soul-browser/app/smali_classes4/kotlin/io/encoding/DecodeInputStream.smali
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* Decompile and recreate Soul Browser v1.4.85 with APK CI builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix CI build: include bundled google.jks and remove PR trigger

The apktool build failed in CI because app/unknown/.../google.jks was
excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files
and commit the missing resource.

Also remove the redundant pull_request workflow trigger.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Change package ID to com.github.kaki87.soulbrowser

Rename the application ID so the rebuilt APK can be installed
alongside the original Soul Browser from Google Play.

- Update AndroidManifest package, permissions, providers, and actions
- Update R class references in smali (com/github/kaki87/soulbrowser/R)
- Update shortcuts.xml targetPackage
- Rename app label to "Soul Rebuild" for easy identification

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install compatibility: remove split APK metadata and bundle native libs

The rebuilt APK still declared requiredSplitTypes and Play Store split
metadata, causing Android to reject standalone installs as incompatible.

- Remove requiredSplitTypes and split-related manifest meta-data
- Merge native libs from all ABI splits with uncompressed storage
- Page-align before signing for extractNativeLibs=false
- Add .so to apktool doNotCompress list

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install failure: use apksigner v2/v3 and bundle arm64 native libs

Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only
produces v1 signatures, causing Android to reject the install.

- Sign with apksigner (v1+v2+v3) instead of jarsigner
- Add arm64-v8a native libraries from universal Soul Browser 1.4.79
- Set extractNativeLibs=true for reliable sideload installs
- Commit stable debug keystore for consistent signatures across builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Add committed debug keystore for consistent APK signatures

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix startup crash: use original classes2.dex desugar libraries

Apktool recompiles smali_classes2 into a broken classes2.dex, causing
ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init.

Inject the original classes2.dex (Java 8+ desugar libs) after apktool
build instead of using the recompiled version.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix missing drawable resources from density split APKs

The base APK is an app bundle module; density-specific drawables like
seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild,
causing Resources$NotFoundException at runtime.

- Merge non-9-patch resources from split APKs before apktool build
- Sync public.xml IDs from R smali only when backing files exist
- Add 713 density-specific resource IDs to public.xml

Co-authored-by: KaKi87 <KaKi87@pm.me>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-10 16:07:14 +02:00

872 lines
19 KiB
Smali

