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

330 lines
5.3 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Lkotlin/text/s;
.super Lkotlin/text/r;
.source "StringNumberConversions.kt"
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lkotlin/text/r;-><init>()V
return-void
.end method
2019-10-09 23:16:36 +00:00
.method public static final toIntOrNull(Ljava/lang/String;)Ljava/lang/Integer;
2019-07-24 11:27:29 +00:00
.locals 1
const-string v0, "$this$toIntOrNull"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/16 v0, 0xa
invoke-static {p0, v0}, Lkotlin/text/l;->toIntOrNull(Ljava/lang/String;I)Ljava/lang/Integer;
2019-07-24 11:27:29 +00:00
move-result-object p0
return-object p0
.end method
2019-10-09 23:16:36 +00:00
.method public static final toIntOrNull(Ljava/lang/String;I)Ljava/lang/Integer;
.locals 9
2019-07-24 11:27:29 +00:00
const-string v0, "$this$toIntOrNull"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1}, Lkotlin/text/a;->checkRadix(I)I
2019-07-24 11:27:29 +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
goto :goto_1
: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
:goto_0
const/4 v4, 0x0
:goto_1
2019-10-09 23:16:36 +00:00
div-int v7, v5, p1
2019-07-24 11:27:29 +00:00
sub-int/2addr v0, v6
if-gt v3, v0, :cond_8
:goto_2
invoke-virtual {p0, v3}, Ljava/lang/String;->charAt(I)C
move-result v6
2019-10-09 23:16:36 +00:00
invoke-static {v6, p1}, Lkotlin/text/a;->digitOf(CI)I
2019-07-24 11:27:29 +00:00
move-result v6
if-gez v6, :cond_5
return-object v1
:cond_5
if-ge v2, v7, :cond_6
return-object v1
:cond_6
2019-10-09 23:16:36 +00:00
mul-int v2, v2, p1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
add-int v8, v5, v6
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ge v2, v8, :cond_7
2019-07-24 11:27:29 +00:00
return-object v1
:cond_7
sub-int/2addr v2, v6
if-eq v3, v0, :cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_2
: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-10-09 23:16:36 +00:00
.method public static final toLongOrNull(Ljava/lang/String;)Ljava/lang/Long;
2019-07-24 11:27:29 +00:00
.locals 1
const-string v0, "$this$toLongOrNull"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const/16 v0, 0xa
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/text/l;->toLongOrNull(Ljava/lang/String;I)Ljava/lang/Long;
2019-07-24 11:27:29 +00:00
move-result-object p0
return-object p0
.end method
2019-10-09 23:16:36 +00:00
.method public static final toLongOrNull(Ljava/lang/String;I)Ljava/lang/Long;
.locals 19
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-object/from16 v0, p0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move/from16 v1, p1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string v2, "$this$toLongOrNull"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {v0, v2}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static/range {p1 .. p1}, Lkotlin/text/a;->checkRadix(I)I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual/range {p0 .. p0}, Ljava/lang/String;->length()I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v2
const/4 v3, 0x0
if-nez v2, :cond_0
return-object v3
2019-07-24 11:27:29 +00:00
:cond_0
2019-10-09 23:16:36 +00:00
const/4 v4, 0x0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual {v0, v4}, Ljava/lang/String;->charAt(I)C
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v5
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/16 v6, 0x30
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-wide v7, -0x7fffffffffffffffL # -4.9E-324
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v9, 0x1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ge v5, v6, :cond_4
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ne v2, v9, :cond_1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object v3
2019-07-24 11:27:29 +00:00
:cond_1
2019-10-09 23:16:36 +00:00
const/16 v6, 0x2d
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ne v5, v6, :cond_2
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-wide/high16 v7, -0x8000000000000000L
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v4, 0x1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v5, 0x1
2019-07-24 11:27:29 +00:00
goto :goto_1
:cond_2
2019-10-09 23:16:36 +00:00
const/16 v6, 0x2b
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ne v5, v6, :cond_3
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v4, 0x1
2019-07-24 11:27:29 +00:00
goto :goto_0
:cond_3
2019-10-09 23:16:36 +00:00
return-object v3
2019-07-24 11:27:29 +00:00
:cond_4
:goto_0
2019-10-09 23:16:36 +00:00
const/4 v5, 0x0
2019-07-24 11:27:29 +00:00
:goto_1
2019-10-09 23:16:36 +00:00
int-to-long v10, v1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
div-long v12, v7, v10
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-wide/16 v14, 0x0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
sub-int/2addr v2, v9
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-gt v4, v2, :cond_8
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
:goto_2
invoke-virtual {v0, v4}, Ljava/lang/String;->charAt(I)C
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v6
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {v6, v1}, Lkotlin/text/a;->digitOf(CI)I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v6
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-gez v6, :cond_5
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object v3
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
:cond_5
cmp-long v9, v14, v12
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-gez v9, :cond_6
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object v3
2019-07-24 11:27:29 +00:00
:cond_6
2019-10-09 23:16:36 +00:00
mul-long v14, v14, v10
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move/from16 v16, v4
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
int-to-long v3, v6
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
add-long v17, v7, v3
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
cmp-long v6, v14, v17
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-gez v6, :cond_7
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v6, 0x0
return-object v6
2019-07-24 11:27:29 +00:00
:cond_7
2019-10-09 23:16:36 +00:00
const/4 v6, 0x0
sub-long/2addr v14, v3
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move/from16 v4, v16
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-eq v4, v2, :cond_8
add-int/lit8 v4, v4, 0x1
move-object v3, v6
2019-07-24 11:27:29 +00:00
goto :goto_2
:cond_8
2019-10-09 23:16:36 +00:00
if-eqz v5, :cond_9
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {v14, v15}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object v0
2019-07-24 11:27:29 +00:00
:cond_9
2019-10-09 23:16:36 +00:00
neg-long v0, v14
2019-07-24 11:27:29 +00:00
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
2019-10-09 23:16:36 +00:00
move-result-object v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object v0
2019-07-24 11:27:29 +00:00
.end method