409 lines
13 KiB
Java
409 lines
13 KiB
Java
package c.i.e.q.r;
|
|
|
|
import c.i.a.f.e.o.c;
|
|
import c.i.e.d;
|
|
import c.i.e.k;
|
|
import c.i.e.l;
|
|
import c.i.e.n.a;
|
|
import com.google.zxing.NotFoundException;
|
|
import com.google.zxing.Result;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
/* compiled from: RSS14Reader */
|
|
public final class e extends a {
|
|
public static final int[] g = {1, 10, 34, 70, 126};
|
|
public static final int[] h = {4, 20, 48, 81};
|
|
public static final int[] i = {0, 161, 961, 2015, 2715};
|
|
public static final int[] j = {0, 336, 1036, 1516};
|
|
public static final int[] k = {8, 6, 4, 3, 1};
|
|
public static final int[] l = {2, 4, 6, 8};
|
|
public static final int[][] m = {new int[]{3, 8, 2, 1}, new int[]{3, 5, 5, 1}, new int[]{3, 3, 7, 1}, new int[]{3, 1, 9, 1}, new int[]{2, 7, 4, 1}, new int[]{2, 5, 6, 1}, new int[]{2, 3, 8, 1}, new int[]{1, 5, 7, 1}, new int[]{1, 3, 9, 1}};
|
|
public final List<d> n = new ArrayList();
|
|
public final List<d> o = new ArrayList();
|
|
|
|
public static void k(Collection<d> collection, d dVar) {
|
|
if (dVar != null) {
|
|
boolean z2 = false;
|
|
Iterator<d> it = collection.iterator();
|
|
while (true) {
|
|
if (!it.hasNext()) {
|
|
break;
|
|
}
|
|
d next = it.next();
|
|
if (next.a == dVar.a) {
|
|
next.d++;
|
|
z2 = true;
|
|
break;
|
|
}
|
|
}
|
|
if (!z2) {
|
|
collection.add(dVar);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // c.i.e.q.k
|
|
public Result b(int i2, a aVar, Map<d, ?> map) throws NotFoundException {
|
|
k(this.n, m(aVar, false, i2, map));
|
|
aVar.i();
|
|
k(this.o, m(aVar, true, i2, map));
|
|
aVar.i();
|
|
for (d dVar : this.n) {
|
|
if (dVar.d > 1) {
|
|
for (d dVar2 : this.o) {
|
|
if (dVar2.d > 1) {
|
|
int i3 = ((dVar2.b * 16) + dVar.b) % 79;
|
|
int i4 = (dVar.f1427c.a * 9) + dVar2.f1427c.a;
|
|
if (i4 > 72) {
|
|
i4--;
|
|
}
|
|
if (i4 > 8) {
|
|
i4--;
|
|
}
|
|
if (i3 == i4) {
|
|
String valueOf = String.valueOf((((long) dVar.a) * 4537077) + ((long) dVar2.a));
|
|
StringBuilder sb = new StringBuilder(14);
|
|
for (int length = 13 - valueOf.length(); length > 0; length--) {
|
|
sb.append('0');
|
|
}
|
|
sb.append(valueOf);
|
|
int i5 = 0;
|
|
for (int i6 = 0; i6 < 13; i6++) {
|
|
int charAt = sb.charAt(i6) - '0';
|
|
if ((i6 & 1) == 0) {
|
|
charAt *= 3;
|
|
}
|
|
i5 += charAt;
|
|
}
|
|
int i7 = 10 - (i5 % 10);
|
|
if (i7 == 10) {
|
|
i7 = 0;
|
|
}
|
|
sb.append(i7);
|
|
k[] kVarArr = dVar.f1427c.f1426c;
|
|
k[] kVarArr2 = dVar2.f1427c.f1426c;
|
|
return new Result(sb.toString(), null, new k[]{kVarArr[0], kVarArr[1], kVarArr2[0], kVarArr2[1]}, c.i.e.a.RSS_14);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
throw NotFoundException.k;
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:35:0x009c, code lost:
|
|
if (r4 < 4) goto L_0x00b4;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:46:0x00b2, code lost:
|
|
if (r4 < 4) goto L_0x00b4;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:47:0x00b4, code lost:
|
|
r14 = true;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:48:0x00b6, code lost:
|
|
r14 = false;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:49:0x00b7, code lost:
|
|
r15 = false;
|
|
*/
|
|
/* JADX WARNING: Removed duplicated region for block: B:101:0x0129 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:104:0x0136 A[LOOP:3: B:103:0x0134->B:104:0x0136, LOOP_END] */
|
|
/* JADX WARNING: Removed duplicated region for block: B:107:0x0147 A[LOOP:4: B:106:0x0145->B:107:0x0147, LOOP_END] */
|
|
/* JADX WARNING: Removed duplicated region for block: B:110:0x0157 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:119:0x0187 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:89:0x0102 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:94:0x0111 */
|
|
/* JADX WARNING: Removed duplicated region for block: B:96:0x011a */
|
|
public final b l(a aVar, c cVar, boolean z2) throws NotFoundException {
|
|
boolean z3;
|
|
boolean z4;
|
|
int length;
|
|
int length2;
|
|
int[] iArr = this.b;
|
|
for (int i2 = 0; i2 < iArr.length; i2++) {
|
|
iArr[i2] = 0;
|
|
}
|
|
if (z2) {
|
|
c.i.e.q.k.f(aVar, cVar.b[0], iArr);
|
|
} else {
|
|
c.i.e.q.k.e(aVar, cVar.b[1] + 1, iArr);
|
|
int i3 = 0;
|
|
for (int length3 = iArr.length - 1; i3 < length3; length3--) {
|
|
int i4 = iArr[i3];
|
|
iArr[i3] = iArr[length3];
|
|
iArr[length3] = i4;
|
|
i3++;
|
|
}
|
|
}
|
|
int i5 = z2 ? 16 : 15;
|
|
float j02 = ((float) c.j0(iArr)) / ((float) i5);
|
|
int[] iArr2 = this.e;
|
|
int[] iArr3 = this.f;
|
|
float[] fArr = this.f1425c;
|
|
float[] fArr2 = this.d;
|
|
for (int i6 = 0; i6 < iArr.length; i6++) {
|
|
float f = ((float) iArr[i6]) / j02;
|
|
int i7 = (int) (0.5f + f);
|
|
if (i7 <= 0) {
|
|
i7 = 1;
|
|
} else if (i7 > 8) {
|
|
i7 = 8;
|
|
}
|
|
int i8 = i6 / 2;
|
|
if ((i6 & 1) == 0) {
|
|
iArr2[i8] = i7;
|
|
fArr[i8] = f - ((float) i7);
|
|
} else {
|
|
iArr3[i8] = i7;
|
|
fArr2[i8] = f - ((float) i7);
|
|
}
|
|
}
|
|
int j03 = c.j0(this.e);
|
|
int j04 = c.j0(this.f);
|
|
if (z2) {
|
|
if (j03 > 12) {
|
|
z4 = false;
|
|
z3 = true;
|
|
} else {
|
|
z4 = j03 < 4;
|
|
z3 = false;
|
|
}
|
|
if (j04 <= 12) {
|
|
}
|
|
} else {
|
|
if (j03 > 11) {
|
|
z4 = false;
|
|
z3 = true;
|
|
} else {
|
|
z4 = j03 < 5;
|
|
z3 = false;
|
|
}
|
|
if (j04 <= 10) {
|
|
}
|
|
}
|
|
boolean z5 = false;
|
|
boolean z6 = true;
|
|
int i9 = (j03 + j04) - i5;
|
|
boolean z7 = (j03 & 1) == z2;
|
|
boolean z8 = (j04 & 1) == 1;
|
|
if (i9 != 1) {
|
|
if (i9 == -1) {
|
|
if (z7) {
|
|
if (!z8) {
|
|
z4 = true;
|
|
} else {
|
|
throw NotFoundException.k;
|
|
}
|
|
} else if (z8) {
|
|
z5 = true;
|
|
} else {
|
|
throw NotFoundException.k;
|
|
}
|
|
} else if (i9 != 0) {
|
|
throw NotFoundException.k;
|
|
} else if (z7) {
|
|
if (!z8) {
|
|
throw NotFoundException.k;
|
|
} else if (j03 < j04) {
|
|
z4 = true;
|
|
} else {
|
|
z5 = true;
|
|
z3 = true;
|
|
}
|
|
} else if (z8) {
|
|
throw NotFoundException.k;
|
|
}
|
|
if (z4) {
|
|
}
|
|
if (z3) {
|
|
}
|
|
if (z5) {
|
|
}
|
|
if (z6) {
|
|
}
|
|
int i10 = 0;
|
|
int i11 = 0;
|
|
while (length >= 0) {
|
|
}
|
|
int i12 = 0;
|
|
int i13 = 0;
|
|
while (length2 >= 0) {
|
|
}
|
|
int i14 = (i12 * 3) + i10;
|
|
if (z2) {
|
|
}
|
|
} else if (z7) {
|
|
if (z8) {
|
|
throw NotFoundException.k;
|
|
}
|
|
z3 = true;
|
|
if (z4) {
|
|
if (!z3) {
|
|
a.h(this.e, this.f1425c);
|
|
} else {
|
|
throw NotFoundException.k;
|
|
}
|
|
}
|
|
if (z3) {
|
|
a.g(this.e, this.f1425c);
|
|
}
|
|
if (z5) {
|
|
if (!z6) {
|
|
a.h(this.f, this.f1425c);
|
|
} else {
|
|
throw NotFoundException.k;
|
|
}
|
|
}
|
|
if (z6) {
|
|
a.g(this.f, this.d);
|
|
}
|
|
int i10 = 0;
|
|
int i11 = 0;
|
|
for (length = iArr2.length - 1; length >= 0; length--) {
|
|
i10 = (i10 * 9) + iArr2[length];
|
|
i11 += iArr2[length];
|
|
}
|
|
int i12 = 0;
|
|
int i13 = 0;
|
|
for (length2 = iArr3.length - 1; length2 >= 0; length2--) {
|
|
i12 = (i12 * 9) + iArr3[length2];
|
|
i13 += iArr3[length2];
|
|
}
|
|
int i14 = (i12 * 3) + i10;
|
|
if (z2) {
|
|
if ((i11 & 1) != 0 || i11 > 12 || i11 < 4) {
|
|
throw NotFoundException.k;
|
|
}
|
|
int i15 = (12 - i11) / 2;
|
|
int i16 = k[i15];
|
|
return new b((c.M(iArr2, i16, false) * g[i15]) + c.M(iArr3, 9 - i16, true) + i[i15], i14);
|
|
} else if ((i13 & 1) != 0 || i13 > 10 || i13 < 4) {
|
|
throw NotFoundException.k;
|
|
} else {
|
|
int i17 = (10 - i13) / 2;
|
|
int i18 = l[i17];
|
|
return new b((c.M(iArr3, 9 - i18, false) * h[i17]) + c.M(iArr2, i18, true) + j[i17], i14);
|
|
}
|
|
} else if (!z8) {
|
|
throw NotFoundException.k;
|
|
}
|
|
z6 = true;
|
|
if (z4) {
|
|
}
|
|
if (z3) {
|
|
}
|
|
if (z5) {
|
|
}
|
|
if (z6) {
|
|
}
|
|
int i10 = 0;
|
|
int i11 = 0;
|
|
while (length >= 0) {
|
|
}
|
|
int i12 = 0;
|
|
int i13 = 0;
|
|
while (length2 >= 0) {
|
|
}
|
|
int i14 = (i12 * 3) + i10;
|
|
if (z2) {
|
|
}
|
|
}
|
|
|
|
public final d m(a aVar, boolean z2, int i2, Map<d, ?> map) {
|
|
try {
|
|
int[] n = n(aVar, z2);
|
|
c o = o(aVar, i2, z2, n);
|
|
l lVar = map == null ? null : (l) map.get(d.NEED_RESULT_POINT_CALLBACK);
|
|
if (lVar != null) {
|
|
float f = ((float) (n[0] + n[1])) / 2.0f;
|
|
if (z2) {
|
|
f = ((float) (aVar.j - 1)) - f;
|
|
}
|
|
lVar.a(new k(f, (float) i2));
|
|
}
|
|
b l2 = l(aVar, o, true);
|
|
b l3 = l(aVar, o, false);
|
|
return new d((l2.a * 1597) + l3.a, (l3.b * 4) + l2.b, o);
|
|
} catch (NotFoundException unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public final int[] n(a aVar, boolean z2) throws NotFoundException {
|
|
int[] iArr = this.a;
|
|
iArr[0] = 0;
|
|
iArr[1] = 0;
|
|
iArr[2] = 0;
|
|
iArr[3] = 0;
|
|
int i2 = aVar.j;
|
|
int i3 = 0;
|
|
boolean z3 = false;
|
|
while (i3 < i2) {
|
|
z3 = !aVar.b(i3);
|
|
if (z2 == z3) {
|
|
break;
|
|
}
|
|
i3++;
|
|
}
|
|
int i4 = i3;
|
|
int i5 = 0;
|
|
while (i3 < i2) {
|
|
if (aVar.b(i3) != z3) {
|
|
iArr[i5] = iArr[i5] + 1;
|
|
} else {
|
|
if (i5 != 3) {
|
|
i5++;
|
|
} else if (a.i(iArr)) {
|
|
return new int[]{i4, i3};
|
|
} else {
|
|
i4 += iArr[0] + iArr[1];
|
|
iArr[0] = iArr[2];
|
|
iArr[1] = iArr[3];
|
|
iArr[2] = 0;
|
|
iArr[3] = 0;
|
|
i5--;
|
|
}
|
|
iArr[i5] = 1;
|
|
z3 = !z3;
|
|
}
|
|
i3++;
|
|
}
|
|
throw NotFoundException.k;
|
|
}
|
|
|
|
public final c o(a aVar, int i2, boolean z2, int[] iArr) throws NotFoundException {
|
|
int i3;
|
|
int i4;
|
|
boolean b = aVar.b(iArr[0]);
|
|
int i5 = iArr[0] - 1;
|
|
while (i5 >= 0 && b != aVar.b(i5)) {
|
|
i5--;
|
|
}
|
|
int i6 = i5 + 1;
|
|
int[] iArr2 = this.a;
|
|
System.arraycopy(iArr2, 0, iArr2, 1, iArr2.length - 1);
|
|
iArr2[0] = iArr[0] - i6;
|
|
int j2 = a.j(iArr2, m);
|
|
int i7 = iArr[1];
|
|
if (z2) {
|
|
int i8 = aVar.j;
|
|
i3 = (i8 - 1) - i7;
|
|
i4 = (i8 - 1) - i6;
|
|
} else {
|
|
i3 = i7;
|
|
i4 = i6;
|
|
}
|
|
return new c(j2, new int[]{i6, iArr[1]}, i4, i3, i2);
|
|
}
|
|
|
|
@Override // c.i.e.q.k, c.i.e.i
|
|
public void reset() {
|
|
this.n.clear();
|
|
this.o.clear();
|
|
}
|
|
}
|