RealBufferedSource.smali
.class public final Lokio/RealBufferedSource;
.super Ljava/lang/Object;
# interfaces
.implements Lokio/BufferedSource;
# instance fields
.field public final f:Lokio/Buffer;
.field public g:Z
.field public final h:Lokio/Source;
# direct methods
.method public constructor <init>(Lokio/Source;)V
.registers 3
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
return-void
.end method
# virtual methods
.method public D1()J
.registers 6
const-wide/16 v0, 0x1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
const/4 v0, 0x0
:goto_6
add-int/lit8 v1, v0, 0x1
int-to-long v2, v1
invoke-virtual {p0, v2, v3}, Lokio/RealBufferedSource;->P0(J)Z
move-result v2
if-eqz v2, :cond_62
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
int-to-long v3, v0
invoke-virtual {v2, v3, v4}, Lokio/Buffer;->o(J)B
move-result v2
const/16 v3, 0x30
int-to-byte v3, v3
if-lt v2, v3, :cond_20
const/16 v3, 0x39
int-to-byte v3, v3
if-le v2, v3, :cond_35
:cond_20
const/16 v3, 0x61
int-to-byte v3, v3
if-lt v2, v3, :cond_2a
const/16 v3, 0x66
int-to-byte v3, v3
if-le v2, v3, :cond_35
:cond_2a
const/16 v3, 0x41
int-to-byte v3, v3
if-lt v2, v3, :cond_37
const/16 v3, 0x46
int-to-byte v3, v3
if-le v2, v3, :cond_35
goto :goto_37
:cond_35
move v0, v1
goto :goto_6
:cond_37
:goto_37
if-eqz v0, :cond_3a
goto :goto_62
:cond_3a
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Expected leading [0-9a-fA-F] character but was 0x"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x10
invoke-static {v1}, Lkotlin/text/CharsKt;->a(I)I
invoke-static {v1}, Lkotlin/text/CharsKt;->a(I)I
invoke-static {v2, v1}, Ljava/lang/Integer;->toString(II)Ljava/lang/String;
move-result-object v1
const-string v2, "java.lang.Integer.toStri\u2026(this, checkRadix(radix))"
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/NumberFormatException;
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
throw v1
:cond_62
:goto_62
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->D1()J
move-result-wide v0
return-wide v0
.end method
.method public H()[B
.registers 3
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
iget-object v1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->I0(Lokio/Source;)J
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->H()[B
move-result-object v0
return-object v0
.end method
.method public H1(Lokio/Options;)I
.registers 10
const-string v0, "options"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_3d
:cond_b
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-static {v0, p1, v1}, Lokio/internal/BufferKt;->d(Lokio/Buffer;Lokio/Options;Z)I
move-result v0
const/4 v2, -0x2
const/4 v3, -0x1
if-eq v0, v2, :cond_2a
if-eq v0, v3, :cond_28
invoke-virtual {p1}, Lokio/Options;->l()[Lokio/ByteString;
move-result-object p1
aget-object p1, p1, v0
invoke-virtual {p1}, Lokio/ByteString;->Q()I
move-result p1
iget-object v1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
int-to-long v2, p1
invoke-virtual {v1, v2, v3}, Lokio/Buffer;->N0(J)V
goto :goto_3c
:cond_28
:goto_28
const/4 v0, -0x1
goto :goto_3c
:cond_2a
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v4, 0x2000
int-to-long v4, v4
invoke-interface {v0, v2, v4, v5}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v4
const-wide/16 v6, -0x1
cmp-long v0, v4, v6
if-nez v0, :cond_b
goto :goto_28
:goto_3c
return v0
:cond_3d
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "closed"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public L(Lokio/ByteString;)J
.registers 4
const-string v0, "bytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->d(Lokio/ByteString;J)J
move-result-wide v0
return-wide v0
.end method
.method public L0()Lokio/ByteString;
.registers 3
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
iget-object v1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->I0(Lokio/Source;)J
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->L0()Lokio/ByteString;
move-result-object v0
return-object v0
.end method
.method public N()Z
.registers 7
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_22
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->N()Z
move-result v0
if-eqz v0, :cond_20
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v3, 0x2000
int-to-long v3, v3
invoke-interface {v0, v2, v3, v4}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v4, -0x1
cmp-long v0, v2, v4
if-nez v0, :cond_20
goto :goto_21
:cond_20
const/4 v1, 0x0
:goto_21
return v1
:cond_22
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "closed"
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public N0(J)V
.registers 8
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_40
:goto_6
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-lez v2, :cond_3f
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, v0
if-nez v4, :cond_2e
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_28
goto :goto_2e
:cond_28
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
:cond_2e
:goto_2e
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v2, v0, v1}, Lokio/Buffer;->N0(J)V
sub-long/2addr p1, v0
goto :goto_6
:cond_3f
return-void
:cond_40
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public P0(J)Z
.registers 10
const/4 v0, 0x0
const/4 v1, 0x1
const-wide/16 v2, 0x0
cmp-long v4, p1, v2
if-ltz v4, :cond_a
const/4 v2, 0x1
goto :goto_b
:cond_a
const/4 v2, 0x0
:goto_b
if-eqz v2, :cond_3c
iget-boolean v2, p0, Lokio/RealBufferedSource;->g:Z
xor-int/2addr v2, v1
if-eqz v2, :cond_30
:cond_12
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, p1
if-gez v4, :cond_2e
iget-object v2, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v3, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v4, 0x2000
int-to-long v4, v4
invoke-interface {v2, v3, v4, v5}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v4, -0x1
cmp-long v6, v2, v4
if-nez v6, :cond_12
goto :goto_2f
:cond_2e
const/4 v0, 0x1
:goto_2f
return v0
:cond_30
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_3c
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method public W0()Ljava/lang/String;
.registers 3
const-wide v0, 0x7fffffffffffffffL
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->f0(J)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public Y0()I
.registers 3
const-wide/16 v0, 0x4
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->Y0()I
move-result v0
return v0
.end method
.method public Z(Lokio/ByteString;)J
.registers 4
const-string v0, "targetBytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->e(Lokio/ByteString;J)J
move-result-wide v0
return-wide v0
.end method
.method public a(B)J
.registers 8
const-wide/16 v2, 0x0
const-wide v4, 0x7fffffffffffffffL
move-object v0, p0
move v1, p1
invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->b(BJJ)J
move-result-wide v0
return-wide v0
.end method
.method public b(BJJ)J
.registers 14
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_6d
const-wide/16 v2, 0x0
cmp-long v0, v2, p2
if-lez v0, :cond_d
goto :goto_12
:cond_d
cmp-long v0, p4, p2
if-ltz v0, :cond_12
goto :goto_13
:cond_12
:goto_12
const/4 v1, 0x0
:goto_13
if-eqz v1, :cond_4a
:goto_15
const-wide/16 v0, -0x1
cmp-long v2, p2, p4
if-gez v2, :cond_49
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
move v3, p1
move-wide v4, p2
move-wide v6, p4
invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->s(BJJ)J
move-result-wide v2
cmp-long v4, v2, v0
if-eqz v4, :cond_2a
move-wide v0, v2
goto :goto_49
:cond_2a
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, p4
if-gez v4, :cond_49
iget-object v4, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v5, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v0
if-nez v6, :cond_44
goto :goto_49
:cond_44
invoke-static {p2, p3, v2, v3}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_15
:cond_49
:goto_49
return-wide v0
:cond_4a
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "fromIndex="
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p2, " toIndex="
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p4, p5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_6d
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public c()Lokio/Buffer;
.registers 2
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
return-object v0
.end method
.method public c0()J
.registers 11
const-wide/16 v0, 0x1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
const-wide/16 v2, 0x0
move-wide v4, v2
:goto_8
add-long v6, v4, v0
invoke-virtual {p0, v6, v7}, Lokio/RealBufferedSource;->P0(J)Z
move-result v8
if-eqz v8, :cond_57
iget-object v8, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v8, v4, v5}, Lokio/Buffer;->o(J)B
move-result v8
const/16 v9, 0x30
int-to-byte v9, v9
if-lt v8, v9, :cond_20
const/16 v9, 0x39
int-to-byte v9, v9
if-le v8, v9, :cond_2a
:cond_20
cmp-long v9, v4, v2
if-nez v9, :cond_2c
const/16 v4, 0x2d
int-to-byte v4, v4
if-eq v8, v4, :cond_2a
goto :goto_2c
:cond_2a
move-wide v4, v6
goto :goto_8
:cond_2c
:goto_2c
if-eqz v9, :cond_2f
goto :goto_57
:cond_2f
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Expected leading [0-9] or \'-\' character but was 0x"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x10
invoke-static {v1}, Lkotlin/text/CharsKt;->a(I)I
invoke-static {v1}, Lkotlin/text/CharsKt;->a(I)I
invoke-static {v8, v1}, Ljava/lang/Integer;->toString(II)Ljava/lang/String;
move-result-object v1
const-string v2, "java.lang.Integer.toStri\u2026(this, checkRadix(radix))"
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/NumberFormatException;
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
throw v1
:cond_57
:goto_57
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->c0()J
move-result-wide v0
return-wide v0
.end method
.method public c1(J)[B
.registers 4
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->c1(J)[B
move-result-object p1
return-object p1
.end method
.method public close()V
.registers 2
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
if-eqz v0, :cond_5
goto :goto_12
:cond_5
const/4 v0, 0x1
iput-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-interface {v0}, Lokio/Source;->close()V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->b()V
:goto_12
return-void
.end method
.method public d(Lokio/ByteString;J)J
.registers 12
const-string v0, "bytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_3d
:goto_b
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->t(Lokio/ByteString;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_18
goto :goto_2e
:cond_18
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
iget-object v4, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v5, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v2
if-nez v6, :cond_2f
move-wide v0, v2
:goto_2e
return-wide v0
:cond_2f
invoke-virtual {p1}, Lokio/ByteString;->Q()I
move-result v2
int-to-long v2, v2
sub-long/2addr v0, v2
const-wide/16 v2, 0x1
add-long/2addr v0, v2
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_b
:cond_3d
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public d1()Ljava/lang/String;
.registers 3
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
iget-object v1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->I0(Lokio/Source;)J
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->d1()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public e(Lokio/ByteString;J)J
.registers 12
const-string v0, "targetBytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_34
:goto_b
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->u(Lokio/ByteString;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_18
goto :goto_2e
:cond_18
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
iget-object v4, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v5, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v2
if-nez v6, :cond_2f
move-wide v0, v2
:goto_2e
return-wide v0
:cond_2f
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_b
:cond_34
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public f(JLokio/ByteString;II)Z
.registers 13
const-string v0, "bytes"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_41
const-wide/16 v2, 0x0
const/4 v0, 0x0
cmp-long v4, p1, v2
if-ltz v4, :cond_3f
if-ltz p4, :cond_3f
if-ltz p5, :cond_3f
invoke-virtual {p3}, Lokio/ByteString;->Q()I
move-result v2
sub-int/2addr v2, p4
if-ge v2, p5, :cond_1e
goto :goto_3f
:cond_1e
const/4 v2, 0x0
:goto_1f
if-ge v2, p5, :cond_40
int-to-long v3, v2
add-long/2addr v3, p1
const-wide/16 v5, 0x1
add-long/2addr v5, v3
invoke-virtual {p0, v5, v6}, Lokio/RealBufferedSource;->P0(J)Z
move-result v5
if-nez v5, :cond_2d
goto :goto_3f
:cond_2d
iget-object v5, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v5, v3, v4}, Lokio/Buffer;->o(J)B
move-result v3
add-int v4, p4, v2
invoke-virtual {p3, v4}, Lokio/ByteString;->o(I)B
move-result v4
if-eq v3, v4, :cond_3c
goto :goto_3f
:cond_3c
add-int/lit8 v2, v2, 0x1
goto :goto_1f
:cond_3f
:goto_3f
const/4 v1, 0x0
:cond_40
return v1
:cond_41
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public f0(J)Ljava/lang/String;
.registers 16
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-ltz v2, :cond_8
const/4 v0, 0x1
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
if-eqz v0, :cond_ae
const-wide/16 v0, 0x1
const-wide v2, 0x7fffffffffffffffL
cmp-long v4, p1, v2
if-nez v4, :cond_18
move-wide v4, v2
goto :goto_1a
:cond_18
add-long v4, p1, v0
:goto_1a
const/16 v6, 0xa
int-to-byte v12, v6
const-wide/16 v8, 0x0
move-object v6, p0
move v7, v12
move-wide v10, v4
invoke-virtual/range {v6 .. v11}, Lokio/RealBufferedSource;->b(BJJ)J
move-result-wide v6
const-wide/16 v8, -0x1
cmp-long v10, v6, v8
if-eqz v10, :cond_33
iget-object p1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-static {p1, v6, v7}, Lokio/internal/BufferKt;->c(Lokio/Buffer;J)Ljava/lang/String;
move-result-object p1
goto :goto_5f
:cond_33
cmp-long v6, v4, v2
if-gez v6, :cond_60
invoke-virtual {p0, v4, v5}, Lokio/RealBufferedSource;->P0(J)Z
move-result v2
if-eqz v2, :cond_60
iget-object v2, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
sub-long v6, v4, v0
invoke-virtual {v2, v6, v7}, Lokio/Buffer;->o(J)B
move-result v2
const/16 v3, 0xd
int-to-byte v3, v3
if-ne v2, v3, :cond_60
add-long/2addr v0, v4
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->P0(J)Z
move-result v0
if-eqz v0, :cond_60
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, v4, v5}, Lokio/Buffer;->o(J)B
move-result v0
if-ne v0, v12, :cond_60
iget-object p1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-static {p1, v4, v5}, Lokio/internal/BufferKt;->c(Lokio/Buffer;J)Ljava/lang/String;
move-result-object p1
:goto_5f
return-object p1
:cond_60
new-instance v6, Lokio/Buffer;
invoke-direct {v6}, Lokio/Buffer;-><init>()V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const-wide/16 v2, 0x0
const/16 v1, 0x20
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v4
int-to-long v7, v1
invoke-static {v7, v8, v4, v5}, Ljava/lang/Math;->min(JJ)J
move-result-wide v4
move-object v1, v6
invoke-virtual/range {v0 .. v5}, Lokio/Buffer;->g(Lokio/Buffer;JJ)Lokio/Buffer;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "\\n not found: limit="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v1}, Lokio/Buffer;->size()J
move-result-wide v1
invoke-static {v1, v2, p1, p2}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p1, " content="
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Lokio/Buffer;->L0()Lokio/ByteString;
move-result-object p1
invoke-virtual {p1}, Lokio/ByteString;->u()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "\u2026"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/io/EOFException;
invoke-direct {p2, p1}, Ljava/io/EOFException;-><init>(Ljava/lang/String;)V
throw p2
:cond_ae
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "limit < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method public g()S
.registers 3
const-wide/16 v0, 0x2
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->G()S
move-result v0
return v0
.end method
.method public i(J)Ljava/lang/String;
.registers 4
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->i(J)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public inputStream()Ljava/io/InputStream;
.registers 2
new-instance v0, Lokio/RealBufferedSource$inputStream$1;
invoke-direct {v0, p0}, Lokio/RealBufferedSource$inputStream$1;-><init>(Lokio/RealBufferedSource;)V
return-object v0
.end method
.method public isOpen()Z
.registers 2
iget-boolean v0, p0, Lokio/RealBufferedSource;->g:Z
xor-int/lit8 v0, v0, 0x1
return v0
.end method
.method public m(J)Lokio/ByteString;
.registers 4
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->m(J)Lokio/ByteString;
move-result-object p1
return-object p1
.end method
.method public o1(Lokio/Buffer;J)J
.registers 11
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x1
const-wide/16 v1, 0x0
cmp-long v3, p2, v1
if-ltz v3, :cond_e
const/4 v3, 0x1
goto :goto_f
:cond_e
const/4 v3, 0x0
:goto_f
if-eqz v3, :cond_4f
iget-boolean v3, p0, Lokio/RealBufferedSource;->g:Z
xor-int/2addr v0, v3
if-eqz v0, :cond_43
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v3
const-wide/16 v5, -0x1
cmp-long v0, v3, v1
if-nez v0, :cond_32
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v0
cmp-long v2, v0, v5
if-nez v2, :cond_32
goto :goto_42
:cond_32
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->o1(Lokio/Buffer;J)J
move-result-wide v5
:goto_42
return-wide v5
:cond_43
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4f
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "byteCount < 0: "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method public peek()Lokio/BufferedSource;
.registers 2
new-instance v0, Lokio/PeekSource;
invoke-direct {v0, p0}, Lokio/PeekSource;-><init>(Lokio/BufferedSource;)V
invoke-static {v0}, Lokio/Okio;->d(Lokio/Source;)Lokio/BufferedSource;
move-result-object v0
return-object v0
.end method
.method public q1()J
.registers 3
const-wide/16 v0, 0x8
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->q1()J
move-result-wide v0
return-wide v0
.end method
.method public r1(Lokio/Sink;)J
.registers 11
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
move-wide v2, v0
:cond_8
:goto_8
iget-object v4, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v5, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v4
const-wide/16 v6, -0x1
cmp-long v8, v4, v6
if-eqz v8, :cond_2a
iget-object v4, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v4}, Lokio/Buffer;->e()J
move-result-wide v4
cmp-long v6, v4, v0
if-lez v6, :cond_8
add-long/2addr v2, v4
iget-object v6, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-interface {p1, v6, v4, v5}, Lokio/Sink;->D0(Lokio/Buffer;J)V
goto :goto_8
:cond_2a
iget-object v4, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
cmp-long v6, v4, v0
if-lez v6, :cond_44
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
add-long/2addr v2, v0
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v4
invoke-interface {p1, v0, v4, v5}, Lokio/Sink;->D0(Lokio/Buffer;J)V
:cond_44
return-wide v2
.end method
.method public read(Ljava/nio/ByteBuffer;)I
.registers 7
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-nez v4, :cond_24
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
iget-object v1, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->o1(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-nez v4, :cond_24
const/4 p1, -0x1
return p1
:cond_24
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1}, Lokio/Buffer;->read(Ljava/nio/ByteBuffer;)I
move-result p1
return p1
.end method
.method public readByte()B
.registers 3
const-wide/16 v0, 0x1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->readByte()B
move-result v0
return v0
.end method
.method public readInt()I
.registers 3
const-wide/16 v0, 0x4
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->readInt()I
move-result v0
return v0
.end method
.method public readShort()S
.registers 3
const-wide/16 v0, 0x2
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->y1(J)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->readShort()S
move-result v0
return v0
.end method
.method public timeout()Lokio/Timeout;
.registers 2
iget-object v0, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "buffer("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x29
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public v0(JLokio/ByteString;)Z
.registers 11
const-string v0, "bytes"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p3}, Lokio/ByteString;->Q()I
move-result v6
const/4 v5, 0x0
move-object v1, p0
move-wide v2, p1
move-object v4, p3
invoke-virtual/range {v1 .. v6}, Lokio/RealBufferedSource;->f(JLokio/ByteString;II)Z
move-result p1
return p1
.end method
.method public w0(Ljava/nio/charset/Charset;)Ljava/lang/String;
.registers 4
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
iget-object v1, p0, Lokio/RealBufferedSource;->h:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->I0(Lokio/Source;)J
iget-object v0, p0, Lokio/RealBufferedSource;->f:Lokio/Buffer;
invoke-virtual {v0, p1}, Lokio/Buffer;->w0(Ljava/nio/charset/Charset;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public y1(J)V
.registers 3
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->P0(J)Z
move-result p1
if-eqz p1, :cond_7
return-void
:cond_7
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
.end method