soul-browser/sources/java/com/google/android/gms/internal/ads/zzfj.java
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* Decompile and recreate Soul Browser v1.4.85 with APK CI builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix CI build: include bundled google.jks and remove PR trigger

The apktool build failed in CI because app/unknown/.../google.jks was
excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files
and commit the missing resource.

Also remove the redundant pull_request workflow trigger.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Change package ID to com.github.kaki87.soulbrowser

Rename the application ID so the rebuilt APK can be installed
alongside the original Soul Browser from Google Play.

- Update AndroidManifest package, permissions, providers, and actions
- Update R class references in smali (com/github/kaki87/soulbrowser/R)
- Update shortcuts.xml targetPackage
- Rename app label to "Soul Rebuild" for easy identification

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install compatibility: remove split APK metadata and bundle native libs

The rebuilt APK still declared requiredSplitTypes and Play Store split
metadata, causing Android to reject standalone installs as incompatible.

- Remove requiredSplitTypes and split-related manifest meta-data
- Merge native libs from all ABI splits with uncompressed storage
- Page-align before signing for extractNativeLibs=false
- Add .so to apktool doNotCompress list

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install failure: use apksigner v2/v3 and bundle arm64 native libs

Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only
produces v1 signatures, causing Android to reject the install.

- Sign with apksigner (v1+v2+v3) instead of jarsigner
- Add arm64-v8a native libraries from universal Soul Browser 1.4.79
- Set extractNativeLibs=true for reliable sideload installs
- Commit stable debug keystore for consistent signatures across builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Add committed debug keystore for consistent APK signatures

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix startup crash: use original classes2.dex desugar libraries

Apktool recompiles smali_classes2 into a broken classes2.dex, causing
ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init.

Inject the original classes2.dex (Java 8+ desugar libs) after apktool
build instead of using the recompiled version.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix missing drawable resources from density split APKs

The base APK is an app bundle module; density-specific drawables like
seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild,
causing Resources$NotFoundException at runtime.

- Merge non-9-patch resources from split APKs before apktool build
- Sync public.xml IDs from R smali only when backing files exist
- Add 713 density-specific resource IDs to public.xml

Co-authored-by: KaKi87 <KaKi87@pm.me>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-10 16:07:14 +02:00

618 lines
25 KiB
Java

