271 lines
9.7 KiB
Java
271 lines
9.7 KiB
Java
|
package o;
|
||
|
|
||
|
import com.google.common.primitives.UnsignedBytes;
|
||
|
import com.google.zxing.ChecksumException;
|
||
|
import com.google.zxing.FormatException;
|
||
|
import com.google.zxing.common.reedsolomon.ReedSolomonException;
|
||
|
import java.util.Map;
|
||
|
import o.C0480Hnn;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class CXS {
|
||
|
private final lxg e = new lxg(Ayo.i);
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:12:0x0015 A[Catch: ChecksumException | FormatException -> 0x006e, TryCatch #2 {ChecksumException | FormatException -> 0x006e, blocks: (B:10:0x0011, B:12:0x0015, B:13:0x0028, B:14:0x0036, B:16:0x003c, B:17:0x003f, B:19:0x0045, B:21:0x0053, B:23:0x005d, B:28:0x0062), top: B:9:0x0011 }] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:16:0x003c A[Catch: ChecksumException | FormatException -> 0x006e, TryCatch #2 {ChecksumException | FormatException -> 0x006e, blocks: (B:10:0x0011, B:12:0x0015, B:13:0x0028, B:14:0x0036, B:16:0x003c, B:17:0x003f, B:19:0x0045, B:21:0x0053, B:23:0x005d, B:28:0x0062), top: B:9:0x0011 }] */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final o.Qys a(o.C8902dZc r8, java.util.Map<o.CGg, ?> r9) throws com.google.zxing.FormatException, com.google.zxing.ChecksumException {
|
||
|
/*
|
||
|
r7 = this;
|
||
|
o.uxh r0 = new o.uxh
|
||
|
r0.<init>(r8)
|
||
|
r8 = 0
|
||
|
o.Qys r8 = r7.e(r0, r9) // Catch: com.google.zxing.ChecksumException -> Lb com.google.zxing.FormatException -> Lf
|
||
|
return r8
|
||
|
Lb:
|
||
|
r1 = move-exception
|
||
|
r2 = r1
|
||
|
r1 = r8
|
||
|
goto L11
|
||
|
Lf:
|
||
|
r1 = move-exception
|
||
|
r2 = r8
|
||
|
L11:
|
||
|
o.EFY r3 = r0.b // Catch: java.lang.Throwable -> L6e
|
||
|
if (r3 == 0) goto L28
|
||
|
o.asu[] r3 = o.EnumC3196asu.values() // Catch: java.lang.Throwable -> L6e
|
||
|
o.EFY r4 = r0.b // Catch: java.lang.Throwable -> L6e
|
||
|
byte r4 = r4.d // Catch: java.lang.Throwable -> L6e
|
||
|
r3 = r3[r4] // Catch: java.lang.Throwable -> L6e
|
||
|
o.dZc r4 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
int r4 = r4.c // Catch: java.lang.Throwable -> L6e
|
||
|
o.dZc r5 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
r3.b(r5, r4) // Catch: java.lang.Throwable -> L6e
|
||
|
L28:
|
||
|
r0.a = r8 // Catch: java.lang.Throwable -> L6e
|
||
|
r0.b = r8 // Catch: java.lang.Throwable -> L6e
|
||
|
r8 = 1
|
||
|
r0.e = r8 // Catch: java.lang.Throwable -> L6e
|
||
|
r0.d() // Catch: java.lang.Throwable -> L6e
|
||
|
r0.b() // Catch: java.lang.Throwable -> L6e
|
||
|
r8 = 0
|
||
|
L36:
|
||
|
o.dZc r3 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
int r3 = r3.e // Catch: java.lang.Throwable -> L6e
|
||
|
if (r8 >= r3) goto L62
|
||
|
int r3 = r8 + 1
|
||
|
r4 = r3
|
||
|
L3f:
|
||
|
o.dZc r5 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
int r5 = r5.c // Catch: java.lang.Throwable -> L6e
|
||
|
if (r4 >= r5) goto L60
|
||
|
o.dZc r5 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
boolean r5 = r5.b(r8, r4) // Catch: java.lang.Throwable -> L6e
|
||
|
o.dZc r6 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
boolean r6 = r6.b(r4, r8) // Catch: java.lang.Throwable -> L6e
|
||
|
if (r5 == r6) goto L5d
|
||
|
o.dZc r5 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
r5.d(r4, r8) // Catch: java.lang.Throwable -> L6e
|
||
|
o.dZc r5 = r0.d // Catch: java.lang.Throwable -> L6e
|
||
|
r5.d(r8, r4) // Catch: java.lang.Throwable -> L6e
|
||
|
L5d:
|
||
|
int r4 = r4 + 1
|
||
|
goto L3f
|
||
|
L60:
|
||
|
r8 = r3
|
||
|
goto L36
|
||
|
L62:
|
||
|
o.Qys r8 = r7.e(r0, r9) // Catch: java.lang.Throwable -> L6e
|
||
|
o.wKk r9 = new o.wKk // Catch: java.lang.Throwable -> L6e
|
||
|
r9.<init>() // Catch: java.lang.Throwable -> L6e
|
||
|
r8.d = r9 // Catch: java.lang.Throwable -> L6e
|
||
|
return r8
|
||
|
L6e:
|
||
|
if (r1 == 0) goto L71
|
||
|
throw r1
|
||
|
L71:
|
||
|
throw r2
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.CXS.a(o.dZc, java.util.Map):o.Qys");
|
||
|
}
|
||
|
|
||
|
private Qys e(uxh uxhVar, Map<CGg, ?> map) throws FormatException, ChecksumException {
|
||
|
C8902dZc c8902dZc;
|
||
|
C0480Hnn d = uxhVar.d();
|
||
|
FVz fVz = uxhVar.b().c;
|
||
|
EFY b = uxhVar.b();
|
||
|
C0480Hnn d2 = uxhVar.d();
|
||
|
EnumC3196asu enumC3196asu = EnumC3196asu.values()[b.d];
|
||
|
int i = uxhVar.d.c;
|
||
|
enumC3196asu.b(uxhVar.d, i);
|
||
|
int i2 = 2;
|
||
|
int i3 = d2.e << 2;
|
||
|
C8902dZc c8902dZc2 = new C8902dZc(i3 + 17);
|
||
|
int i4 = 0;
|
||
|
c8902dZc2.b(0, 0, 9, 9);
|
||
|
int i5 = i3 + 9;
|
||
|
c8902dZc2.b(i5, 0, 8, 9);
|
||
|
c8902dZc2.b(0, i5, 9, 8);
|
||
|
int length = d2.a.length;
|
||
|
int i6 = 0;
|
||
|
while (i6 < length) {
|
||
|
int i7 = d2.a[i6];
|
||
|
int i8 = 0;
|
||
|
while (i8 < length) {
|
||
|
if ((i6 != 0 || (i8 != 0 && i8 != length - 1)) && (i6 != length - 1 || i8 != 0)) {
|
||
|
c8902dZc2.b(d2.a[i8] - i2, i7 - 2, 5, 5);
|
||
|
}
|
||
|
i8++;
|
||
|
i2 = 2;
|
||
|
}
|
||
|
i6++;
|
||
|
i2 = 2;
|
||
|
}
|
||
|
int i9 = 6;
|
||
|
c8902dZc2.b(6, 9, 1, i3);
|
||
|
c8902dZc2.b(9, 6, i3, 1);
|
||
|
if (d2.e > 6) {
|
||
|
int i10 = i3 + 6;
|
||
|
c8902dZc2.b(i10, 0, 3, 6);
|
||
|
c8902dZc2.b(0, i10, 6, 3);
|
||
|
}
|
||
|
int i11 = d2.b;
|
||
|
byte[] bArr = new byte[i11];
|
||
|
int i12 = i - 1;
|
||
|
int i13 = 0;
|
||
|
int i14 = 0;
|
||
|
int i15 = 0;
|
||
|
boolean z = true;
|
||
|
int i16 = i12;
|
||
|
while (i16 > 0) {
|
||
|
if (i16 == i9) {
|
||
|
i16--;
|
||
|
}
|
||
|
int i17 = i4;
|
||
|
while (i17 < i) {
|
||
|
int i18 = z ? i12 - i17 : i17;
|
||
|
int i19 = i;
|
||
|
while (i4 < 2) {
|
||
|
int i20 = i16 - i4;
|
||
|
if (c8902dZc2.b(i20, i18)) {
|
||
|
c8902dZc = c8902dZc2;
|
||
|
} else {
|
||
|
i14++;
|
||
|
int i21 = i15 << 1;
|
||
|
c8902dZc = c8902dZc2;
|
||
|
int i22 = uxhVar.d.b(i20, i18) ? i21 | 1 : i21;
|
||
|
if (i14 == 8) {
|
||
|
bArr[i13] = (byte) i22;
|
||
|
i13++;
|
||
|
i14 = 0;
|
||
|
i15 = 0;
|
||
|
} else {
|
||
|
i15 = i22;
|
||
|
}
|
||
|
}
|
||
|
i4++;
|
||
|
c8902dZc2 = c8902dZc;
|
||
|
}
|
||
|
i17++;
|
||
|
i = i19;
|
||
|
c8902dZc2 = c8902dZc2;
|
||
|
i4 = 0;
|
||
|
}
|
||
|
z = !z;
|
||
|
i16 -= 2;
|
||
|
c8902dZc2 = c8902dZc2;
|
||
|
i9 = 6;
|
||
|
i4 = 0;
|
||
|
}
|
||
|
if (i13 != d2.b) {
|
||
|
throw FormatException.c();
|
||
|
}
|
||
|
if (i11 != d.b) {
|
||
|
throw new IllegalArgumentException();
|
||
|
}
|
||
|
C0480Hnn.Sts sts = d.c[fVz.ordinal()];
|
||
|
C0480Hnn.IeS[] ieSArr = sts.e;
|
||
|
int i23 = 0;
|
||
|
for (C0480Hnn.IeS ieS : ieSArr) {
|
||
|
i23 += ieS.a;
|
||
|
}
|
||
|
BZR[] bzrArr = new BZR[i23];
|
||
|
int i24 = 0;
|
||
|
for (C0480Hnn.IeS ieS2 : ieSArr) {
|
||
|
int i25 = 0;
|
||
|
while (i25 < ieS2.a) {
|
||
|
int i26 = ieS2.c;
|
||
|
bzrArr[i24] = new BZR(i26, new byte[sts.b + i26]);
|
||
|
i25++;
|
||
|
i24++;
|
||
|
}
|
||
|
}
|
||
|
int length2 = bzrArr[0].b.length;
|
||
|
int i27 = i23 - 1;
|
||
|
while (i27 >= 0 && bzrArr[i27].b.length != length2) {
|
||
|
i27--;
|
||
|
}
|
||
|
int i28 = i27 + 1;
|
||
|
int i29 = length2 - sts.b;
|
||
|
int i30 = 0;
|
||
|
for (int i31 = 0; i31 < i29; i31++) {
|
||
|
int i32 = 0;
|
||
|
while (i32 < i24) {
|
||
|
bzrArr[i32].b[i31] = bArr[i30];
|
||
|
i32++;
|
||
|
i30++;
|
||
|
}
|
||
|
}
|
||
|
int i33 = i28;
|
||
|
while (i33 < i24) {
|
||
|
bzrArr[i33].b[i29] = bArr[i30];
|
||
|
i33++;
|
||
|
i30++;
|
||
|
}
|
||
|
int length3 = bzrArr[0].b.length;
|
||
|
while (i29 < length3) {
|
||
|
int i34 = 0;
|
||
|
while (i34 < i24) {
|
||
|
bzrArr[i34].b[i34 < i28 ? i29 : i29 + 1] = bArr[i30];
|
||
|
i34++;
|
||
|
i30++;
|
||
|
}
|
||
|
i29++;
|
||
|
}
|
||
|
int i35 = 0;
|
||
|
for (int i36 = 0; i36 < i23; i36++) {
|
||
|
i35 += bzrArr[i36].e;
|
||
|
}
|
||
|
byte[] bArr2 = new byte[i35];
|
||
|
int i37 = 0;
|
||
|
for (int i38 = 0; i38 < i23; i38++) {
|
||
|
BZR bzr = bzrArr[i38];
|
||
|
byte[] bArr3 = bzr.b;
|
||
|
int i39 = bzr.e;
|
||
|
int length4 = bArr3.length;
|
||
|
int[] iArr = new int[length4];
|
||
|
for (int i40 = 0; i40 < length4; i40++) {
|
||
|
iArr[i40] = bArr3[i40] & UnsignedBytes.MAX_VALUE;
|
||
|
}
|
||
|
try {
|
||
|
this.e.b(iArr, bArr3.length - i39);
|
||
|
for (int i41 = 0; i41 < i39; i41++) {
|
||
|
bArr3[i41] = (byte) iArr[i41];
|
||
|
}
|
||
|
int i42 = 0;
|
||
|
while (i42 < i39) {
|
||
|
bArr2[i37] = bArr3[i42];
|
||
|
i42++;
|
||
|
i37++;
|
||
|
}
|
||
|
} catch (ReedSolomonException unused) {
|
||
|
throw ChecksumException.e();
|
||
|
}
|
||
|
}
|
||
|
return C15637hNR.d(bArr2, d, fVz, map);
|
||
|
}
|
||
|
}
|