apkfuckery/com.discord/smali/kotlin/text/s.smali

312 lines
4.9 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public Lkotlin/text/s;
.super Lkotlin/text/r;
2019-02-04 20:29:01 +00:00
.source "StringNumberConversions.kt"
2019-02-04 20:08:30 +00:00
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lkotlin/text/r;-><init>()V
return-void
.end method
2019-07-10 21:18:28 +00:00
.method public static final dR(Ljava/lang/String;)Ljava/lang/Integer;
2019-06-26 01:01:00 +00:00
.locals 1
const-string v0, "$this$toIntOrNull"
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-10 21:18:28 +00:00
invoke-static {p0}, Lkotlin/text/l;->dS(Ljava/lang/String;)Ljava/lang/Integer;
2019-06-26 01:01:00 +00:00
move-result-object p0
return-object p0
.end method
2019-07-10 21:18:28 +00:00
.method public static final dS(Ljava/lang/String;)Ljava/lang/Integer;
2019-02-04 20:08:30 +00:00
.locals 8
2019-05-03 18:53:54 +00:00
const-string v0, "$this$toIntOrNull"
2019-02-04 20:08:30 +00:00
2019-05-22 23:20:16 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
:cond_0
const/4 v2, 0x0
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x30
const v5, -0x7fffffff
const/4 v6, 0x1
if-ge v3, v4, :cond_4
if-ne v0, v6, :cond_1
return-object v1
:cond_1
const/16 v4, 0x2d
if-ne v3, v4, :cond_2
const/high16 v5, -0x80000000
const/4 v3, 0x1
const/4 v4, 0x1
2019-05-03 18:53:54 +00:00
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_2
const/16 v4, 0x2b
if-ne v3, v4, :cond_3
const/4 v3, 0x1
goto :goto_0
:cond_3
return-object v1
:cond_4
const/4 v3, 0x0
2019-05-03 18:53:54 +00:00
:goto_0
2019-02-04 20:08:30 +00:00
const/4 v4, 0x0
2019-05-03 18:53:54 +00:00
:goto_1
2019-02-04 20:08:30 +00:00
sub-int/2addr v0, v6
if-gt v3, v0, :cond_8
2019-05-03 18:53:54 +00:00
:goto_2
2019-02-04 20:08:30 +00:00
invoke-virtual {p0, v3}, Ljava/lang/String;->charAt(I)C
move-result v6
const/16 v7, 0xa
invoke-static {v6, v7}, Ljava/lang/Character;->digit(II)I
move-result v6
if-gez v6, :cond_5
return-object v1
:cond_5
const v7, -0xccccccc
if-ge v2, v7, :cond_6
return-object v1
:cond_6
mul-int/lit8 v2, v2, 0xa
add-int v7, v5, v6
if-ge v2, v7, :cond_7
return-object v1
:cond_7
sub-int/2addr v2, v6
if-eq v3, v0, :cond_8
add-int/lit8 v3, v3, 0x1
2019-05-03 18:53:54 +00:00
goto :goto_2
2019-02-04 20:08:30 +00:00
:cond_8
if-eqz v4, :cond_9
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p0
return-object p0
:cond_9
neg-int p0, v2
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p0
return-object p0
.end method
2019-07-10 21:18:28 +00:00
.method public static final dT(Ljava/lang/String;)Ljava/lang/Long;
2019-02-04 20:08:30 +00:00
.locals 1
2019-05-03 18:53:54 +00:00
const-string v0, "$this$toLongOrNull"
2019-02-04 20:08:30 +00:00
2019-05-22 23:20:16 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-07-10 21:18:28 +00:00
invoke-static {p0}, Lkotlin/text/l;->dU(Ljava/lang/String;)Ljava/lang/Long;
2019-02-04 20:08:30 +00:00
move-result-object p0
return-object p0
.end method
2019-07-10 21:18:28 +00:00
.method public static final dU(Ljava/lang/String;)Ljava/lang/Long;
2019-02-04 20:08:30 +00:00
.locals 14
2019-05-03 18:53:54 +00:00
const-string v0, "$this$toLongOrNull"
2019-02-04 20:08:30 +00:00
2019-05-22 23:20:16 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
:cond_0
const/4 v2, 0x0
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x30
const-wide v5, -0x7fffffffffffffffL # -4.9E-324
const/4 v7, 0x1
if-ge v3, v4, :cond_4
if-ne v0, v7, :cond_1
return-object v1
:cond_1
const/16 v4, 0x2d
if-ne v3, v4, :cond_2
const-wide/high16 v5, -0x8000000000000000L
const/4 v2, 0x1
const/4 v3, 0x1
2019-05-03 18:53:54 +00:00
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_2
const/16 v4, 0x2b
if-ne v3, v4, :cond_3
const/4 v2, 0x1
goto :goto_0
:cond_3
return-object v1
:cond_4
2019-05-03 18:53:54 +00:00
:goto_0
2019-02-04 20:08:30 +00:00
const/4 v3, 0x0
2019-05-03 18:53:54 +00:00
:goto_1
2019-02-04 20:08:30 +00:00
const-wide/16 v8, 0x0
sub-int/2addr v0, v7
if-gt v2, v0, :cond_8
2019-05-03 18:53:54 +00:00
:goto_2
2019-02-04 20:08:30 +00:00
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v4
const/16 v7, 0xa
invoke-static {v4, v7}, Ljava/lang/Character;->digit(II)I
move-result v4
if-gez v4, :cond_5
return-object v1
:cond_5
const-wide v10, -0xcccccccccccccccL
cmp-long v7, v8, v10
if-gez v7, :cond_6
return-object v1
:cond_6
const-wide/16 v10, 0xa
mul-long v8, v8, v10
int-to-long v10, v4
add-long v12, v5, v10
cmp-long v4, v8, v12
if-gez v4, :cond_7
return-object v1
:cond_7
sub-long/2addr v8, v10
if-eq v2, v0, :cond_8
add-int/lit8 v2, v2, 0x1
2019-05-03 18:53:54 +00:00
goto :goto_2
2019-02-04 20:08:30 +00:00
:cond_8
if-eqz v3, :cond_9
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
return-object p0
:cond_9
neg-long v0, v8
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
return-object p0
.end method