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

480 lines
15 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class Ioe extends ktU {
private final double[] a;
private Sts[] b;
private boolean e = true;
@Override // o.ktU
public final void a(double d, double[] dArr) {
if (!this.e) {
if (d < this.b[0].j) {
d = this.b[0].j;
}
Sts[] stsArr = this.b;
if (d > stsArr[stsArr.length - 1].h) {
Sts[] stsArr2 = this.b;
d = stsArr2[stsArr2.length - 1].h;
}
} else {
if (d < this.b[0].j) {
double d2 = this.b[0].j;
double d3 = d - this.b[0].j;
if (this.b[0].a) {
dArr[0] = this.b[0].d(d2) + (this.b[0].d * d3);
dArr[1] = this.b[0].e(d2) + (d3 * this.b[0].c);
return;
}
this.b[0].c(d2);
Sts sts = this.b[0];
dArr[0] = sts.d + (sts.b * sts.f) + (this.b[0].b() * d3);
Sts sts2 = this.b[0];
dArr[1] = sts2.c + (sts2.e * sts2.i) + (d3 * this.b[0].a());
return;
}
Sts[] stsArr3 = this.b;
if (d > stsArr3[stsArr3.length - 1].h) {
Sts[] stsArr4 = this.b;
double d4 = stsArr4[stsArr4.length - 1].h;
double d5 = d - d4;
Sts[] stsArr5 = this.b;
int length = stsArr5.length - 1;
if (stsArr5[length].a) {
dArr[0] = this.b[length].d(d4) + (this.b[length].d * d5);
dArr[1] = this.b[length].e(d4) + (d5 * this.b[length].c);
return;
}
this.b[length].c(d);
Sts sts3 = this.b[length];
dArr[0] = sts3.d + (sts3.b * sts3.f) + (this.b[length].b() * d5);
Sts sts4 = this.b[length];
dArr[1] = sts4.c + (sts4.e * sts4.i) + (d5 * this.b[length].a());
return;
}
}
int i = 0;
while (true) {
Sts[] stsArr6 = this.b;
if (i >= stsArr6.length) {
return;
}
if (d <= stsArr6[i].h) {
if (this.b[i].a) {
dArr[0] = this.b[i].d(d);
dArr[1] = this.b[i].e(d);
return;
}
this.b[i].c(d);
Sts sts5 = this.b[i];
dArr[0] = sts5.d + (sts5.b * sts5.f);
Sts sts6 = this.b[i];
dArr[1] = sts6.c + (sts6.e * sts6.i);
return;
}
i++;
}
}
@Override // o.ktU
public final void a(double d, float[] fArr) {
if (this.e) {
if (d < this.b[0].j) {
double d2 = this.b[0].j;
double d3 = d - this.b[0].j;
if (this.b[0].a) {
fArr[0] = (float) (this.b[0].d(d2) + (this.b[0].d * d3));
fArr[1] = (float) (this.b[0].e(d2) + (d3 * this.b[0].c));
return;
}
this.b[0].c(d2);
Sts sts = this.b[0];
fArr[0] = (float) (sts.d + (sts.b * sts.f) + (this.b[0].b() * d3));
Sts sts2 = this.b[0];
fArr[1] = (float) (sts2.c + (sts2.e * sts2.i) + (d3 * this.b[0].a()));
return;
}
Sts[] stsArr = this.b;
if (d > stsArr[stsArr.length - 1].h) {
Sts[] stsArr2 = this.b;
double d4 = stsArr2[stsArr2.length - 1].h;
double d5 = d - d4;
Sts[] stsArr3 = this.b;
int length = stsArr3.length - 1;
if (stsArr3[length].a) {
fArr[0] = (float) (this.b[length].d(d4) + (this.b[length].d * d5));
fArr[1] = (float) (this.b[length].e(d4) + (d5 * this.b[length].c));
return;
}
this.b[length].c(d);
Sts sts3 = this.b[length];
fArr[0] = (float) (sts3.d + (sts3.b * sts3.f));
Sts sts4 = this.b[length];
fArr[1] = (float) (sts4.c + (sts4.e * sts4.i));
return;
}
} else if (d < this.b[0].j) {
d = this.b[0].j;
} else {
Sts[] stsArr4 = this.b;
if (d > stsArr4[stsArr4.length - 1].h) {
Sts[] stsArr5 = this.b;
d = stsArr5[stsArr5.length - 1].h;
}
}
int i = 0;
while (true) {
Sts[] stsArr6 = this.b;
if (i >= stsArr6.length) {
return;
}
if (d <= stsArr6[i].h) {
if (this.b[i].a) {
fArr[0] = (float) this.b[i].d(d);
fArr[1] = (float) this.b[i].e(d);
return;
}
this.b[i].c(d);
Sts sts5 = this.b[i];
fArr[0] = (float) (sts5.d + (sts5.b * sts5.f));
Sts sts6 = this.b[i];
fArr[1] = (float) (sts6.c + (sts6.e * sts6.i));
return;
}
i++;
}
}
@Override // o.ktU
public final void b(double d, double[] dArr) {
if (d < this.b[0].j) {
d = this.b[0].j;
} else {
Sts[] stsArr = this.b;
if (d > stsArr[stsArr.length - 1].h) {
Sts[] stsArr2 = this.b;
d = stsArr2[stsArr2.length - 1].h;
}
}
int i = 0;
while (true) {
Sts[] stsArr3 = this.b;
if (i >= stsArr3.length) {
return;
}
if (d <= stsArr3[i].h) {
if (this.b[i].a) {
dArr[0] = this.b[i].d;
dArr[1] = this.b[i].c;
return;
} else {
this.b[i].c(d);
dArr[0] = this.b[i].b();
dArr[1] = this.b[i].a();
return;
}
}
i++;
}
}
@Override // o.ktU
public final double e(double d) {
double d2;
double d3;
double d4;
int i = 0;
if (this.e) {
if (d < this.b[0].j) {
double d5 = this.b[0].j;
d2 = d - this.b[0].j;
if (this.b[0].a) {
d4 = this.b[0].d(d5);
d3 = this.b[0].d;
} else {
this.b[0].c(d5);
Sts sts = this.b[0];
d4 = sts.d + (sts.b * sts.f);
d3 = this.b[0].b();
}
} else {
if (d > this.b[r0.length - 1].h) {
double d6 = this.b[r0.length - 1].h;
d2 = d - d6;
Sts[] stsArr = this.b;
int length = stsArr.length - 1;
double d7 = stsArr[length].d(d6);
d3 = this.b[length].d;
d4 = d7;
}
}
return d4 + (d2 * d3);
}
if (d < this.b[0].j) {
d = this.b[0].j;
} else {
if (d > this.b[r0.length - 1].h) {
d = this.b[r11.length - 1].h;
}
}
while (true) {
Sts[] stsArr2 = this.b;
if (i >= stsArr2.length) {
return Double.NaN;
}
if (d <= stsArr2[i].h) {
if (this.b[i].a) {
return this.b[i].d(d);
}
this.b[i].c(d);
Sts sts2 = this.b[i];
return sts2.d + (sts2.b * sts2.f);
}
i++;
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x0027, code lost:
if (r6 == 1) goto L12;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public Ioe(int[] r25, double[] r26, double[][] r27) {
/*
r24 = this;
r0 = r24
r1 = r26
r24.<init>()
r2 = 1
r0.e = r2
r0.a = r1
int r3 = r1.length
int r3 = r3 - r2
o.Ioe$Sts[] r3 = new o.Ioe.Sts[r3]
r0.b = r3
r3 = 0
r5 = r2
r6 = r5
r4 = r3
L16:
o.Ioe$Sts[] r7 = r0.b
int r8 = r7.length
if (r4 >= r8) goto L4e
r8 = r25[r4]
r9 = 3
if (r8 == 0) goto L2e
if (r8 == r2) goto L2b
r10 = 2
if (r8 == r10) goto L29
if (r8 != r9) goto L2f
if (r6 != r2) goto L2b
L29:
r5 = r10
goto L2c
L2b:
r5 = r2
L2c:
r6 = r5
goto L2f
L2e:
r5 = r9
L2f:
r10 = r1[r4]
int r22 = r4 + 1
r12 = r1[r22]
r8 = r27[r4]
r14 = r8[r3]
r16 = r8[r2]
r8 = r27[r22]
o.Ioe$Sts r23 = new o.Ioe$Sts
r18 = r8[r3]
r20 = r8[r2]
r8 = r23
r9 = r5
r8.<init>(r9, r10, r12, r14, r16, r18, r20)
r7[r4] = r23
r4 = r22
goto L16
L4e:
return
*/
throw new UnsupportedOperationException("Method not decompiled: o.Ioe.<init>(int[], double[], double[][]):void");
}
/* loaded from: classes.dex */
static class Sts {
private static double[] g = new double[91];
boolean a;
double b;
double c;
double d;
double e;
double f;
double h;
double i;
double j;
private double k;
private double[] l;
private boolean m;
private double n;
/* renamed from: o, reason: collision with root package name */
private double f8215o;
private double p;
private double q;
private double r;
private double t;
Sts(int i, double d, double d2, double d3, double d4, double d5, double d6) {
double d7;
double d8 = d3;
this.a = false;
int i2 = 1;
this.m = i == 1;
this.j = d;
this.h = d2;
this.n = 1.0d / (d2 - d);
if (3 == i) {
this.a = true;
}
double d9 = d5 - d8;
double d10 = d6 - d4;
if (this.a || Math.abs(d9) < 0.001d || Math.abs(d10) < 0.001d) {
this.a = true;
this.q = d8;
this.r = d5;
this.t = d4;
this.p = d6;
double hypot = Math.hypot(d10, d9);
this.f8215o = hypot;
this.k = hypot * this.n;
double d11 = this.h - this.j;
this.d = d9 / d11;
this.c = d10 / d11;
return;
}
this.l = new double[101];
boolean z = this.m;
this.b = (z ? -1 : 1) * d9;
this.e = d10 * (z ? 1 : -1);
this.d = z ? d5 : d8;
this.c = z ? d4 : d6;
int i3 = 0;
double d12 = 0.0d;
double d13 = 0.0d;
double d14 = 0.0d;
while (true) {
if (i3 >= g.length) {
break;
}
double radians = Math.toRadians((i3 * 90.0d) / (r14.length - i2));
double sin = Math.sin(radians) * d9;
double cos = Math.cos(radians) * (d4 - d6);
if (i3 > 0) {
d7 = sin;
d12 += Math.hypot(sin - d13, cos - d14);
g[i3] = d12;
} else {
d7 = sin;
}
i3++;
d13 = d7;
d14 = cos;
i2 = 1;
}
this.f8215o = d12;
int i4 = 0;
while (true) {
double[] dArr = g;
if (i4 >= dArr.length) {
break;
}
dArr[i4] = dArr[i4] / d12;
i4++;
}
int i5 = 0;
while (true) {
if (i5 >= this.l.length) {
this.k = this.f8215o * this.n;
return;
}
double length = i5 / (r1.length - 1);
int binarySearch = Arrays.binarySearch(g, length);
if (binarySearch >= 0) {
this.l[i5] = binarySearch / (g.length - 1);
} else if (binarySearch == -1) {
this.l[i5] = 0.0d;
} else {
int i6 = -binarySearch;
int i7 = i6 - 2;
double[] dArr2 = g;
double d15 = dArr2[i7];
this.l[i5] = (i7 + ((length - d15) / (dArr2[i6 - 1] - d15))) / (dArr2.length - 1);
}
i5++;
}
}
final void c(double d) {
double b = b((this.m ? this.h - d : d - this.j) * this.n) * 1.5707963267948966d;
this.f = Math.sin(b);
this.i = Math.cos(b);
}
final double b() {
double d = this.b * this.i;
double hypot = this.k / Math.hypot(d, (-this.e) * this.f);
if (this.m) {
d = -d;
}
return d * hypot;
}
final double a() {
double d = this.b;
double d2 = this.i;
double d3 = (-this.e) * this.f;
double hypot = this.k / Math.hypot(d * d2, d3);
return this.m ? (-d3) * hypot : d3 * hypot;
}
private double b(double d) {
if (d <= 0.0d) {
return 0.0d;
}
if (d >= 1.0d) {
return 1.0d;
}
double[] dArr = this.l;
double length = d * (dArr.length - 1);
int i = (int) length;
double d2 = dArr[i];
return d2 + ((length - i) * (dArr[i + 1] - d2));
}
public final double e(double d) {
double d2 = this.j;
double d3 = this.n;
double d4 = this.t;
return d4 + ((d - d2) * d3 * (this.p - d4));
}
public final double d(double d) {
double d2 = this.j;
double d3 = this.n;
double d4 = this.q;
return d4 + ((d - d2) * d3 * (this.r - d4));
}
}
@Override // o.ktU
public final double[] e() {
return this.a;
}
}