package com.huawei.hms.utils; import android.graphics.Color; import android.graphics.PointF; import android.media.AudioTrack; import android.os.Process; import android.text.TextUtils; import android.view.KeyEvent; import android.view.ViewConfiguration; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.huawei.hms.framework.common.ExceptionCode; import java.lang.reflect.Method; import java.util.regex.Pattern; import o.xzZ; import o.zUI; /* loaded from: classes2.dex */ public class StringUtil { private static final Pattern a; private static int d; private static int e; private static final byte[] $$a = {105, 77, -86, 73}; private static final int $$b = 158; private static int $10 = 0; private static int $11 = 1; private static int c = 0; static { d = 1; e(); a = Pattern.compile("(^([0-9]{1,2}\\.){2}[0-9]{1,2}$)|(^([0-9]{1,2}\\.){3}[0-9]{1,3}$)"); int i = c + 29; d = i % 128; if (i % 2 == 0) { int i2 = 30 / 0; } } private StringUtil() { } /* JADX WARN: Removed duplicated region for block: B:10:0x0028 */ /* JADX WARN: Removed duplicated region for block: B:7:0x0020 */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0028 -> B:4:0x002a). 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 f(short r5, int r6, short r7, java.lang.Object[] r8) { /* byte[] r0 = com.huawei.hms.utils.StringUtil.$$a int r7 = r7 * 2 int r1 = 1 - r7 int r5 = r5 * 7 int r5 = r5 + 69 int r6 = r6 + 4 byte[] r1 = new byte[r1] r2 = 0 int r7 = 0 - r7 if (r0 != 0) goto L16 r3 = r7 r4 = r2 goto L2a L16: r3 = r2 L17: byte r4 = (byte) r5 r1[r3] = r4 int r6 = r6 + 1 int r4 = r3 + 1 if (r3 != r7) goto L28 java.lang.String r5 = new java.lang.String r5.(r1, r2) r8[r2] = r5 return L28: r3 = r0[r6] L2a: int r3 = -r3 int r5 = r5 + r3 r3 = r4 goto L17 */ throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.utils.StringUtil.f(short, int, short, java.lang.Object[]):void"); } public static String objDesc(Object obj) { int i = 2 % 2; if (obj == null) { int i2 = d + 43; c = i2 % 128; if (i2 % 2 != 0) { Object[] objArr = new Object[1]; b(2 % KeyEvent.keyCodeFromString(""), 4 >>> (AudioTrack.getMaxVolume() > 2.0f ? 1 : (AudioTrack.getMaxVolume() == 2.0f ? 0 : -1)), ViewConfiguration.getScrollDefaultDelay() + 25719, new char[]{65534, 65534, 7, 0}, true, objArr); return ((String) objArr[0]).intern(); } Object[] objArr2 = new Object[1]; b(KeyEvent.keyCodeFromString("") + 4, (AudioTrack.getMaxVolume() > BitmapDescriptorFactory.HUE_RED ? 1 : (AudioTrack.getMaxVolume() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 3, 220 - (ViewConfiguration.getScrollDefaultDelay() >> 16), new char[]{65534, 65534, 7, 0}, true, objArr2); return ((String) objArr2[0]).intern(); } StringBuilder sb = new StringBuilder(); sb.append(obj.getClass().getName()); sb.append('@'); sb.append(Integer.toHexString(obj.hashCode())); String obj2 = sb.toString(); int i3 = c + 99; d = i3 % 128; int i4 = i3 % 2; return obj2; } public static boolean checkVersion(String str) { int i = 2 % 2; int i2 = d + 23; c = i2 % 128; if (i2 % 2 == 0) { boolean find = a.matcher(str).find(); int i3 = d + 113; c = i3 % 128; if (i3 % 2 != 0) { int i4 = 95 / 0; } return find; } a.matcher(str).find(); Object obj = null; obj.hashCode(); throw null; } public static int convertVersion2Integer(String str) { int i = 2 % 2; int i2 = c + 27; d = i2 % 128; int i3 = i2 % 2; if (!checkVersion(str)) { return 0; } String[] split = str.split("\\."); if (split.length < 3) { return 0; } int parseInt = (Integer.parseInt(split[0]) * ExceptionCode.CRASH_EXCEPTION) + (Integer.parseInt(split[1]) * 100000) + (Integer.parseInt(split[2]) * 1000); if (split.length == 4) { parseInt += Integer.parseInt(split[3]); int i4 = c + 97; d = i4 % 128; int i5 = i4 % 2; } int i6 = d + 49; c = i6 % 128; if (i6 % 2 == 0) { return parseInt; } throw null; } public static String addByteForNum(String str, int i, char c2) { int i2 = 2 % 2; if (str == null) { str = ""; } int length = str.length(); if (length == i) { return str; } if (length > i) { return str.substring(length - i); } StringBuffer stringBuffer = new StringBuffer(); while (length < i) { int i3 = d + 43; c = i3 % 128; int i4 = i3 % 2; stringBuffer.append(c2); length++; } stringBuffer.append(str); String obj = stringBuffer.toString(); int i5 = d + 23; c = i5 % 128; int i6 = i5 % 2; return obj; } private static void b(int i, int i2, int i3, char[] cArr, boolean z, Object[] objArr) { int i4 = 2 % 2; zUI zui = new zUI(); char[] cArr2 = new char[i]; zui.d = 0; while (zui.d < i) { zui.c = cArr[zui.d]; cArr2[zui.d] = (char) (i3 + zui.c); int i5 = zui.d; try { Object[] objArr2 = {Integer.valueOf(cArr2[i5]), Integer.valueOf(e)}; Object obj = xzZ.y.get(880493502); if (obj == null) { Class cls = (Class) xzZ.c(143 - (ViewConfiguration.getWindowTouchSlop() >> 8), (ViewConfiguration.getTouchSlop() >> 8) + 7, (char) (1 - (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)))); byte b = (byte) 0; byte b2 = (byte) (b - 1); Object[] objArr3 = new Object[1]; f(b, b2, (byte) (b2 + 1), objArr3); obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Integer.TYPE); xzZ.y.put(880493502, obj); } cArr2[i5] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue(); try { Object[] objArr4 = {zui, zui}; Object obj2 = xzZ.y.get(1294990079); if (obj2 == null) { Class cls2 = (Class) xzZ.c(342 - ((Process.getThreadPriority(0) + 20) >> 6), (ViewConfiguration.getKeyRepeatDelay() >> 16) + 5, (char) (ViewConfiguration.getScrollBarFadeDuration() >> 16)); byte b3 = (byte) 1; byte b4 = (byte) (-b3); Object[] objArr5 = new Object[1]; f(b3, b4, (byte) (b4 + 1), objArr5); obj2 = cls2.getMethod((String) objArr5[0], Object.class, Object.class); xzZ.y.put(1294990079, obj2); } ((Method) obj2).invoke(null, objArr4); } catch (Throwable th) { Throwable cause = th.getCause(); if (cause == null) { throw th; } throw cause; } } catch (Throwable th2) { Throwable cause2 = th2.getCause(); if (cause2 == null) { throw th2; } throw cause2; } } if (i2 > 0) { zui.a = i2; char[] cArr3 = new char[i]; System.arraycopy(cArr2, 0, cArr3, 0, i); System.arraycopy(cArr3, 0, cArr2, i - zui.a, zui.a); System.arraycopy(cArr3, zui.a, cArr2, 0, i - zui.a); } if (z) { int i6 = $11 + 3; $10 = i6 % 128; int i7 = i6 % 2; char[] cArr4 = new char[i]; zui.d = 0; while (zui.d < i) { int i8 = $10 + 87; $11 = i8 % 128; if (i8 % 2 == 0) { cArr4[zui.d] = cArr2[(i << zui.d) >>> 1]; try { Object[] objArr6 = {zui, zui}; Object obj3 = xzZ.y.get(1294990079); if (obj3 == null) { Class cls3 = (Class) xzZ.c((ViewConfiguration.getDoubleTapTimeout() >> 16) + 342, TextUtils.indexOf((CharSequence) "", '0') + 6, (char) Color.red(0)); byte b5 = (byte) 1; byte b6 = (byte) (-b5); Object[] objArr7 = new Object[1]; f(b5, b6, (byte) (b6 + 1), objArr7); obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class); xzZ.y.put(1294990079, obj3); } ((Method) obj3).invoke(null, objArr6); } catch (Throwable th3) { Throwable cause3 = th3.getCause(); if (cause3 == null) { throw th3; } throw cause3; } } else { cArr4[zui.d] = cArr2[(i - zui.d) - 1]; Object[] objArr8 = {zui, zui}; Object obj4 = xzZ.y.get(1294990079); if (obj4 == null) { Class cls4 = (Class) xzZ.c((PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 342, Color.argb(0, 0, 0, 0) + 5, (char) ((Process.getThreadPriority(0) + 20) >> 6)); byte b7 = (byte) 1; byte b8 = (byte) (-b7); Object[] objArr9 = new Object[1]; f(b7, b8, (byte) (b8 + 1), objArr9); obj4 = cls4.getMethod((String) objArr9[0], Object.class, Object.class); xzZ.y.put(1294990079, obj4); } ((Method) obj4).invoke(null, objArr8); } } cArr2 = cArr4; } objArr[0] = new String(cArr2); } static void e() { e = 2015661641; } }