apkfuckery/com.discord/smali_classes2/b0/p/c.smali

430 lines
7.5 KiB
Smali
Raw Normal View History

2020-09-29 21:44:44 +00:00
.class public abstract Lb0/p/c;
2020-09-08 08:16:32 +00:00
.super Ljava/lang/Object;
.source "Random.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
2020-09-29 21:44:44 +00:00
Lb0/p/c$a;
2020-09-08 08:16:32 +00:00
}
.end annotation
# static fields
2020-09-29 21:44:44 +00:00
.field public static final a:Lb0/p/c;
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
.field public static final b:Lb0/p/c$a;
2020-09-08 08:16:32 +00:00
# direct methods
.method public static constructor <clinit>()V
.locals 2
2020-09-29 21:44:44 +00:00
new-instance v0, Lb0/p/c$a;
2020-09-08 08:16:32 +00:00
const/4 v1, 0x0
2020-09-29 21:44:44 +00:00
invoke-direct {v0, v1}, Lb0/p/c$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
sput-object v0, Lb0/p/c;->b:Lb0/p/c$a;
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
sget-object v0, Lb0/l/b;->a:Lb0/l/a;
2020-09-08 08:16:32 +00:00
if-eqz v0, :cond_0
2020-09-29 21:44:44 +00:00
new-instance v0, Lb0/p/b;
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
invoke-direct {v0}, Lb0/p/b;-><init>()V
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
sput-object v0, Lb0/p/c;->a:Lb0/p/c;
2020-09-08 08:16:32 +00:00
return-void
:cond_0
throw v1
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public abstract nextBits(I)I
.end method
.method public nextBytes([B)[B
.locals 2
2020-09-16 23:45:23 +00:00
const-string v0, "array"
2020-09-29 21:44:44 +00:00
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
array-length v0, p1
2020-09-08 08:16:32 +00:00
2020-09-16 23:45:23 +00:00
const/4 v1, 0x0
2020-09-08 08:16:32 +00:00
2020-09-29 21:44:44 +00:00
invoke-virtual {p0, p1, v1, v0}, Lb0/p/c;->nextBytes([BII)[B
2020-09-08 08:16:32 +00:00
move-result-object p1
return-object p1
.end method
.method public nextBytes([BII)[B
.locals 6
2020-09-16 23:45:23 +00:00
const-string v0, "array"
2020-09-29 21:44:44 +00:00
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
2020-09-08 08:16:32 +00:00
array-length v0, p1
const/4 v1, 0x0
const/4 v2, 0x1
if-gez p2, :cond_0
goto :goto_0
:cond_0
if-lt v0, p2, :cond_2
array-length v0, p1
if-gez p3, :cond_1
goto :goto_0
:cond_1
if-lt v0, p3, :cond_2
const/4 v0, 0x1
goto :goto_1
:cond_2
:goto_0
const/4 v0, 0x0
:goto_1
const-string v3, "fromIndex ("
if-eqz v0, :cond_7
if-gt p2, p3, :cond_3
goto :goto_2
:cond_3
const/4 v2, 0x0
:goto_2
if-eqz v2, :cond_6
sub-int v0, p3, p2
div-int/lit8 v0, v0, 0x4
const/4 v2, 0x0
:goto_3
if-ge v2, v0, :cond_4
2020-09-29 21:44:44 +00:00
invoke-virtual {p0}, Lb0/p/c;->nextInt()I
2020-09-08 08:16:32 +00:00
move-result v3
int-to-byte v4, v3
aput-byte v4, p1, p2
add-int/lit8 v4, p2, 0x1
ushr-int/lit8 v5, v3, 0x8
int-to-byte v5, v5
aput-byte v5, p1, v4
add-int/lit8 v4, p2, 0x2
ushr-int/lit8 v5, v3, 0x10
int-to-byte v5, v5
aput-byte v5, p1, v4
add-int/lit8 v4, p2, 0x3
ushr-int/lit8 v3, v3, 0x18
int-to-byte v3, v3
aput-byte v3, p1, v4
add-int/lit8 p2, p2, 0x4
add-int/lit8 v2, v2, 0x1
goto :goto_3
:cond_4
sub-int/2addr p3, p2
mul-int/lit8 v0, p3, 0x8
2020-09-29 21:44:44 +00:00
invoke-virtual {p0, v0}, Lb0/p/c;->nextBits(I)I
2020-09-08 08:16:32 +00:00
move-result v0
:goto_4
if-ge v1, p3, :cond_5
add-int v2, p2, v1
mul-int/lit8 v3, v1, 0x8
ushr-int v3, v0, v3
int-to-byte v3, v3
aput-byte v3, p1, v2
add-int/lit8 v1, v1, 0x1
goto :goto_4
:cond_5
return-object p1
:cond_6
const-string p1, ") must be not greater than toIndex ("
const-string v0, ")."
2020-09-23 03:12:49 +00:00
invoke-static {v3, p2, p1, p3, v0}, Lf/e/c/a/a;->l(Ljava/lang/String;ILjava/lang/String;ILjava/lang/String;)Ljava/lang/String;
2020-09-08 08:16:32 +00:00
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
:cond_7
const-string v0, ") or toIndex ("
const-string v1, ") are out of range: 0.."
2020-10-03 03:03:24 +00:00
invoke-static {v3, p2, v0, p3, v1}, Lf/e/c/a/a;->H(Ljava/lang/String;ILjava/lang/String;ILjava/lang/String;)Ljava/lang/StringBuilder;
2020-09-08 08:16:32 +00:00
move-result-object p2
array-length p1, p1
const/16 p3, 0x2e
2020-09-23 03:12:49 +00:00
invoke-static {p2, p1, p3}, Lf/e/c/a/a;->s(Ljava/lang/StringBuilder;IC)Ljava/lang/String;
2020-09-08 08:16:32 +00:00
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 abstract nextInt()I
.end method
.method public nextInt(I)I
.locals 1
const/4 v0, 0x0
2020-09-29 21:44:44 +00:00
invoke-virtual {p0, v0, p1}, Lb0/p/c;->nextInt(II)I
2020-09-08 08:16:32 +00:00
move-result p1
return p1
.end method
.method public nextInt(II)I
.locals 4
const/4 v0, 0x1
if-le p2, p1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
2020-09-16 23:45:23 +00:00
if-eqz v1, :cond_5
2020-09-08 08:16:32 +00:00
sub-int v1, p2, p1
2020-09-16 23:45:23 +00:00
if-gtz v1, :cond_3
2020-09-08 08:16:32 +00:00
const/high16 v2, -0x80000000
2020-09-16 23:45:23 +00:00
if-ne v1, v2, :cond_1
2020-09-08 08:16:32 +00:00
goto :goto_2
2020-09-16 23:45:23 +00:00
:cond_1
2020-09-08 08:16:32 +00:00
:goto_1
2020-09-29 21:44:44 +00:00
invoke-virtual {p0}, Lb0/p/c;->nextInt()I
2020-09-08 08:16:32 +00:00
move-result v0
2020-09-16 23:45:23 +00:00
if-le p1, v0, :cond_2
2020-09-08 08:16:32 +00:00
goto :goto_1
2020-09-16 23:45:23 +00:00
:cond_2
if-le p2, v0, :cond_1
2020-09-08 08:16:32 +00:00
return v0
2020-09-16 23:45:23 +00:00
:cond_3
2020-09-08 08:16:32 +00:00
:goto_2
neg-int p2, v1
and-int/2addr p2, v1
2020-09-16 23:45:23 +00:00
if-ne p2, v1, :cond_4
2020-09-08 08:16:32 +00:00
invoke-static {v1}, Ljava/lang/Integer;->numberOfLeadingZeros(I)I
move-result p2
rsub-int/lit8 p2, p2, 0x1f
2020-09-29 21:44:44 +00:00
invoke-virtual {p0, p2}, Lb0/p/c;->nextBits(I)I
2020-09-08 08:16:32 +00:00
move-result p2
goto :goto_3
2020-09-16 23:45:23 +00:00
:cond_4
2020-09-29 21:44:44 +00:00
invoke-virtual {p0}, Lb0/p/c;->nextInt()I
2020-09-08 08:16:32 +00:00
move-result p2
ushr-int/2addr p2, v0
rem-int v2, p2, v1
sub-int/2addr p2, v2
add-int/lit8 v3, v1, -0x1
add-int/2addr v3, p2
2020-09-16 23:45:23 +00:00
if-ltz v3, :cond_4
2020-09-08 08:16:32 +00:00
move p2, v2
:goto_3
add-int/2addr p1, p2
return p1
2020-09-16 23:45:23 +00:00
:cond_5
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p2
const-string v0, "from"
2020-09-29 21:44:44 +00:00
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
const-string v0, "until"
2020-09-29 21:44:44 +00:00
invoke-static {p2, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Random range is empty: ["
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, ", "
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, ")."
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, 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
2020-09-08 08:16:32 +00:00
.end method
.method public nextLong()J
.locals 4
2020-09-29 21:44:44 +00:00
invoke-virtual {p0}, Lb0/p/c;->nextInt()I
2020-09-08 08:16:32 +00:00
move-result v0
int-to-long v0, v0
const/16 v2, 0x20
shl-long/2addr v0, v2
2020-09-29 21:44:44 +00:00
invoke-virtual {p0}, Lb0/p/c;->nextInt()I
2020-09-08 08:16:32 +00:00
move-result v2
int-to-long v2, v2
add-long/2addr v0, v2
return-wide v0
.end method