* 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>
878 lines
17 KiB
Smali
878 lines
17 KiB
Smali
.class public abstract Lkotlin/random/Random;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lkotlin/random/Random$Default;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
d1 = {
|
|
"\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0002\u0008\u0005\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0006\n\u0000\n\u0002\u0010\u0007\n\u0000\n\u0002\u0010\u0012\n\u0002\u0008\u0006\u0008\'\u0018\u0000 \u00182\u00020\u0001:\u0001\u0018B\u0007\u00a2\u0006\u0004\u0008\u0002\u0010\u0003J\u0010\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0005H&J\u0008\u0010\u0007\u001a\u00020\u0005H\u0016J\u0010\u0010\u0007\u001a\u00020\u00052\u0006\u0010\u0008\u001a\u00020\u0005H\u0016J\u0018\u0010\u0007\u001a\u00020\u00052\u0006\u0010\t\u001a\u00020\u00052\u0006\u0010\u0008\u001a\u00020\u0005H\u0016J\u0008\u0010\n\u001a\u00020\u000bH\u0016J\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\u0008\u001a\u00020\u000bH\u0016J\u0018\u0010\n\u001a\u00020\u000b2\u0006\u0010\t\u001a\u00020\u000b2\u0006\u0010\u0008\u001a\u00020\u000bH\u0016J\u0008\u0010\u000c\u001a\u00020\rH\u0016J\u0008\u0010\u000e\u001a\u00020\u000fH\u0016J\u0010\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0008\u001a\u00020\u000fH\u0016J\u0018\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\t\u001a\u00020\u000f2\u0006\u0010\u0008\u001a\u00020\u000fH\u0016J\u0008\u0010\u0010\u001a\u00020\u0011H\u0016J$\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00132\u0008\u0008\u0002\u0010\u0015\u001a\u00020\u00052\u0008\u0008\u0002\u0010\u0016\u001a\u00020\u0005H\u0016J\u0010\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u0013H\u0016J\u0010\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0017\u001a\u00020\u0005H\u0016\u00a8\u0006\u0019"
|
|
}
|
|
d2 = {
|
|
"Lkotlin/random/Random;",
|
|
"",
|
|
"<init>",
|
|
"()V",
|
|
"nextBits",
|
|
"",
|
|
"bitCount",
|
|
"nextInt",
|
|
"until",
|
|
"from",
|
|
"nextLong",
|
|
"",
|
|
"nextBoolean",
|
|
"",
|
|
"nextDouble",
|
|
"",
|
|
"nextFloat",
|
|
"",
|
|
"nextBytes",
|
|
"",
|
|
"array",
|
|
"fromIndex",
|
|
"toIndex",
|
|
"size",
|
|
"Default",
|
|
"kotlin-stdlib"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x2,
|
|
0x2,
|
|
0x0
|
|
}
|
|
xi = 0x30
|
|
.end annotation
|
|
|
|
.annotation build Lkotlin/SinceKotlin;
|
|
version = "1.3"
|
|
.end annotation
|
|
|
|
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
|
|
value = {
|
|
"SMAP\nRandom.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Random.kt\nkotlin/random/Random\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,387:1\n1#2:388\n*E\n"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Default:Lkotlin/random/Random$Default;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final defaultRandom:Lkotlin/random/Random;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Lkotlin/random/Random$Default;
|
|
|
|
.line 2
|
|
.line 3
|
|
const/4 v1, 0x0
|
|
|
|
.line 4
|
|
invoke-direct {v0, v1}, Lkotlin/random/Random$Default;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.line 5
|
|
.line 6
|
|
.line 7
|
|
sput-object v0, Lkotlin/random/Random;->Default:Lkotlin/random/Random$Default;
|
|
|
|
.line 8
|
|
.line 9
|
|
sget-object v0, Lkotlin/internal/PlatformImplementationsKt;->IMPLEMENTATIONS:Lkotlin/internal/PlatformImplementations;
|
|
|
|
.line 10
|
|
.line 11
|
|
invoke-virtual {v0}, Lkotlin/internal/PlatformImplementations;->defaultPlatformRandom()Lkotlin/random/Random;
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
move-result-object v0
|
|
|
|
.line 15
|
|
sput-object v0, Lkotlin/random/Random;->defaultRandom:Lkotlin/random/Random;
|
|
|
|
.line 16
|
|
.line 17
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDefaultRandom$cp()Lkotlin/random/Random;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lkotlin/random/Random;->defaultRandom:Lkotlin/random/Random;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic nextBytes$default(Lkotlin/random/Random;[BIIILjava/lang/Object;)[B
|
|
.locals 0
|
|
|
|
.line 1
|
|
if-nez p5, :cond_2
|
|
|
|
.line 2
|
|
.line 3
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
.line 4
|
|
.line 5
|
|
if-eqz p5, :cond_0
|
|
|
|
.line 6
|
|
.line 7
|
|
const/4 p2, 0x0
|
|
|
|
.line 8
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
.line 9
|
|
.line 10
|
|
if-eqz p4, :cond_1
|
|
|
|
.line 11
|
|
.line 12
|
|
array-length p3, p1
|
|
|
|
.line 13
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2, p3}, Lkotlin/random/Random;->nextBytes([BII)[B
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
move-result-object p0
|
|
|
|
.line 17
|
|
return-object p0
|
|
|
|
.line 18
|
|
:cond_2
|
|
new-instance p0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
.line 19
|
|
.line 20
|
|
const-string p1, "Super calls with default arguments not supported in this target, function: nextBytes"
|
|
|
|
.line 21
|
|
.line 22
|
|
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 23
|
|
.line 24
|
|
.line 25
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public abstract nextBits(I)I
|
|
.end method
|
|
|
|
.method public nextBoolean()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
const/4 v0, 0x1
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
.line 3
|
|
.line 4
|
|
.line 5
|
|
move-result v1
|
|
|
|
.line 6
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 7
|
|
.line 8
|
|
return v0
|
|
|
|
.line 9
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 10
|
|
return v0
|
|
.end method
|
|
|
|
.method public nextBytes(I)[B
|
|
.locals 0
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 21
|
|
new-array p1, p1, [B
|
|
|
|
invoke-virtual {p0, p1}, Lkotlin/random/Random;->nextBytes([B)[B
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public nextBytes([B)[B
|
|
.locals 2
|
|
.param p1 # [B
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "array"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 20
|
|
array-length v1, p1
|
|
|
|
invoke-virtual {p0, p1, v0, v1}, Lkotlin/random/Random;->nextBytes([BII)[B
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public nextBytes([BII)[B
|
|
.locals 6
|
|
.param p1 # [B
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "array"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
const-string v0, "fromIndex ("
|
|
|
|
if-ltz p2, :cond_3
|
|
|
|
array-length v1, p1
|
|
|
|
if-gt p2, v1, :cond_3
|
|
|
|
if-ltz p3, :cond_3
|
|
|
|
array-length v1, p1
|
|
|
|
if-gt p3, v1, :cond_3
|
|
|
|
if-gt p2, p3, :cond_2
|
|
|
|
sub-int v0, p3, p2
|
|
|
|
.line 2
|
|
div-int/lit8 v0, v0, 0x4
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result v3
|
|
|
|
int-to-byte v4, v3
|
|
|
|
.line 4
|
|
aput-byte v4, p1, p2
|
|
|
|
add-int/lit8 v4, p2, 0x1
|
|
|
|
ushr-int/lit8 v5, v3, 0x8
|
|
|
|
int-to-byte v5, v5
|
|
|
|
.line 5
|
|
aput-byte v5, p1, v4
|
|
|
|
add-int/lit8 v4, p2, 0x2
|
|
|
|
ushr-int/lit8 v5, v3, 0x10
|
|
|
|
int-to-byte v5, v5
|
|
|
|
.line 6
|
|
aput-byte v5, p1, v4
|
|
|
|
add-int/lit8 v4, p2, 0x3
|
|
|
|
ushr-int/lit8 v3, v3, 0x18
|
|
|
|
int-to-byte v3, v3
|
|
|
|
.line 7
|
|
aput-byte v3, p1, v4
|
|
|
|
add-int/lit8 p2, p2, 0x4
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sub-int/2addr p3, p2
|
|
|
|
mul-int/lit8 v0, p3, 0x8
|
|
|
|
.line 8
|
|
invoke-virtual {p0, v0}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result v0
|
|
|
|
:goto_1
|
|
if-ge v1, p3, :cond_1
|
|
|
|
add-int v2, p2, v1
|
|
|
|
mul-int/lit8 v3, v1, 0x8
|
|
|
|
ushr-int v3, v0, v3
|
|
|
|
int-to-byte v3, v3
|
|
|
|
.line 9
|
|
aput-byte v3, p1, v2
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
return-object p1
|
|
|
|
.line 10
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, ") must be not greater than toIndex ("
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, ")."
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
.line 11
|
|
:cond_3
|
|
const-string v1, ") or toIndex ("
|
|
|
|
const-string v2, ") are out of range: 0.."
|
|
|
|
.line 12
|
|
invoke-static {v0, p2, p3, v1, v2}, Landroid/support/v4/media/a;->u(Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
.line 13
|
|
array-length p1, p1
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2e
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public nextDouble()D
|
|
.locals 2
|
|
|
|
const/16 v0, 0x1a
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x1b
|
|
|
|
invoke-virtual {p0, v1}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v0, v1}, Lkotlin/random/PlatformRandomKt;->doubleFromParts(II)D
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public nextDouble(D)D
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, v1, p1, p2}, Lkotlin/random/Random;->nextDouble(DD)D
|
|
|
|
move-result-wide p1
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public nextDouble(DD)D
|
|
.locals 6
|
|
|
|
.line 3
|
|
invoke-static {p1, p2, p3, p4}, Lkotlin/random/RandomKt;->checkRangeBounds(DD)V
|
|
|
|
sub-double v0, p3, p1
|
|
|
|
.line 4
|
|
invoke-static {v0, v1}, Ljava/lang/Double;->isInfinite(D)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->abs(D)D
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide v4, 0x7fefffffffffffffL # Double.MAX_VALUE
|
|
|
|
cmpg-double v2, v2, v4
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
invoke-static {p3, p4}, Ljava/lang/Math;->abs(D)D
|
|
|
|
move-result-wide v2
|
|
|
|
cmpg-double v2, v2, v4
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextDouble()D
|
|
|
|
move-result-wide v0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
int-to-double v2, v2
|
|
|
|
div-double v4, p3, v2
|
|
|
|
div-double v2, p1, v2
|
|
|
|
sub-double/2addr v4, v2
|
|
|
|
mul-double/2addr v4, v0
|
|
|
|
add-double/2addr p1, v4
|
|
|
|
add-double/2addr p1, v4
|
|
|
|
goto :goto_0
|
|
|
|
.line 6
|
|
:cond_0
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextDouble()D
|
|
|
|
move-result-wide v2
|
|
|
|
mul-double/2addr v2, v0
|
|
|
|
add-double/2addr p1, v2
|
|
|
|
:goto_0
|
|
cmpl-double v0, p1, p3
|
|
|
|
if-ltz v0, :cond_1
|
|
|
|
const-wide/high16 p1, -0x10000000000000L # Double.NEGATIVE_INFINITY
|
|
|
|
.line 7
|
|
invoke-static {p3, p4, p1, p2}, Ljava/lang/Math;->nextAfter(DD)D
|
|
|
|
move-result-wide p1
|
|
|
|
:cond_1
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public nextFloat()F
|
|
.locals 2
|
|
|
|
.line 1
|
|
const/16 v0, 0x18
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {p0, v0}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result v0
|
|
|
|
.line 7
|
|
int-to-float v0, v0
|
|
|
|
.line 8
|
|
const/high16 v1, 0x4b800000 # 1.6777216E7f
|
|
|
|
.line 9
|
|
.line 10
|
|
div-float/2addr v0, v1
|
|
|
|
.line 11
|
|
return v0
|
|
.end method
|
|
|
|
.method public nextInt()I
|
|
.locals 1
|
|
|
|
const/16 v0, 0x20
|
|
|
|
.line 1
|
|
invoke-virtual {p0, v0}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public nextInt(I)I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, p1}, Lkotlin/random/Random;->nextInt(II)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public nextInt(II)I
|
|
.locals 3
|
|
|
|
.line 3
|
|
invoke-static {p1, p2}, Lkotlin/random/RandomKt;->checkRangeBounds(II)V
|
|
|
|
sub-int v0, p2, p1
|
|
|
|
if-gtz v0, :cond_1
|
|
|
|
const/high16 v1, -0x80000000
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result v0
|
|
|
|
if-gt p1, v0, :cond_0
|
|
|
|
if-ge v0, p2, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
neg-int p2, v0
|
|
|
|
and-int/2addr p2, v0
|
|
|
|
if-ne p2, v0, :cond_2
|
|
|
|
.line 5
|
|
invoke-static {v0}, Lkotlin/random/RandomKt;->fastLog2(I)I
|
|
|
|
move-result p2
|
|
|
|
.line 6
|
|
invoke-virtual {p0, p2}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result p2
|
|
|
|
goto :goto_1
|
|
|
|
.line 7
|
|
:cond_2
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result p2
|
|
|
|
ushr-int/lit8 p2, p2, 0x1
|
|
|
|
.line 8
|
|
rem-int v1, p2, v0
|
|
|
|
sub-int/2addr p2, v1
|
|
|
|
add-int/lit8 v2, v0, -0x1
|
|
|
|
add-int/2addr v2, p2
|
|
|
|
if-ltz v2, :cond_2
|
|
|
|
move p2, v1
|
|
|
|
:goto_1
|
|
add-int/2addr p1, p2
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public nextLong()J
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v0, v0
|
|
|
|
const/16 v2, 0x20
|
|
|
|
shl-long/2addr v0, v2
|
|
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result v2
|
|
|
|
int-to-long v2, v2
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public nextLong(J)J
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0, v1, p1, p2}, Lkotlin/random/Random;->nextLong(JJ)J
|
|
|
|
move-result-wide p1
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public nextLong(JJ)J
|
|
.locals 9
|
|
|
|
.line 3
|
|
invoke-static {p1, p2, p3, p4}, Lkotlin/random/RandomKt;->checkRangeBounds(JJ)V
|
|
|
|
sub-long v0, p3, p1
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-lez v4, :cond_3
|
|
|
|
neg-long p3, v0
|
|
|
|
and-long/2addr p3, v0
|
|
|
|
cmp-long p3, p3, v0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-nez p3, :cond_2
|
|
|
|
long-to-int p3, v0
|
|
|
|
const/16 p4, 0x20
|
|
|
|
ushr-long/2addr v0, p4
|
|
|
|
long-to-int v0, v0
|
|
|
|
const-wide v1, 0xffffffffL
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
.line 4
|
|
invoke-static {p3}, Lkotlin/random/RandomKt;->fastLog2(I)I
|
|
|
|
move-result p3
|
|
|
|
.line 5
|
|
invoke-virtual {p0, p3}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result p3
|
|
|
|
:goto_0
|
|
int-to-long p3, p3
|
|
|
|
and-long/2addr p3, v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
if-ne v0, v4, :cond_1
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result p3
|
|
|
|
goto :goto_0
|
|
|
|
.line 7
|
|
:cond_1
|
|
invoke-static {v0}, Lkotlin/random/RandomKt;->fastLog2(I)I
|
|
|
|
move-result p3
|
|
|
|
.line 8
|
|
invoke-virtual {p0, p3}, Lkotlin/random/Random;->nextBits(I)I
|
|
|
|
move-result p3
|
|
|
|
int-to-long v3, p3
|
|
|
|
shl-long p3, v3, p4
|
|
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextInt()I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v3, v0
|
|
|
|
and-long/2addr v1, v3
|
|
|
|
add-long/2addr p3, v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 9
|
|
:cond_2
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextLong()J
|
|
|
|
move-result-wide p3
|
|
|
|
ushr-long/2addr p3, v4
|
|
|
|
.line 10
|
|
rem-long v5, p3, v0
|
|
|
|
sub-long/2addr p3, v5
|
|
|
|
const-wide/16 v7, 0x1
|
|
|
|
sub-long v7, v0, v7
|
|
|
|
add-long/2addr v7, p3
|
|
|
|
cmp-long p3, v7, v2
|
|
|
|
if-ltz p3, :cond_2
|
|
|
|
move-wide p3, v5
|
|
|
|
:goto_1
|
|
add-long/2addr p1, p3
|
|
|
|
return-wide p1
|
|
|
|
.line 11
|
|
:cond_3
|
|
invoke-virtual {p0}, Lkotlin/random/Random;->nextLong()J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-gtz v2, :cond_3
|
|
|
|
cmp-long v2, v0, p3
|
|
|
|
if-gez v2, :cond_3
|
|
|
|
return-wide v0
|
|
.end method
|