Rabbit-R1/switch port/smali/smali_classes3/okio/SegmentedByteString.smali
2024-05-21 17:08:36 -04:00

1664 lines
36 KiB
Smali

.class public final Lokio/SegmentedByteString;
.super Lokio/ByteString;
.source "SegmentedByteString.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nSegmentedByteString.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SegmentedByteString.kt\nokio/SegmentedByteString\n+ 2 SegmentedByteString.kt\nokio/internal/SegmentedByteStringKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,128:1\n59#2,12:129\n59#2,12:141\n100#2:153\n101#2,26:155\n130#2,5:181\n137#2:186\n140#2,3:187\n59#2,8:190\n143#2,4:198\n67#2,4:202\n147#2:206\n59#2,12:207\n151#2:219\n81#2,10:220\n152#2,9:230\n91#2,4:239\n161#2,2:243\n170#2,4:245\n81#2,10:249\n174#2,3:259\n91#2,4:262\n177#2:266\n186#2,7:267\n81#2,10:274\n193#2,3:284\n91#2,4:287\n196#2:291\n200#2,4:292\n208#2,6:296\n59#2,8:302\n214#2,7:310\n67#2,4:317\n221#2,2:321\n1#3:154\n*E\n*S KotlinDebug\n*F\n+ 1 SegmentedByteString.kt\nokio/SegmentedByteString\n*L\n53#1,12:129\n63#1,12:141\n75#1:153\n75#1,26:155\n77#1,5:181\n79#1:186\n81#1,3:187\n81#1,8:190\n81#1,4:198\n81#1,4:202\n81#1:206\n87#1,12:207\n93#1:219\n93#1,10:220\n93#1,9:230\n93#1,4:239\n93#1,2:243\n100#1,4:245\n100#1,10:249\n100#1,3:259\n100#1,4:262\n100#1:266\n107#1,7:267\n107#1,10:274\n107#1,3:284\n107#1,4:287\n107#1:291\n119#1,4:292\n121#1,6:296\n121#1,8:302\n121#1,7:310\n121#1,4:317\n121#1,2:321\n75#1:154\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\u0015\n\u0002\u0008\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\u0008\u0005\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u000b\n\u0002\u0010\u0005\n\u0002\u0008\t\n\u0002\u0018\u0002\n\u0002\u0008\t\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\u0008\u0000\u0018\u00002\u00020\u0001B\u001d\u0008\u0000\u0012\u000c\u0010\u0002\u001a\u0008\u0012\u0004\u0012\u00020\u00040\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u00a2\u0006\u0002\u0010\u0007J\u0008\u0010\r\u001a\u00020\u000eH\u0016J\u0008\u0010\u000f\u001a\u00020\u0010H\u0016J\u0008\u0010\u0011\u001a\u00020\u0010H\u0016J\u0015\u0010\u0012\u001a\u00020\u00012\u0006\u0010\u0013\u001a\u00020\u0010H\u0010\u00a2\u0006\u0002\u0008\u0014J\u0013\u0010\u0015\u001a\u00020\u00162\u0008\u0010\u0017\u001a\u0004\u0018\u00010\u0018H\u0096\u0002J\r\u0010\u0019\u001a\u00020\u001aH\u0010\u00a2\u0006\u0002\u0008\u001bJ\u0008\u0010\u001c\u001a\u00020\u001aH\u0016J\u0008\u0010\u001d\u001a\u00020\u0010H\u0016J\u001d\u0010\u001e\u001a\u00020\u00012\u0006\u0010\u0013\u001a\u00020\u00102\u0006\u0010\u001f\u001a\u00020\u0001H\u0010\u00a2\u0006\u0002\u0008 J\u0018\u0010!\u001a\u00020\u001a2\u0006\u0010\u0017\u001a\u00020\u00042\u0006\u0010\"\u001a\u00020\u001aH\u0016J\r\u0010#\u001a\u00020\u0004H\u0010\u00a2\u0006\u0002\u0008$J\u0015\u0010%\u001a\u00020&2\u0006\u0010\'\u001a\u00020\u001aH\u0010\u00a2\u0006\u0002\u0008(J\u0018\u0010)\u001a\u00020\u001a2\u0006\u0010\u0017\u001a\u00020\u00042\u0006\u0010\"\u001a\u00020\u001aH\u0016J(\u0010*\u001a\u00020\u00162\u0006\u0010+\u001a\u00020\u001a2\u0006\u0010\u0017\u001a\u00020\u00042\u0006\u0010,\u001a\u00020\u001a2\u0006\u0010-\u001a\u00020\u001aH\u0016J(\u0010*\u001a\u00020\u00162\u0006\u0010+\u001a\u00020\u001a2\u0006\u0010\u0017\u001a\u00020\u00012\u0006\u0010,\u001a\u00020\u001a2\u0006\u0010-\u001a\u00020\u001aH\u0016J\u0010\u0010.\u001a\u00020\u00102\u0006\u0010/\u001a\u000200H\u0016J\u0018\u00101\u001a\u00020\u00012\u0006\u00102\u001a\u00020\u001a2\u0006\u00103\u001a\u00020\u001aH\u0016J\u0008\u00104\u001a\u00020\u0001H\u0016J\u0008\u00105\u001a\u00020\u0001H\u0016J\u0008\u00106\u001a\u00020\u0004H\u0016J\u0008\u00107\u001a\u00020\u0001H\u0002J\u0008\u00108\u001a\u00020\u0010H\u0016J\u0010\u00109\u001a\u00020:2\u0006\u0010;\u001a\u00020<H\u0016J%\u00109\u001a\u00020:2\u0006\u0010=\u001a\u00020>2\u0006\u0010+\u001a\u00020\u001a2\u0006\u0010-\u001a\u00020\u001aH\u0010\u00a2\u0006\u0002\u0008?J\u0008\u0010@\u001a\u00020AH\u0002R\u0014\u0010\u0005\u001a\u00020\u0006X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0008\u0010\tR\u001c\u0010\u0002\u001a\u0008\u0012\u0004\u0012\u00020\u00040\u0003X\u0080\u0004\u00a2\u0006\n\n\u0002\u0010\u000c\u001a\u0004\u0008\n\u0010\u000b\u00a8\u0006B"
}
d2 = {
"Lokio/SegmentedByteString;",
"Lokio/ByteString;",
"segments",
"",
"",
"directory",
"",
"([[B[I)V",
"getDirectory$okio",
"()[I",
"getSegments$okio",
"()[[B",
"[[B",
"asByteBuffer",
"Ljava/nio/ByteBuffer;",
"base64",
"",
"base64Url",
"digest",
"algorithm",
"digest$okio",
"equals",
"",
"other",
"",
"getSize",
"",
"getSize$okio",
"hashCode",
"hex",
"hmac",
"key",
"hmac$okio",
"indexOf",
"fromIndex",
"internalArray",
"internalArray$okio",
"internalGet",
"",
"pos",
"internalGet$okio",
"lastIndexOf",
"rangeEquals",
"offset",
"otherOffset",
"byteCount",
"string",
"charset",
"Ljava/nio/charset/Charset;",
"substring",
"beginIndex",
"endIndex",
"toAsciiLowercase",
"toAsciiUppercase",
"toByteArray",
"toByteString",
"toString",
"write",
"",
"out",
"Ljava/io/OutputStream;",
"buffer",
"Lokio/Buffer;",
"write$okio",
"writeReplace",
"Ljava/lang/Object;",
"okio"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field private final transient directory:[I
.field private final transient segments:[[B
# direct methods
.method public constructor <init>([[B[I)V
.locals 1
const-string v0, "segments"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "directory"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 39
sget-object v0, Lokio/ByteString;->EMPTY:Lokio/ByteString;
invoke-virtual {v0}, Lokio/ByteString;->getData$okio()[B
move-result-object v0
invoke-direct {p0, v0}, Lokio/ByteString;-><init>([B)V
iput-object p1, p0, Lokio/SegmentedByteString;->segments:[[B
iput-object p2, p0, Lokio/SegmentedByteString;->directory:[I
return-void
.end method
.method private final toByteString()Lokio/ByteString;
.locals 1
.line 115
new-instance v0, Lokio/ByteString;
invoke-virtual {p0}, Lokio/SegmentedByteString;->toByteArray()[B
move-result-object p0
invoke-direct {v0, p0}, Lokio/ByteString;-><init>([B)V
return-object v0
.end method
.method private final writeReplace()Ljava/lang/Object;
.locals 1
.line 126
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
if-eqz p0, :cond_0
check-cast p0, Ljava/lang/Object;
return-object p0
:cond_0
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
# virtual methods
.method public asByteBuffer()Ljava/nio/ByteBuffer;
.locals 1
.line 83
invoke-virtual {p0}, Lokio/SegmentedByteString;->toByteArray()[B
move-result-object p0
invoke-static {p0}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
move-result-object p0
invoke-virtual {p0}, Ljava/nio/ByteBuffer;->asReadOnlyBuffer()Ljava/nio/ByteBuffer;
move-result-object p0
const-string v0, "ByteBuffer.wrap(toByteArray()).asReadOnlyBuffer()"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public base64()Ljava/lang/String;
.locals 0
.line 43
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->base64()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public base64Url()Ljava/lang/String;
.locals 0
.line 72
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->base64Url()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public digest$okio(Ljava/lang/String;)Lokio/ByteString;
.locals 6
const-string v0, "algorithm"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 52
invoke-static {p1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object p1
.line 129
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v0
check-cast v0, [Ljava/lang/Object;
array-length v0, v0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v1, v0, :cond_0
.line 133
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
add-int v4, v0, v1
aget v3, v3, v4
.line 134
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v4
aget v4, v4, v1
.line 136
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v5
aget-object v5, v5, v1
sub-int v2, v4, v2
.line 54
invoke-virtual {p1, v5, v3, v2}, Ljava/security/MessageDigest;->update([BII)V
add-int/lit8 v1, v1, 0x1
move v2, v4
goto :goto_0
.line 56
:cond_0
new-instance p0, Lokio/ByteString;
invoke-virtual {p1}, Ljava/security/MessageDigest;->digest()[B
move-result-object p1
const-string v0, "digest.digest()"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lokio/ByteString;-><init>([B)V
return-object p0
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 4
const/4 v0, 0x1
if-ne p1, p0, :cond_0
goto :goto_0
.line 294
:cond_0
instance-of v1, p1, Lokio/ByteString;
const/4 v2, 0x0
if-eqz v1, :cond_1
check-cast p1, Lokio/ByteString;
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v1
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v3
if-ne v1, v3, :cond_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v1
invoke-virtual {p0, v2, p1, v2, v1}, Lokio/SegmentedByteString;->rangeEquals(ILokio/ByteString;II)Z
move-result p0
if-eqz p0, :cond_1
goto :goto_0
:cond_1
move v0, v2
:goto_0
return v0
.end method
.method public final getDirectory$okio()[I
.locals 0
iget-object p0, p0, Lokio/SegmentedByteString;->directory:[I
return-object p0
.end method
.method public final getSegments$okio()[[B
.locals 0
iget-object p0, p0, Lokio/SegmentedByteString;->segments:[[B
return-object p0
.end method
.method public getSize$okio()I
.locals 1
.line 186
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object p0
check-cast p0, [Ljava/lang/Object;
array-length p0, p0
add-int/lit8 p0, p0, -0x1
aget p0, v0, p0
return p0
.end method
.method public hashCode()I
.locals 8
.line 296
invoke-virtual {p0}, Lokio/SegmentedByteString;->getHashCode$okio()I
move-result v0
if-eqz v0, :cond_0
goto :goto_2
.line 302
:cond_0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v0
check-cast v0, [Ljava/lang/Object;
array-length v0, v0
const/4 v1, 0x0
const/4 v2, 0x1
move v3, v1
:goto_0
if-ge v1, v0, :cond_2
.line 306
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v4
add-int v5, v0, v1
aget v4, v4, v5
.line 307
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v5
aget v5, v5, v1
.line 309
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v6
aget-object v6, v6, v1
sub-int v3, v5, v3
add-int/2addr v3, v4
:goto_1
if-ge v4, v3, :cond_1
mul-int/lit8 v2, v2, 0x1f
.line 313
aget-byte v7, v6, v4
add-int/2addr v2, v7
add-int/lit8 v4, v4, 0x1
goto :goto_1
:cond_1
add-int/lit8 v1, v1, 0x1
move v3, v5
goto :goto_0
.line 321
:cond_2
invoke-virtual {p0, v2}, Lokio/SegmentedByteString;->setHashCode$okio(I)V
move v0, v2
:goto_2
return v0
.end method
.method public hex()Ljava/lang/String;
.locals 0
.line 45
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->hex()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public hmac$okio(Ljava/lang/String;Lokio/ByteString;)Lokio/ByteString;
.locals 5
const-string v0, "algorithm"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "key"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 61
:try_start_0
invoke-static {p1}, Ljavax/crypto/Mac;->getInstance(Ljava/lang/String;)Ljavax/crypto/Mac;
move-result-object v0
.line 62
new-instance v1, Ljavax/crypto/spec/SecretKeySpec;
invoke-virtual {p2}, Lokio/ByteString;->toByteArray()[B
move-result-object p2
invoke-direct {v1, p2, p1}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V
check-cast v1, Ljava/security/Key;
invoke-virtual {v0, v1}, Ljavax/crypto/Mac;->init(Ljava/security/Key;)V
.line 141
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object p1
check-cast p1, [Ljava/lang/Object;
array-length p1, p1
const/4 p2, 0x0
move v1, p2
:goto_0
if-ge p2, p1, :cond_0
.line 145
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v2
add-int v3, p1, p2
aget v2, v2, v3
.line 146
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
aget v3, v3, p2
.line 148
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v4
aget-object v4, v4, p2
sub-int v1, v3, v1
.line 64
invoke-virtual {v0, v4, v2, v1}, Ljavax/crypto/Mac;->update([BII)V
add-int/lit8 p2, p2, 0x1
move v1, v3
goto :goto_0
.line 66
:cond_0
new-instance p0, Lokio/ByteString;
invoke-virtual {v0}, Ljavax/crypto/Mac;->doFinal()[B
move-result-object p1
const-string p2, "mac.doFinal()"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lokio/ByteString;-><init>([B)V
:try_end_0
.catch Ljava/security/InvalidKeyException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
.line 68
new-instance p1, Ljava/lang/IllegalArgumentException;
check-cast p0, Ljava/lang/Throwable;
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/Throwable;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public indexOf([BI)I
.locals 1
const-string v0, "other"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 109
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0, p1, p2}, Lokio/ByteString;->indexOf([BI)I
move-result p0
return p0
.end method
.method public internalArray$okio()[B
.locals 0
.line 117
invoke-virtual {p0}, Lokio/SegmentedByteString;->toByteArray()[B
move-result-object p0
return-object p0
.end method
.method public internalGet$okio(I)B
.locals 7
.line 181
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v1
check-cast v1, [Ljava/lang/Object;
array-length v1, v1
add-int/lit8 v1, v1, -0x1
aget v0, v0, v1
int-to-long v1, v0
int-to-long v3, p1
const-wide/16 v5, 0x1
invoke-static/range {v1 .. v6}, Lokio/-Util;->checkOffsetAndCount(JJJ)V
.line 182
invoke-static {p0, p1}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result v0
if-nez v0, :cond_0
const/4 v1, 0x0
goto :goto_0
.line 183
:cond_0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v1
add-int/lit8 v2, v0, -0x1
aget v1, v1, v2
.line 184
:goto_0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v2
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v3
check-cast v3, [Ljava/lang/Object;
array-length v3, v3
add-int/2addr v3, v0
aget v2, v2, v3
.line 185
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object p0
aget-object p0, p0, v0
sub-int/2addr p1, v1
add-int/2addr p1, v2
aget-byte p0, p0, p1
return p0
.end method
.method public lastIndexOf([BI)I
.locals 1
const-string v0, "other"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 111
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0, p1, p2}, Lokio/ByteString;->lastIndexOf([BI)I
move-result p0
return p0
.end method
.method public rangeEquals(ILokio/ByteString;II)Z
.locals 6
const-string v0, "other"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
if-ltz p1, :cond_4
.line 245
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v1
sub-int/2addr v1, p4
if-le p1, v1, :cond_0
goto :goto_2
:cond_0
add-int/2addr p4, p1
.line 249
invoke-static {p0, p1}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result v1
:goto_0
if-ge p1, p4, :cond_3
if-nez v1, :cond_1
move v2, v0
goto :goto_1
.line 252
:cond_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v2
add-int/lit8 v3, v1, -0x1
aget v2, v2, v3
.line 253
:goto_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
aget v3, v3, v1
sub-int/2addr v3, v2
.line 254
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v4
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v5
check-cast v5, [Ljava/lang/Object;
array-length v5, v5
add-int/2addr v5, v1
aget v4, v4, v5
add-int/2addr v3, v2
.line 256
invoke-static {p4, v3}, Ljava/lang/Math;->min(II)I
move-result v3
sub-int/2addr v3, p1
sub-int v2, p1, v2
add-int/2addr v4, v2
.line 258
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v2
aget-object v2, v2, v1
.line 259
invoke-virtual {p2, p3, v2, v4, v3}, Lokio/ByteString;->rangeEquals(I[BII)Z
move-result v2
if-nez v2, :cond_2
goto :goto_2
:cond_2
add-int/2addr p3, v3
add-int/2addr p1, v3
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_3
const/4 v0, 0x1
:cond_4
:goto_2
return v0
.end method
.method public rangeEquals(I[BII)Z
.locals 6
const-string v0, "other"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
if-ltz p1, :cond_4
.line 267
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v1
sub-int/2addr v1, p4
if-gt p1, v1, :cond_4
if-ltz p3, :cond_4
.line 268
array-length v1, p2
sub-int/2addr v1, p4
if-le p3, v1, :cond_0
goto :goto_2
:cond_0
add-int/2addr p4, p1
.line 274
invoke-static {p0, p1}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result v1
:goto_0
if-ge p1, p4, :cond_3
if-nez v1, :cond_1
move v2, v0
goto :goto_1
.line 277
:cond_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v2
add-int/lit8 v3, v1, -0x1
aget v2, v2, v3
.line 278
:goto_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
aget v3, v3, v1
sub-int/2addr v3, v2
.line 279
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v4
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v5
check-cast v5, [Ljava/lang/Object;
array-length v5, v5
add-int/2addr v5, v1
aget v4, v4, v5
add-int/2addr v3, v2
.line 281
invoke-static {p4, v3}, Ljava/lang/Math;->min(II)I
move-result v3
sub-int/2addr v3, p1
sub-int v2, p1, v2
add-int/2addr v4, v2
.line 283
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v2
aget-object v2, v2, v1
.line 284
invoke-static {v2, v4, p2, p3, v3}, Lokio/-Util;->arrayRangeEquals([BI[BII)Z
move-result v2
if-nez v2, :cond_2
goto :goto_2
:cond_2
add-int/2addr p3, v3
add-int/2addr p1, v3
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_3
const/4 v0, 0x1
:cond_4
:goto_2
return v0
.end method
.method public string(Ljava/nio/charset/Charset;)Ljava/lang/String;
.locals 1
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 41
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0, p1}, Lokio/ByteString;->string(Ljava/nio/charset/Charset;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public substring(II)Lokio/ByteString;
.locals 12
const/4 v0, 0x0
const/4 v1, 0x1
if-ltz p1, :cond_0
move v2, v1
goto :goto_0
:cond_0
move v2, v0
:goto_0
if-eqz v2, :cond_9
.line 155
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v2
if-gt p2, v2, :cond_1
move v2, v1
goto :goto_1
:cond_1
move v2, v0
:goto_1
const-string v3, "endIndex="
if-eqz v2, :cond_8
sub-int v2, p2, p1
if-ltz v2, :cond_2
move v4, v1
goto :goto_2
:cond_2
move v4, v0
:goto_2
if-eqz v4, :cond_7
if-nez p1, :cond_3
.line 161
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v3
if-ne p2, v3, :cond_3
check-cast p0, Lokio/ByteString;
goto :goto_5
:cond_3
if-ne p1, p2, :cond_4
.line 162
sget-object p0, Lokio/ByteString;->EMPTY:Lokio/ByteString;
goto :goto_5
.line 165
:cond_4
invoke-static {p0, p1}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result v3
sub-int/2addr p2, v1
.line 166
invoke-static {p0, p2}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result p2
.line 168
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v4
check-cast v4, [Ljava/lang/Object;
add-int/lit8 v5, p2, 0x1
invoke-static {v4, v3, v5}, Lkotlin/collections/ArraysKt;->copyOfRange([Ljava/lang/Object;II)[Ljava/lang/Object;
move-result-object v4
check-cast v4, [[B
.line 169
move-object v5, v4
check-cast v5, [Ljava/lang/Object;
array-length v6, v5
mul-int/lit8 v6, v6, 0x2
new-array v6, v6, [I
if-gt v3, p2, :cond_5
move v7, v0
move v8, v3
.line 172
:goto_3
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v9
aget v9, v9, v8
sub-int/2addr v9, p1
invoke-static {v9, v2}, Ljava/lang/Math;->min(II)I
move-result v9
aput v9, v6, v7
add-int/lit8 v9, v7, 0x1
.line 173
array-length v10, v5
add-int/2addr v7, v10
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v10
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v11
check-cast v11, [Ljava/lang/Object;
array-length v11, v11
add-int/2addr v11, v8
aget v10, v10, v11
aput v10, v6, v7
if-eq v8, p2, :cond_5
add-int/lit8 v8, v8, 0x1
move v7, v9
goto :goto_3
:cond_5
if-nez v3, :cond_6
goto :goto_4
.line 177
:cond_6
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object p0
sub-int/2addr v3, v1
aget v0, p0, v3
.line 178
:goto_4
array-length p0, v5
aget p2, v6, p0
sub-int/2addr p1, v0
add-int/2addr p2, p1
aput p2, v6, p0
.line 180
new-instance p0, Lokio/SegmentedByteString;
invoke-direct {p0, v4, v6}, Lokio/SegmentedByteString;-><init>([[B[I)V
check-cast p0, Lokio/ByteString;
:goto_5
return-object p0
.line 158
:cond_7
new-instance p0, Ljava/lang/StringBuilder;
invoke-direct {p0, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
const-string p2, " < beginIndex="
invoke-virtual {p0, p2}, 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
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.line 155
:cond_8
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1, v3}, 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, " > length("
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result p0
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
const/16 p1, 0x29
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.line 153
:cond_9
new-instance p0, Ljava/lang/StringBuilder;
const-string p2, "beginIndex="
invoke-direct {p0, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p0
const-string p1, " < 0"
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public toAsciiLowercase()Lokio/ByteString;
.locals 0
.line 47
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->toAsciiLowercase()Lokio/ByteString;
move-result-object p0
return-object p0
.end method
.method public toAsciiUppercase()Lokio/ByteString;
.locals 0
.line 49
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->toAsciiUppercase()Lokio/ByteString;
move-result-object p0
return-object p0
.end method
.method public toByteArray()[B
.locals 9
.line 187
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result v0
new-array v0, v0, [B
.line 190
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v1
check-cast v1, [Ljava/lang/Object;
array-length v1, v1
const/4 v2, 0x0
move v3, v2
move v4, v3
:goto_0
if-ge v2, v1, :cond_0
.line 194
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v5
add-int v6, v1, v2
aget v5, v5, v6
.line 195
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v6
aget v6, v6, v2
.line 197
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v7
aget-object v7, v7, v2
sub-int v3, v6, v3
add-int v8, v5, v3
.line 198
invoke-static {v7, v0, v4, v5, v8}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
add-int/2addr v4, v3
add-int/lit8 v2, v2, 0x1
move v3, v6
goto :goto_0
:cond_0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 0
.line 123
invoke-direct {p0}, Lokio/SegmentedByteString;->toByteString()Lokio/ByteString;
move-result-object p0
invoke-virtual {p0}, Lokio/ByteString;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public write(Ljava/io/OutputStream;)V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "out"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 207
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v0
check-cast v0, [Ljava/lang/Object;
array-length v0, v0
const/4 v1, 0x0
move v2, v1
:goto_0
if-ge v1, v0, :cond_0
.line 211
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
add-int v4, v0, v1
aget v3, v3, v4
.line 212
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v4
aget v4, v4, v1
.line 214
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v5
aget-object v5, v5, v1
sub-int v2, v4, v2
.line 88
invoke-virtual {p1, v5, v3, v2}, Ljava/io/OutputStream;->write([BII)V
add-int/lit8 v1, v1, 0x1
move v2, v4
goto :goto_0
:cond_0
return-void
.end method
.method public write$okio(Lokio/Buffer;II)V
.locals 10
const-string v0, "buffer"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
add-int/2addr p3, p2
.line 220
invoke-static {p0, p2}, Lokio/internal/SegmentedByteStringKt;->segment(Lokio/SegmentedByteString;I)I
move-result v0
:goto_0
if-ge p2, p3, :cond_2
if-nez v0, :cond_0
const/4 v1, 0x0
goto :goto_1
.line 223
:cond_0
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v1
add-int/lit8 v2, v0, -0x1
aget v1, v1, v2
.line 224
:goto_1
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v2
aget v2, v2, v0
sub-int/2addr v2, v1
.line 225
invoke-virtual {p0}, Lokio/SegmentedByteString;->getDirectory$okio()[I
move-result-object v3
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v4
check-cast v4, [Ljava/lang/Object;
array-length v4, v4
add-int/2addr v4, v0
aget v3, v3, v4
add-int/2addr v2, v1
.line 227
invoke-static {p3, v2}, Ljava/lang/Math;->min(II)I
move-result v2
sub-int/2addr v2, p2
sub-int v1, p2, v1
add-int v6, v3, v1
.line 229
invoke-virtual {p0}, Lokio/SegmentedByteString;->getSegments$okio()[[B
move-result-object v1
aget-object v5, v1, v0
.line 230
new-instance v1, Lokio/Segment;
add-int v7, v6, v2
const/4 v8, 0x1
const/4 v9, 0x0
move-object v4, v1
invoke-direct/range {v4 .. v9}, Lokio/Segment;-><init>([BIIZZ)V
.line 231
iget-object v3, p1, Lokio/Buffer;->head:Lokio/Segment;
if-nez v3, :cond_1
.line 232
iput-object v1, v1, Lokio/Segment;->prev:Lokio/Segment;
.line 233
iget-object v3, v1, Lokio/Segment;->prev:Lokio/Segment;
iput-object v3, v1, Lokio/Segment;->next:Lokio/Segment;
.line 234
iget-object v1, v1, Lokio/Segment;->next:Lokio/Segment;
iput-object v1, p1, Lokio/Buffer;->head:Lokio/Segment;
goto :goto_2
.line 236
:cond_1
iget-object v3, p1, Lokio/Buffer;->head:Lokio/Segment;
invoke-static {v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
iget-object v3, v3, Lokio/Segment;->prev:Lokio/Segment;
invoke-static {v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-virtual {v3, v1}, Lokio/Segment;->push(Lokio/Segment;)Lokio/Segment;
:goto_2
add-int/2addr p2, v2
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 243
:cond_2
invoke-virtual {p1}, Lokio/Buffer;->size()J
move-result-wide p2
invoke-virtual {p0}, Lokio/SegmentedByteString;->size()I
move-result p0
int-to-long v0, p0
add-long/2addr p2, v0
invoke-virtual {p1, p2, p3}, Lokio/Buffer;->setSize$okio(J)V
return-void
.end method