package com.google.android.gms.internal.ads;
import android.app.UiModeManager;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.google.android.gms.common.ConnectionResult;
import com.google.api.client.http.HttpStatusCodes;
import java.math.RoundingMode;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.regex.Pattern;
import kotlin.KotlinVersion;
import kotlin.uuid.Uuid;
/* loaded from: classes.dex */
public final class zzfj {
/* renamed from: a, reason: collision with root package name */
public static final String f7405a;
public static final byte[] b;
/* renamed from: c, reason: collision with root package name */
public static final Pattern f7406c;
public static HashMap d;
public static final String[] e;
public static final String[] f;
public static final int[] g;
public static final int[] h;
public static final int[] i;
static {
String str = Build.DEVICE;
String str2 = Build.MODEL;
String str3 = Build.MANUFACTURER;
int i2 = Build.VERSION.SDK_INT;
int length = String.valueOf(str).length();
StringBuilder sb = new StringBuilder(length + 2 + String.valueOf(str2).length() + 2 + String.valueOf(str3).length() + 2 + String.valueOf(i2).length());
android.support.v4.media.a.z(sb, str, ", ", str2, ", ");
sb.append(str3);
sb.append(", ");
sb.append(i2);
f7405a = sb.toString();
b = new byte[0];
f7406c = Pattern.compile("(?:.*\\.)?isml?(?:/(manifest(.*))?)?", 2);
e = new String[]{"alb", "sq", "arm", "hy", "baq", "eu", "bur", "my", "tib", "bo", "chi", "zh", "cze", "cs", "dut", "nl", "ger", "de", "gre", "el", "fre", "fr", "geo", "ka", "ice", "is", "mac", "mk", "mao", "mi", "may", "ms", "per", "fa", "rum", "ro", "scc", "hbs-srp", "slo", "sk", "wel", "cy", "id", "ms-ind", "iw", "he", "heb", "he", "ji", "yi", "arb", "ar-arb", "in", "ms-ind", "ind", "ms-ind", "nb", "no-nob", "nob", "no-nob", "nn", "no-nno", "nno", "no-nno", "tw", "ak-twi", "twi", "ak-twi", "bs", "hbs-bos", "bos", "hbs-bos", "hr", "hbs-hrv", "hrv", "hbs-hrv", "sr", "hbs-srp", "srp", "hbs-srp", "cmn", "zh-cmn", "hak", "zh-hak", "nan", "zh-nan", "hsn", "zh-hsn"};
f = new String[]{"i-lux", "lb", "i-hak", "zh-hak", "i-navajo", "nv", "no-bok", "no-nob", "no-nyn", "no-nno", "zh-guoyu", "zh-cmn", "zh-hakka", "zh-hak", "zh-min-nan", "zh-nan", "zh-xiang", "zh-hsn"};
g = new int[]{0, 79764919, 159529838, 222504665, 319059676, 398814059, 445009330, 507990021, 638119352, 583659535, 797628118, 726387553, 890018660, 835552979, 1015980042, 944750013, 1276238704, 1221641927, 1167319070, 1095957929, 1595256236, 1540665371, 1452775106, 1381403509, 1780037320, 1859660671, 1671105958, 1733955601, 2031960084, 2111593891, 1889500026, 1952343757, -1742489888, -1662866601, -1851683442, -1788833735, -1960329156, -1880695413, -2103051438, -2040207643, -1104454824, -1159051537, -1213636554, -1284997759, -1389417084, -1444007885, -1532160278, -1603531939, -734892656, -789352409, -575645954, -646886583, -952755380, -1007220997, -827056094, -898286187, -231047128, -151282273, -71779514, -8804623, -515967244, -436212925, -390279782, -327299027, 881225847, 809987520, 1023691545, 969234094, 662832811, 591600412, 771767749, 717299826, 311336399, 374308984, 453813921, 533576470, 25881363, 88864420, 134795389, 214552010, 2023205639, 2086057648, 1897238633, 1976864222, 1804852699, 1867694188, 1645340341, 1724971778, 1587496639, 1516133128, 1461550545, 1406951526, 1302016099, 1230646740, 1142491917, 1087903418, -1398421865, -1469785312, -1524105735, -1578704818, -1079922613, -1151291908, -1239184603, -1293773166, -1968362705, -1905510760, -2094067647, -2014441994, -1716953613, -1654112188, -1876203875, -1796572374, -525066777, -462094256, -382327159, -302564546, -206542021, -143559028, -97365931, -17609246, -960696225, -1031934488, -817968335, -872425850, -709327229, -780559564, -600130067, -654598054, 1762451694, 1842216281, 1619975040, 1682949687, 2047383090, 2127137669, 1938468188, 2001449195, 1325665622, 1271206113, 1183200824, 1111960463, 1543535498, 1489069629, 1434599652, 1363369299, 622672798, 568075817, 748617968, 677256519, 907627842, 853037301, 1067152940, 995781531, 51762726, 131386257, 177728840, 240578815, 269590778, 349224269, 429104020, 491947555, -248556018, -168932423, -122852000, -60002089, -500490030, -420856475, -341238852, -278395381, -685261898, -739858943, -559578920, -630940305, -1004286614, -1058877219, -845023740, -916395085, -1119974018, -1174433591, -1262701040, -1333941337, -1371866206, -1426332139, -1481064244, -1552294533, -1690935098, -1611170447, -1833673816, -1770699233, -2009983462, -1930228819, -2119160460, -2056179517, 1569362073, 1498123566, 1409854455, 1355396672, 1317987909, 1246755826, 1192025387, 1137557660, 2072149281, 2135122070, 1912620623, 1992383480, 1753615357, 1816598090, 1627664531, 1707420964, 295390185, 358241886, 404320391, 483945776, 43990325, 106832002, 186451547, 266083308, 932423249, 861060070, 1041341759, 986742920, 613929101, 542559546, 756411363, 701822548, -978770311, -1050133554, -869589737, -924188512, -693284699, -764654318, -550540341, -605129092, -475935807, -413084042, -366743377, -287118056, -257573603, -194731862, -114850189, -35218492, -1984365303, -1921392450, -2143631769, -2063868976, -1698919467, -1635936670, -1824608069, -1744851700, -1347415887, -1418654458, -1506661409, -1561119128, -1129027987, -1200260134, -1254728445, -1309196108};
h = new int[]{0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935};
i = new int[]{0, 7, 14, 9, 28, 27, 18, 21, 56, 63, 54, 49, 36, 35, 42, 45, 112, 119, 126, 121, 108, 107, 98, 101, 72, 79, 70, 65, 84, 83, 90, 93, 224, 231, 238, 233, 252, 251, 242, 245, 216, 223, 214, 209, 196, 195, HttpStatusCodes.STATUS_CODE_ACCEPTED, 205, 144, 151, 158, 153, 140, 139, 130, 133, 168, 175, 166, 161, 180, 179, 186, 189, 199, 192, HttpStatusCodes.STATUS_CODE_CREATED, 206, 219, 220, 213, 210, KotlinVersion.MAX_COMPONENT_VALUE, 248, 241, 246, 227, 228, 237, 234, 183, 176, 185, 190, 171, 172, 165, 162, 143, 136, 129, 134, 147, 148, 157, 154, 39, 32, 41, 46, 59, 60, 53, 50, 31, 24, 17, 22, 3, 4, 13, 10, 87, 80, 89, 94, 75, 76, 69, 66, 111, 104, 97, 102, 115, 116, 125, 122, 137, 142, 135, Uuid.SIZE_BITS, 149, 146, 155, 156, 177, 182, 191, 184, 173, 170, 163, 164, 249, 254, 247, 240, 229, 226, 235, 236, 193, 198, 207, HttpStatusCodes.STATUS_CODE_OK, 221, 218, 211, 212, 105, 110, 103, 96, 117, 114, 123, 124, 81, 86, 95, 88, 77, 74, 67, 68, 25, 30, 23, 16, 5, 2, 11, 12, 33, 38, 47, 40, 61, 58, 51, 52, 78, 73, 64, 71, 82, 85, 92, 91, 118, 113, 120, 127, 106, 109, 100, 99, 62, 57, 48, 55, 34, 37, 44, 43, 6, 1, 8, 15, 26, 29, 20, 19, 174, 169, 160, 167, 178, 181, 188, 187, 150, 145, 152, 159, 138, 141, 132, 131, 222, 217, 208, 215, 194, 197, HttpStatusCodes.STATUS_CODE_NO_CONTENT, 203, 230, 225, 232, 239, 250, 253, 244, 243};
}
public static boolean a(int i2) {
return i2 == 3 || i2 == 2 || i2 == 268435456 || i2 == 21 || i2 == 1342177280 || i2 == 22 || i2 == 1610612736 || i2 == 4;
}
public static int b(int i2) {
int i3;
int i4 = 6396;
if (i2 != 10) {
if (i2 == 16) {
i3 = 205215996;
} else if (i2 != 24) {
switch (i2) {
case 1:
return 4;
case 2:
return 12;
case 3:
return 28;
case 4:
return HttpStatusCodes.STATUS_CODE_NO_CONTENT;
case 5:
return 220;
case 6:
return 252;
case 7:
return 1276;
case 8:
return 6396;
default:
switch (i2) {
case 12:
return 743676;
case 13:
i3 = 30136348;
break;
case 14:
i3 = 202070268;
break;
default:
return 0;
}
}
} else {
i3 = 67108860;
}
i4 = 0;
} else {
i3 = 737532;
}
return Build.VERSION.SDK_INT >= 32 ? i3 : i4;
}
public static int c(int i2) {
if (i2 == 30) {
return 34;
}
switch (i2) {
case 2:
case 3:
return 3;
case 4:
case 5:
case 6:
return 21;
case 7:
case 8:
return 23;
case 9:
case 10:
case 11:
case 12:
return 28;
default:
switch (i2) {
case 14:
return 25;
case 15:
case 16:
case 17:
case 18:
return 28;
default:
switch (i2) {
case 20:
return 30;
case 21:
case 22:
return 31;
default:
return Integer.MAX_VALUE;
}
}
}
}
public static int d(int i2) {
if (i2 != 2) {
if (i2 != 3) {
if (i2 != 4) {
if (i2 != 21) {
if (i2 != 22) {
if (i2 != 268435456) {
if (i2 != 1342177280) {
if (i2 != 1610612736) {
throw new IllegalArgumentException();
}
}
}
}
}
return 3;
}
return 4;
}
return 1;
}
return 2;
}
public static int e(int i2) {
if (i2 == 2 || i2 == 4) {
return 6005;
}
if (i2 == 10) {
return 6004;
}
if (i2 == 7) {
return 6005;
}
if (i2 == 8) {
return 6003;
}
switch (i2) {
case 15:
return 6003;
case 16:
case 18:
return 6005;
case 17:
case 19:
case 20:
case 21:
case 22:
return 6004;
default:
switch (i2) {
case ConnectionResult.API_DISABLED_FOR_CONNECTION /* 24 */:
case 25:
case 26:
case 27:
case 28:
return 6002;
default:
return 6006;
}
}
}
public static int f(byte[] bArr, int i2, int i3, int i4) {
while (i2 < i3) {
i4 = g[(i4 >>> 24) ^ (bArr[i2] & KotlinVersion.MAX_COMPONENT_VALUE)] ^ (i4 << 8);
i2++;
}
return i4;
}
/* JADX WARN: Code restructure failed: missing block: B:36:0x004b, code lost:
r5.C(r4);
r4 = true;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static boolean g(com.google.android.gms.internal.ads.zzer r4, com.google.android.gms.internal.ads.zzer r5, java.util.zip.Inflater r6) {
/*
int r0 = r4.B()
r1 = 0
if (r0 <= 0) goto L75
int r0 = r4.I()
r2 = 120(0x78, float:1.68E-43)
if (r0 != r2) goto L75
int r0 = r4.B()
r2 = 1
if (r0 != 0) goto L18
r4 = r1
goto L72
L18:
byte[] r0 = r5.f6834a
int r0 = r0.length
int r3 = r4.B()
if (r0 >= r3) goto L29
int r0 = r4.B()
int r0 = r0 + r0
r5.A(r0)
L29:
if (r6 != 0) goto L30
java.util.zip.Inflater r6 = new java.util.zip.Inflater
r6.<init>()
L30:
byte[] r0 = r4.f6834a
int r3 = r4.b
int r4 = r4.B()
r6.setInput(r0, r3, r4)
r4 = r1
L3c:
byte[] r0 = r5.f6834a // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
int r3 = r0.length // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
int r3 = r3 - r4
int r0 = r6.inflate(r0, r4, r3) // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
int r4 = r4 + r0
boolean r0 = r6.finished() // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
if (r0 == 0) goto L52
r5.C(r4) // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
r4 = r2
goto L6f
L50:
r4 = move-exception
goto L6b
L52:
boolean r0 = r6.needsDictionary() // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
if (r0 != 0) goto L5e
boolean r0 = r6.needsInput() // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
if (r0 == 0) goto L60
L5e:
r4 = r1
goto L6f
L60:
byte[] r0 = r5.f6834a // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
int r3 = r0.length // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
if (r4 != r3) goto L3c
int r0 = r0.length // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
int r0 = r0 + r0
r5.A(r0) // Catch: java.lang.Throwable -> L50 java.util.zip.DataFormatException -> L5e
goto L3c
L6b:
r6.reset()
throw r4
L6f:
r6.reset()
L72:
if (r4 == 0) goto L75
return r2
L75:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzfj.g(com.google.android.gms.internal.ads.zzer, com.google.android.gms.internal.ads.zzer, java.util.zip.Inflater):boolean");
}
public static boolean h(Context context) {
UiModeManager uiModeManager = (UiModeManager) context.getApplicationContext().getSystemService("uimode");
if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
return true;
}
return false;
}
public static int i(String str) {
String[] split2;
int length;
boolean z;
if (str == null || (length = (split2 = str.split("_", -1)).length) < 2) {
return 0;
}
String str2 = split2[length - 1];
if (length >= 3 && "neg".equals(split2[length - 2])) {
z = true;
} else {
z = false;
}
try {
if (str2 != null) {
int parseInt = Integer.parseInt(str2);
if (z) {
return -parseInt;
}
return parseInt;
}
throw null;
} catch (NumberFormatException unused) {
return 0;
}
}
public static boolean j(Context context) {
int i2 = Build.VERSION.SDK_INT;
if (i2 >= 29 && context.getApplicationInfo().targetSdkVersion >= 29) {
if (i2 == 30) {
String str = Build.MODEL;
if (zzgpj.d(str, "moto g(20)") || zzgpj.d(str, "rmx3231")) {
return true;
}
}
if (i2 != 34 || !zzgpj.d(Build.MODEL, "sm-x200")) {
return false;
}
return true;
}
return true;
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Code restructure failed: missing block: B:27:0x0092, code lost:
if (java.lang.Math.abs(r11 - r2) == 0.5d) goto L57;
*/
/* JADX WARN: Failed to find 'out' block for switch in B:23:0x007d. Please report as an issue. */
/* JADX WARN: Removed duplicated region for block: B:30:0x00f1 */
/* JADX WARN: Removed duplicated region for block: B:33:0x00f9 */
/* JADX WARN: Removed duplicated region for block: B:36:0x00fe */
/* JADX WARN: Removed duplicated region for block: B:38:0x0100 */
/* JADX WARN: Removed duplicated region for block: B:40:0x00f3 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static long k(long r9, long r11, long r13, java.math.RoundingMode r15) {
/*
Method dump skipped, instructions count: 334
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzfj.k(long, long, long, java.math.RoundingMode):long");
}
public static String l(String str) {
try {
Class<?> cls = Class.forName("android.os.SystemProperties");
return (String) cls.getMethod("get", String.class).invoke(cls, str);
} catch (Exception e2) {
zzee.f("Util", "Failed to read system property ".concat(str), e2);
return null;
}
}
public static Object[] m(int i2, Object[] objArr) {
boolean z;
if (i2 <= objArr.length) {
z = true;
} else {
z = false;
}
zzgqa.a(z);
return Arrays.copyOf(objArr, i2);
}
public static Handler n() {
Looper myLooper = Looper.myLooper();
myLooper.getClass();
return new Handler(myLooper, null);
}
public static String o(String str) {
if (str == null) {
return null;
}
String replace = str.replace('_', '-');
if (!replace.isEmpty() && !replace.equals("und")) {
str = replace;
}
String a2 = zzgpj.a(str);
int i2 = 0;
String str2 = a2.split("-", 2)[0];
if (d == null) {
String[] iSOLanguages = Locale.getISOLanguages();
int length = iSOLanguages.length;
String[] strArr = e;
int length2 = strArr.length;
HashMap hashMap = new HashMap(length + 88);
for (String str3 : iSOLanguages) {
try {
String iSO3Language = new Locale(str3).getISO3Language();
if (!TextUtils.isEmpty(iSO3Language)) {
hashMap.put(iSO3Language, str3);
}
} catch (MissingResourceException unused) {
}
}
for (int i3 = 0; i3 < 88; i3 += 2) {
hashMap.put(strArr[i3], strArr[i3 + 1]);
}
d = hashMap;
}
String str4 = (String) d.get(str2);
if (str4 != null) {
a2 = str4.concat(String.valueOf(a2.substring(str2.length())));
str2 = str4;
}
if (!"no".equals(str2) && !"i".equals(str2) && !"zh".equals(str2)) {
return a2;
}
while (true) {
String[] strArr2 = f;
int length3 = strArr2.length;
if (i2 < 18) {
if (a2.startsWith(strArr2[i2])) {
return String.valueOf(strArr2[i2 + 1]).concat(String.valueOf(a2.substring(strArr2[i2].length())));
}
i2 += 2;
} else {
return a2;
}
}
}
public static int p(int[] iArr, int i2, boolean z, boolean z2) {
int i3;
int i4;
int binarySearch = Arrays.binarySearch(iArr, i2);
if (binarySearch < 0) {
i4 = -(binarySearch + 2);
} else {
while (true) {
i3 = binarySearch - 1;
if (i3 < 0 || iArr[i3] != i2) {
break;
}
binarySearch = i3;
}
if (z) {
i4 = binarySearch;
} else {
i4 = i3;
}
}
if (z2) {
return Math.max(0, i4);
}
return i4;
}
public static int q(long[] jArr, long j, boolean z) {
int i2;
int binarySearch = Arrays.binarySearch(jArr, j);
if (binarySearch < 0) {
i2 = -(binarySearch + 2);
} else {
while (true) {
int i3 = binarySearch - 1;
if (i3 < 0 || jArr[i3] != j) {
break;
}
binarySearch = i3;
}
i2 = binarySearch;
}
if (z) {
return Math.max(0, i2);
}
return i2;
}
public static long r(long j) {
return (j == -9223372036854775807L || j == Long.MIN_VALUE) ? j : j / 1000;
}
public static long s(long j) {
return (j == -9223372036854775807L || j == Long.MIN_VALUE) ? j : j * 1000;
}
public static long t(int i2, long j) {
return u(j, 1000000L, i2, RoundingMode.DOWN);
}
public static long u(long j, long j2, long j3, RoundingMode roundingMode) {
if (j == 0 || j2 == 0) {
return 0L;
}
if (j3 >= j2 && j3 % j2 == 0) {
return zzgws.a(j, zzgws.a(j3, j2, RoundingMode.UNNECESSARY), roundingMode);
}
if (j3 < j2 && j2 % j3 == 0) {
return zzgws.c(j, zzgws.a(j2, j3, RoundingMode.UNNECESSARY));
}
if (j3 >= j && j3 % j == 0) {
return zzgws.a(j2, zzgws.a(j3, j, RoundingMode.UNNECESSARY), roundingMode);
}
if (j3 < j && j % j3 == 0) {
return zzgws.c(j2, zzgws.a(j, j3, RoundingMode.UNNECESSARY));
}
return k(j, j2, j3, roundingMode);
}
public static void v(long[] jArr, long j) {
long j2;
RoundingMode roundingMode = RoundingMode.DOWN;
int i2 = 0;
if (j >= 1000000 && j % 1000000 == 0) {
long a2 = zzgws.a(j, 1000000L, RoundingMode.UNNECESSARY);
while (i2 < jArr.length) {
jArr[i2] = zzgws.a(jArr[i2], a2, roundingMode);
i2++;
}
return;
}
if (j < 1000000 && 1000000 % j == 0) {
long a3 = zzgws.a(1000000L, j, RoundingMode.UNNECESSARY);
while (i2 < jArr.length) {
jArr[i2] = zzgws.c(jArr[i2], a3);
i2++;
}
return;
}
int i3 = 0;
while (i3 < jArr.length) {
long j3 = jArr[i3];
if (j3 != 0) {
if (j >= j3 && j % j3 == 0) {
jArr[i3] = zzgws.a(1000000L, zzgws.a(j, j3, RoundingMode.UNNECESSARY), roundingMode);
} else if (j < j3 && j3 % j == 0) {
jArr[i3] = zzgws.c(1000000L, zzgws.a(j3, j, RoundingMode.UNNECESSARY));
} else {
j2 = j;
jArr[i3] = k(j3, 1000000L, j2, roundingMode);
i3++;
j = j2;
}
}
j2 = j;
i3++;
j = j2;
}
}
public static long w(long j, float f2) {
if (f2 == 1.0f) {
return j;
}
return Math.round(j * f2);
}
public static String x(int i2) {
return new String(new byte[]{(byte) (i2 >> 24), (byte) (i2 >> 16), (byte) (i2 >> 8), (byte) i2}, StandardCharsets.US_ASCII);
}
public static int y(int i2, ByteOrder byteOrder) {
if (i2 != 8) {
if (i2 != 16) {
if (i2 != 24) {
if (i2 != 32) {
return 0;
}
if (byteOrder.equals(ByteOrder.LITTLE_ENDIAN)) {
return 22;
}
return 1610612736;
}
if (byteOrder.equals(ByteOrder.LITTLE_ENDIAN)) {
return 21;
}
return 1342177280;
}
if (byteOrder.equals(ByteOrder.LITTLE_ENDIAN)) {
return 2;
}
return 268435456;
}
return 3;
}
}