package com.google.zxing.oned; import com.google.zxing.NotFoundException; import com.google.zxing.common.BitArray; /* loaded from: classes.dex */ public final class Code128Reader extends OneDReader { static final int[][] a = {new int[]{2, 1, 2, 2, 2, 2}, new int[]{2, 2, 2, 1, 2, 2}, new int[]{2, 2, 2, 2, 2, 1}, new int[]{1, 2, 1, 2, 2, 3}, new int[]{1, 2, 1, 3, 2, 2}, new int[]{1, 3, 1, 2, 2, 2}, new int[]{1, 2, 2, 2, 1, 3}, new int[]{1, 2, 2, 3, 1, 2}, new int[]{1, 3, 2, 2, 1, 2}, new int[]{2, 2, 1, 2, 1, 3}, new int[]{2, 2, 1, 3, 1, 2}, new int[]{2, 3, 1, 2, 1, 2}, new int[]{1, 1, 2, 2, 3, 2}, new int[]{1, 2, 2, 1, 3, 2}, new int[]{1, 2, 2, 2, 3, 1}, new int[]{1, 1, 3, 2, 2, 2}, new int[]{1, 2, 3, 1, 2, 2}, new int[]{1, 2, 3, 2, 2, 1}, new int[]{2, 2, 3, 2, 1, 1}, new int[]{2, 2, 1, 1, 3, 2}, new int[]{2, 2, 1, 2, 3, 1}, new int[]{2, 1, 3, 2, 1, 2}, new int[]{2, 2, 3, 1, 1, 2}, new int[]{3, 1, 2, 1, 3, 1}, new int[]{3, 1, 1, 2, 2, 2}, new int[]{3, 2, 1, 1, 2, 2}, new int[]{3, 2, 1, 2, 2, 1}, new int[]{3, 1, 2, 2, 1, 2}, new int[]{3, 2, 2, 1, 1, 2}, new int[]{3, 2, 2, 2, 1, 1}, new int[]{2, 1, 2, 1, 2, 3}, new int[]{2, 1, 2, 3, 2, 1}, new int[]{2, 3, 2, 1, 2, 1}, new int[]{1, 1, 1, 3, 2, 3}, new int[]{1, 3, 1, 1, 2, 3}, new int[]{1, 3, 1, 3, 2, 1}, new int[]{1, 1, 2, 3, 1, 3}, new int[]{1, 3, 2, 1, 1, 3}, new int[]{1, 3, 2, 3, 1, 1}, new int[]{2, 1, 1, 3, 1, 3}, new int[]{2, 3, 1, 1, 1, 3}, new int[]{2, 3, 1, 3, 1, 1}, new int[]{1, 1, 2, 1, 3, 3}, new int[]{1, 1, 2, 3, 3, 1}, new int[]{1, 3, 2, 1, 3, 1}, new int[]{1, 1, 3, 1, 2, 3}, new int[]{1, 1, 3, 3, 2, 1}, new int[]{1, 3, 3, 1, 2, 1}, new int[]{3, 1, 3, 1, 2, 1}, new int[]{2, 1, 1, 3, 3, 1}, new int[]{2, 3, 1, 1, 3, 1}, new int[]{2, 1, 3, 1, 1, 3}, new int[]{2, 1, 3, 3, 1, 1}, new int[]{2, 1, 3, 1, 3, 1}, new int[]{3, 1, 1, 1, 2, 3}, new int[]{3, 1, 1, 3, 2, 1}, new int[]{3, 3, 1, 1, 2, 1}, new int[]{3, 1, 2, 1, 1, 3}, new int[]{3, 1, 2, 3, 1, 1}, new int[]{3, 3, 2, 1, 1, 1}, new int[]{3, 1, 4, 1, 1, 1}, new int[]{2, 2, 1, 4, 1, 1}, new int[]{4, 3, 1, 1, 1, 1}, new int[]{1, 1, 1, 2, 2, 4}, new int[]{1, 1, 1, 4, 2, 2}, new int[]{1, 2, 1, 1, 2, 4}, new int[]{1, 2, 1, 4, 2, 1}, new int[]{1, 4, 1, 1, 2, 2}, new int[]{1, 4, 1, 2, 2, 1}, new int[]{1, 1, 2, 2, 1, 4}, new int[]{1, 1, 2, 4, 1, 2}, new int[]{1, 2, 2, 1, 1, 4}, new int[]{1, 2, 2, 4, 1, 1}, new int[]{1, 4, 2, 1, 1, 2}, new int[]{1, 4, 2, 2, 1, 1}, new int[]{2, 4, 1, 2, 1, 1}, new int[]{2, 2, 1, 1, 1, 4}, new int[]{4, 1, 3, 1, 1, 1}, new int[]{2, 4, 1, 1, 1, 2}, new int[]{1, 3, 4, 1, 1, 1}, new int[]{1, 1, 1, 2, 4, 2}, new int[]{1, 2, 1, 1, 4, 2}, new int[]{1, 2, 1, 2, 4, 1}, new int[]{1, 1, 4, 2, 1, 2}, new int[]{1, 2, 4, 1, 1, 2}, new int[]{1, 2, 4, 2, 1, 1}, new int[]{4, 1, 1, 2, 1, 2}, new int[]{4, 2, 1, 1, 1, 2}, new int[]{4, 2, 1, 2, 1, 1}, new int[]{2, 1, 2, 1, 4, 1}, new int[]{2, 1, 4, 1, 2, 1}, new int[]{4, 1, 2, 1, 2, 1}, new int[]{1, 1, 1, 1, 4, 3}, new int[]{1, 1, 1, 3, 4, 1}, new int[]{1, 3, 1, 1, 4, 1}, new int[]{1, 1, 4, 1, 1, 3}, new int[]{1, 1, 4, 3, 1, 1}, new int[]{4, 1, 1, 1, 1, 3}, new int[]{4, 1, 1, 3, 1, 1}, new int[]{1, 1, 3, 1, 4, 1}, new int[]{1, 1, 4, 1, 3, 1}, new int[]{3, 1, 1, 1, 4, 1}, new int[]{4, 1, 1, 1, 3, 1}, new int[]{2, 1, 1, 4, 1, 2}, new int[]{2, 1, 1, 2, 1, 4}, new int[]{2, 1, 1, 2, 3, 2}, new int[]{2, 3, 3, 1, 1, 1, 2}}; private static int[] a(BitArray bitArray) throws NotFoundException { int h = bitArray.h(); int b = bitArray.b(0); int[] iArr = new int[6]; int i = b; boolean z = false; int i2 = 0; while (b < h) { if (bitArray.a(b) != z) { iArr[i2] = iArr[i2] + 1; } else { if (i2 == 5) { float f = 0.25f; int i3 = -1; for (int i4 = 103; i4 <= 105; i4++) { float a2 = OneDReader.a(iArr, a[i4], 0.7f); if (a2 < f) { i3 = i4; f = a2; } } if (i3 >= 0 && bitArray.a(Math.max(0, i - ((b - i) / 2)), i, false)) { return new int[]{i, b, i3}; } i += iArr[0] + iArr[1]; int i5 = i2 - 1; System.arraycopy(iArr, 2, iArr, 0, i5); iArr[i5] = 0; iArr[i2] = 0; i2--; } else { i2++; } iArr[i2] = 1; z = !z; } b++; } throw NotFoundException.getNotFoundInstance(); } private static int a(BitArray bitArray, int[] iArr, int i) throws NotFoundException { OneDReader.a(bitArray, i, iArr); float f = 0.25f; int i2 = -1; int i3 = 0; while (true) { int[][] iArr2 = a; if (i3 >= iArr2.length) { break; } float a2 = OneDReader.a(iArr, iArr2[i3], 0.7f); if (a2 < f) { i2 = i3; f = a2; } i3++; } if (i2 >= 0) { return i2; } throw NotFoundException.getNotFoundInstance(); } /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */ /* JADX WARN: Code restructure failed: missing block: B:64:0x00e1, code lost: if (r5 != false) goto L82; */ /* JADX WARN: Code restructure failed: missing block: B:65:0x0135, code lost: r5 = false; r11 = false; */ /* JADX WARN: Code restructure failed: missing block: B:93:0x0133, code lost: if (r5 != false) goto L82; */ /* JADX WARN: Failed to find 'out' block for switch in B:54:0x00c1. Please report as an issue. */ /* JADX WARN: Failed to find 'out' block for switch in B:83:0x010e. Please report as an issue. */ /* JADX WARN: Removed duplicated region for block: B:14:0x0057 */ /* JADX WARN: Removed duplicated region for block: B:72:0x013f A[PHI: r19 0x013f: PHI (r19v9 boolean) = (r19v5 boolean), (r19v17 boolean) binds: [B:83:0x010e, B:54:0x00c1] A[DONT_GENERATE, DONT_INLINE]] */ /* JADX WARN: Removed duplicated region for block: B:73:0x0149 A[PHI: r6 r19 0x0149: PHI (r6v10 boolean) = (r6v2 boolean) (r6v2 boolean) (r6v2 boolean) (r6v2 boolean) (r6v9 boolean) (r6v2 boolean) (r6v2 boolean) (r6v2 boolean) (r6v2 boolean) binds: [B:83:0x010e, B:84:0x0112, B:88:0x011e, B:87:0x011a, B:74:0x0148, B:54:0x00c1, B:55:0x00c6, B:59:0x00d3, B:58:0x00ce] A[DONT_GENERATE, DONT_INLINE] 0x0149: PHI (r19v8 boolean) = (r19v5 boolean) (r19v5 boolean) (r19v5 boolean) (r19v5 boolean) (r19v7 boolean) (r19v17 boolean) (r19v17 boolean) (r19v17 boolean) (r19v17 boolean) binds: [B:83:0x010e, B:84:0x0112, B:88:0x011e, B:87:0x011a, B:74:0x0148, B:54:0x00c1, B:55:0x00c6, B:59:0x00d3, B:58:0x00ce] A[DONT_GENERATE, DONT_INLINE]] */ @Override // com.google.zxing.oned.OneDReader /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public com.google.zxing.Result a(int r25, com.google.zxing.common.BitArray r26, java.util.Map r27) throws com.google.zxing.NotFoundException, com.google.zxing.FormatException, com.google.zxing.ChecksumException { /* Method dump skipped, instructions count: 646 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: com.google.zxing.oned.Code128Reader.a(int, com.google.zxing.common.BitArray, java.util.Map):com.google.zxing.Result"); } }