discord-jadx/app/src/main/java/r6/h.java
2022-04-15 08:15:37 +00:00

105 lines
2.7 KiB
Java

package r6;
import f6.c0;
import f8.p0;
import f8.r;
import f8.y;
import l6.y;
import l6.z;
/* compiled from: VbriSeeker.java */
/* loaded from: classes4.dex */
final class h implements g {
/* renamed from: a reason: collision with root package name */
private final long[] f21489a;
/* renamed from: b reason: collision with root package name */
private final long[] f21490b;
/* renamed from: c reason: collision with root package name */
private final long f21491c;
/* renamed from: d reason: collision with root package name */
private final long f21492d;
private h(long[] jArr, long[] jArr2, long j10, long j11) {
this.f21489a = jArr;
this.f21490b = jArr2;
this.f21491c = j10;
this.f21492d = j11;
}
public static h b(long j10, long j11, c0.a aVar, y yVar) {
int i10;
yVar.Q(10);
int n10 = yVar.n();
if (n10 <= 0) {
return null;
}
int i11 = aVar.f11022d;
long I0 = p0.I0(n10, 1000000 * (i11 >= 32000 ? 1152 : 576), i11);
int J = yVar.J();
int J2 = yVar.J();
int J3 = yVar.J();
yVar.Q(2);
long j12 = j11 + aVar.f11021c;
long[] jArr = new long[J];
long[] jArr2 = new long[J];
int i12 = 0;
long j13 = j11;
while (i12 < J) {
jArr[i12] = (i12 * I0) / J;
jArr2[i12] = Math.max(j13, j12);
if (J3 == 1) {
i10 = yVar.D();
} else if (J3 == 2) {
i10 = yVar.J();
} else if (J3 == 3) {
i10 = yVar.G();
} else if (J3 != 4) {
return null;
} else {
i10 = yVar.H();
}
j13 += i10 * J2;
i12++;
j12 = j12;
J2 = J2;
}
if (!(j10 == -1 || j10 == j13)) {
r.h("VbriSeeker", "VBRI data size mismatch: " + j10 + ", " + j13);
}
return new h(jArr, jArr2, I0, j13);
}
@Override // r6.g
public long a(long j10) {
return this.f21489a[p0.i(this.f21490b, j10, true, true)];
}
@Override // r6.g
public long d() {
return this.f21492d;
}
@Override // l6.y
public boolean e() {
return true;
}
@Override // l6.y
public y.a h(long j10) {
int i10 = p0.i(this.f21489a, j10, true, true);
z zVar = new z(this.f21489a[i10], this.f21490b[i10]);
if (zVar.f16523a >= j10 || i10 == this.f21489a.length - 1) {
return new y.a(zVar);
}
int i11 = i10 + 1;
return new y.a(zVar, new z(this.f21489a[i11], this.f21490b[i11]));
}
@Override // l6.y
public long i() {
return this.f21491c;
}
}