Rabbit-R1/switch port/smali/smali_classes3/kotlin/io/encoding/Base64.smali
2024-05-21 17:08:36 -04:00

2187 lines
49 KiB
Smali

.class public Lkotlin/io/encoding/Base64;
.super Ljava/lang/Object;
.source "Base64.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lkotlin/io/encoding/Base64$Default;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0006\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0012\n\u0002\u0008\u0002\n\u0002\u0010\r\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0002\u0008\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\n\u0008\u0017\u0018\u0000 22\u00020\u0001:\u00012B\u0017\u0008\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0005J\u0015\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u000cH\u0000\u00a2\u0006\u0002\u0008\rJ%\u0010\u000e\u001a\u00020\u000c2\u0006\u0010\u000b\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000\u00a2\u0006\u0002\u0008\u0013J \u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00112\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0018\u001a\u00020\u0011H\u0002J%\u0010\u0019\u001a\u00020\u00152\u0006\u0010\u001a\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000\u00a2\u0006\u0002\u0008\u001bJ\"\u0010\u001c\u001a\u00020\u000c2\u0006\u0010\u000b\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J\"\u0010\u001c\u001a\u00020\u000c2\u0006\u0010\u000b\u001a\u00020\u000f2\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J0\u0010\u001d\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u001e\u001a\u00020\u000c2\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J4\u0010\u001f\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u001e\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0017\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J4\u0010\u001f\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000f2\u0006\u0010\u001e\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0017\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J \u0010 \u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J\"\u0010!\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J4\u0010\"\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u001e\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0017\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J5\u0010#\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u001e\u001a\u00020\u000c2\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000\u00a2\u0006\u0002\u0008$J\u0010\u0010%\u001a\u00020\u00112\u0006\u0010\u001a\u001a\u00020\u0011H\u0002J=\u0010&\u001a\u0002H\'\"\u000c\u0008\u0000\u0010\'*\u00060(j\u0002`)2\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u001e\u001a\u0002H\'2\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011\u00a2\u0006\u0002\u0010*J\"\u0010+\u001a\u00020\u000c2\u0006\u0010\u000b\u001a\u00020\u000c2\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00112\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0011J%\u0010,\u001a\u00020\u000c2\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000\u00a2\u0006\u0002\u0008-J(\u0010.\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010/\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00112\u0006\u00100\u001a\u00020\u0011H\u0002J \u00101\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000c2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002R\u0014\u0010\u0004\u001a\u00020\u0003X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0006\u0010\u0007R\u0014\u0010\u0002\u001a\u00020\u0003X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0008\u0010\u0007\u00a8\u00063"
}
d2 = {
"Lkotlin/io/encoding/Base64;",
"",
"isUrlSafe",
"",
"isMimeScheme",
"(ZZ)V",
"isMimeScheme$kotlin_stdlib",
"()Z",
"isUrlSafe$kotlin_stdlib",
"bytesToStringImpl",
"",
"source",
"",
"bytesToStringImpl$kotlin_stdlib",
"charsToBytesImpl",
"",
"startIndex",
"",
"endIndex",
"charsToBytesImpl$kotlin_stdlib",
"checkDestinationBounds",
"",
"destinationSize",
"destinationOffset",
"capacityNeeded",
"checkSourceBounds",
"sourceSize",
"checkSourceBounds$kotlin_stdlib",
"decode",
"decodeImpl",
"destination",
"decodeIntoByteArray",
"decodeSize",
"encode",
"encodeIntoByteArray",
"encodeIntoByteArrayImpl",
"encodeIntoByteArrayImpl$kotlin_stdlib",
"encodeSize",
"encodeToAppendable",
"A",
"Ljava/lang/Appendable;",
"Lkotlin/text/Appendable;",
"([BLjava/lang/Appendable;II)Ljava/lang/Appendable;",
"encodeToByteArray",
"encodeToByteArrayImpl",
"encodeToByteArrayImpl$kotlin_stdlib",
"handlePaddingSymbol",
"padIndex",
"byteStart",
"skipIllegalSymbolsIfMime",
"Default",
"kotlin-stdlib"
}
k = 0x1
mv = {
0x1,
0x9,
0x0
}
xi = 0x30
.end annotation
# static fields
.field public static final Default:Lkotlin/io/encoding/Base64$Default;
.field private static final Mime:Lkotlin/io/encoding/Base64;
.field private static final UrlSafe:Lkotlin/io/encoding/Base64;
.field private static final bitsPerByte:I = 0x8
.field private static final bitsPerSymbol:I = 0x6
.field public static final bytesPerGroup:I = 0x3
.field private static final mimeGroupsPerLine:I = 0x13
.field public static final mimeLineLength:I = 0x4c
.field private static final mimeLineSeparatorSymbols:[B
.field public static final padSymbol:B = 0x3dt
.field public static final symbolsPerGroup:I = 0x4
# instance fields
.field private final isMimeScheme:Z
.field private final isUrlSafe:Z
# direct methods
.method static constructor <clinit>()V
.locals 3
new-instance v0, Lkotlin/io/encoding/Base64$Default;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lkotlin/io/encoding/Base64$Default;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lkotlin/io/encoding/Base64;->Default:Lkotlin/io/encoding/Base64$Default;
const/4 v0, 0x2
new-array v0, v0, [B
fill-array-data v0, :array_0
sput-object v0, Lkotlin/io/encoding/Base64;->mimeLineSeparatorSymbols:[B
.line 551
new-instance v0, Lkotlin/io/encoding/Base64;
const/4 v1, 0x1
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lkotlin/io/encoding/Base64;-><init>(ZZ)V
sput-object v0, Lkotlin/io/encoding/Base64;->UrlSafe:Lkotlin/io/encoding/Base64;
.line 563
new-instance v0, Lkotlin/io/encoding/Base64;
invoke-direct {v0, v2, v1}, Lkotlin/io/encoding/Base64;-><init>(ZZ)V
sput-object v0, Lkotlin/io/encoding/Base64;->Mime:Lkotlin/io/encoding/Base64;
return-void
nop
:array_0
.array-data 1
0xdt
0xat
.end array-data
.end method
.method private constructor <init>(ZZ)V
.locals 0
.line 18
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-boolean p1, p0, Lkotlin/io/encoding/Base64;->isUrlSafe:Z
iput-boolean p2, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-eqz p1, :cond_1
if-nez p2, :cond_0
goto :goto_0
.line 25
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Failed requirement."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
:goto_0
return-void
.end method
.method public synthetic constructor <init>(ZZLkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0, p1, p2}, Lkotlin/io/encoding/Base64;-><init>(ZZ)V
return-void
.end method
.method public static final synthetic access$getMime$cp()Lkotlin/io/encoding/Base64;
.locals 1
sget-object v0, Lkotlin/io/encoding/Base64;->Mime:Lkotlin/io/encoding/Base64;
return-object v0
.end method
.method public static final synthetic access$getMimeLineSeparatorSymbols$cp()[B
.locals 1
sget-object v0, Lkotlin/io/encoding/Base64;->mimeLineSeparatorSymbols:[B
return-object v0
.end method
.method public static final synthetic access$getUrlSafe$cp()Lkotlin/io/encoding/Base64;
.locals 1
sget-object v0, Lkotlin/io/encoding/Base64;->UrlSafe:Lkotlin/io/encoding/Base64;
return-object v0
.end method
.method private final checkDestinationBounds(III)V
.locals 3
const-string p0, ", destination size: "
if-ltz p2, :cond_1
if-gt p2, p1, :cond_1
add-int v0, p2, p3
if-ltz v0, :cond_0
if-gt v0, p1, :cond_0
return-void
.line 508
:cond_0
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
.line 509
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "The destination array does not have enough capacity, destination offset: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
const-string p1, ", capacity needed: "
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
.line 508
invoke-direct {v0, p0}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
throw v0
.line 503
:cond_1
new-instance p3, Ljava/lang/IndexOutOfBoundsException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "destination offset: "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p3, p0}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
throw p3
.end method
.method public static synthetic decode$default(Lkotlin/io/encoding/Base64;Ljava/lang/CharSequence;IIILjava/lang/Object;)[B
.locals 0
if-nez p5, :cond_2
and-int/lit8 p5, p4, 0x2
if-eqz p5, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p4, p4, 0x4
if-eqz p4, :cond_1
.line 216
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p3
:cond_1
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->decode(Ljava/lang/CharSequence;II)[B
move-result-object p0
return-object p0
:cond_2
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: decode"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic decode$default(Lkotlin/io/encoding/Base64;[BIIILjava/lang/Object;)[B
.locals 0
if-nez p5, :cond_2
and-int/lit8 p5, p4, 0x2
if-eqz p5, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p4, p4, 0x4
if-eqz p4, :cond_1
.line 150
array-length p3, p1
:cond_1
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->decode([BII)[B
move-result-object p0
return-object p0
:cond_2
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: decode"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private final decodeImpl([B[BIII)I
.locals 18
move-object/from16 v0, p0
move-object/from16 v1, p1
move/from16 v2, p5
iget-boolean v3, v0, Lkotlin/io/encoding/Base64;->isUrlSafe:Z
if-eqz v3, :cond_0
.line 341
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64UrlDecodeMap$p()[I
move-result-object v3
goto :goto_0
:cond_0
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64DecodeMap$p()[I
move-result-object v3
:goto_0
const/4 v4, -0x8
const/4 v5, 0x0
move/from16 v8, p3
move v7, v4
move v6, v5
move/from16 v5, p4
:goto_1
const-string v9, ") at index "
const-string v10, "toString(...)"
const-string v11, "\'("
const/4 v13, -0x2
if-ge v5, v2, :cond_6
if-ne v7, v4, :cond_1
add-int/lit8 v15, v5, 0x3
if-ge v15, v2, :cond_1
add-int/lit8 v15, v5, 0x1
.line 349
aget-byte v4, v1, v5
and-int/lit16 v4, v4, 0xff
aget v4, v3, v4
add-int/lit8 v16, v5, 0x2
.line 350
aget-byte v15, v1, v15
and-int/lit16 v15, v15, 0xff
aget v15, v3, v15
add-int/lit8 v17, v5, 0x3
.line 351
aget-byte v14, v1, v16
and-int/lit16 v14, v14, 0xff
aget v14, v3, v14
add-int/lit8 v16, v5, 0x4
.line 352
aget-byte v12, v1, v17
and-int/lit16 v12, v12, 0xff
aget v12, v3, v12
shl-int/lit8 v4, v4, 0x12
shl-int/lit8 v15, v15, 0xc
or-int/2addr v4, v15
shl-int/lit8 v14, v14, 0x6
or-int/2addr v4, v14
or-int/2addr v4, v12
if-ltz v4, :cond_1
add-int/lit8 v5, v8, 0x1
shr-int/lit8 v9, v4, 0x10
int-to-byte v9, v9
.line 355
aput-byte v9, p2, v8
add-int/lit8 v9, v8, 0x2
shr-int/lit8 v10, v4, 0x8
int-to-byte v10, v10
.line 356
aput-byte v10, p2, v5
add-int/lit8 v8, v8, 0x3
int-to-byte v4, v4
.line 357
aput-byte v4, p2, v9
move/from16 v5, v16
goto :goto_2
.line 363
:cond_1
aget-byte v4, v1, v5
and-int/lit16 v4, v4, 0xff
.line 364
aget v12, v3, v4
if-gez v12, :cond_4
if-ne v12, v13, :cond_2
.line 367
invoke-direct {v0, v1, v5, v2, v7}, Lkotlin/io/encoding/Base64;->handlePaddingSymbol([BIII)I
move-result v5
goto :goto_3
:cond_2
iget-boolean v12, v0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-eqz v12, :cond_3
add-int/lit8 v5, v5, 0x1
goto :goto_2
.line 373
:cond_3
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Invalid symbol \'"
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
int-to-char v2, v4
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const/16 v2, 0x8
invoke-static {v2}, Lkotlin/text/CharsKt;->checkRadix(I)I
move-result v2
invoke-static {v4, v2}, Ljava/lang/Integer;->toString(II)Ljava/lang/String;
move-result-object v2
invoke-static {v2, v10}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_4
add-int/lit8 v5, v5, 0x1
shl-int/lit8 v4, v6, 0x6
or-int v6, v4, v12
add-int/lit8 v4, v7, 0x6
if-ltz v4, :cond_5
add-int/lit8 v9, v8, 0x1
ushr-int v10, v6, v4
int-to-byte v10, v10
.line 383
aput-byte v10, p2, v8
const/4 v8, 0x1
shl-int v4, v8, v4
sub-int/2addr v4, v8
and-int/2addr v6, v4
add-int/lit8 v7, v7, -0x2
move v8, v9
goto :goto_2
:cond_5
move v7, v4
:goto_2
const/4 v4, -0x8
goto/16 :goto_1
:cond_6
:goto_3
if-eq v7, v13, :cond_8
.line 398
invoke-direct {v0, v1, v5, v2}, Lkotlin/io/encoding/Base64;->skipIllegalSymbolsIfMime([BII)I
move-result v0
if-lt v0, v2, :cond_7
sub-int v8, v8, p3
return v8
.line 400
:cond_7
aget-byte v1, v1, v0
and-int/lit16 v1, v1, 0xff
.line 401
new-instance v2, Ljava/lang/IllegalArgumentException;
new-instance v3, Ljava/lang/StringBuilder;
const-string v4, "Symbol \'"
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
int-to-char v4, v1
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
const/16 v4, 0x8
invoke-static {v4}, Lkotlin/text/CharsKt;->checkRadix(I)I
move-result v4
invoke-static {v1, v4}, Ljava/lang/Integer;->toString(II)Ljava/lang/String;
move-result-object v1
invoke-static {v1, v10}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const/4 v3, 0x1
sub-int/2addr v0, v3
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, " is prohibited after the pad character"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v2, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v2
.line 393
:cond_8
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "The last unit of input does not have enough bits"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static synthetic decodeIntoByteArray$default(Lkotlin/io/encoding/Base64;Ljava/lang/CharSequence;[BIIIILjava/lang/Object;)I
.locals 7
if-nez p7, :cond_3
and-int/lit8 p7, p6, 0x4
const/4 v0, 0x0
if-eqz p7, :cond_0
move v4, v0
goto :goto_0
:cond_0
move v4, p3
:goto_0
and-int/lit8 p3, p6, 0x8
if-eqz p3, :cond_1
move v5, v0
goto :goto_1
:cond_1
move v5, p4
:goto_1
and-int/lit8 p3, p6, 0x10
if-eqz p3, :cond_2
.line 248
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result p5
:cond_2
move v6, p5
move-object v1, p0
move-object v2, p1
move-object v3, p2
.line 243
invoke-virtual/range {v1 .. v6}, Lkotlin/io/encoding/Base64;->decodeIntoByteArray(Ljava/lang/CharSequence;[BIII)I
move-result p0
return p0
:cond_3
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: decodeIntoByteArray"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic decodeIntoByteArray$default(Lkotlin/io/encoding/Base64;[B[BIIIILjava/lang/Object;)I
.locals 7
if-nez p7, :cond_3
and-int/lit8 p7, p6, 0x4
const/4 v0, 0x0
if-eqz p7, :cond_0
move v4, v0
goto :goto_0
:cond_0
move v4, p3
:goto_0
and-int/lit8 p3, p6, 0x8
if-eqz p3, :cond_1
move v5, v0
goto :goto_1
:cond_1
move v5, p4
:goto_1
and-int/lit8 p3, p6, 0x10
if-eqz p3, :cond_2
.line 190
array-length p5, p1
:cond_2
move v6, p5
move-object v1, p0
move-object v2, p1
move-object v3, p2
.line 185
invoke-virtual/range {v1 .. v6}, Lkotlin/io/encoding/Base64;->decodeIntoByteArray([B[BIII)I
move-result p0
return p0
:cond_3
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: decodeIntoByteArray"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private final decodeSize([BII)I
.locals 2
sub-int v0, p3, p2
if-nez v0, :cond_0
const/4 p0, 0x0
return p0
:cond_0
const/4 v1, 0x1
if-eq v0, v1, :cond_6
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-eqz p0, :cond_3
:goto_0
if-ge p2, p3, :cond_5
.line 417
aget-byte p0, p1, p2
and-int/lit16 p0, p0, 0xff
.line 418
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64DecodeMap$p()[I
move-result-object v1
aget p0, v1, p0
if-gez p0, :cond_2
const/4 v1, -0x2
if-ne p0, v1, :cond_1
sub-int/2addr p3, p2
sub-int/2addr v0, p3
goto :goto_1
:cond_1
add-int/lit8 v0, v0, -0x1
:cond_2
add-int/lit8 p2, p2, 0x1
goto :goto_0
:cond_3
add-int/lit8 p0, p3, -0x1
.line 427
aget-byte p0, p1, p0
const/16 p2, 0x3d
if-ne p0, p2, :cond_5
add-int/lit8 p0, v0, -0x1
add-int/lit8 p3, p3, -0x2
.line 429
aget-byte p1, p1, p3
if-ne p1, p2, :cond_4
add-int/lit8 v0, v0, -0x2
goto :goto_1
:cond_4
move v0, p0
:cond_5
:goto_1
int-to-long p0, v0
const/4 p2, 0x6
int-to-long p2, p2
mul-long/2addr p0, p2
const/16 p2, 0x8
int-to-long p2, p2
.line 433
div-long/2addr p0, p2
long-to-int p0, p0
return p0
.line 413
:cond_6
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance p1, Ljava/lang/StringBuilder;
const-string v0, "Input should have at list 2 symbols for Base64 decoding, startIndex: "
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p1
const-string p2, ", endIndex: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic encode$default(Lkotlin/io/encoding/Base64;[BIIILjava/lang/Object;)Ljava/lang/String;
.locals 0
if-nez p5, :cond_2
and-int/lit8 p5, p4, 0x2
if-eqz p5, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p4, p4, 0x4
if-eqz p4, :cond_1
.line 100
array-length p3, p1
:cond_1
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->encode([BII)Ljava/lang/String;
move-result-object p0
return-object p0
:cond_2
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: encode"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic encodeIntoByteArray$default(Lkotlin/io/encoding/Base64;[B[BIIIILjava/lang/Object;)I
.locals 7
if-nez p7, :cond_3
and-int/lit8 p7, p6, 0x4
const/4 v0, 0x0
if-eqz p7, :cond_0
move v4, v0
goto :goto_0
:cond_0
move v4, p3
:goto_0
and-int/lit8 p3, p6, 0x8
if-eqz p3, :cond_1
move v5, v0
goto :goto_1
:cond_1
move v5, p4
:goto_1
and-int/lit8 p3, p6, 0x10
if-eqz p3, :cond_2
.line 77
array-length p5, p1
:cond_2
move v6, p5
move-object v1, p0
move-object v2, p1
move-object v3, p2
.line 72
invoke-virtual/range {v1 .. v6}, Lkotlin/io/encoding/Base64;->encodeIntoByteArray([B[BIII)I
move-result p0
return p0
:cond_3
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: encodeIntoByteArray"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private final encodeSize(I)I
.locals 0
add-int/lit8 p1, p1, 0x2
.line 325
div-int/lit8 p1, p1, 0x3
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-eqz p0, :cond_0
add-int/lit8 p0, p1, -0x1
.line 326
div-int/lit8 p0, p0, 0x13
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
mul-int/lit8 p1, p1, 0x4
mul-int/lit8 p0, p0, 0x2
add-int/2addr p1, p0
if-ltz p1, :cond_1
return p1
.line 329
:cond_1
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Input is too big"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic encodeToAppendable$default(Lkotlin/io/encoding/Base64;[BLjava/lang/Appendable;IIILjava/lang/Object;)Ljava/lang/Appendable;
.locals 0
if-nez p6, :cond_2
and-int/lit8 p6, p5, 0x4
if-eqz p6, :cond_0
const/4 p3, 0x0
:cond_0
and-int/lit8 p5, p5, 0x8
if-eqz p5, :cond_1
.line 125
array-length p4, p1
.line 121
:cond_1
invoke-virtual {p0, p1, p2, p3, p4}, Lkotlin/io/encoding/Base64;->encodeToAppendable([BLjava/lang/Appendable;II)Ljava/lang/Appendable;
move-result-object p0
return-object p0
:cond_2
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: encodeToAppendable"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static synthetic encodeToByteArray$default(Lkotlin/io/encoding/Base64;[BIIILjava/lang/Object;)[B
.locals 0
if-nez p5, :cond_2
and-int/lit8 p5, p4, 0x2
if-eqz p5, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p4, p4, 0x4
if-eqz p4, :cond_1
.line 48
array-length p3, p1
:cond_1
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->encodeToByteArray([BII)[B
move-result-object p0
return-object p0
:cond_2
new-instance p0, Ljava/lang/UnsupportedOperationException;
const-string p1, "Super calls with default arguments not supported in this target, function: encodeToByteArray"
invoke-direct {p0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private final handlePaddingSymbol([BIII)I
.locals 1
const/4 v0, -0x8
if-eq p4, v0, :cond_4
const/4 v0, -0x6
if-eq p4, v0, :cond_3
const/4 v0, -0x4
if-eq p4, v0, :cond_1
const/4 p0, -0x2
if-ne p4, p0, :cond_0
goto :goto_0
.line 476
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Unreachable"
.line 478
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
add-int/lit8 p2, p2, 0x1
.line 469
invoke-direct {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->skipIllegalSymbolsIfMime([BII)I
move-result p0
if-eq p0, p3, :cond_2
.line 470
aget-byte p1, p1, p0
const/16 p2, 0x3d
if-ne p1, p2, :cond_2
add-int/lit8 p2, p0, 0x1
goto :goto_1
.line 471
:cond_2
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance p2, Ljava/lang/StringBuilder;
const-string p3, "Missing one pad character at index "
invoke-direct {p2, p3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_3
:goto_0
add-int/lit8 p2, p2, 0x1
:goto_1
return p2
.line 465
:cond_4
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance p1, Ljava/lang/StringBuilder;
const-string p3, "Redundant pad character at index "
invoke-direct {p1, p3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private final skipIllegalSymbolsIfMime([BII)I
.locals 1
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-nez p0, :cond_0
return p2
:cond_0
:goto_0
if-ge p2, p3, :cond_2
.line 488
aget-byte p0, p1, p2
and-int/lit16 p0, p0, 0xff
.line 489
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64DecodeMap$p()[I
move-result-object v0
aget p0, v0, p0
const/4 v0, -0x1
if-eq p0, v0, :cond_1
return p2
:cond_1
add-int/lit8 p2, p2, 0x1
goto :goto_0
:cond_2
return p2
.end method
# virtual methods
.method public final bytesToStringImpl$kotlin_stdlib([B)Ljava/lang/String;
.locals 3
const-string p0, "source"
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 455
new-instance p0, Ljava/lang/StringBuilder;
array-length v0, p1
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(I)V
.line 456
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
aget-byte v2, p1, v1
int-to-char v2, v2
.line 457
invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 459
:cond_0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string p1, "toString(...)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public final charsToBytesImpl$kotlin_stdlib(Ljava/lang/CharSequence;II)[B
.locals 3
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 437
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
invoke-virtual {p0, v0, p2, p3}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
sub-int p0, p3, p2
.line 439
new-array p0, p0, [B
const/4 v0, 0x0
:goto_0
if-ge p2, p3, :cond_1
.line 442
invoke-interface {p1, p2}, Ljava/lang/CharSequence;->charAt(I)C
move-result v1
const/16 v2, 0xff
if-gt v1, v2, :cond_0
add-int/lit8 v2, v0, 0x1
int-to-byte v1, v1
.line 444
aput-byte v1, p0, v0
move v0, v2
goto :goto_1
:cond_0
add-int/lit8 v1, v0, 0x1
const/16 v2, 0x3f
.line 448
aput-byte v2, p0, v0
move v0, v1
:goto_1
add-int/lit8 p2, p2, 0x1
goto :goto_0
:cond_1
return-object p0
.end method
.method public final checkSourceBounds$kotlin_stdlib(III)V
.locals 0
.line 498
sget-object p0, Lkotlin/collections/AbstractList;->Companion:Lkotlin/collections/AbstractList$Companion;
invoke-virtual {p0, p2, p3, p1}, Lkotlin/collections/AbstractList$Companion;->checkBoundsIndexes$kotlin_stdlib(III)V
return-void
.end method
.method public final decode(Ljava/lang/CharSequence;II)[B
.locals 6
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 217
instance-of v0, p1, Ljava/lang/String;
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
invoke-virtual {p0, v0, p2, p3}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
check-cast p1, Ljava/lang/String;
invoke-virtual {p1, p2, p3}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object p1
const-string p2, "substring(...)"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
sget-object p2, Lkotlin/text/Charsets;->ISO_8859_1:Ljava/nio/charset/Charset;
const-string p3, "null cannot be cast to non-null type java.lang.String"
invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object p1
const-string p2, "getBytes(...)"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_0
:cond_0
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->charsToBytesImpl$kotlin_stdlib(Ljava/lang/CharSequence;II)[B
move-result-object p1
:goto_0
move-object v1, p1
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x6
const/4 v5, 0x0
move-object v0, p0
.line 218
invoke-static/range {v0 .. v5}, Lkotlin/io/encoding/Base64;->decode$default(Lkotlin/io/encoding/Base64;[BIIILjava/lang/Object;)[B
move-result-object p0
return-object p0
.end method
.method public final decode([BII)[B
.locals 8
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 151
array-length v0, p1
invoke-virtual {p0, v0, p2, p3}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
.line 153
invoke-direct {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->decodeSize([BII)I
move-result v0
.line 154
new-array v7, v0, [B
const/4 v4, 0x0
move-object v1, p0
move-object v2, p1
move-object v3, v7
move v5, p2
move v6, p3
.line 156
invoke-direct/range {v1 .. v6}, Lkotlin/io/encoding/Base64;->decodeImpl([B[BIII)I
move-result p0
if-ne p0, v0, :cond_0
return-object v7
.line 158
:cond_0
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Check failed."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public final decodeIntoByteArray(Ljava/lang/CharSequence;[BIII)I
.locals 8
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "destination"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 250
instance-of v0, p1, Ljava/lang/String;
if-eqz v0, :cond_0
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
invoke-virtual {p0, v0, p4, p5}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
check-cast p1, Ljava/lang/String;
invoke-virtual {p1, p4, p5}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object p1
const-string p4, "substring(...)"
invoke-static {p1, p4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
sget-object p4, Lkotlin/text/Charsets;->ISO_8859_1:Ljava/nio/charset/Charset;
const-string p5, "null cannot be cast to non-null type java.lang.String"
invoke-static {p1, p5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p1, p4}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object p1
const-string p4, "getBytes(...)"
invoke-static {p1, p4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_0
:cond_0
invoke-virtual {p0, p1, p4, p5}, Lkotlin/io/encoding/Base64;->charsToBytesImpl$kotlin_stdlib(Ljava/lang/CharSequence;II)[B
move-result-object p1
:goto_0
move-object v1, p1
const/4 v4, 0x0
const/4 v5, 0x0
const/16 v6, 0x18
const/4 v7, 0x0
move-object v0, p0
move-object v2, p2
move v3, p3
.line 251
invoke-static/range {v0 .. v7}, Lkotlin/io/encoding/Base64;->decodeIntoByteArray$default(Lkotlin/io/encoding/Base64;[B[BIIIILjava/lang/Object;)I
move-result p0
return p0
.end method
.method public final decodeIntoByteArray([B[BIII)I
.locals 2
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "destination"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 192
array-length v0, p1
invoke-virtual {p0, v0, p4, p5}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
.line 193
array-length v0, p2
invoke-direct {p0, p1, p4, p5}, Lkotlin/io/encoding/Base64;->decodeSize([BII)I
move-result v1
invoke-direct {p0, v0, p3, v1}, Lkotlin/io/encoding/Base64;->checkDestinationBounds(III)V
.line 195
invoke-direct/range {p0 .. p5}, Lkotlin/io/encoding/Base64;->decodeImpl([B[BIII)I
move-result p0
return p0
.end method
.method public final encode([BII)Ljava/lang/String;
.locals 1
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 101
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->encodeToByteArrayImpl$kotlin_stdlib([BII)[B
move-result-object p0
new-instance p1, Ljava/lang/String;
sget-object p2, Lkotlin/text/Charsets;->ISO_8859_1:Ljava/nio/charset/Charset;
invoke-direct {p1, p0, p2}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
return-object p1
.end method
.method public final encodeIntoByteArray([B[BIII)I
.locals 1
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "destination"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 79
invoke-virtual/range {p0 .. p5}, Lkotlin/io/encoding/Base64;->encodeIntoByteArrayImpl$kotlin_stdlib([B[BIII)I
move-result p0
return p0
.end method
.method public final encodeIntoByteArrayImpl$kotlin_stdlib([B[BIII)I
.locals 10
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "destination"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 272
array-length v0, p1
invoke-virtual {p0, v0, p4, p5}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
.line 273
array-length v0, p2
sub-int v1, p5, p4
invoke-direct {p0, v1}, Lkotlin/io/encoding/Base64;->encodeSize(I)I
move-result v1
invoke-direct {p0, v0, p3, v1}, Lkotlin/io/encoding/Base64;->checkDestinationBounds(III)V
iget-boolean v0, p0, Lkotlin/io/encoding/Base64;->isUrlSafe:Z
if-eqz v0, :cond_0
.line 275
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64UrlEncodeMap$p()[B
move-result-object v0
goto :goto_0
:cond_0
invoke-static {}, Lkotlin/io/encoding/Base64Kt;->access$getBase64EncodeMap$p()[B
move-result-object v0
:goto_0
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
if-eqz p0, :cond_1
const/16 p0, 0x13
goto :goto_1
:cond_1
const p0, 0x7fffffff
:goto_1
move v1, p3
:cond_2
:goto_2
add-int/lit8 v2, p4, 0x2
const/4 v3, 0x1
if-ge v2, p5, :cond_4
sub-int v2, p5, p4
.line 281
div-int/lit8 v2, v2, 0x3
invoke-static {v2, p0}, Ljava/lang/Math;->min(II)I
move-result v2
const/4 v4, 0x0
move v5, v4
:goto_3
if-ge v5, v2, :cond_3
add-int/lit8 v6, p4, 0x1
.line 283
aget-byte v7, p1, p4
and-int/lit16 v7, v7, 0xff
add-int/lit8 v8, p4, 0x2
.line 284
aget-byte v6, p1, v6
and-int/lit16 v6, v6, 0xff
add-int/lit8 p4, p4, 0x3
.line 285
aget-byte v8, p1, v8
and-int/lit16 v8, v8, 0xff
shl-int/lit8 v7, v7, 0x10
shl-int/lit8 v6, v6, 0x8
or-int/2addr v6, v7
or-int/2addr v6, v8
add-int/lit8 v7, v1, 0x1
ushr-int/lit8 v8, v6, 0x12
.line 287
aget-byte v8, v0, v8
aput-byte v8, p2, v1
add-int/lit8 v8, v1, 0x2
ushr-int/lit8 v9, v6, 0xc
and-int/lit8 v9, v9, 0x3f
.line 288
aget-byte v9, v0, v9
aput-byte v9, p2, v7
add-int/lit8 v7, v1, 0x3
ushr-int/lit8 v9, v6, 0x6
and-int/lit8 v9, v9, 0x3f
.line 289
aget-byte v9, v0, v9
aput-byte v9, p2, v8
add-int/lit8 v1, v1, 0x4
and-int/lit8 v6, v6, 0x3f
.line 290
aget-byte v6, v0, v6
aput-byte v6, p2, v7
add-int/lit8 v5, v5, 0x1
goto :goto_3
:cond_3
if-ne v2, p0, :cond_2
if-eq p4, p5, :cond_2
add-int/lit8 v2, v1, 0x1
sget-object v5, Lkotlin/io/encoding/Base64;->mimeLineSeparatorSymbols:[B
.line 293
aget-byte v4, v5, v4
aput-byte v4, p2, v1
add-int/lit8 v1, v1, 0x2
.line 294
aget-byte v3, v5, v3
aput-byte v3, p2, v2
goto :goto_2
:cond_4
sub-int p0, p5, p4
const/16 v2, 0x3d
if-eq p0, v3, :cond_6
const/4 v3, 0x2
if-eq p0, v3, :cond_5
goto :goto_4
:cond_5
add-int/lit8 p0, p4, 0x1
.line 308
aget-byte v4, p1, p4
and-int/lit16 v4, v4, 0xff
add-int/lit8 p4, p4, 0x2
.line 309
aget-byte p0, p1, p0
and-int/lit16 p0, p0, 0xff
shl-int/lit8 p1, v4, 0xa
shl-int/2addr p0, v3
or-int/2addr p0, p1
add-int/lit8 p1, v1, 0x1
ushr-int/lit8 v3, p0, 0xc
.line 311
aget-byte v3, v0, v3
aput-byte v3, p2, v1
add-int/lit8 v3, v1, 0x2
ushr-int/lit8 v4, p0, 0x6
and-int/lit8 v4, v4, 0x3f
.line 312
aget-byte v4, v0, v4
aput-byte v4, p2, p1
add-int/lit8 p1, v1, 0x3
and-int/lit8 p0, p0, 0x3f
.line 313
aget-byte p0, v0, p0
aput-byte p0, p2, v3
add-int/lit8 v1, v1, 0x4
.line 314
aput-byte v2, p2, p1
goto :goto_4
:cond_6
add-int/lit8 p0, p4, 0x1
.line 300
aget-byte p1, p1, p4
and-int/lit16 p1, p1, 0xff
shl-int/lit8 p1, p1, 0x4
add-int/lit8 p4, v1, 0x1
ushr-int/lit8 v3, p1, 0x6
.line 302
aget-byte v3, v0, v3
aput-byte v3, p2, v1
add-int/lit8 v3, v1, 0x2
and-int/lit8 p1, p1, 0x3f
.line 303
aget-byte p1, v0, p1
aput-byte p1, p2, p4
add-int/lit8 p1, v1, 0x3
.line 304
aput-byte v2, p2, v3
add-int/lit8 v1, v1, 0x4
.line 305
aput-byte v2, p2, p1
move p4, p0
:goto_4
if-ne p4, p5, :cond_7
sub-int/2addr v1, p3
return v1
.line 318
:cond_7
new-instance p0, Ljava/lang/IllegalStateException;
const-string p1, "Check failed."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public final encodeToAppendable([BLjava/lang/Appendable;II)Ljava/lang/Appendable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<A::",
"Ljava/lang/Appendable;",
">([BTA;II)TA;"
}
.end annotation
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "destination"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 127
invoke-virtual {p0, p1, p3, p4}, Lkotlin/io/encoding/Base64;->encodeToByteArrayImpl$kotlin_stdlib([BII)[B
move-result-object p0
new-instance p1, Ljava/lang/String;
sget-object p3, Lkotlin/text/Charsets;->ISO_8859_1:Ljava/nio/charset/Charset;
invoke-direct {p1, p0, p3}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
.line 128
check-cast p1, Ljava/lang/CharSequence;
invoke-interface {p2, p1}, Ljava/lang/Appendable;->append(Ljava/lang/CharSequence;)Ljava/lang/Appendable;
return-object p2
.end method
.method public final encodeToByteArray([BII)[B
.locals 1
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 49
invoke-virtual {p0, p1, p2, p3}, Lkotlin/io/encoding/Base64;->encodeToByteArrayImpl$kotlin_stdlib([BII)[B
move-result-object p0
return-object p0
.end method
.method public final encodeToByteArrayImpl$kotlin_stdlib([BII)[B
.locals 7
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 257
array-length v0, p1
invoke-virtual {p0, v0, p2, p3}, Lkotlin/io/encoding/Base64;->checkSourceBounds$kotlin_stdlib(III)V
sub-int v0, p3, p2
.line 259
invoke-direct {p0, v0}, Lkotlin/io/encoding/Base64;->encodeSize(I)I
move-result v0
.line 260
new-array v0, v0, [B
const/4 v4, 0x0
move-object v1, p0
move-object v2, p1
move-object v3, v0
move v5, p2
move v6, p3
.line 261
invoke-virtual/range {v1 .. v6}, Lkotlin/io/encoding/Base64;->encodeIntoByteArrayImpl$kotlin_stdlib([B[BIII)I
return-object v0
.end method
.method public final isMimeScheme$kotlin_stdlib()Z
.locals 0
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isMimeScheme:Z
return p0
.end method
.method public final isUrlSafe$kotlin_stdlib()Z
.locals 0
iget-boolean p0, p0, Lkotlin/io/encoding/Base64;->isUrlSafe:Z
return p0
.end method