.class final Lkotlin/io/encoding/DecodeInputStream;
.super Ljava/io/InputStream;
.source "SourceFile"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u0012\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0002\u0008\t\n\u0002\u0010\u0002\n\u0002\u0008\u000b\u0008\u0003\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u00a2\u0006\u0004\u0008\u0005\u0010\u0006J\u0008\u0010\u0014\u001a\u00020\u000fH\u0016J \u0010\u0014\u001a\u00020\u000f2\u0006\u0010\u0015\u001a\u00020\u000b2\u0006\u0010\u0016\u001a\u00020\u000f2\u0006\u0010\u0017\u001a\u00020\u000fH\u0016J\u0008\u0010\u0018\u001a\u00020\u0019H\u0016J(\u0010\u001a\u001a\u00020\u000f2\u0006\u0010\u001b\u001a\u00020\u000b2\u0006\u0010\u001c\u001a\u00020\u000f2\u0006\u0010\u001d\u001a\u00020\u000f2\u0006\u0010\u001e\u001a\u00020\u000fH\u0002J \u0010\u001f\u001a\u00020\u00192\u0006\u0010\u001b\u001a\u00020\u000b2\u0006\u0010\u001c\u001a\u00020\u000f2\u0006\u0010\u0017\u001a\u00020\u000fH\u0002J\u0008\u0010 \u001a\u00020\u0019H\u0002J\u0008\u0010!\u001a\u00020\u0019H\u0002J\u0010\u0010\"\u001a\u00020\u000f2\u0006\u0010\u001e\u001a\u00020\u000fH\u0002J\u0008\u0010#\u001a\u00020\u000fH\u0002R\u000e\u0010\u0002\u001a\u00020\u0001X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0008X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000c\u001a\u00020\u000bX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000bX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0010\u001a\u00020\u000fX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0011\u001a\u00020\u000f8BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0012\u0010\u0013\u00a8\u0006$"
}
d2 = {
"Lkotlin/io/encoding/DecodeInputStream;",
"Ljava/io/InputStream;",
"input",
"base64",
"Lkotlin/io/encoding/Base64;",
"<init>",
"(Ljava/io/InputStream;Lkotlin/io/encoding/Base64;)V",
"isClosed",
"",
"isEOF",
"singleByteBuffer",
"",
"symbolBuffer",
"byteBuffer",
"byteBufferStartIndex",
"",
"byteBufferEndIndex",
"byteBufferLength",
"getByteBufferLength",
"()I",
"read",
"destination",
"offset",
"length",
"close",
"",
"decodeSymbolBufferInto",
"dst",
"dstOffset",
"dstEndIndex",
"symbolBufferLength",
"copyByteBufferInto",
"resetByteBufferIfEmpty",
"shiftByteBufferToStartIfNeeded",
"handlePaddingSymbol",
"readNextSymbol",
"kotlin-stdlib"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/io/encoding/ExperimentalEncodingApi;
.end annotation
# instance fields
.field private final base64:Lkotlin/io/encoding/Base64;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
.field private final byteBuffer:[B
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
.field private byteBufferEndIndex:I
.field private byteBufferStartIndex:I
.field private final input:Ljava/io/InputStream;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
.field private isClosed:Z
.field private isEOF:Z
.field private final singleByteBuffer:[B
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
.field private final symbolBuffer:[B
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/io/InputStream;Lkotlin/io/encoding/Base64;)V
.locals 1
.param p1 # Ljava/io/InputStream;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
.param p2 # Lkotlin/io/encoding/Base64;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
.line 1
const-string v0, "input"
.line 2
.line 3
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
const-string v0, "base64"
.line 7
.line 8
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 9
.line 10
.line 11
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
.line 12
.line 13
.line 14
iput-object p1, p0, Lkotlin/io/encoding/DecodeInputStream;->input:Ljava/io/InputStream;
.line 15
.line 16
iput-object p2, p0, Lkotlin/io/encoding/DecodeInputStream;->base64:Lkotlin/io/encoding/Base64;
.line 17
.line 18
const/4 p1, 0x1
.line 19
new-array p1, p1, [B
.line 20
.line 21
iput-object p1, p0, Lkotlin/io/encoding/DecodeInputStream;->singleByteBuffer:[B
.line 22
.line 23
const/16 p1, 0x400
.line 24
.line 25
new-array p2, p1, [B
.line 26
.line 27
iput-object p2, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
.line 28
.line 29
new-array p1, p1, [B
.line 30
.line 31
iput-object p1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBuffer:[B
.line 32
.line 33
return-void
.end method
.method private final copyByteBufferInto([BII)V
.locals 3
.line 1
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBuffer:[B
.line 2
.line 3
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 4
.line 5
add-int v2, v1, p3
.line 6
.line 7
invoke-static {v0, p1, p2, v1, v2}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
.line 8
.line 9
.line 10
iget p1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 11
.line 12
add-int/2addr p1, p3
.line 13
iput p1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 14
.line 15
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->resetByteBufferIfEmpty()V
.line 16
.line 17
.line 18
return-void
.end method
.method private final decodeSymbolBufferInto([BIII)I
.locals 6
.line 1
iget v3, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 2
.line 3
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->base64:Lkotlin/io/encoding/Base64;
.line 4
.line 5
iget-object v1, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
.line 6
.line 7
iget-object v2, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBuffer:[B
.line 8
.line 9
const/4 v4, 0x0
.line 10
move v5, p4
.line 11
invoke-virtual/range {v0 .. v5}, Lkotlin/io/encoding/Base64;->decodeIntoByteArray([B[BIII)I
.line 12
.line 13
.line 14
move-result p4
.line 15
add-int/2addr v3, p4
.line 16
iput v3, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 17
.line 18
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->getByteBufferLength()I
.line 19
.line 20
.line 21
move-result p4
.line 22
sub-int/2addr p3, p2
.line 23
invoke-static {p4, p3}, Ljava/lang/Math;->min(II)I
.line 24
.line 25
.line 26
move-result p3
.line 27
invoke-direct {p0, p1, p2, p3}, Lkotlin/io/encoding/DecodeInputStream;->copyByteBufferInto([BII)V
.line 28
.line 29
.line 30
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->shiftByteBufferToStartIfNeeded()V
.line 31
.line 32
.line 33
return p3
.end method
.method private final getByteBufferLength()I
.locals 2
.line 1
iget v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 2
.line 3
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 4
.line 5
sub-int/2addr v0, v1
.line 6
return v0
.end method
.method private final handlePaddingSymbol(I)I
.locals 4
.line 1
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
.line 2
.line 3
const/16 v1, 0x3d
.line 4
.line 5
aput-byte v1, v0, p1
.line 6
.line 7
and-int/lit8 v0, p1, 0x3
.line 8
.line 9
const/4 v1, 0x2
.line 10
if-ne v0, v1, :cond_1
.line 11
.line 12
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->readNextSymbol()I
.line 13
.line 14
.line 15
move-result v0
.line 16
if-ltz v0, :cond_0
.line 17
.line 18
iget-object v2, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
.line 19
.line 20
add-int/lit8 v3, p1, 0x1
.line 21
.line 22
int-to-byte v0, v0
.line 23
aput-byte v0, v2, v3
.line 24
.line 25
:cond_0
add-int/2addr p1, v1
.line 26
return p1
.line 27
:cond_1
add-int/lit8 p1, p1, 0x1
.line 28
.line 29
return p1
.end method
.method private final readNextSymbol()I
.locals 2
.line 1
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->base64:Lkotlin/io/encoding/Base64;
.line 2
.line 3
invoke-virtual {v0}, Lkotlin/io/encoding/Base64;->isMimeScheme$kotlin_stdlib()Z
.line 4
.line 5
.line 6
move-result v0
.line 7
if-nez v0, :cond_0
.line 8
.line 9
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->input:Ljava/io/InputStream;
.line 10
.line 11
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
.line 12
.line 13
.line 14
move-result v0
.line 15
return v0
.line 16
:cond_0
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->input:Ljava/io/InputStream;
.line 17
.line 18
invoke-virtual {v0}, Ljava/io/InputStream;->read()I
.line 19
.line 20
.line 21
move-result v0
.line 22
const/4 v1, -0x1
.line 23
if-eq v0, v1, :cond_1
.line 24
.line 25
invoke-static {v0}, Lkotlin/io/encoding/Base64Kt;->isInMimeAlphabet(I)Z
.line 26
.line 27
.line 28
move-result v1
.line 29
if-eqz v1, :cond_0
.line 30
.line 31
:cond_1
return v0
.end method
.method private final resetByteBufferIfEmpty()V
.locals 2
.line 1
iget v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 2
.line 3
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 4
.line 5
if-ne v0, v1, :cond_0
.line 6
.line 7
const/4 v0, 0x0
.line 8
iput v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 9
.line 10
iput v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 11
.line 12
:cond_0
return-void
.end method
.method private final shiftByteBufferToStartIfNeeded()V
.locals 4
.line 1
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBuffer:[B
.line 2
.line 3
array-length v1, v0
.line 4
iget v2, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 5
.line 6
sub-int/2addr v1, v2
.line 7
iget-object v3, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
.line 8
.line 9
array-length v3, v3
.line 10
div-int/lit8 v3, v3, 0x4
.line 11
.line 12
mul-int/lit8 v3, v3, 0x3
.line 13
.line 14
if-le v3, v1, :cond_0
.line 15
.line 16
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 17
.line 18
const/4 v3, 0x0
.line 19
invoke-static {v0, v0, v3, v1, v2}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
.line 20
.line 21
.line 22
iget v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 23
.line 24
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 25
.line 26
sub-int/2addr v0, v1
.line 27
iput v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
.line 28
.line 29
iput v3, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 30
.line 31
:cond_0
return-void
.end method
# virtual methods
.method public close()V
.locals 1
.line 1
iget-boolean v0, p0, Lkotlin/io/encoding/DecodeInputStream;->isClosed:Z
.line 2
.line 3
if-nez v0, :cond_0
.line 4
.line 5
const/4 v0, 0x1
.line 6
iput-boolean v0, p0, Lkotlin/io/encoding/DecodeInputStream;->isClosed:Z
.line 7
.line 8
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->input:Ljava/io/InputStream;
.line 9
.line 10
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
.line 11
.line 12
.line 13
:cond_0
return-void
.end method
.method public read()I
.locals 4
.line 1
iget v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
iget v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferEndIndex:I
const/4 v2, 0x1
if-ge v0, v1, :cond_0
.line 2
iget-object v1, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBuffer:[B
aget-byte v1, v1, v0
and-int/lit16 v1, v1, 0xff
add-int/2addr v0, v2
.line 3
iput v0, p0, Lkotlin/io/encoding/DecodeInputStream;->byteBufferStartIndex:I
.line 4
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->resetByteBufferIfEmpty()V
return v1
.line 5
:cond_0
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->singleByteBuffer:[B
const/4 v1, 0x0
invoke-virtual {p0, v0, v1, v2}, Lkotlin/io/encoding/DecodeInputStream;->read([BII)I
move-result v0
const/4 v3, -0x1
if-eq v0, v3, :cond_2
if-ne v0, v2, :cond_1
.line 6
iget-object v0, p0, Lkotlin/io/encoding/DecodeInputStream;->singleByteBuffer:[B
aget-byte v0, v0, v1
and-int/lit16 v0, v0, 0xff
return v0
:cond_1
new-instance v0, Ljava/lang/IllegalStateException;
.line 7
const-string v1, "Unreachable"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:cond_2
return v3
.end method
.method public read([BII)I
.locals 9
.param p1 # [B
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
const-string v0, "destination"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
if-ltz p2, :cond_b
if-ltz p3, :cond_b
add-int v0, p2, p3
.line 8
array-length v1, p1
if-gt v0, v1, :cond_b
.line 9
iget-boolean v1, p0, Lkotlin/io/encoding/DecodeInputStream;->isClosed:Z
if-nez v1, :cond_a
.line 10
iget-boolean v1, p0, Lkotlin/io/encoding/DecodeInputStream;->isEOF:Z
const/4 v2, -0x1
if-eqz v1, :cond_0
return v2
:cond_0
const/4 v1, 0x0
if-nez p3, :cond_1
return v1
.line 11
:cond_1
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->getByteBufferLength()I
move-result v3
if-lt v3, p3, :cond_2
.line 12
invoke-direct {p0, p1, p2, p3}, Lkotlin/io/encoding/DecodeInputStream;->copyByteBufferInto([BII)V
return p3
.line 13
:cond_2
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->getByteBufferLength()I
move-result v3
sub-int/2addr p3, v3
add-int/lit8 p3, p3, 0x2
.line 14
div-int/lit8 p3, p3, 0x3
mul-int/lit8 p3, p3, 0x4
move v3, p2
.line 15
:goto_0
iget-boolean v4, p0, Lkotlin/io/encoding/DecodeInputStream;->isEOF:Z
if-nez v4, :cond_8
if-lez p3, :cond_8
.line 16
iget-object v4, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
array-length v4, v4
invoke-static {v4, p3}, Ljava/lang/Math;->min(II)I
move-result v4
move v5, v1
.line 17
:goto_1
iget-boolean v6, p0, Lkotlin/io/encoding/DecodeInputStream;->isEOF:Z
if-nez v6, :cond_5
if-ge v5, v4, :cond_5
.line 18
invoke-direct {p0}, Lkotlin/io/encoding/DecodeInputStream;->readNextSymbol()I
move-result v6
const/4 v7, 0x1
if-eq v6, v2, :cond_4
const/16 v8, 0x3d
if-eq v6, v8, :cond_3
.line 19
iget-object v7, p0, Lkotlin/io/encoding/DecodeInputStream;->symbolBuffer:[B
int-to-byte v6, v6
aput-byte v6, v7, v5
add-int/lit8 v5, v5, 0x1
goto :goto_1
.line 20
:cond_3
invoke-direct {p0, v5}, Lkotlin/io/encoding/DecodeInputStream;->handlePaddingSymbol(I)I
move-result v5
.line 21
iput-boolean v7, p0, Lkotlin/io/encoding/DecodeInputStream;->isEOF:Z
goto :goto_1
.line 22
:cond_4
iput-boolean v7, p0, Lkotlin/io/encoding/DecodeInputStream;->isEOF:Z
goto :goto_1
:cond_5
if-nez v6, :cond_7
if-ne v5, v4, :cond_6
goto :goto_2
.line 23
:cond_6
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "Check failed."
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_7
:goto_2
sub-int/2addr p3, v5
.line 24
invoke-direct {p0, p1, v3, v0, v5}, Lkotlin/io/encoding/DecodeInputStream;->decodeSymbolBufferInto([BIII)I
move-result v4
add-int/2addr v3, v4
goto :goto_0
:cond_8
if-ne v3, p2, :cond_9
if-eqz v4, :cond_9
return v2
:cond_9
sub-int/2addr v3, p2
return v3
.line 25
:cond_a
new-instance p1, Ljava/io/IOException;
const-string p2, "The input stream is closed."
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.line 26
:cond_b
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
const-string v1, ", length: "
const-string v2, ", buffer size: "
.line 27
const-string v3, "offset: "
invoke-static {v3, p2, p3, v1, v2}, Landroid/support/v4/media/a;->u(Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
.line 28
array-length p1, p1
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
throw v0
.end method