what-the-bank/sources/o/C17366wFO.java

352 lines
11 KiB
Java

package o;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
/* renamed from: o.wFO, reason: case insensitive filesystem */
/* loaded from: classes2.dex */
public final class C17366wFO {
public static final LWm a = new LWm(0);
public boolean b;
public final C8902dZc d;
private final pgq g;
public final List<Bjz> c = new ArrayList();
private final int[] e = new int[5];
public C17366wFO(C8902dZc c8902dZc, pgq pgqVar) {
this.d = c8902dZc;
this.g = pgqVar;
}
public static boolean c(int[] iArr) {
int i = 0;
for (int i2 = 0; i2 < 5; i2++) {
int i3 = iArr[i2];
if (i3 == 0) {
return false;
}
i += i3;
}
if (i < 7) {
return false;
}
float f = i / 7.0f;
float f2 = f / 2.0f;
if (Math.abs(f - iArr[0]) >= f2 || Math.abs(f - iArr[1]) >= f2) {
return false;
}
return Math.abs((f * 3.0f) - ((float) iArr[2])) < 3.0f * f2 && Math.abs(f - ((float) iArr[3])) < f2 && Math.abs(f - ((float) iArr[4])) < f2;
}
private boolean c(int i, int i2) {
int i3;
int i4;
int i5;
Arrays.fill(this.e, 0);
int[] iArr = this.e;
int i6 = 0;
while (i >= i6 && i2 >= i6 && this.d.b(i2 - i6, i - i6)) {
iArr[2] = iArr[2] + 1;
i6++;
}
if (iArr[2] == 0) {
return false;
}
while (i >= i6 && i2 >= i6 && !this.d.b(i2 - i6, i - i6)) {
iArr[1] = iArr[1] + 1;
i6++;
}
if (iArr[1] == 0) {
return false;
}
while (i >= i6 && i2 >= i6 && this.d.b(i2 - i6, i - i6)) {
iArr[0] = iArr[0] + 1;
i6++;
}
if (iArr[0] == 0) {
return false;
}
int i7 = this.d.c;
int i8 = this.d.e;
int i9 = 1;
while (true) {
int i10 = i + i9;
if (i10 >= i7 || (i5 = i2 + i9) >= i8 || !this.d.b(i5, i10)) {
break;
}
iArr[2] = iArr[2] + 1;
i9++;
}
while (true) {
int i11 = i + i9;
if (i11 >= i7 || (i4 = i2 + i9) >= i8 || this.d.b(i4, i11)) {
break;
}
iArr[3] = iArr[3] + 1;
i9++;
}
if (iArr[3] == 0) {
return false;
}
while (true) {
int i12 = i + i9;
if (i12 >= i7 || (i3 = i2 + i9) >= i8 || !this.d.b(i3, i12)) {
break;
}
iArr[4] = iArr[4] + 1;
i9++;
}
if (iArr[4] == 0) {
return false;
}
int i13 = 0;
for (int i14 = 0; i14 < 5; i14++) {
int i15 = iArr[i14];
if (i15 == 0) {
return false;
}
i13 += i15;
}
if (i13 < 7) {
return false;
}
float f = i13 / 7.0f;
float f2 = f / 1.333f;
if (Math.abs(f - iArr[0]) >= f2 || Math.abs(f - iArr[1]) >= f2) {
return false;
}
return Math.abs((f * 3.0f) - ((float) iArr[2])) < 3.0f * f2 && Math.abs(f - ((float) iArr[3])) < f2 && Math.abs(f - ((float) iArr[4])) < f2;
}
public final boolean b(int[] iArr, int i, int i2) {
int i3 = 0;
int i4 = iArr[0] + iArr[1];
int i5 = iArr[2];
int i6 = iArr[3];
int i7 = i4 + i5 + i6 + iArr[4];
int i8 = (int) (((i2 - r6) - i6) - (i5 / 2.0f));
float a2 = a(i, i8, i5, i7);
if (!Float.isNaN(a2)) {
int i9 = (int) a2;
float e = e(i8, i9, iArr[2], i7);
if (!Float.isNaN(e) && c(i9, (int) e)) {
float f = i7 / 7.0f;
while (true) {
if (i3 < this.c.size()) {
Bjz bjz = this.c.get(i3);
if (bjz.c(f, a2, e)) {
this.c.set(i3, bjz.a(a2, e, f));
break;
}
i3++;
} else {
Bjz bjz2 = new Bjz(e, a2, f);
this.c.add(bjz2);
pgq pgqVar = this.g;
if (pgqVar != null) {
pgqVar.a(bjz2);
}
}
}
return true;
}
}
return false;
}
public final boolean e() {
int size = this.c.size();
float f = BitmapDescriptorFactory.HUE_RED;
int i = 0;
float f2 = 0.0f;
for (Bjz bjz : this.c) {
if (bjz.b >= 2) {
i++;
f2 += bjz.d;
}
}
if (i < 3) {
return false;
}
float f3 = f2 / size;
Iterator<Bjz> it = this.c.iterator();
while (it.hasNext()) {
f += Math.abs(it.next().d - f3);
}
return f <= f2 * 0.05f;
}
/* renamed from: o.wFO$LWm */
/* loaded from: classes2.dex */
static final class LWm implements Comparator<Bjz>, Serializable {
private LWm() {
}
/* synthetic */ LWm(byte b) {
this();
}
@Override // java.util.Comparator
public final /* bridge */ /* synthetic */ int compare(Bjz bjz, Bjz bjz2) {
return Float.compare(bjz.d, bjz2.d);
}
}
/* JADX WARN: Code restructure failed: missing block: B:50:0x0083, code lost:
if (r2[3] < r13) goto L48;
*/
/* JADX WARN: Code restructure failed: missing block: B:52:0x0087, code lost:
if (r11 >= r1) goto L79;
*/
/* JADX WARN: Code restructure failed: missing block: B:54:0x008d, code lost:
if (r0.b(r11, r12) == false) goto L80;
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x008f, code lost:
r9 = r2[4];
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x0091, code lost:
if (r9 >= r13) goto L78;
*/
/* JADX WARN: Code restructure failed: missing block: B:57:0x0093, code lost:
r2[4] = r9 + 1;
r11 = r11 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:59:0x009a, code lost:
r12 = r2[4];
*/
/* JADX WARN: Code restructure failed: missing block: B:60:0x009c, code lost:
if (r12 < r13) goto L58;
*/
/* JADX WARN: Code restructure failed: missing block: B:61:0x009e, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:63:0x00b2, code lost:
if ((java.lang.Math.abs(((((r2[0] + r2[1]) + r2[2]) + r2[3]) + r12) - r14) * 5) < r14) goto L61;
*/
/* JADX WARN: Code restructure failed: missing block: B:64:0x00b4, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:66:0x00b9, code lost:
if (c(r2) == false) goto L83;
*/
/* JADX WARN: Code restructure failed: missing block: B:68:0x00ca, code lost:
return ((r11 - r2[4]) - r2[3]) - (r2[2] / 2.0f);
*/
/* JADX WARN: Code restructure failed: missing block: B:69:?, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:72:?, code lost:
return Float.NaN;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private float e(int r11, int r12, int r13, int r14) {
/*
Method dump skipped, instructions count: 203
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.C17366wFO.e(int, int, int, int):float");
}
/* JADX WARN: Code restructure failed: missing block: B:50:0x0083, code lost:
if (r2[3] < r13) goto L48;
*/
/* JADX WARN: Code restructure failed: missing block: B:52:0x0087, code lost:
if (r11 >= r1) goto L79;
*/
/* JADX WARN: Code restructure failed: missing block: B:54:0x008d, code lost:
if (r0.b(r12, r11) == false) goto L80;
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x008f, code lost:
r9 = r2[4];
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x0091, code lost:
if (r9 >= r13) goto L78;
*/
/* JADX WARN: Code restructure failed: missing block: B:57:0x0093, code lost:
r2[4] = r9 + 1;
r11 = r11 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:59:0x009a, code lost:
r12 = r2[4];
*/
/* JADX WARN: Code restructure failed: missing block: B:60:0x009c, code lost:
if (r12 < r13) goto L58;
*/
/* JADX WARN: Code restructure failed: missing block: B:61:0x009e, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:63:0x00b4, code lost:
if ((java.lang.Math.abs(((((r2[0] + r2[1]) + r2[2]) + r2[3]) + r12) - r14) * 5) < (r14 << 1)) goto L61;
*/
/* JADX WARN: Code restructure failed: missing block: B:64:0x00b6, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:66:0x00bb, code lost:
if (c(r2) == false) goto L83;
*/
/* JADX WARN: Code restructure failed: missing block: B:68:0x00cc, code lost:
return ((r11 - r2[4]) - r2[3]) - (r2[2] / 2.0f);
*/
/* JADX WARN: Code restructure failed: missing block: B:69:?, code lost:
return Float.NaN;
*/
/* JADX WARN: Code restructure failed: missing block: B:72:?, code lost:
return Float.NaN;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private float a(int r11, int r12, int r13, int r14) {
/*
Method dump skipped, instructions count: 205
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.C17366wFO.a(int, int, int, int):float");
}
public static double b(Bjz bjz, Bjz bjz2) {
double d = bjz.a - bjz2.a;
double d2 = bjz.e - bjz2.e;
return (d * d) + (d2 * d2);
}
}