- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
337 lines
11 KiB
Java
337 lines
11 KiB
Java
package com.applovin.impl;
|
|
|
|
import com.applovin.impl.f9;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
|
|
import com.vungle.ads.internal.protos.Sdk;
|
|
import java.nio.ByteBuffer;
|
|
import org.apache.http.HttpStatus;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class k {
|
|
private static final int[] a = {1, 2, 3, 6};
|
|
private static final int[] b = {48000, 44100, 32000};
|
|
private static final int[] c = {24000, 22050, 16000};
|
|
private static final int[] d = {2, 1, 2, 3, 3, 4, 4, 5};
|
|
private static final int[] e = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, PsExtractor.AUDIO_STREAM, 224, 256, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 384, 448, 512, 576, 640};
|
|
private static final int[] f = {69, 87, 104, 121, 139, 174, 208, 243, 278, 348, HttpStatus.SC_EXPECTATION_FAILED, 487, 557, 696, 835, 975, 1114, 1253, 1393};
|
|
|
|
public static final class b {
|
|
public final String a;
|
|
public final int b;
|
|
public final int c;
|
|
public final int d;
|
|
public final int e;
|
|
public final int f;
|
|
|
|
private b(String str, int i, int i2, int i3, int i4, int i5) {
|
|
this.a = str;
|
|
this.b = i;
|
|
this.d = i2;
|
|
this.c = i3;
|
|
this.e = i4;
|
|
this.f = i5;
|
|
}
|
|
}
|
|
|
|
public static int b(ByteBuffer byteBuffer) {
|
|
if (((byteBuffer.get(byteBuffer.position() + 5) & 248) >> 3) > 10) {
|
|
return a[((byteBuffer.get(byteBuffer.position() + 4) & 192) >> 6) != 3 ? (byteBuffer.get(byteBuffer.position() + 4) & 48) >> 4 : 3] * 256;
|
|
}
|
|
return 1536;
|
|
}
|
|
|
|
public static int a(ByteBuffer byteBuffer) {
|
|
int position = byteBuffer.position();
|
|
int limit = byteBuffer.limit() - 10;
|
|
for (int i = position; i <= limit; i++) {
|
|
if ((xp.a(byteBuffer, i + 4) & (-2)) == -126718022) {
|
|
return i - position;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public static f9 b(bh bhVar, String str, String str2, y6 y6Var) {
|
|
bhVar.g(2);
|
|
int i = b[(bhVar.w() & PsExtractor.AUDIO_STREAM) >> 6];
|
|
int w = bhVar.w();
|
|
int i2 = d[(w & 14) >> 1];
|
|
if ((w & 1) != 0) {
|
|
i2++;
|
|
}
|
|
if (((bhVar.w() & 30) >> 1) > 0 && (2 & bhVar.w()) != 0) {
|
|
i2 += 2;
|
|
}
|
|
return new f9.b().c(str).f((bhVar.a() <= 0 || (bhVar.w() & 1) == 0) ? MimeTypes.AUDIO_E_AC3 : MimeTypes.AUDIO_E_AC3_JOC).c(i2).n(i).a(y6Var).e(str2).a();
|
|
}
|
|
|
|
private static int a(int i, int i2) {
|
|
int i3 = i2 / 2;
|
|
if (i < 0) {
|
|
return -1;
|
|
}
|
|
int[] iArr = b;
|
|
if (i >= iArr.length || i2 < 0) {
|
|
return -1;
|
|
}
|
|
int[] iArr2 = f;
|
|
if (i3 >= iArr2.length) {
|
|
return -1;
|
|
}
|
|
int i4 = iArr[i];
|
|
if (i4 == 44100) {
|
|
return (iArr2[i3] + (i2 % 2)) * 2;
|
|
}
|
|
int i5 = e[i3];
|
|
return i4 == 32000 ? i5 * 6 : i5 * 4;
|
|
}
|
|
|
|
public static f9 a(bh bhVar, String str, String str2, y6 y6Var) {
|
|
int i = b[(bhVar.w() & PsExtractor.AUDIO_STREAM) >> 6];
|
|
int w = bhVar.w();
|
|
int i2 = d[(w & 56) >> 3];
|
|
if ((w & 4) != 0) {
|
|
i2++;
|
|
}
|
|
return new f9.b().c(str).f(MimeTypes.AUDIO_AC3).c(i2).n(i).a(y6Var).e(str2).a();
|
|
}
|
|
|
|
public static int b(byte[] bArr) {
|
|
if (bArr[4] == -8 && bArr[5] == 114 && bArr[6] == 111) {
|
|
byte b2 = bArr[7];
|
|
if ((b2 & 254) == 186) {
|
|
return 40 << ((bArr[(b2 & 255) == 187 ? '\t' : '\b'] >> 4) & 7);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public static b a(ah ahVar) {
|
|
int a2;
|
|
int i;
|
|
int i2;
|
|
int i3;
|
|
int i4;
|
|
String str;
|
|
int a3;
|
|
int i5;
|
|
int i6;
|
|
int i7;
|
|
int i8;
|
|
int e2 = ahVar.e();
|
|
ahVar.d(40);
|
|
boolean z = ahVar.a(5) > 10;
|
|
ahVar.c(e2);
|
|
int i9 = -1;
|
|
if (z) {
|
|
ahVar.d(16);
|
|
int a4 = ahVar.a(2);
|
|
if (a4 == 0) {
|
|
i9 = 0;
|
|
} else if (a4 == 1) {
|
|
i9 = 1;
|
|
} else if (a4 == 2) {
|
|
i9 = 2;
|
|
}
|
|
ahVar.d(3);
|
|
a2 = (ahVar.a(11) + 1) * 2;
|
|
int a5 = ahVar.a(2);
|
|
if (a5 == 3) {
|
|
i = c[ahVar.a(2)];
|
|
i5 = 6;
|
|
a3 = 3;
|
|
} else {
|
|
a3 = ahVar.a(2);
|
|
i5 = a[a3];
|
|
i = b[a5];
|
|
}
|
|
i3 = i5 * 256;
|
|
int a6 = ahVar.a(3);
|
|
boolean f2 = ahVar.f();
|
|
i2 = d[a6] + (f2 ? 1 : 0);
|
|
ahVar.d(10);
|
|
if (ahVar.f()) {
|
|
ahVar.d(8);
|
|
}
|
|
if (a6 == 0) {
|
|
ahVar.d(5);
|
|
if (ahVar.f()) {
|
|
ahVar.d(8);
|
|
}
|
|
}
|
|
if (i9 == 1 && ahVar.f()) {
|
|
ahVar.d(16);
|
|
}
|
|
if (ahVar.f()) {
|
|
if (a6 > 2) {
|
|
ahVar.d(2);
|
|
}
|
|
if ((a6 & 1) == 0 || a6 <= 2) {
|
|
i7 = 6;
|
|
} else {
|
|
i7 = 6;
|
|
ahVar.d(6);
|
|
}
|
|
if ((a6 & 4) != 0) {
|
|
ahVar.d(i7);
|
|
}
|
|
if (f2 && ahVar.f()) {
|
|
ahVar.d(5);
|
|
}
|
|
if (i9 == 0) {
|
|
if (ahVar.f()) {
|
|
i8 = 6;
|
|
ahVar.d(6);
|
|
} else {
|
|
i8 = 6;
|
|
}
|
|
if (a6 == 0 && ahVar.f()) {
|
|
ahVar.d(i8);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(i8);
|
|
}
|
|
int a7 = ahVar.a(2);
|
|
if (a7 == 1) {
|
|
ahVar.d(5);
|
|
} else if (a7 == 2) {
|
|
ahVar.d(12);
|
|
} else if (a7 == 3) {
|
|
int a8 = ahVar.a(5);
|
|
if (ahVar.f()) {
|
|
ahVar.d(5);
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(4);
|
|
}
|
|
}
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(5);
|
|
if (ahVar.f()) {
|
|
ahVar.d(7);
|
|
if (ahVar.f()) {
|
|
ahVar.d(8);
|
|
}
|
|
}
|
|
}
|
|
ahVar.d((a8 + 2) * 8);
|
|
ahVar.c();
|
|
}
|
|
if (a6 < 2) {
|
|
if (ahVar.f()) {
|
|
ahVar.d(14);
|
|
}
|
|
if (a6 == 0 && ahVar.f()) {
|
|
ahVar.d(14);
|
|
}
|
|
}
|
|
if (ahVar.f()) {
|
|
if (a3 == 0) {
|
|
ahVar.d(5);
|
|
} else {
|
|
for (int i10 = 0; i10 < i5; i10++) {
|
|
if (ahVar.f()) {
|
|
ahVar.d(5);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(5);
|
|
if (a6 == 2) {
|
|
ahVar.d(4);
|
|
}
|
|
if (a6 >= 6) {
|
|
ahVar.d(2);
|
|
}
|
|
if (ahVar.f()) {
|
|
ahVar.d(8);
|
|
}
|
|
if (a6 == 0 && ahVar.f()) {
|
|
ahVar.d(8);
|
|
}
|
|
if (a5 < 3) {
|
|
ahVar.g();
|
|
}
|
|
}
|
|
if (i9 == 0 && a3 != 3) {
|
|
ahVar.g();
|
|
}
|
|
if (i9 == 2 && (a3 == 3 || ahVar.f())) {
|
|
i6 = 6;
|
|
ahVar.d(6);
|
|
} else {
|
|
i6 = 6;
|
|
}
|
|
str = (ahVar.f() && ahVar.a(i6) == 1 && ahVar.a(8) == 1) ? MimeTypes.AUDIO_E_AC3_JOC : MimeTypes.AUDIO_E_AC3;
|
|
i4 = i9;
|
|
} else {
|
|
ahVar.d(32);
|
|
int a9 = ahVar.a(2);
|
|
String str2 = a9 == 3 ? null : MimeTypes.AUDIO_AC3;
|
|
a2 = a(a9, ahVar.a(6));
|
|
ahVar.d(8);
|
|
int a10 = ahVar.a(3);
|
|
if ((a10 & 1) != 0 && a10 != 1) {
|
|
ahVar.d(2);
|
|
}
|
|
if ((a10 & 4) != 0) {
|
|
ahVar.d(2);
|
|
}
|
|
if (a10 == 2) {
|
|
ahVar.d(2);
|
|
}
|
|
int[] iArr = b;
|
|
i = a9 < iArr.length ? iArr[a9] : -1;
|
|
i2 = d[a10] + (ahVar.f() ? 1 : 0);
|
|
i3 = 1536;
|
|
i4 = -1;
|
|
str = str2;
|
|
}
|
|
return new b(str, i4, i2, i, a2, i3);
|
|
}
|
|
|
|
public static int a(byte[] bArr) {
|
|
if (bArr.length < 6) {
|
|
return -1;
|
|
}
|
|
if (((bArr[5] & 248) >> 3) > 10) {
|
|
return (((bArr[3] & 255) | ((bArr[2] & 7) << 8)) + 1) * 2;
|
|
}
|
|
byte b2 = bArr[4];
|
|
return a((b2 & 192) >> 6, b2 & 63);
|
|
}
|
|
|
|
public static int a(ByteBuffer byteBuffer, int i) {
|
|
return 40 << ((byteBuffer.get((byteBuffer.position() + i) + ((byteBuffer.get((byteBuffer.position() + i) + 7) & 255) == 187 ? 9 : 8)) >> 4) & 7);
|
|
}
|
|
}
|