package o; import com.google.zxing.FormatException; import java.math.BigInteger; import java.nio.charset.Charset; import java.util.Arrays; /* loaded from: classes2.dex */ final class nxY { private static final BigInteger[] a; private static final char[] c = ";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'".toCharArray(); private static final char[] e = "0123456789&\r\t,:#-.$/+%*=^".toCharArray(); /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public enum RVV { ALPHA, LOWER, MIXED, PUNCT, ALPHA_SHIFT, PUNCT_SHIFT } static { BigInteger[] bigIntegerArr = new BigInteger[16]; a = bigIntegerArr; bigIntegerArr[0] = BigInteger.ONE; BigInteger valueOf = BigInteger.valueOf(900L); bigIntegerArr[1] = valueOf; int i = 2; while (true) { BigInteger[] bigIntegerArr2 = a; if (i >= bigIntegerArr2.length) { return; } bigIntegerArr2[i] = bigIntegerArr2[i - 1].multiply(valueOf); i++; } } /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: Code restructure failed: missing block: B:54:0x00b4, code lost: if (r7 == 924) goto L51; */ /* JADX WARN: Code restructure failed: missing block: B:56:0x00b8, code lost: if (r13 >= r16[0]) goto L55; */ /* JADX WARN: Code restructure failed: missing block: B:58:0x00bc, code lost: if (r16[r13] >= 900) goto L55; */ /* JADX WARN: Code restructure failed: missing block: B:59:0x00be, code lost: r2 = 0; */ /* JADX WARN: Code restructure failed: missing block: B:61:0x00c0, code lost: if (r2 >= 6) goto L126; */ /* JADX WARN: Code restructure failed: missing block: B:62:0x00c2, code lost: r1.b.append((char) (((byte) (r11 >> ((5 - r2) << 3))) & com.google.common.primitives.UnsignedBytes.MAX_VALUE)); r2 = r2 + 1; */ /* JADX WARN: Failed to find 'out' block for switch in B:11:0x0020. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:98:0x0023. Please report as an issue. */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static o.Qys a(int[] r16, java.lang.String r17) throws com.google.zxing.FormatException { /* Method dump skipped, instructions count: 368 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: o.nxY.a(int[], java.lang.String):o.Qys"); } private static int b(int[] iArr, int i, RYc rYc) throws FormatException { int i2; if (i + 2 > iArr[0]) { throw FormatException.c(); } int[] iArr2 = new int[2]; int i3 = 0; while (i3 < 2) { iArr2[i3] = iArr[i]; i3++; i++; } String e2 = e(iArr2, 2); if (!e2.isEmpty()) { try { Integer.parseInt(e2); } catch (NumberFormatException unused) { throw FormatException.c(); } } StringBuilder sb = new StringBuilder(); while (i < iArr[0] && i < iArr.length && (i2 = iArr[i]) != 922 && i2 != 923) { sb.append(String.format("%03d", Integer.valueOf(i2))); i++; } if (sb.length() == 0) { throw FormatException.c(); } rYc.a = sb.toString(); int i4 = iArr[i] == 923 ? i + 1 : -1; while (i < iArr[0]) { int i5 = iArr[i]; if (i5 == 922) { i++; rYc.b = true; } else if (i5 == 923) { switch (iArr[i + 1]) { case 0: i = b(iArr, i + 2, new WFo()); break; case 1: WFo wFo = new WFo(); i = c(iArr, i + 2, wFo); try { Integer.parseInt(wFo.toString()); break; } catch (NumberFormatException unused2) { throw FormatException.c(); } case 2: WFo wFo2 = new WFo(); i = c(iArr, i + 2, wFo2); try { Long.parseLong(wFo2.toString()); break; } catch (NumberFormatException unused3) { throw FormatException.c(); } case 3: i = b(iArr, i + 2, new WFo()); break; case 4: i = b(iArr, i + 2, new WFo()); break; case 5: WFo wFo3 = new WFo(); i = c(iArr, i + 2, wFo3); try { Long.parseLong(wFo3.toString()); break; } catch (NumberFormatException unused4) { throw FormatException.c(); } case 6: WFo wFo4 = new WFo(); i = c(iArr, i + 2, wFo4); try { Integer.parseInt(wFo4.toString()); break; } catch (NumberFormatException unused5) { throw FormatException.c(); } default: throw FormatException.c(); } } else { throw FormatException.c(); } } if (i4 != -1) { int i6 = i - i4; if (rYc.b) { i6--; } if (i6 > 0) { Arrays.copyOfRange(iArr, i4, i6 + i4); } } return i; } /* JADX WARN: Failed to find 'out' block for switch in B:33:0x0035. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:34:0x0038. Please report as an issue. */ private static int b(int[] iArr, int i, WFo wFo) throws FormatException { int i2 = (iArr[0] - i) << 1; int[] iArr2 = new int[i2]; int[] iArr3 = new int[i2]; RVV rvv = RVV.ALPHA; boolean z = false; int i3 = 0; while (i < iArr[0] && !z) { int i4 = i + 1; int i5 = iArr[i]; if (i5 < 900) { iArr2[i3] = i5 / 30; iArr2[i3 + 1] = i5 % 30; i3 += 2; } else if (i5 == 913) { iArr2[i3] = 913; i += 2; iArr3[i3] = iArr[i4]; i3++; } else if (i5 != 927) { if (i5 != 928) { switch (i5) { case 900: iArr2[i3] = 900; i3++; break; case 901: case 902: break; default: switch (i5) { } } } z = true; } else { rvv = e(iArr2, iArr3, i3, wFo, rvv); i += 2; int i6 = iArr[i4]; wFo.c(); EnumC0626KzG c2 = EnumC0626KzG.c(i6); if (c2 == null) { throw FormatException.c(); } wFo.e = Charset.forName(c2.name()); int i7 = iArr[0]; if (i > i7) { throw FormatException.c(); } int i8 = (i7 - i) << 1; iArr2 = new int[i8]; iArr3 = new int[i8]; i3 = 0; } i = i4; } e(iArr2, iArr3, i3, wFo, rvv); return i; } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARN: Failed to find 'out' block for switch in B:42:0x0085. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:4:0x0020. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:55:0x00af. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:65:0x00d9. Please report as an issue. */ /* JADX WARN: Removed duplicated region for block: B:26:0x00e7 A[PHI: r3 r13 0x00e7: PHI (r3v9 o.nxY$RVV) = (r3v1 o.nxY$RVV), (r3v1 o.nxY$RVV), (r3v1 o.nxY$RVV), (r3v11 o.nxY$RVV) binds: [B:65:0x00d9, B:55:0x00af, B:42:0x0085, B:25:0x00f6] A[DONT_GENERATE, DONT_INLINE] 0x00e7: PHI (r13v4 char) = (r13v0 char), (r13v0 char), (r13v0 char), (r13v5 char) binds: [B:65:0x00d9, B:55:0x00af, B:42:0x0085, B:25:0x00f6] A[DONT_GENERATE, DONT_INLINE]] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static o.nxY.RVV e(int[] r15, int[] r16, int r17, o.WFo r18, o.nxY.RVV r19) { /* Method dump skipped, instructions count: 330 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: o.nxY.e(int[], int[], int, o.WFo, o.nxY$RVV):o.nxY$RVV"); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.nxY$2, reason: invalid class name */ /* loaded from: classes2.dex */ public static /* synthetic */ class AnonymousClass2 { static final int[] c; static { int[] iArr = new int[RVV.values().length]; c = iArr; try { iArr[RVV.ALPHA.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { c[RVV.LOWER.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { c[RVV.MIXED.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { c[RVV.PUNCT.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } try { c[RVV.ALPHA_SHIFT.ordinal()] = 5; } catch (NoSuchFieldError unused5) { } try { c[RVV.PUNCT_SHIFT.ordinal()] = 6; } catch (NoSuchFieldError unused6) { } } } /* JADX WARN: Code restructure failed: missing block: B:20:0x003e, code lost: r10.b.append(e(r0, r3)); r3 = 0; */ /* JADX WARN: Removed duplicated region for block: B:14:0x0036 */ /* JADX WARN: Removed duplicated region for block: B:26:0x003c A[ADDED_TO_REGION, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static int c(int[] r8, int r9, o.WFo r10) throws com.google.zxing.FormatException { /* r0 = 15 int[] r0 = new int[r0] r1 = 0 r2 = r1 r3 = r2 L7: r4 = r8[r1] if (r9 >= r4) goto L49 if (r2 != 0) goto L49 int r5 = r9 + 1 r6 = r8[r9] r7 = 1 if (r5 != r4) goto L15 r2 = r7 L15: r4 = 900(0x384, float:1.261E-42) if (r6 >= r4) goto L1e r0[r3] = r6 int r3 = r3 + 1 goto L2f L1e: if (r6 == r4) goto L31 r4 = 901(0x385, float:1.263E-42) if (r6 == r4) goto L31 r4 = 927(0x39f, float:1.299E-42) if (r6 == r4) goto L31 r4 = 928(0x3a0, float:1.3E-42) if (r6 == r4) goto L31 switch(r6) { case 922: goto L31; case 923: goto L31; case 924: goto L31; default: goto L2f; } L2f: r9 = r5 goto L32 L31: r2 = r7 L32: int r4 = r3 % 15 if (r4 == 0) goto L3c r4 = 902(0x386, float:1.264E-42) if (r6 == r4) goto L3c if (r2 == 0) goto L7 L3c: if (r3 <= 0) goto L7 java.lang.String r3 = e(r0, r3) java.lang.StringBuilder r4 = r10.b r4.append(r3) r3 = r1 goto L7 L49: return r9 */ throw new UnsupportedOperationException("Method not decompiled: o.nxY.c(int[], int, o.WFo):int"); } private static String e(int[] iArr, int i) throws FormatException { BigInteger bigInteger = BigInteger.ZERO; for (int i2 = 0; i2 < i; i2++) { bigInteger = bigInteger.add(a[(i - i2) - 1].multiply(BigInteger.valueOf(iArr[i2]))); } String obj = bigInteger.toString(); if (obj.charAt(0) != '1') { throw FormatException.c(); } return obj.substring(1); } }