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

687 lines
30 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.graphics.Path;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.util.ArrayList;
/* renamed from: o.Lpn, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0661Lpn {
static float[] c(float[] fArr, int i) {
if (i < 0) {
throw new IllegalArgumentException();
}
int length = fArr.length;
if (length < 0) {
throw new ArrayIndexOutOfBoundsException();
}
int min = Math.min(i, length);
float[] fArr2 = new float[i];
System.arraycopy(fArr, 0, fArr2, 0, min);
return fArr2;
}
public static Path oG_(String str) {
Path path = new Path();
HBt[] c = c(str);
if (c == null) {
return null;
}
try {
HBt.oI_(c, path);
return path;
} catch (RuntimeException e) {
throw new RuntimeException("Error in parsing ".concat(String.valueOf(str)), e);
}
}
public static HBt[] c(String str) {
if (str == null) {
return null;
}
ArrayList arrayList = new ArrayList();
int i = 0;
int i2 = 1;
while (i2 < str.length()) {
while (i2 < str.length()) {
char charAt = str.charAt(i2);
if (((charAt - 'A') * (charAt - 'Z') <= 0 || (charAt - 'a') * (charAt - 'z') <= 0) && charAt != 'e' && charAt != 'E') {
break;
}
i2++;
}
String trim = str.substring(i, i2).trim();
if (trim.length() > 0) {
arrayList.add(new HBt(trim.charAt(0), d(trim)));
}
i = i2;
i2++;
}
if (i2 - i == 1 && i < str.length()) {
arrayList.add(new HBt(str.charAt(i), new float[0]));
}
return (HBt[]) arrayList.toArray(new HBt[arrayList.size()]);
}
public static HBt[] c(HBt[] hBtArr) {
if (hBtArr == null) {
return null;
}
HBt[] hBtArr2 = new HBt[hBtArr.length];
for (int i = 0; i < hBtArr.length; i++) {
hBtArr2[i] = new HBt(hBtArr[i]);
}
return hBtArr2;
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.Lpn$LWm */
/* loaded from: classes.dex */
public static class LWm {
boolean a;
int c;
LWm() {
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Failed to find 'out' block for switch in B:17:0x0041. Please report as an issue. */
/* JADX WARN: Removed duplicated region for block: B:21:0x005c A[Catch: NumberFormatException -> 0x007f, LOOP:1: B:9:0x002b->B:21:0x005c, LOOP_END, TryCatch #0 {NumberFormatException -> 0x007f, blocks: (B:6:0x0011, B:8:0x0025, B:9:0x002b, B:11:0x0031, B:17:0x0041, B:21:0x005c, B:37:0x004a, B:40:0x0051, B:23:0x005f, B:25:0x0065, B:26:0x0071, B:29:0x0077, B:45:0x007a), top: B:5:0x0011 }] */
/* JADX WARN: Removed duplicated region for block: B:22:0x005f A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:25:0x0065 A[Catch: NumberFormatException -> 0x007f, TryCatch #0 {NumberFormatException -> 0x007f, blocks: (B:6:0x0011, B:8:0x0025, B:9:0x002b, B:11:0x0031, B:17:0x0041, B:21:0x005c, B:37:0x004a, B:40:0x0051, B:23:0x005f, B:25:0x0065, B:26:0x0071, B:29:0x0077, B:45:0x007a), top: B:5:0x0011 }] */
/* JADX WARN: Removed duplicated region for block: B:28:0x0077 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:32:0x0075 A[SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static float[] d(java.lang.String r13) {
/*
r0 = 0
char r1 = r13.charAt(r0)
r2 = 122(0x7a, float:1.71E-43)
if (r1 == r2) goto L99
char r1 = r13.charAt(r0)
r2 = 90
if (r1 == r2) goto L99
int r1 = r13.length() // Catch: java.lang.NumberFormatException -> L7f
float[] r1 = new float[r1] // Catch: java.lang.NumberFormatException -> L7f
o.Lpn$LWm r2 = new o.Lpn$LWm // Catch: java.lang.NumberFormatException -> L7f
r2.<init>() // Catch: java.lang.NumberFormatException -> L7f
int r3 = r13.length() // Catch: java.lang.NumberFormatException -> L7f
r4 = 1
r6 = r0
r5 = r4
L23:
if (r5 >= r3) goto L7a
r2.a = r0 // Catch: java.lang.NumberFormatException -> L7f
r8 = r0
r9 = r8
r10 = r9
r7 = r5
L2b:
int r11 = r13.length() // Catch: java.lang.NumberFormatException -> L7f
if (r7 >= r11) goto L5f
char r11 = r13.charAt(r7) // Catch: java.lang.NumberFormatException -> L7f
r12 = 32
if (r11 == r12) goto L58
r12 = 69
if (r11 == r12) goto L56
r12 = 101(0x65, float:1.42E-43)
if (r11 == r12) goto L56
switch(r11) {
case 44: goto L58;
case 45: goto L4d;
case 46: goto L45;
default: goto L44;
} // Catch: java.lang.NumberFormatException -> L7f
L44:
goto L54
L45:
if (r8 != 0) goto L4a
r9 = r0
r8 = r4
goto L5a
L4a:
r2.a = r4 // Catch: java.lang.NumberFormatException -> L7f
goto L58
L4d:
if (r7 == r5) goto L54
if (r9 != 0) goto L54
r2.a = r4 // Catch: java.lang.NumberFormatException -> L7f
goto L58
L54:
r9 = r0
goto L5a
L56:
r9 = r4
goto L5a
L58:
r9 = r0
r10 = r4
L5a:
if (r10 != 0) goto L5f
int r7 = r7 + 1
goto L2b
L5f:
r2.c = r7 // Catch: java.lang.NumberFormatException -> L7f
int r7 = r2.c // Catch: java.lang.NumberFormatException -> L7f
if (r5 >= r7) goto L71
java.lang.String r5 = r13.substring(r5, r7) // Catch: java.lang.NumberFormatException -> L7f
float r5 = java.lang.Float.parseFloat(r5) // Catch: java.lang.NumberFormatException -> L7f
r1[r6] = r5 // Catch: java.lang.NumberFormatException -> L7f
int r6 = r6 + 1
L71:
boolean r5 = r2.a // Catch: java.lang.NumberFormatException -> L7f
if (r5 == 0) goto L77
r5 = r7
goto L23
L77:
int r5 = r7 + 1
goto L23
L7a:
float[] r13 = c(r1, r6) // Catch: java.lang.NumberFormatException -> L7f
return r13
L7f:
r0 = move-exception
java.lang.RuntimeException r1 = new java.lang.RuntimeException
java.lang.StringBuilder r2 = new java.lang.StringBuilder
java.lang.String r3 = "error in parsing \""
r2.<init>(r3)
r2.append(r13)
java.lang.String r13 = "\""
r2.append(r13)
java.lang.String r13 = r2.toString()
r1.<init>(r13, r0)
throw r1
L99:
float[] r13 = new float[r0]
return r13
*/
throw new UnsupportedOperationException("Method not decompiled: o.C0661Lpn.d(java.lang.String):float[]");
}
/* renamed from: o.Lpn$HBt */
/* loaded from: classes.dex */
public static class HBt {
public char b;
public float[] c;
HBt(char c, float[] fArr) {
this.b = c;
this.c = fArr;
}
HBt(HBt hBt) {
this.b = hBt.b;
float[] fArr = hBt.c;
this.c = C0661Lpn.c(fArr, fArr.length);
}
public static void oI_(HBt[] hBtArr, Path path) {
int i;
int i2;
float[] fArr;
char c;
int i3;
float f;
float f2;
float f3;
float f4;
float f5;
float f6;
float f7;
float f8;
float f9;
float f10;
float f11;
float f12;
float f13;
float f14;
float f15;
float f16;
float f17;
HBt[] hBtArr2 = hBtArr;
int i4 = 6;
float[] fArr2 = new float[6];
char c2 = 'm';
int i5 = 0;
char c3 = 'm';
int i6 = 0;
while (i6 < hBtArr2.length) {
HBt hBt = hBtArr2[i6];
char c4 = hBt.b;
float[] fArr3 = hBt.c;
float f18 = fArr2[i5];
float f19 = fArr2[1];
float f20 = fArr2[2];
float f21 = fArr2[3];
float f22 = fArr2[4];
float f23 = fArr2[5];
switch (c4) {
case 'A':
case 'a':
i = 7;
break;
case 'C':
case 'c':
i = i4;
break;
case 'H':
case 'V':
case 'h':
case 'v':
i = 1;
break;
case 'Q':
case 'S':
case 'q':
case 's':
i = 4;
break;
case 'Z':
case 'z':
path.close();
path.moveTo(f22, f23);
f18 = f22;
f20 = f18;
f19 = f23;
f21 = f19;
break;
}
i = 2;
float f24 = f22;
float f25 = f23;
float f26 = f18;
float f27 = f19;
int i7 = i5;
while (i7 < fArr3.length) {
if (c4 != 'A') {
if (c4 != 'C') {
if (c4 == 'H') {
i2 = i7;
fArr = fArr3;
c = c4;
i3 = i6;
path.lineTo(fArr[i2], f27);
f26 = fArr[i2];
} else if (c4 == 'Q') {
i2 = i7;
fArr = fArr3;
c = c4;
i3 = i6;
int i8 = i2 + 1;
int i9 = i2 + 2;
int i10 = i2 + 3;
path.quadTo(fArr[i2], fArr[i8], fArr[i9], fArr[i10]);
f = fArr[i2];
f2 = fArr[i8];
f26 = fArr[i9];
f27 = fArr[i10];
} else if (c4 == 'V') {
i2 = i7;
fArr = fArr3;
c = c4;
i3 = i6;
path.lineTo(f26, fArr[i2]);
f27 = fArr[i2];
} else if (c4 != 'a') {
if (c4 != 'c') {
if (c4 == 'h') {
i2 = i7;
path.rLineTo(fArr3[i2], BitmapDescriptorFactory.HUE_RED);
f26 += fArr3[i2];
} else if (c4 != 'q') {
if (c4 == 'v') {
i2 = i7;
f8 = f27;
path.rLineTo(BitmapDescriptorFactory.HUE_RED, fArr3[i2]);
f9 = fArr3[i2];
} else if (c4 == 'L') {
i2 = i7;
int i11 = i2 + 1;
path.lineTo(fArr3[i2], fArr3[i11]);
f26 = fArr3[i2];
f27 = fArr3[i11];
} else if (c4 == 'M') {
i2 = i7;
f26 = fArr3[i2];
f27 = fArr3[i2 + 1];
if (i2 > 0) {
path.lineTo(f26, f27);
} else {
path.moveTo(f26, f27);
f25 = f27;
f24 = f26;
}
} else if (c4 == 'S') {
i2 = i7;
float f28 = f27;
float f29 = f26;
if (c3 == 'c' || c3 == 's' || c3 == 'C' || c3 == 'S') {
f10 = (f28 * 2.0f) - f21;
f11 = (f29 * 2.0f) - f20;
} else {
f11 = f29;
f10 = f28;
}
int i12 = i2 + 1;
int i13 = i2 + 2;
int i14 = i2 + 3;
path.cubicTo(f11, f10, fArr3[i2], fArr3[i12], fArr3[i13], fArr3[i14]);
f4 = fArr3[i2];
f7 = fArr3[i12];
f26 = fArr3[i13];
f27 = fArr3[i14];
f21 = f7;
f20 = f4;
} else if (c4 == 'T') {
i2 = i7;
float f30 = f27;
float f31 = f26;
if (c3 == 'q' || c3 == 't' || c3 == 'Q' || c3 == 'T') {
f12 = (f31 * 2.0f) - f20;
f13 = (f30 * 2.0f) - f21;
} else {
f12 = f31;
f13 = f30;
}
int i15 = i2 + 1;
path.quadTo(f12, f13, fArr3[i2], fArr3[i15]);
f21 = f13;
f20 = f12;
fArr = fArr3;
c = c4;
i3 = i6;
f26 = fArr3[i2];
f27 = fArr3[i15];
} else if (c4 == 'l') {
i2 = i7;
f8 = f27;
int i16 = i2 + 1;
path.rLineTo(fArr3[i2], fArr3[i16]);
f26 += fArr3[i2];
f9 = fArr3[i16];
} else if (c4 == c2) {
i2 = i7;
float f32 = fArr3[i2];
f26 += f32;
float f33 = fArr3[i2 + 1];
f27 += f33;
if (i2 > 0) {
path.rLineTo(f32, f33);
} else {
path.rMoveTo(f32, f33);
f25 = f27;
f24 = f26;
}
} else if (c4 == 's') {
if (c3 == 'c' || c3 == 's' || c3 == 'C' || c3 == 'S') {
f14 = f26 - f20;
f15 = f27 - f21;
} else {
f14 = BitmapDescriptorFactory.HUE_RED;
f15 = BitmapDescriptorFactory.HUE_RED;
}
int i17 = i7 + 1;
int i18 = i7 + 2;
int i19 = i7 + 3;
i2 = i7;
f3 = f27;
float f34 = f26;
path.rCubicTo(f14, f15, fArr3[i7], fArr3[i17], fArr3[i18], fArr3[i19]);
f4 = fArr3[i2] + f34;
f5 = fArr3[i17] + f3;
f26 = f34 + fArr3[i18];
f6 = fArr3[i19];
} else if (c4 == 't') {
if (c3 == 'q' || c3 == 't' || c3 == 'Q' || c3 == 'T') {
f16 = f26 - f20;
f17 = f27 - f21;
} else {
f17 = BitmapDescriptorFactory.HUE_RED;
f16 = BitmapDescriptorFactory.HUE_RED;
}
int i20 = i7 + 1;
path.rQuadTo(f16, f17, fArr3[i7], fArr3[i20]);
float f35 = f16 + f26;
f21 = f17 + f27;
f26 = fArr3[i7] + f26;
i2 = i7;
f27 = fArr3[i20] + f27;
fArr = fArr3;
c = c4;
i3 = i6;
f20 = f35;
} else {
i2 = i7;
}
f27 = f8 + f9;
} else {
i2 = i7;
f3 = f27;
float f36 = f26;
int i21 = i2 + 1;
int i22 = i2 + 2;
int i23 = i2 + 3;
path.rQuadTo(fArr3[i2], fArr3[i21], fArr3[i22], fArr3[i23]);
f4 = fArr3[i2] + f36;
f5 = fArr3[i21] + f3;
f26 = f36 + fArr3[i22];
f6 = fArr3[i23];
}
fArr = fArr3;
c = c4;
i3 = i6;
} else {
i2 = i7;
f3 = f27;
float f37 = f26;
int i24 = i2 + 2;
int i25 = i2 + 3;
int i26 = i2 + 4;
int i27 = i2 + 5;
path.rCubicTo(fArr3[i2], fArr3[i2 + 1], fArr3[i24], fArr3[i25], fArr3[i26], fArr3[i27]);
f4 = fArr3[i24] + f37;
f5 = fArr3[i25] + f3;
f26 = f37 + fArr3[i26];
f6 = fArr3[i27];
}
f27 = f3 + f6;
f7 = f5;
f21 = f7;
f20 = f4;
fArr = fArr3;
c = c4;
i3 = i6;
} else {
i2 = i7;
float f38 = f27;
float f39 = f26;
int i28 = i2 + 5;
int i29 = i2 + 6;
fArr = fArr3;
c = c4;
i3 = i6;
oH_(path, f39, f38, fArr3[i28] + f39, fArr3[i29] + f38, fArr3[i2], fArr3[i2 + 1], fArr3[i2 + 2], fArr3[i2 + 3] != BitmapDescriptorFactory.HUE_RED, fArr3[i2 + 4] != BitmapDescriptorFactory.HUE_RED);
f26 = f39 + fArr[i28];
f27 = f38 + fArr[i29];
}
i7 = i2 + i;
c3 = c;
c4 = c3;
fArr3 = fArr;
i6 = i3;
c2 = 'm';
i5 = 0;
} else {
i2 = i7;
fArr = fArr3;
c = c4;
i3 = i6;
int i30 = i2 + 2;
int i31 = i2 + 3;
int i32 = i2 + 4;
int i33 = i2 + 5;
path.cubicTo(fArr[i2], fArr[i2 + 1], fArr[i30], fArr[i31], fArr[i32], fArr[i33]);
f26 = fArr[i32];
f27 = fArr[i33];
f = fArr[i30];
f2 = fArr[i31];
}
f20 = f;
f21 = f2;
i7 = i2 + i;
c3 = c;
c4 = c3;
fArr3 = fArr;
i6 = i3;
c2 = 'm';
i5 = 0;
} else {
i2 = i7;
fArr = fArr3;
c = c4;
i3 = i6;
int i34 = i2 + 5;
int i35 = i2 + 6;
oH_(path, f26, f27, fArr[i34], fArr[i35], fArr[i2], fArr[i2 + 1], fArr[i2 + 2], fArr[i2 + 3] != BitmapDescriptorFactory.HUE_RED, fArr[i2 + 4] != BitmapDescriptorFactory.HUE_RED);
f26 = fArr[i34];
f27 = fArr[i35];
}
f21 = f27;
f20 = f26;
i7 = i2 + i;
c3 = c;
c4 = c3;
fArr3 = fArr;
i6 = i3;
c2 = 'm';
i5 = 0;
}
int i36 = i6;
fArr2[i5] = f26;
fArr2[1] = f27;
fArr2[2] = f20;
fArr2[3] = f21;
fArr2[4] = f24;
fArr2[5] = f25;
i6 = i36 + 1;
i4 = 6;
c2 = 'm';
c3 = hBtArr[i36].b;
hBtArr2 = hBtArr;
}
}
private static void oH_(Path path, float f, float f2, float f3, float f4, float f5, float f6, float f7, boolean z, boolean z2) {
double d;
double d2;
float f8 = f;
float f9 = f3;
float f10 = f5;
float f11 = f6;
float f12 = f7;
while (true) {
double radians = Math.toRadians(f12);
double cos = Math.cos(radians);
double sin = Math.sin(radians);
double d3 = f8;
double d4 = f2;
double d5 = f10;
double d6 = ((d3 * cos) + (d4 * sin)) / d5;
double d7 = d3;
float f13 = f10;
double d8 = f11;
double d9 = (((-f8) * sin) + (d4 * cos)) / d8;
double d10 = d4;
double d11 = f4;
double d12 = ((f9 * cos) + (d11 * sin)) / d5;
double d13 = (((-f9) * sin) + (d11 * cos)) / d8;
double d14 = d6 - d12;
double d15 = d9 - d13;
double d16 = (d6 + d12) / 2.0d;
double d17 = (d9 + d13) / 2.0d;
double d18 = (d14 * d14) + (d15 * d15);
if (d18 == 0.0d) {
return;
}
double d19 = (1.0d / d18) - 0.25d;
if (d19 < 0.0d) {
float sqrt = (float) (Math.sqrt(d18) / 1.99999d);
f10 = f13 * sqrt;
f11 *= sqrt;
f8 = f;
f9 = f3;
f12 = f7;
} else {
double sqrt2 = Math.sqrt(d19);
double d20 = d14 * sqrt2;
double d21 = sqrt2 * d15;
if (z == z2) {
d = d16 - d21;
d2 = d17 + d20;
} else {
d = d16 + d21;
d2 = d17 - d20;
}
double atan2 = Math.atan2(d9 - d2, d6 - d);
double atan22 = Math.atan2(d13 - d2, d12 - d) - atan2;
if (z2 != (atan22 >= 0.0d)) {
atan22 = atan22 > 0.0d ? atan22 - 6.283185307179586d : atan22 + 6.283185307179586d;
}
double d22 = d * d5;
double d23 = d2 * d8;
double d24 = (d22 * cos) - (d23 * sin);
double d25 = (d22 * sin) + (d23 * cos);
int ceil = (int) Math.ceil(Math.abs((atan22 * 4.0d) / 3.141592653589793d));
double cos2 = Math.cos(radians);
double sin2 = Math.sin(radians);
double cos3 = Math.cos(atan2);
double sin3 = Math.sin(atan2);
double d26 = -d5;
double d27 = d26 * cos2;
double d28 = d8 * sin2;
double d29 = d26 * sin2;
double d30 = d8 * cos2;
double d31 = atan22 / ceil;
double d32 = (sin3 * d29) + (cos3 * d30);
double d33 = (sin3 * d27) - (cos3 * d28);
double d34 = d32;
int i = 0;
double d35 = atan2;
while (i < ceil) {
double d36 = d35 + d31;
double sin4 = Math.sin(d36);
double cos4 = Math.cos(d36);
double d37 = d31;
double d38 = (d24 + ((d5 * cos2) * cos4)) - (d28 * sin4);
double d39 = d24;
double d40 = d25 + (d5 * sin2 * cos4) + (d30 * sin4);
double d41 = (d27 * sin4) - (d28 * cos4);
double d42 = (sin4 * d29) + (cos4 * d30);
double d43 = d36 - d35;
double tan = Math.tan(d43 / 2.0d);
double sin5 = (Math.sin(d43) * (Math.sqrt(((tan * 3.0d) * tan) + 4.0d) - 1.0d)) / 3.0d;
path.rLineTo(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED);
path.cubicTo((float) (d7 + (d33 * sin5)), (float) (d10 + (d34 * sin5)), (float) (d38 - (sin5 * d41)), (float) (d40 - (sin5 * d42)), (float) d38, (float) d40);
i++;
cos2 = cos2;
d7 = d38;
d10 = d40;
ceil = ceil;
d35 = d36;
d34 = d42;
d33 = d41;
d29 = d29;
d31 = d37;
d24 = d39;
}
return;
}
}
}
}
}