package o; import android.graphics.Color; import android.os.Process; import android.os.SystemClock; import android.telephony.cdma.CdmaCellLocation; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.view.KeyEvent; import android.view.ViewConfiguration; import android.widget.EditText; import android.widget.ExpandableListView; import com.google.common.base.Ascii; import java.lang.ref.WeakReference; import java.lang.reflect.Method; import java.math.BigDecimal; import java.text.DecimalFormat; /* loaded from: classes5.dex */ public class fLX implements TextWatcher { private HBt c; private final WeakReference d; private double e = 9.9999999999999E9d; private static final byte[] $$a = {Ascii.CAN, -103, 8, 6}; private static final int $$b = 235; private static int $10 = 0; private static int $11 = 1; private static int j = 0; private static int i = 1; private static char[] a = {49027}; private static char b = 35368; @FunctionalInterface /* loaded from: classes5.dex */ public interface HBt { void d(BigDecimal bigDecimal); } /* JADX WARN: Removed duplicated region for block: B:10:0x0023 */ /* JADX WARN: Removed duplicated region for block: B:7:0x001b */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0023 -> B:4:0x0027). Please report as a decompilation issue!!! */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static void g(byte r5, byte r6, int r7, java.lang.Object[] r8) { /* int r6 = r6 + 4 int r5 = r5 * 3 int r0 = r5 + 1 byte[] r1 = o.fLX.$$a int r7 = r7 + 117 byte[] r0 = new byte[r0] r2 = 0 if (r1 != 0) goto L13 r4 = r7 r3 = r2 r7 = r5 goto L27 L13: r3 = r2 L14: byte r4 = (byte) r7 int r6 = r6 + 1 r0[r3] = r4 if (r3 != r5) goto L23 java.lang.String r5 = new java.lang.String r5.(r0, r2) r8[r2] = r5 return L23: int r3 = r3 + 1 r4 = r1[r6] L27: int r7 = r7 + r4 goto L14 */ throw new UnsupportedOperationException("Method not decompiled: o.fLX.g(byte, byte, int, java.lang.Object[]):void"); } public fLX(EditText editText, HBt hBt) { this.d = new WeakReference<>(editText); this.c = hBt; } @Override // android.text.TextWatcher public void afterTextChanged(Editable editable) { int i2 = 2 % 2; EditText editText = this.d.get(); if (editText == null || editable == null) { return; } int i3 = j + 45; i = i3 % 128; int i4 = i3 % 2; String obj = editable.toString(); if (obj.equalsIgnoreCase(".") || obj.isEmpty()) { return; } BigDecimal E = C6583cXR.E(obj); if (editable.toString().indexOf(".") != editable.length() - 1) { int i5 = i + 49; j = i5 % 128; int i6 = i5 % 2; editText.removeTextChangedListener(this); int selectionStart = editText.getSelectionStart(); int length = editText.getText().length(); editText.setText(e(obj)); editText.addTextChangedListener(this); if (editText.getText().length() - length == 1) { int i7 = i + 55; j = i7 % 128; int i8 = i7 % 2; selectionStart++; } if (selectionStart >= editText.getText().length()) { selectionStart = editText.getText().length(); } editText.setSelection(selectionStart); } HBt hBt = this.c; if (hBt != null) { hBt.d(E); } } private static String e(String str) { int i2 = 2 % 2; int i3 = j + 49; i = i3 % 128; int i4 = i3 % 2; String str2 = "###,###,###,##0."; for (int i5 = 0; i5 < 4; i5++) { int i6 = i + 7; j = i6 % 128; int i7 = i6 % 2; if (i5 < ((Integer) C6583cXR.c(new Object[]{str}, -681284434, 681284436, (int) System.currentTimeMillis())).intValue()) { StringBuilder sb = new StringBuilder(); sb.append(str2); Object[] objArr = new Object[1]; f(Color.argb(0, 0, 0, 0) + 1, new char[]{13819}, (byte) ((KeyEvent.getMaxKeyCode() >> 16) + 81), objArr); sb.append(((String) objArr[0]).intern()); str2 = sb.toString(); } else { StringBuilder sb2 = new StringBuilder(); sb2.append(str2); sb2.append("#"); str2 = sb2.toString(); int i8 = i + 53; j = i8 % 128; int i9 = i8 % 2; } } return new DecimalFormat(str2).format(C6583cXR.E(str)); } private static void f(int i2, char[] cArr, byte b2, Object[] objArr) { int i3; int i4; int i5 = 2 % 2; IRS irs = new IRS(); char[] cArr2 = a; long j2 = 0; if (cArr2 != null) { int i6 = $10 + 125; $11 = i6 % 128; int i7 = i6 % 2; int length = cArr2.length; char[] cArr3 = new char[length]; int i8 = 0; while (i8 < length) { try { Object[] objArr2 = {Integer.valueOf(cArr2[i8])}; Object obj = xzZ.y.get(-1987398494); if (obj == null) { Class cls = (Class) xzZ.c(ExpandableListView.getPackedPositionChild(j2) + 299, (-16777211) - Color.rgb(0, 0, 0), (char) TextUtils.indexOf("", "", 0)); byte b3 = (byte) 0; byte b4 = (byte) (b3 - 1); Object[] objArr3 = new Object[1]; g(b3, b4, (byte) (b4 + 1), objArr3); obj = cls.getMethod((String) objArr3[0], Integer.TYPE); xzZ.y.put(-1987398494, obj); } cArr3[i8] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue(); i8++; int i9 = $11 + 9; $10 = i9 % 128; int i10 = i9 % 2; j2 = 0; } catch (Throwable th) { Throwable cause = th.getCause(); if (cause == null) { throw th; } throw cause; } } cArr2 = cArr3; } try { Object[] objArr4 = {Integer.valueOf(b)}; Object obj2 = xzZ.y.get(-1987398494); int i11 = 8; if (obj2 == null) { Class cls2 = (Class) xzZ.c(TextUtils.indexOf("", "") + 298, (SystemClock.elapsedRealtimeNanos() > 0L ? 1 : (SystemClock.elapsedRealtimeNanos() == 0L ? 0 : -1)) + 4, (char) (ViewConfiguration.getScrollBarSize() >> 8)); byte b5 = (byte) 0; byte b6 = (byte) (b5 - 1); Object[] objArr5 = new Object[1]; g(b5, b6, (byte) (b6 + 1), objArr5); obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE); xzZ.y.put(-1987398494, obj2); } char charValue = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue(); char[] cArr4 = new char[i2]; if (i2 % 2 != 0) { i3 = i2 - 1; cArr4[i3] = (char) (cArr[i3] - b2); } else { i3 = i2; } if (i3 > 1) { irs.e = 0; while (irs.e < i3) { irs.b = cArr[irs.e]; irs.c = cArr[irs.e + 1]; if (irs.b == irs.c) { int i12 = $10 + 71; $11 = i12 % 128; if (i12 % 2 == 0) { cArr4[irs.e] = (char) (irs.b + b2); cArr4[irs.e] = (char) (irs.c - b2); } else { cArr4[irs.e] = (char) (irs.b - b2); cArr4[irs.e + 1] = (char) (irs.c - b2); } i4 = i11; } else { Object[] objArr6 = new Object[13]; objArr6[12] = irs; objArr6[11] = Integer.valueOf(charValue); objArr6[10] = irs; objArr6[9] = irs; objArr6[i11] = Integer.valueOf(charValue); objArr6[7] = irs; objArr6[6] = irs; objArr6[5] = Integer.valueOf(charValue); objArr6[4] = irs; objArr6[3] = irs; objArr6[2] = Integer.valueOf(charValue); objArr6[1] = irs; objArr6[0] = irs; Object obj3 = xzZ.y.get(822107368); if (obj3 == null) { Class cls3 = (Class) xzZ.c((ViewConfiguration.getScrollBarSize() >> i11) + 233, 6 - (ViewConfiguration.getGlobalActionKeyTimeout() > 0L ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0L ? 0 : -1)), (char) ((CdmaCellLocation.convertQuartSecToDecDegrees(0) > 0.0d ? 1 : (CdmaCellLocation.convertQuartSecToDecDegrees(0) == 0.0d ? 0 : -1)) + 22024)); byte b7 = (byte) 0; byte b8 = (byte) (b7 - 1); Object[] objArr7 = new Object[1]; g(b7, b8, (byte) (b8 + 4), objArr7); obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class, Integer.TYPE, Object.class, Object.class, Integer.TYPE, Object.class, Object.class, Integer.TYPE, Object.class, Object.class, Integer.TYPE, Object.class); xzZ.y.put(822107368, obj3); } if (((Integer) ((Method) obj3).invoke(null, objArr6)).intValue() == irs.j) { Object[] objArr8 = {irs, irs, Integer.valueOf(charValue), Integer.valueOf(charValue), irs, irs, Integer.valueOf(charValue), Integer.valueOf(charValue), irs, Integer.valueOf(charValue), irs}; Object obj4 = xzZ.y.get(-1152873385); if (obj4 != null) { i4 = 8; } else { Class cls4 = (Class) xzZ.c(Color.red(0) + 327, 5 - (Process.myPid() >> 22), (char) Color.blue(0)); byte b9 = (byte) 0; byte b10 = (byte) (b9 - 1); Object[] objArr9 = new Object[1]; g(b9, b10, (byte) (-b10), objArr9); String str = (String) objArr9[0]; i4 = 8; obj4 = cls4.getMethod(str, Object.class, Object.class, Integer.TYPE, Integer.TYPE, Object.class, Object.class, Integer.TYPE, Integer.TYPE, Object.class, Integer.TYPE, Object.class); xzZ.y.put(-1152873385, obj4); } int intValue = ((Integer) ((Method) obj4).invoke(null, objArr8)).intValue(); int i13 = (irs.d * charValue) + irs.j; cArr4[irs.e] = cArr2[intValue]; cArr4[irs.e + 1] = cArr2[i13]; } else { i4 = 8; if (irs.a == irs.d) { int i14 = $11 + 65; $10 = i14 % 128; int i15 = i14 % 2; irs.f = ((irs.f + charValue) - 1) % charValue; irs.j = ((irs.j + charValue) - 1) % charValue; int i16 = (irs.a * charValue) + irs.f; int i17 = (irs.d * charValue) + irs.j; cArr4[irs.e] = cArr2[i16]; cArr4[irs.e + 1] = cArr2[i17]; } else { int i18 = (irs.a * charValue) + irs.j; int i19 = (irs.d * charValue) + irs.f; cArr4[irs.e] = cArr2[i18]; cArr4[irs.e + 1] = cArr2[i19]; } } } irs.e += 2; i11 = i4; } } int i20 = $10 + 91; $11 = i20 % 128; int i21 = i20 % 2; for (int i22 = 0; i22 < i2; i22++) { cArr4[i22] = (char) (cArr4[i22] ^ 13722); } objArr[0] = new String(cArr4); } catch (Throwable th2) { Throwable cause2 = th2.getCause(); if (cause2 == null) { throw th2; } throw cause2; } } public final void a(HBt hBt) { int i2 = 2 % 2; int i3 = i; int i4 = i3 + 35; j = i4 % 128; int i5 = i4 % 2; this.c = hBt; if (i5 != 0) { Object obj = null; obj.hashCode(); throw null; } int i6 = i3 + 111; j = i6 % 128; int i7 = i6 % 2; } @Override // android.text.TextWatcher public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) { int i5 = 2 % 2; int i6 = j + 97; i = i6 % 128; if (i6 % 2 == 0) { int i7 = 13 / 0; } } @Override // android.text.TextWatcher public void beforeTextChanged(CharSequence charSequence, int i2, int i3, int i4) { int i5 = 2 % 2; int i6 = i + 65; j = i6 % 128; int i7 = i6 % 2; } }