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

141 lines
4.3 KiB
Java

package o;
import java.util.Formatter;
/* loaded from: classes2.dex */
final class GXj {
hOP a;
final YdT b;
final int d;
final iJs[] e;
/* JADX INFO: Access modifiers changed from: package-private */
public GXj(YdT ydT, hOP hop) {
this.b = ydT;
int i = ydT.c;
this.d = i;
this.a = hop;
this.e = new iJs[i + 2];
}
/* JADX INFO: Access modifiers changed from: package-private */
public final void e(iJs ijs) {
qCz qcz;
qCz qcz2;
int i;
if (ijs != null) {
C16621pkz c16621pkz = (C16621pkz) ijs;
YdT ydT = this.b;
vDP[] vdpArr = c16621pkz.e;
for (vDP vdp : c16621pkz.e) {
if (vdp != null) {
vdp.b = ((vdp.e / 30) * 3) + (vdp.c / 3);
}
}
c16621pkz.c(vdpArr, ydT);
hOP hop = c16621pkz.d;
if (c16621pkz.a) {
qcz = hop.g;
} else {
qcz = hop.i;
}
if (c16621pkz.a) {
qcz2 = hop.e;
} else {
qcz2 = hop.b;
}
int i2 = ((int) qcz.e) - c16621pkz.d.h;
int i3 = ((int) qcz2.e) - c16621pkz.d.h;
int i4 = -1;
int i5 = 1;
int i6 = 0;
while (i2 < i3) {
vDP vdp2 = vdpArr[i2];
if (vdp2 != null) {
int i7 = vdp2.b - i4;
if (i7 == 0) {
i6++;
} else {
if (i7 == 1) {
int max = Math.max(i5, i6);
i = vdp2.b;
i5 = max;
} else {
if (i7 >= 0 && vdp2.b < ydT.b && i7 <= i2) {
if (i5 > 2) {
i7 *= i5 - 2;
}
boolean z = i7 >= i2;
for (int i8 = 1; i8 <= i7 && !z; i8++) {
z = vdpArr[i2 - i8] != null;
}
if (!z) {
i = vdp2.b;
}
}
vdpArr[i2] = null;
}
i4 = i;
i6 = 1;
}
}
i2++;
}
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int c(int i, int i2, vDP vdp) {
if (vdp == null || vdp.b()) {
return i2;
}
if (i == -1 || vdp.c != (i % 3) * 3) {
return i2 + 1;
}
vdp.b = i;
return 0;
}
public final String toString() {
iJs[] ijsArr = this.e;
iJs ijs = ijsArr[0];
if (ijs == null) {
ijs = ijsArr[this.d + 1];
}
Formatter formatter = new Formatter();
for (int i = 0; i < ijs.e.length; i++) {
try {
formatter.format("CW %3d:", Integer.valueOf(i));
for (int i2 = 0; i2 < this.d + 2; i2++) {
iJs ijs2 = this.e[i2];
if (ijs2 == null) {
formatter.format(" | ", new Object[0]);
} else {
vDP vdp = ijs2.e[i];
if (vdp == null) {
formatter.format(" | ", new Object[0]);
} else {
formatter.format(" %3d|%3d", Integer.valueOf(vdp.b), Integer.valueOf(vdp.e));
}
}
}
formatter.format("%n", new Object[0]);
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
try {
formatter.close();
} catch (Throwable th3) {
th.addSuppressed(th3);
}
throw th2;
}
}
}
String obj = formatter.toString();
formatter.close();
return obj;
}
}