package com.google.android.gms.vision; import android.content.Context; import android.graphics.Color; import android.text.TextUtils; import android.util.Pair; import android.view.ViewConfiguration; import com.google.common.base.Ascii; import java.io.File; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import net.sf.scuba.smartcards.ISO7816; import o.jTb; import o.zUI; import org.bouncycastle.crypto.tls.CipherSuite; /* loaded from: classes2.dex */ public class EngineManager { private static char a; private static char b; private static char c; private static char d; private static int e; private static final ConcurrentMap, EngineManager> zzai; private final String zzaj; private static final byte[] j = {75, ISO7816.INS_UPDATE_RECORD, 11, 77, -1, -3, 12, Ascii.SUB, -27, 9, -14, 19, -15, -5}; private static final int h = CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA; public static EngineManager zza(String str, String str2) { Pair create = Pair.create(str, str2); ConcurrentMap, EngineManager> concurrentMap = zzai; if (concurrentMap.get(create) != null) { return concurrentMap.get(create); } concurrentMap.putIfAbsent(create, new EngineManager(str, str2)); return concurrentMap.get(create); } private EngineManager(String str, String str2) { str2 = str2.startsWith("lib") ? str2.substring(3) : str2; Object[] objArr = new Object[1]; f((-16777213) - Color.rgb(0, 0, 0), (ViewConfiguration.getWindowTouchSlop() >> 8) + 1, 162 - TextUtils.indexOf("", ""), new char[]{21, 65492, 25}, false, objArr); this.zzaj = str2.endsWith((String) objArr[0]) ? str2.substring(0, str2.length() - 3) : str2; } public final boolean zza(Context context) { synchronized (this) { c(this.zzaj); } return true; } public final void zzb(Context context) { synchronized (this) { throw new UnsupportedOperationException("SDK might not contain correct files, please re-download."); } } public static File zzc(Context context) { return new File("assets/"); } static { b(); zzai = new ConcurrentHashMap(); } private static void g(char[] cArr, int i, Object[] objArr) { jTb jtb = new jTb(); char[] cArr2 = new char[cArr.length]; jtb.b = 0; char[] cArr3 = new char[2]; while (jtb.b < cArr.length) { cArr3[0] = cArr[jtb.b]; cArr3[1] = cArr[jtb.b + 1]; int i2 = 58224; for (int i3 = 0; i3 < 16; i3++) { char c2 = cArr3[1]; char c3 = cArr3[0]; char c4 = (char) (c2 - (((c3 + i2) ^ ((c3 << 4) + ((char) (a ^ 41718355337583039L)))) ^ ((c3 >>> 5) + ((char) (b ^ 41718355337583039L))))); cArr3[1] = c4; cArr3[0] = (char) (c3 - (((c4 >>> 5) + ((char) (c ^ 41718355337583039L))) ^ ((c4 + i2) ^ ((c4 << 4) + ((char) (d ^ 41718355337583039L)))))); i2 -= 40503; } cArr2[jtb.b] = cArr3[0]; cArr2[jtb.b + 1] = cArr3[1]; jtb.b += 2; } objArr[0] = new String(cArr2, 0, i); } private static void f(int i, int i2, int i3, char[] cArr, boolean z, Object[] objArr) { zUI zui = new zUI(); char[] cArr2 = new char[i]; zui.d = 0; while (zui.d < i) { zui.c = cArr[zui.d]; cArr2[zui.d] = (char) (zui.c + i3); int i4 = zui.d; cArr2[i4] = (char) (cArr2[i4] - ((int) (e ^ 2848453412581051943L))); zui.d++; } if (i2 > 0) { zui.a = i2; char[] cArr3 = new char[i]; System.arraycopy(cArr2, 0, cArr3, 0, i); System.arraycopy(cArr3, 0, cArr2, i - zui.a, zui.a); System.arraycopy(cArr3, zui.a, cArr2, 0, i - zui.a); } if (z) { char[] cArr4 = new char[i]; zui.d = 0; while (zui.d < i) { cArr4[zui.d] = cArr2[(i - zui.d) - 1]; zui.d++; } cArr2 = cArr4; } objArr[0] = new String(cArr2); } /* JADX WARN: Removed duplicated region for block: B:10:0x002b */ /* JADX WARN: Removed duplicated region for block: B:7:0x0022 */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x002b -> B:4:0x002d). Please report as a decompilation issue!!! */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static void i(byte r5, byte r6, byte r7, java.lang.Object[] r8) { /* int r7 = r7 * 2 int r7 = r7 + 4 int r6 = r6 * 2 int r6 = r6 + 102 byte[] r0 = com.google.android.gms.vision.EngineManager.j int r5 = r5 * 4 int r1 = 11 - r5 byte[] r1 = new byte[r1] int r5 = 10 - r5 r2 = -1 if (r0 != 0) goto L18 r3 = r5 r6 = r7 goto L2d L18: r4 = r7 r7 = r6 r6 = r4 L1b: int r2 = r2 + 1 byte r3 = (byte) r7 r1[r2] = r3 if (r2 != r5) goto L2b java.lang.String r5 = new java.lang.String r6 = 0 r5.(r1, r6) r8[r6] = r5 return L2b: r3 = r0[r6] L2d: int r3 = -r3 int r7 = r7 + r3 int r6 = r6 + 1 int r7 = r7 + 2 goto L1b */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.vision.EngineManager.i(byte, byte, byte, java.lang.Object[]):void"); } static void b() { e = 2015661679; d = (char) 41390; c = (char) 45959; a = (char) 58256; b = (char) 48822; } /* JADX WARN: Can't wrap try/catch for region: R(31:288|289|290|291|(17:293|294|295|296|297|298|299|256|257|258|259|260|261|262|263|265|51)|319|320|321|322|323|324|325|326|327|328|329|330|332|333|334|70c|352|257|258|259|260|261|262|263|265|51) */ /* JADX WARN: Code restructure failed: missing block: B:382:0x07c4, code lost: r0 = e; */ /* JADX WARN: Code restructure failed: missing block: B:383:0x07c5, code lost: r9 = 0; r12 = 10; */ /* JADX WARN: Multi-variable type inference failed */ /* JADX WARN: Removed duplicated region for block: B:171:0x0496 A[EXC_TOP_SPLITTER, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:368:0x07be A[Catch: all -> 0x07c0, TryCatch #18 {all -> 0x07c0, blocks: (B:361:0x07a1, B:362:0x07a6, B:366:0x07b7, B:368:0x07be, B:369:0x07bf), top: B:334:0x070c }] */ /* JADX WARN: Removed duplicated region for block: B:369:0x07bf A[Catch: all -> 0x07c0, TRY_LEAVE, TryCatch #18 {all -> 0x07c0, blocks: (B:361:0x07a1, B:362:0x07a6, B:366:0x07b7, B:368:0x07be, B:369:0x07bf), top: B:334:0x070c }] */ /* JADX WARN: Removed duplicated region for block: B:390:0x07e6 A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:391:0x07e7 A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:437:0x081e A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:438:0x081f A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:48:0x08eb A[SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:502:0x087c A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:503:0x087d A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:50:0x08e0 A[SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:551:0x08a7 A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Removed duplicated region for block: B:552:0x08a8 A[Catch: Exception -> 0x08d1, TryCatch #63 {Exception -> 0x08d1, blocks: (B:357:0x07c2, B:358:0x07c3, B:388:0x07df, B:390:0x07e6, B:391:0x07e7, B:404:0x07e9, B:406:0x07f5, B:407:0x07f6, B:424:0x07fe, B:426:0x0808, B:427:0x0809, B:435:0x0814, B:437:0x081e, B:438:0x081f, B:453:0x082b, B:455:0x0835, B:456:0x0836, B:474:0x0842, B:476:0x084c, B:477:0x084d, B:490:0x085a, B:492:0x0864, B:493:0x0865, B:500:0x0874, B:502:0x087c, B:503:0x087d, B:515:0x0887, B:517:0x0891, B:518:0x0892, B:549:0x089d, B:551:0x08a7, B:552:0x08a8, B:566:0x08b9, B:568:0x08c1, B:569:0x08c2, B:572:0x08c4, B:574:0x08cf, B:575:0x08d0, B:16:0x00c6, B:320:0x06d6), top: B:15:0x00c6, inners: #21, #35 }] */ /* JADX WARN: Type inference failed for: r12v10 */ /* JADX WARN: Type inference failed for: r12v110 */ /* JADX WARN: Type inference failed for: r12v111 */ /* JADX WARN: Type inference failed for: r12v13, types: [java.lang.reflect.Constructor] */ /* JADX WARN: Type inference failed for: r12v16 */ /* JADX WARN: Type inference failed for: r12v2 */ /* JADX WARN: Type inference failed for: r12v3 */ /* JADX WARN: Type inference failed for: r12v62 */ /* JADX WARN: Type inference failed for: r12v63 */ /* JADX WARN: Type inference failed for: r12v64 */ /* JADX WARN: Type inference failed for: r12v7 */ /* JADX WARN: Type inference failed for: r12v71 */ /* JADX WARN: Type inference failed for: r12v8 */ /* JADX WARN: Type inference failed for: r12v87, types: [int] */ /* JADX WARN: Type inference failed for: r12v9, types: [char[]] */ /* JADX WARN: Type inference failed for: r9v1 */ /* JADX WARN: Type inference failed for: r9v10 */ /* JADX WARN: Type inference failed for: r9v107, types: [java.lang.String] */ /* JADX WARN: Type inference failed for: r9v152 */ /* JADX WARN: Type inference failed for: r9v2 */ /* JADX WARN: Type inference failed for: r9v3 */ /* JADX WARN: Type inference failed for: r9v4 */ /* JADX WARN: Type inference failed for: r9v57, types: [java.io.InputStream] */ /* JADX WARN: Type inference failed for: r9v6 */ /* JADX WARN: Type inference failed for: r9v66 */ /* JADX WARN: Type inference failed for: r9v67 */ /* JADX WARN: Type inference failed for: r9v76 */ /* JADX WARN: Type inference failed for: r9v8 */ /* JADX WARN: Type inference failed for: r9v9 */ /* JADX WARN: Unreachable blocks removed: 2, instructions: 2 */ /* JADX WARN: Unreachable blocks removed: 2, instructions: 4 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static void c(java.lang.String r34) { /* Method dump skipped, instructions count: 2614 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.vision.EngineManager.c(java.lang.String):void"); } }