_Utf8Kt.smali
.class public final Lokio/internal/_Utf8Kt;
.super Ljava/lang/Object;
.source "-Utf8.kt"
# direct methods
.method public static final commonAsUtf8ToByteArray(Ljava/lang/String;)[B
.registers 13
const-string v0, "$this$commonAsUtf8ToByteArray"
invoke-static {p0, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
mul-int/lit8 v0, v0, 0x4
new-array v0, v0, [B
.line 2
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v1
const/4 v2, 0x0
:goto_12
const-string v3, "java.util.Arrays.copyOf(this, newSize)"
if-ge v2, v1, :cond_e5
.line 3
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v4
const/16 v5, 0x80
if-lt v4, v5, :cond_de
.line 4
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v1
move v4, v2
:goto_23
if-ge v2, v1, :cond_d6
.line 5
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v6
if-ge v6, v5, :cond_4a
int-to-byte v6, v6
add-int/lit8 v7, v4, 0x1
.line 6
aput-byte v6, v0, v4
add-int/lit8 v2, v2, 0x1
:goto_32
if-ge v2, v1, :cond_48
.line 7
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v4
if-ge v4, v5, :cond_48
add-int/lit8 v4, v2, 0x1
.line 8
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v2
int-to-byte v2, v2
add-int/lit8 v6, v7, 0x1
.line 9
aput-byte v2, v0, v7
move v2, v4
move v7, v6
goto :goto_32
:cond_48
move v4, v7
goto :goto_23
:cond_4a
const/16 v7, 0x800
if-ge v6, v7, :cond_63
shr-int/lit8 v7, v6, 0x6
or-int/lit16 v7, v7, 0xc0
int-to-byte v7, v7
add-int/lit8 v8, v4, 0x1
aput-byte v7, v0, v4
and-int/lit8 v4, v6, 0x3f
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v6, v8, 0x1
aput-byte v4, v0, v8
:goto_5f
add-int/lit8 v2, v2, 0x1
:goto_61
move v4, v6
goto :goto_23
:cond_63
const v7, 0xd800
const/16 v8, 0x3f
if-gt v7, v6, :cond_bb
const v7, 0xdfff
if-ge v7, v6, :cond_70
goto :goto_bb
:cond_70
const v9, 0xdbff
if-gt v6, v9, :cond_b6
add-int/lit8 v9, v2, 0x1
if-le v1, v9, :cond_b6
const v10, 0xdc00
.line 10
invoke-virtual {p0, v9}, Ljava/lang/String;->charAt(I)C
move-result v11
if-gt v10, v11, :cond_b6
if-ge v7, v11, :cond_85
goto :goto_b6
:cond_85
shl-int/lit8 v6, v6, 0xa
.line 11
invoke-virtual {p0, v9}, Ljava/lang/String;->charAt(I)C
move-result v7
add-int/2addr v6, v7
const v7, -0x35fdc00
add-int/2addr v6, v7
shr-int/lit8 v7, v6, 0x12
or-int/lit16 v7, v7, 0xf0
int-to-byte v7, v7
add-int/lit8 v9, v4, 0x1
.line 12
aput-byte v7, v0, v4
shr-int/lit8 v4, v6, 0xc
and-int/2addr v4, v8
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v7, v9, 0x1
aput-byte v4, v0, v9
shr-int/lit8 v4, v6, 0x6
and-int/2addr v4, v8
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v9, v7, 0x1
aput-byte v4, v0, v7
and-int/lit8 v4, v6, 0x3f
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v6, v9, 0x1
aput-byte v4, v0, v9
add-int/lit8 v2, v2, 0x2
goto :goto_61
:cond_b6
:goto_b6
add-int/lit8 v6, v4, 0x1
aput-byte v8, v0, v4
goto :goto_5f
:cond_bb
:goto_bb
shr-int/lit8 v7, v6, 0xc
or-int/lit16 v7, v7, 0xe0
int-to-byte v7, v7
add-int/lit8 v9, v4, 0x1
aput-byte v7, v0, v4
shr-int/lit8 v4, v6, 0x6
and-int/2addr v4, v8
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v7, v9, 0x1
aput-byte v4, v0, v9
and-int/lit8 v4, v6, 0x3f
or-int/2addr v4, v5
int-to-byte v4, v4
add-int/lit8 v6, v7, 0x1
aput-byte v4, v0, v7
goto :goto_5f
.line 13
:cond_d6
invoke-static {v0, v4}, Ljava/util/Arrays;->copyOf([BI)[B
move-result-object p0
invoke-static {p0, v3}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
:cond_de
int-to-byte v3, v4
.line 14
aput-byte v3, v0, v2
add-int/lit8 v2, v2, 0x1
goto/16 :goto_12
.line 15
:cond_e5
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result p0
invoke-static {v0, p0}, Ljava/util/Arrays;->copyOf([BI)[B
move-result-object p0
invoke-static {p0, v3}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public static final commonToUtf8String([BII)Ljava/lang/String;
.registers 20
move-object/from16 v0, p0
move/from16 v1, p1
move/from16 v2, p2
const-string v3, "$this$commonToUtf8String"
invoke-static {v0, v3}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
if-ltz v1, :cond_1a9
.line 1
array-length v3, v0
if-gt v2, v3, :cond_1a9
if-gt v1, v2, :cond_1a9
sub-int v3, v2, v1
.line 2
new-array v3, v3, [C
const/4 v4, 0x0
const/4 v5, 0x0
:goto_18
if-ge v1, v2, :cond_1a3
.line 3
aget-byte v6, v0, v1
if-ltz v6, :cond_39
int-to-char v6, v6
add-int/lit8 v7, v5, 0x1
.line 4
aput-char v6, v3, v5
add-int/lit8 v1, v1, 0x1
:goto_25
if-ge v1, v2, :cond_37
.line 5
aget-byte v5, v0, v1
if-ltz v5, :cond_37
add-int/lit8 v5, v1, 0x1
.line 6
aget-byte v1, v0, v1
int-to-char v1, v1
add-int/lit8 v6, v7, 0x1
.line 7
aput-char v1, v3, v7
move v1, v5
move v7, v6
goto :goto_25
:cond_37
:goto_37
move v5, v7
goto :goto_18
:cond_39
shr-int/lit8 v7, v6, 0x5
const/4 v8, -0x2
const/16 v10, 0x80
const v11, 0xfffd
if-ne v7, v8, :cond_76
add-int/lit8 v6, v1, 0x1
if-gt v2, v6, :cond_4e
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
:cond_4c
:goto_4c
const/4 v12, 0x1
goto :goto_74
.line 8
:cond_4e
aget-byte v7, v0, v1
.line 9
aget-byte v6, v0, v6
and-int/lit16 v8, v6, 0xc0
if-ne v8, v10, :cond_58
const/4 v8, 0x1
goto :goto_59
:cond_58
const/4 v8, 0x0
:goto_59
if-nez v8, :cond_61
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
.line 10
aput-char v6, v3, v5
goto :goto_4c
:cond_61
xor-int/lit16 v6, v6, 0xf80
shl-int/lit8 v7, v7, 0x6
xor-int/2addr v6, v7
if-ge v6, v10, :cond_6e
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
goto :goto_73
:cond_6e
int-to-char v6, v6
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
:cond_73
:goto_73
const/4 v12, 0x2
:goto_74
add-int/2addr v1, v12
goto :goto_37
:cond_76
shr-int/lit8 v7, v6, 0x4
const v13, 0xd800
const v14, 0xdfff
const/4 v15, 0x3
if-ne v7, v8, :cond_e6
add-int/lit8 v6, v1, 0x2
if-gt v2, v6, :cond_9a
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
add-int/lit8 v5, v1, 0x1
if-le v2, v5, :cond_4c
.line 11
aget-byte v5, v0, v5
and-int/lit16 v5, v5, 0xc0
if-ne v5, v10, :cond_96
const/4 v5, 0x1
goto :goto_97
:cond_96
const/4 v5, 0x0
:goto_97
if-nez v5, :cond_73
goto :goto_4c
.line 12
:cond_9a
aget-byte v7, v0, v1
add-int/lit8 v8, v1, 0x1
.line 13
aget-byte v8, v0, v8
and-int/lit16 v9, v8, 0xc0
if-ne v9, v10, :cond_a6
const/4 v9, 0x1
goto :goto_a7
:cond_a6
const/4 v9, 0x0
:goto_a7
if-nez v9, :cond_af
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
.line 14
aput-char v6, v3, v5
goto :goto_4c
.line 15
:cond_af
aget-byte v6, v0, v6
and-int/lit16 v9, v6, 0xc0
if-ne v9, v10, :cond_b7
const/4 v12, 0x1
goto :goto_b8
:cond_b7
const/4 v12, 0x0
:goto_b8
if-nez v12, :cond_c0
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
.line 16
aput-char v6, v3, v5
goto :goto_73
:cond_c0
const v9, -0x1e080
xor-int/2addr v6, v9
shl-int/lit8 v8, v8, 0x6
xor-int/2addr v6, v8
shl-int/lit8 v7, v7, 0xc
xor-int/2addr v6, v7
const/16 v7, 0x800
if-ge v6, v7, :cond_d4
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
goto :goto_e4
:cond_d4
if-le v13, v6, :cond_d7
goto :goto_df
:cond_d7
if-lt v14, v6, :cond_df
int-to-char v6, v11
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
goto :goto_e4
:cond_df
:goto_df
int-to-char v6, v6
add-int/lit8 v7, v5, 0x1
aput-char v6, v3, v5
:goto_e4
const/4 v12, 0x3
goto :goto_74
:cond_e6
shr-int/lit8 v6, v6, 0x3
if-ne v6, v8, :cond_19a
add-int/lit8 v6, v1, 0x3
if-gt v2, v6, :cond_117
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
add-int/lit8 v5, v1, 0x1
if-le v2, v5, :cond_114
.line 17
aget-byte v5, v0, v5
and-int/lit16 v5, v5, 0xc0
if-ne v5, v10, :cond_fe
const/4 v5, 0x1
goto :goto_ff
:cond_fe
const/4 v5, 0x0
:goto_ff
if-nez v5, :cond_102
goto :goto_114
:cond_102
add-int/lit8 v5, v1, 0x2
if-le v2, v5, :cond_111
.line 18
aget-byte v5, v0, v5
and-int/lit16 v5, v5, 0xc0
if-ne v5, v10, :cond_10e
const/4 v12, 0x1
goto :goto_10f
:cond_10e
const/4 v12, 0x0
:goto_10f
if-nez v12, :cond_198
:cond_111
:goto_111
const/4 v15, 0x2
goto/16 :goto_198
:cond_114
:goto_114
const/4 v15, 0x1
goto/16 :goto_198
.line 19
:cond_117
aget-byte v7, v0, v1
add-int/lit8 v8, v1, 0x1
.line 20
aget-byte v8, v0, v8
and-int/lit16 v9, v8, 0xc0
if-ne v9, v10, :cond_123
const/4 v9, 0x1
goto :goto_124
:cond_123
const/4 v9, 0x0
:goto_124
if-nez v9, :cond_12b
add-int/lit8 v6, v5, 0x1
.line 21
aput-char v11, v3, v5
goto :goto_114
:cond_12b
add-int/lit8 v9, v1, 0x2
.line 22
aget-byte v9, v0, v9
and-int/lit16 v12, v9, 0xc0
if-ne v12, v10, :cond_135
const/4 v12, 0x1
goto :goto_136
:cond_135
const/4 v12, 0x0
:goto_136
if-nez v12, :cond_13d
add-int/lit8 v6, v5, 0x1
.line 23
aput-char v11, v3, v5
goto :goto_111
.line 24
:cond_13d
aget-byte v6, v0, v6
and-int/lit16 v12, v6, 0xc0
if-ne v12, v10, :cond_146
const/16 v16, 0x1
goto :goto_148
:cond_146
const/16 v16, 0x0
:goto_148
if-nez v16, :cond_14f
add-int/lit8 v6, v5, 0x1
.line 25
aput-char v11, v3, v5
goto :goto_198
:cond_14f
const v10, 0x381f80
xor-int/2addr v6, v10
shl-int/lit8 v9, v9, 0x6
xor-int/2addr v6, v9
shl-int/lit8 v8, v8, 0xc
xor-int/2addr v6, v8
shl-int/lit8 v7, v7, 0x12
xor-int/2addr v6, v7
const v7, 0x10ffff
if-le v6, v7, :cond_166
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
goto :goto_196
:cond_166
if-le v13, v6, :cond_169
goto :goto_170
:cond_169
if-lt v14, v6, :cond_170
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
goto :goto_196
:cond_170
:goto_170
const/high16 v7, 0x10000
if-ge v6, v7, :cond_179
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
goto :goto_196
:cond_179
if-eq v6, v11, :cond_192
ushr-int/lit8 v7, v6, 0xa
const v8, 0xd7c0
add-int/2addr v7, v8
int-to-char v7, v7
add-int/lit8 v8, v5, 0x1
aput-char v7, v3, v5
and-int/lit16 v5, v6, 0x3ff
const v6, 0xdc00
add-int/2addr v5, v6
int-to-char v5, v5
add-int/lit8 v6, v8, 0x1
aput-char v5, v3, v8
goto :goto_196
:cond_192
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
:goto_196
const/4 v9, 0x4
const/4 v15, 0x4
:cond_198
:goto_198
add-int/2addr v1, v15
goto :goto_1a0
:cond_19a
add-int/lit8 v6, v5, 0x1
aput-char v11, v3, v5
add-int/lit8 v1, v1, 0x1
:goto_1a0
move v5, v6
goto/16 :goto_18
.line 26
:cond_1a3
new-instance v0, Ljava/lang/String;
invoke-direct {v0, v3, v4, v5}, Ljava/lang/String;-><init>([CII)V
return-object v0
.line 27
:cond_1a9
new-instance v3, Ljava/lang/ArrayIndexOutOfBoundsException;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "size="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
array-length v0, v0
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " beginIndex="
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " endIndex="
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v3, v0}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
goto :goto_1d2
:goto_1d1
throw v3
:goto_1d2
goto :goto_1d1
.end method
.method public static synthetic commonToUtf8String$default([BIIILjava/lang/Object;)Ljava/lang/String;
.registers 5
and-int/lit8 p4, p3, 0x1
if-eqz p4, :cond_5
const/4 p1, 0x0
:cond_5
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_a
.line 1
array-length p2, p0
:cond_a
invoke-static {p0, p1, p2}, Lokio/internal/_Utf8Kt;->commonToUtf8String([BII)Ljava/lang/String;
move-result-object p0
return-object p0
.end method