Rabbit-R1/switch port/smali/smali_classes3/kotlin/UnsignedKt.smali

634 lines
12 KiB
Smali
Raw Normal View History

2024-05-21 21:08:36 +00:00
.class public final Lkotlin/UnsignedKt;
.super Ljava/lang/Object;
.source "UnsignedUtils.kt"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u00000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0006\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\t\n\u0002\u0010\t\n\u0002\u0008\u0007\n\u0002\u0010\u000e\n\u0002\u0008\u0002\u001a\u0015\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u0001\u00a2\u0006\u0002\u0010\u0004\u001a\u0015\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0002\u001a\u00020\u0003H\u0001\u00a2\u0006\u0002\u0010\u0007\u001a\u0018\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\u000b\u001a\u00020\tH\u0001\u001a\u001f\u0010\u000c\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\u00012\u0006\u0010\u000b\u001a\u00020\u0001H\u0001\u00a2\u0006\u0004\u0008\r\u0010\u000e\u001a\u001f\u0010\u000f\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\u00012\u0006\u0010\u000b\u001a\u00020\u0001H\u0001\u00a2\u0006\u0004\u0008\u0010\u0010\u000e\u001a\u0010\u0010\u0011\u001a\u00020\u00032\u0006\u0010\u0002\u001a\u00020\tH\u0001\u001a\u0018\u0010\u0012\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u00132\u0006\u0010\u000b\u001a\u00020\u0013H\u0001\u001a\u001f\u0010\u0014\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\u00062\u0006\u0010\u000b\u001a\u00020\u0006H\u0001\u00a2\u0006\u0004\u0008\u0015\u0010\u0016\u001a\u001f\u0010\u0017\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\u00062\u0006\u0010\u000b\u001a\u00020\u0006H\u0001\u00a2\u0006\u0004\u0008\u0018\u0010\u0016\u001a\u0010\u0010\u0019\u001a\u00020\u00032\u0006\u0010\u0002\u001a\u00020\u0013H\u0001\u001a\u0010\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u0002\u001a\u00020\u0013H\u0000\u001a\u0018\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u0002\u001a\u00020\u00132\u0006\u0010\u001c\u001a\u00020\tH\u0000\u00a8\u0006\u001d"
}
d2 = {
"doubleToUInt",
"Lkotlin/UInt;",
"v",
"",
"(D)I",
"doubleToULong",
"Lkotlin/ULong;",
"(D)J",
"uintCompare",
"",
"v1",
"v2",
"uintDivide",
"uintDivide-J1ME1BU",
"(II)I",
"uintRemainder",
"uintRemainder-J1ME1BU",
"uintToDouble",
"ulongCompare",
"",
"ulongDivide",
"ulongDivide-eb3DHEI",
"(JJ)J",
"ulongRemainder",
"ulongRemainder-eb3DHEI",
"ulongToDouble",
"ulongToString",
"",
"base",
"kotlin-stdlib"
}
k = 0x2
mv = {
0x1,
0x9,
0x0
}
xi = 0x30
.end annotation
# direct methods
.method public static final doubleToUInt(D)I
.locals 4
.line 66
invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_0
goto :goto_0
.line 67
:cond_0
invoke-static {v1}, Lkotlin/UnsignedKt;->uintToDouble(I)D
move-result-wide v2
cmpg-double v0, p0, v2
if-gtz v0, :cond_1
goto :goto_0
:cond_1
const/4 v1, -0x1
.line 68
invoke-static {v1}, Lkotlin/UnsignedKt;->uintToDouble(I)D
move-result-wide v2
cmpl-double v0, p0, v2
if-ltz v0, :cond_2
goto :goto_0
:cond_2
const-wide v0, 0x41dfffffffc00000L # 2.147483647E9
cmpg-double v0, p0, v0
if-gtz v0, :cond_3
double-to-int p0, p0
.line 69
invoke-static {p0}, Lkotlin/UInt;->constructor-impl(I)I
move-result v1
goto :goto_0
:cond_3
const v0, 0x7fffffff
int-to-double v1, v0
sub-double/2addr p0, v1
double-to-int p0, p0
.line 70
invoke-static {p0}, Lkotlin/UInt;->constructor-impl(I)I
move-result p0
invoke-static {v0}, Lkotlin/UInt;->constructor-impl(I)I
move-result p1
add-int/2addr p0, p1
invoke-static {p0}, Lkotlin/UInt;->constructor-impl(I)I
move-result v1
:goto_0
return v1
.end method
.method public static final doubleToULong(D)J
.locals 5
.line 75
invoke-static {p0, p1}, Ljava/lang/Double;->isNaN(D)Z
move-result v0
const-wide/16 v1, 0x0
if-eqz v0, :cond_0
goto :goto_0
.line 76
:cond_0
invoke-static {v1, v2}, Lkotlin/UnsignedKt;->ulongToDouble(J)D
move-result-wide v3
cmpg-double v0, p0, v3
if-gtz v0, :cond_1
goto :goto_0
:cond_1
const-wide/16 v1, -0x1
.line 77
invoke-static {v1, v2}, Lkotlin/UnsignedKt;->ulongToDouble(J)D
move-result-wide v3
cmpl-double v0, p0, v3
if-ltz v0, :cond_2
goto :goto_0
:cond_2
const-wide/high16 v0, 0x43e0000000000000L # 9.223372036854776E18
cmpg-double v2, p0, v0
if-gez v2, :cond_3
double-to-long p0, p0
.line 78
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide v1
goto :goto_0
:cond_3
sub-double/2addr p0, v0
double-to-long p0, p0
.line 81
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
const-wide/high16 v0, -0x8000000000000000L
add-long/2addr p0, v0
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide v1
:goto_0
return-wide v1
.end method
.method public static final uintCompare(II)I
.locals 1
const/high16 v0, -0x80000000
xor-int/2addr p0, v0
xor-int/2addr p1, v0
.line 9
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->compare(II)I
move-result p0
return p0
.end method
.method public static final uintDivide-J1ME1BU(II)I
.locals 4
int-to-long v0, p0
const-wide v2, 0xffffffffL
and-long/2addr v0, v2
int-to-long p0, p1
and-long/2addr p0, v2
.line 14
div-long/2addr v0, p0
long-to-int p0, v0
invoke-static {p0}, Lkotlin/UInt;->constructor-impl(I)I
move-result p0
return p0
.end method
.method public static final uintRemainder-J1ME1BU(II)I
.locals 4
int-to-long v0, p0
const-wide v2, 0xffffffffL
and-long/2addr v0, v2
int-to-long p0, p1
and-long/2addr p0, v2
.line 16
rem-long/2addr v0, p0
long-to-int p0, v0
invoke-static {p0}, Lkotlin/UInt;->constructor-impl(I)I
move-result p0
return p0
.end method
.method public static final uintToDouble(I)D
.locals 6
const v0, 0x7fffffff
and-int/2addr v0, p0
int-to-double v0, v0
ushr-int/lit8 p0, p0, 0x1f
shl-int/lit8 p0, p0, 0x1e
int-to-double v2, p0
const/4 p0, 0x2
int-to-double v4, p0
mul-double/2addr v2, v4
add-double/2addr v0, v2
return-wide v0
.end method
.method public static final ulongCompare(JJ)I
.locals 2
const-wide/high16 v0, -0x8000000000000000L
xor-long/2addr p0, v0
xor-long/2addr p2, v0
.line 11
invoke-static {p0, p1, p2, p3}, Lkotlin/jvm/internal/Intrinsics;->compare(JJ)I
move-result p0
return p0
.end method
.method public static final ulongDivide-eb3DHEI(JJ)J
.locals 5
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-gez v2, :cond_1
.line 26
invoke-static {p0, p1, p2, p3}, Ljava/lang/Long;->compareUnsigned(JJ)I
move-result p0
if-gez p0, :cond_0
invoke-static {v0, v1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
goto :goto_0
:cond_0
const-wide/16 p0, 0x1
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
:goto_0
return-wide p0
:cond_1
cmp-long v0, p0, v0
if-ltz v0, :cond_2
.line 31
div-long/2addr p0, p2
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
return-wide p0
:cond_2
const/4 v0, 0x1
ushr-long v1, p0, v0
.line 35
div-long/2addr v1, p2
shl-long/2addr v1, v0
mul-long v3, v1, p2
sub-long/2addr p0, v3
.line 37
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
invoke-static {p2, p3}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p2
invoke-static {p0, p1, p2, p3}, Ljava/lang/Long;->compareUnsigned(JJ)I
move-result p0
if-ltz p0, :cond_3
goto :goto_1
:cond_3
const/4 v0, 0x0
:goto_1
int-to-long p0, v0
add-long/2addr v1, p0
invoke-static {v1, v2}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
return-wide p0
.end method
.method public static final ulongRemainder-eb3DHEI(JJ)J
.locals 6
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-gez v2, :cond_1
.line 46
invoke-static {p0, p1, p2, p3}, Ljava/lang/Long;->compareUnsigned(JJ)I
move-result v0
if-gez v0, :cond_0
goto :goto_0
:cond_0
sub-long/2addr p0, p2
.line 49
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
:goto_0
return-wide p0
:cond_1
cmp-long v2, p0, v0
if-ltz v2, :cond_2
.line 55
rem-long/2addr p0, p2
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
return-wide p0
:cond_2
const/4 v2, 0x1
ushr-long v3, p0, v2
.line 59
div-long/2addr v3, p2
shl-long v2, v3, v2
mul-long/2addr v2, p2
sub-long/2addr p0, v2
.line 61
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide v2
invoke-static {p2, p3}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide v4
invoke-static {v2, v3, v4, v5}, Ljava/lang/Long;->compareUnsigned(JJ)I
move-result v2
if-ltz v2, :cond_3
goto :goto_1
:cond_3
move-wide p2, v0
:goto_1
sub-long/2addr p0, p2
invoke-static {p0, p1}, Lkotlin/ULong;->constructor-impl(J)J
move-result-wide p0
return-wide p0
.end method
.method public static final ulongToDouble(J)D
.locals 4
const/16 v0, 0xb
ushr-long v0, p0, v0
long-to-double v0, v0
const/16 v2, 0x800
int-to-double v2, v2
mul-double/2addr v0, v2
const-wide/16 v2, 0x7ff
and-long/2addr p0, v2
long-to-double p0, p0
add-double/2addr v0, p0
return-wide v0
.end method
.method public static final ulongToString(J)Ljava/lang/String;
.locals 1
const/16 v0, 0xa
.line 92
invoke-static {p0, p1, v0}, Lkotlin/UnsignedKt;->ulongToString(JI)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public static final ulongToString(JI)Ljava/lang/String;
.locals 8
const-wide/16 v0, 0x0
cmp-long v0, p0, v0
const-string v1, "toString(...)"
if-ltz v0, :cond_0
.line 95
invoke-static {p2}, Lkotlin/text/CharsKt;->checkRadix(I)I
move-result p2
invoke-static {p0, p1, p2}, Ljava/lang/Long;->toString(JI)Ljava/lang/String;
move-result-object p0
invoke-static {p0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
:cond_0
const/4 v0, 0x1
ushr-long v2, p0, v0
int-to-long v4, p2
.line 97
div-long/2addr v2, v4
shl-long/2addr v2, v0
mul-long v6, v2, v4
sub-long/2addr p0, v6
cmp-long v0, p0, v4
if-ltz v0, :cond_1
sub-long/2addr p0, v4
const-wide/16 v4, 0x1
add-long/2addr v2, v4
.line 103
:cond_1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {p2}, Lkotlin/text/CharsKt;->checkRadix(I)I
move-result v4
invoke-static {v2, v3, v4}, Ljava/lang/Long;->toString(JI)Ljava/lang/String;
move-result-object v2
invoke-static {v2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {p2}, Lkotlin/text/CharsKt;->checkRadix(I)I
move-result p2
invoke-static {p0, p1, p2}, Ljava/lang/Long;->toString(JI)Ljava/lang/String;
move-result-object p0
invoke-static {p0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method