Buffer.smali

.class public final Lokio/Buffer;
.super Ljava/lang/Object;

# interfaces
.implements Lokio/BufferedSource;
.implements Lokio/BufferedSink;
.implements Ljava/lang/Cloneable;
.implements Ljava/nio/channels/ByteChannel;


# instance fields
.field public f:Lokio/Segment;

.field private g:J


# direct methods
.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public A0(Ljava/lang/String;II)Lokio/Buffer;
    .registers 15

    const-string v0, "string"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x0

    const/4 v1, 0x1

    if-ltz p2, :cond_b

    const/4 v2, 0x1

    goto :goto_c

    :cond_b
    const/4 v2, 0x0

    :goto_c
    if-eqz v2, :cond_177

    if-lt p3, p2, :cond_12

    const/4 v2, 0x1

    goto :goto_13

    :cond_12
    const/4 v2, 0x0

    :goto_13
    if-eqz v2, :cond_154

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    if-gt p3, v2, :cond_1d

    const/4 v2, 0x1

    goto :goto_1e

    :cond_1d
    const/4 v2, 0x0

    :goto_1e
    if-eqz v2, :cond_12d

    :goto_20
    if-ge p2, p3, :cond_12c

    invoke-virtual {p1, p2}, Ljava/lang/String;->charAt(I)C

    move-result v2

    const/16 v3, 0x80

    if-ge v2, v3, :cond_62

    invoke-virtual {p0, v1}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v4

    iget-object v5, v4, Lokio/Segment;->a:[B

    iget v6, v4, Lokio/Segment;->c:I

    sub-int/2addr v6, p2

    rsub-int v7, v6, 0x2000

    invoke-static {p3, v7}, Ljava/lang/Math;->min(II)I

    move-result v7

    add-int/lit8 v8, p2, 0x1

    add-int/2addr p2, v6

    int-to-byte v2, v2

    aput-byte v2, v5, p2

    :goto_3f
    if-ge v8, v7, :cond_50

    invoke-virtual {p1, v8}, Ljava/lang/String;->charAt(I)C

    move-result p2

    if-lt p2, v3, :cond_48

    goto :goto_50

    :cond_48
    add-int/lit8 v2, v8, 0x1

    add-int/2addr v8, v6

    int-to-byte p2, p2

    aput-byte p2, v5, v8

    move v8, v2

    goto :goto_3f

    :cond_50
    :goto_50
    add-int/2addr v6, v8

    iget p2, v4, Lokio/Segment;->c:I

    sub-int/2addr v6, p2

    add-int/2addr p2, v6

    iput p2, v4, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    int-to-long v4, v6

    add-long/2addr v2, v4

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->J(J)V

    move p2, v8

    goto :goto_20

    :cond_62
    const/16 v4, 0x800

    if-ge v2, v4, :cond_8e

    const/4 v4, 0x2

    invoke-virtual {p0, v4}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v5

    iget-object v6, v5, Lokio/Segment;->a:[B

    iget v7, v5, Lokio/Segment;->c:I

    shr-int/lit8 v8, v2, 0x6

    or-int/lit16 v8, v8, 0xc0

    int-to-byte v8, v8

    aput-byte v8, v6, v7

    add-int/lit8 v8, v7, 0x1

    and-int/lit8 v2, v2, 0x3f

    or-int/2addr v2, v3

    int-to-byte v2, v2

    aput-byte v2, v6, v8

    add-int/2addr v7, v4

    iput v7, v5, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    const-wide/16 v4, 0x2

    add-long/2addr v2, v4

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->J(J)V

    :goto_8b
    add-int/lit8 p2, p2, 0x1

    goto :goto_20

    :cond_8e
    const v4, 0xd800

    const/16 v5, 0x3f

    if-lt v2, v4, :cond_fc

    const v4, 0xdfff

    if-le v2, v4, :cond_9b

    goto :goto_fc

    :cond_9b
    add-int/lit8 v6, p2, 0x1

    if-ge v6, p3, :cond_a4

    invoke-virtual {p1, v6}, Ljava/lang/String;->charAt(I)C

    move-result v7

    goto :goto_a5

    :cond_a4
    const/4 v7, 0x0

    :goto_a5
    const v8, 0xdbff

    if-gt v2, v8, :cond_f6

    const v8, 0xdc00

    if-gt v8, v7, :cond_f6

    if-ge v4, v7, :cond_b2

    goto :goto_f6

    :cond_b2
    const/high16 v4, 0x10000

    and-int/lit16 v2, v2, 0x3ff

    shl-int/lit8 v2, v2, 0xa

    and-int/lit16 v6, v7, 0x3ff

    or-int/2addr v2, v6

    add-int/2addr v2, v4

    const/4 v4, 0x4

    invoke-virtual {p0, v4}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v6

    iget-object v7, v6, Lokio/Segment;->a:[B

    iget v8, v6, Lokio/Segment;->c:I

    shr-int/lit8 v9, v2, 0x12

    or-int/lit16 v9, v9, 0xf0

    int-to-byte v9, v9

    aput-byte v9, v7, v8

    add-int/lit8 v9, v8, 0x1

    shr-int/lit8 v10, v2, 0xc

    and-int/2addr v10, v5

    or-int/2addr v10, v3

    int-to-byte v10, v10

    aput-byte v10, v7, v9

    add-int/lit8 v9, v8, 0x2

    shr-int/lit8 v10, v2, 0x6

    and-int/2addr v10, v5

    or-int/2addr v10, v3

    int-to-byte v10, v10

    aput-byte v10, v7, v9

    add-int/lit8 v9, v8, 0x3

    and-int/2addr v2, v5

    or-int/2addr v2, v3

    int-to-byte v2, v2

    aput-byte v2, v7, v9

    add-int/2addr v8, v4

    iput v8, v6, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    const-wide/16 v4, 0x4

    add-long/2addr v2, v4

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->J(J)V

    add-int/lit8 p2, p2, 0x2

    goto/16 :goto_20

    :cond_f6
    :goto_f6
    invoke-virtual {p0, v5}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    move p2, v6

    goto/16 :goto_20

    :cond_fc
    :goto_fc
    const/4 v4, 0x3

    invoke-virtual {p0, v4}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v6

    iget-object v7, v6, Lokio/Segment;->a:[B

    iget v8, v6, Lokio/Segment;->c:I

    shr-int/lit8 v9, v2, 0xc

    or-int/lit16 v9, v9, 0xe0

    int-to-byte v9, v9

    aput-byte v9, v7, v8

    add-int/lit8 v9, v8, 0x1

    shr-int/lit8 v10, v2, 0x6

    and-int/2addr v5, v10

    or-int/2addr v5, v3

    int-to-byte v5, v5

    aput-byte v5, v7, v9

    add-int/lit8 v5, v8, 0x2

    and-int/lit8 v2, v2, 0x3f

    or-int/2addr v2, v3

    int-to-byte v2, v2

    aput-byte v2, v7, v5

    add-int/2addr v8, v4

    iput v8, v6, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    const-wide/16 v4, 0x3

    add-long/2addr v2, v4

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->J(J)V

    goto/16 :goto_8b

    :cond_12c
    return-object p0

    :cond_12d
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "endIndex > string.length: "

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, " > "

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result 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

    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_154
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "endIndex < beginIndex: "

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, " < "

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)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_177
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p3, "beginIndex < 0: "

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)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 bridge synthetic B(J)Lokio/BufferedSink;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->l0(J)Lokio/Buffer;

    return-object p0
.end method

.method public C([BII)I
    .registers 11

    const-string v0, "sink"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    array-length v0, p1

    int-to-long v1, v0

    int-to-long v3, p2

    int-to-long v5, p3

    invoke-static/range {v1 .. v6}, Lokio/-Util;->b(JJJ)V

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_42

    iget v1, v0, Lokio/Segment;->c:I

    iget v2, v0, Lokio/Segment;->b:I

    sub-int/2addr v1, v2

    invoke-static {p3, v1}, Ljava/lang/Math;->min(II)I

    move-result p3

    iget-object v1, v0, Lokio/Segment;->a:[B

    iget v2, v0, Lokio/Segment;->b:I

    add-int v3, v2, p3

    invoke-static {v1, p1, p2, v2, v3}, Lkotlin/collections/ArraysKt;->d([B[BIII)[B

    iget p1, v0, Lokio/Segment;->b:I

    add-int/2addr p1, p3

    iput p1, v0, Lokio/Segment;->b:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p1

    int-to-long v1, p3

    sub-long/2addr p1, v1

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->J(J)V

    iget p1, v0, Lokio/Segment;->b:I

    iget p2, v0, Lokio/Segment;->c:I

    if-ne p1, p2, :cond_43

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object p1

    iput-object p1, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object p1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {p1, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_43

    :cond_42
    const/4 p3, -0x1

    :cond_43
    :goto_43
    return p3
.end method

.method public bridge synthetic C0([BII)Lokio/BufferedSink;
    .registers 4

    invoke-virtual {p0, p1, p2, p3}, Lokio/Buffer;->Y([BII)Lokio/Buffer;

    return-object p0
.end method

.method public C1()Ljava/io/OutputStream;
    .registers 2

    new-instance v0, Lokio/Buffer$outputStream$1;

    invoke-direct {v0, p0}, Lokio/Buffer$outputStream$1;-><init>(Lokio/Buffer;)V

    return-object v0
.end method

.method public D([B)V
    .registers 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    const-string v0, "sink"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x0

    :goto_6
    array-length v1, p1

    if-ge v0, v1, :cond_1a

    array-length v1, p1

    sub-int/2addr v1, v0

    invoke-virtual {p0, p1, v0, v1}, Lokio/Buffer;->C([BII)I

    move-result v1

    const/4 v2, -0x1

    if-eq v1, v2, :cond_14

    add-int/2addr v0, v1

    goto :goto_6

    :cond_14
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_1a
    return-void
.end method

.method public D0(Lokio/Buffer;J)V
    .registers 12

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x0

    if-eq p1, p0, :cond_a

    const/4 v1, 0x1

    goto :goto_b

    :cond_a
    const/4 v1, 0x0

    :goto_b
    if-eqz v1, :cond_d3

    invoke-virtual {p1}, Lokio/Buffer;->size()J

    move-result-wide v2

    const-wide/16 v4, 0x0

    move-wide v6, p2

    invoke-static/range {v2 .. v7}, Lokio/-Util;->b(JJJ)V

    :goto_17
    const-wide/16 v1, 0x0

    cmp-long v3, p2, v1

    if-lez v3, :cond_d2

    iget-object v1, p1, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v2, 0x0

    if-eqz v1, :cond_ce

    iget v3, v1, Lokio/Segment;->c:I

    if-eqz v1, :cond_ca

    iget v1, v1, Lokio/Segment;->b:I

    sub-int/2addr v3, v1

    int-to-long v3, v3

    cmp-long v1, p2, v3

    if-gez v1, :cond_84

    iget-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v1, :cond_3b

    if-eqz v1, :cond_37

    iget-object v1, v1, Lokio/Segment;->g:Lokio/Segment;

    goto :goto_3c

    :cond_37
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_3b
    move-object v1, v2

    :goto_3c
    if-eqz v1, :cond_74

    iget-boolean v3, v1, Lokio/Segment;->e:Z

    if-eqz v3, :cond_74

    iget v3, v1, Lokio/Segment;->c:I

    int-to-long v3, v3

    add-long/2addr v3, p2

    iget-boolean v5, v1, Lokio/Segment;->d:Z

    if-eqz v5, :cond_4c

    const/4 v5, 0x0

    goto :goto_4e

    :cond_4c
    iget v5, v1, Lokio/Segment;->b:I

    :goto_4e
    int-to-long v5, v5

    sub-long/2addr v3, v5

    const/16 v5, 0x2000

    int-to-long v5, v5

    cmp-long v7, v3, v5

    if-gtz v7, :cond_74

    iget-object v0, p1, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_70

    long-to-int v2, p2

    invoke-virtual {v0, v1, v2}, Lokio/Segment;->f(Lokio/Segment;I)V

    invoke-virtual {p1}, Lokio/Buffer;->size()J

    move-result-wide v0

    sub-long/2addr v0, p2

    invoke-virtual {p1, v0, v1}, Lokio/Buffer;->J(J)V

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    add-long/2addr v0, p2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    goto :goto_d2

    :cond_70
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_74
    iget-object v1, p1, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v1, :cond_80

    long-to-int v3, p2

    invoke-virtual {v1, v3}, Lokio/Segment;->e(I)Lokio/Segment;

    move-result-object v1

    iput-object v1, p1, Lokio/Buffer;->f:Lokio/Segment;

    goto :goto_84

    :cond_80
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_84
    :goto_84
    iget-object v1, p1, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v1, :cond_c6

    iget v3, v1, Lokio/Segment;->c:I

    iget v4, v1, Lokio/Segment;->b:I

    sub-int/2addr v3, v4

    int-to-long v3, v3

    invoke-virtual {v1}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v5

    iput-object v5, p1, Lokio/Buffer;->f:Lokio/Segment;

    iget-object v5, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-nez v5, :cond_9f

    iput-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    iput-object v1, v1, Lokio/Segment;->g:Lokio/Segment;

    iput-object v1, v1, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_ab

    :cond_9f
    if-eqz v5, :cond_c2

    iget-object v5, v5, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v5, :cond_be

    invoke-virtual {v5, v1}, Lokio/Segment;->c(Lokio/Segment;)Lokio/Segment;

    invoke-virtual {v1}, Lokio/Segment;->a()V

    :goto_ab
    invoke-virtual {p1}, Lokio/Buffer;->size()J

    move-result-wide v1

    sub-long/2addr v1, v3

    invoke-virtual {p1, v1, v2}, Lokio/Buffer;->J(J)V

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    add-long/2addr v1, v3

    invoke-virtual {p0, v1, v2}, Lokio/Buffer;->J(J)V

    sub-long/2addr p2, v3

    goto/16 :goto_17

    :cond_be
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_c2
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_c6
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_ca
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_ce
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_d2
    :goto_d2
    return-void

    :cond_d3
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string p2, "source == this"

    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public D1()J
    .registers 16
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-eqz v4, :cond_bc

    const/4 v0, 0x0

    move-wide v4, v2

    const/4 v1, 0x0

    :cond_d
    iget-object v6, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v6, :cond_b7

    iget-object v7, v6, Lokio/Segment;->a:[B

    iget v8, v6, Lokio/Segment;->b:I

    iget v9, v6, Lokio/Segment;->c:I

    :goto_17
    if-ge v8, v9, :cond_97

    aget-byte v10, v7, v8

    const/16 v11, 0x30

    int-to-byte v11, v11

    if-lt v10, v11, :cond_28

    const/16 v12, 0x39

    int-to-byte v12, v12

    if-gt v10, v12, :cond_28

    sub-int v11, v10, v11

    goto :goto_42

    :cond_28
    const/16 v11, 0x61

    int-to-byte v11, v11

    if-lt v10, v11, :cond_37

    const/16 v12, 0x66

    int-to-byte v12, v12

    if-gt v10, v12, :cond_37

    :goto_32
    sub-int v11, v10, v11

    add-int/lit8 v11, v11, 0xa

    goto :goto_42

    :cond_37
    const/16 v11, 0x41

    int-to-byte v11, v11

    if-lt v10, v11, :cond_78

    const/16 v12, 0x46

    int-to-byte v12, v12

    if-gt v10, v12, :cond_78

    goto :goto_32

    :goto_42
    const-wide/high16 v12, -0x1000000000000000L    # -3.105036184601418E231

    and-long/2addr v12, v4

    cmp-long v14, v12, v2

    if-nez v14, :cond_52

    const/4 v10, 0x4

    shl-long/2addr v4, v10

    int-to-long v10, v11

    or-long/2addr v4, v10

    add-int/lit8 v8, v8, 0x1

    add-int/lit8 v0, v0, 0x1

    goto :goto_17

    :cond_52
    new-instance v0, Lokio/Buffer;

    invoke-direct {v0}, Lokio/Buffer;-><init>()V

    invoke-virtual {v0, v4, v5}, Lokio/Buffer;->h0(J)Lokio/Buffer;

    invoke-virtual {v0, v10}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    new-instance v1, Ljava/lang/NumberFormatException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Number too large: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Lokio/Buffer;->d1()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_78
    if-eqz v0, :cond_7c

    const/4 v1, 0x1

    goto :goto_97

    :cond_7c
    new-instance v0, Ljava/lang/NumberFormatException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Expected leading [0-9a-fA-F] character but was 0x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {v10}, Lokio/-Util;->f(B)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_97
    :goto_97
    if-ne v8, v9, :cond_a5

    invoke-virtual {v6}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v7

    iput-object v7, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v7, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v7, v6}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_a7

    :cond_a5
    iput v8, v6, Lokio/Segment;->b:I

    :goto_a7
    if-nez v1, :cond_ad

    iget-object v6, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-nez v6, :cond_d

    :cond_ad
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    int-to-long v6, v0

    sub-long/2addr v1, v6

    invoke-virtual {p0, v1, v2}, Lokio/Buffer;->J(J)V

    return-wide v4

    :cond_b7
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_bc
    new-instance v0, Ljava/io/EOFException;

    invoke-direct {v0}, Ljava/io/EOFException;-><init>()V

    throw v0
.end method

.method public E()J
    .registers 15
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x8

    cmp-long v4, v0, v2

    if-ltz v4, :cond_9e

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_99

    iget v1, v0, Lokio/Segment;->b:I

    iget v4, v0, Lokio/Segment;->c:I

    sub-int v5, v4, v1

    int-to-long v5, v5

    const/16 v7, 0x20

    cmp-long v8, v5, v2

    if-gez v8, :cond_2f

    invoke-virtual {p0}, Lokio/Buffer;->readInt()I

    move-result v0

    int-to-long v0, v0

    const-wide v2, 0xffffffffL

    and-long/2addr v0, v2

    shl-long/2addr v0, v7

    invoke-virtual {p0}, Lokio/Buffer;->readInt()I

    move-result v4

    int-to-long v4, v4

    and-long/2addr v2, v4

    or-long/2addr v0, v2

    goto :goto_98

    :cond_2f
    iget-object v5, v0, Lokio/Segment;->a:[B

    add-int/lit8 v6, v1, 0x1

    aget-byte v1, v5, v1

    int-to-long v8, v1

    const-wide/16 v10, 0xff

    and-long/2addr v8, v10

    const/16 v1, 0x38

    shl-long/2addr v8, v1

    add-int/lit8 v1, v6, 0x1

    aget-byte v6, v5, v6

    int-to-long v12, v6

    and-long/2addr v12, v10

    const/16 v6, 0x30

    shl-long/2addr v12, v6

    or-long/2addr v8, v12

    add-int/lit8 v6, v1, 0x1

    aget-byte v1, v5, v1

    int-to-long v12, v1

    and-long/2addr v12, v10

    const/16 v1, 0x28

    shl-long/2addr v12, v1

    or-long/2addr v8, v12

    add-int/lit8 v1, v6, 0x1

    aget-byte v6, v5, v6

    int-to-long v12, v6

    and-long/2addr v12, v10

    shl-long v6, v12, v7

    or-long/2addr v6, v8

    add-int/lit8 v8, v1, 0x1

    aget-byte v1, v5, v1

    int-to-long v12, v1

    and-long/2addr v12, v10

    const/16 v1, 0x18

    shl-long/2addr v12, v1

    or-long/2addr v6, v12

    add-int/lit8 v1, v8, 0x1

    aget-byte v8, v5, v8

    int-to-long v8, v8

    and-long/2addr v8, v10

    const/16 v12, 0x10

    shl-long/2addr v8, v12

    or-long/2addr v6, v8

    add-int/lit8 v8, v1, 0x1

    aget-byte v1, v5, v1

    int-to-long v12, v1

    and-long/2addr v12, v10

    const/16 v1, 0x8

    shl-long/2addr v12, v1

    or-long/2addr v6, v12

    add-int/lit8 v1, v8, 0x1

    aget-byte v5, v5, v8

    int-to-long v8, v5

    and-long/2addr v8, v10

    or-long v5, v6, v8

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    sub-long/2addr v7, v2

    invoke-virtual {p0, v7, v8}, Lokio/Buffer;->J(J)V

    if-ne v1, v4, :cond_95

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v1

    iput-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v1, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_97

    :cond_95
    iput v1, v0, Lokio/Segment;->b:I

    :goto_97
    move-wide v0, v5

    :goto_98
    return-wide v0

    :cond_99
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_9e
    new-instance v0, Ljava/io/EOFException;

    invoke-direct {v0}, Ljava/io/EOFException;-><init>()V

    throw v0
.end method

.method public bridge synthetic F0(Ljava/lang/String;II)Lokio/BufferedSink;
    .registers 4

    invoke-virtual {p0, p1, p2, p3}, Lokio/Buffer;->A0(Ljava/lang/String;II)Lokio/Buffer;

    return-object p0
.end method

.method public G()S
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->readShort()S

    move-result v0

    invoke-static {v0}, Lokio/-Util;->e(S)S

    move-result v0

    return v0
.end method

.method public H()[B
    .registers 3

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->c1(J)[B

    move-result-object v0

    return-object v0
.end method

.method public H0(I)Lokio/Buffer;
    .registers 10

    const/16 v0, 0x80

    if-ge p1, v0, :cond_9

    invoke-virtual {p0, p1}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    goto/16 :goto_b1

    :cond_9
    const/16 v1, 0x800

    const/16 v2, 0x3f

    if-ge p1, v1, :cond_35

    const/4 v1, 0x2

    invoke-virtual {p0, v1}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v3

    iget-object v4, v3, Lokio/Segment;->a:[B

    iget v5, v3, Lokio/Segment;->c:I

    shr-int/lit8 v6, p1, 0x6

    or-int/lit16 v6, v6, 0xc0

    int-to-byte v6, v6

    aput-byte v6, v4, v5

    add-int/lit8 v6, v5, 0x1

    and-int/2addr p1, v2

    or-int/2addr p1, v0

    int-to-byte p1, p1

    aput-byte p1, v4, v6

    add-int/2addr v5, v1

    iput v5, v3, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x2

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    goto/16 :goto_b1

    :cond_35
    const v1, 0xdfff

    const v3, 0xd800

    if-le v3, p1, :cond_3e

    goto :goto_44

    :cond_3e
    if-lt v1, p1, :cond_44

    invoke-virtual {p0, v2}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    goto :goto_b1

    :cond_44
    :goto_44
    const/high16 v1, 0x10000

    if-ge p1, v1, :cond_76

    const/4 v1, 0x3

    invoke-virtual {p0, v1}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v3

    iget-object v4, v3, Lokio/Segment;->a:[B

    iget v5, v3, Lokio/Segment;->c:I

    shr-int/lit8 v6, p1, 0xc

    or-int/lit16 v6, v6, 0xe0

    int-to-byte v6, v6

    aput-byte v6, v4, v5

    add-int/lit8 v6, v5, 0x1

    shr-int/lit8 v7, p1, 0x6

    and-int/2addr v7, v2

    or-int/2addr v7, v0

    int-to-byte v7, v7

    aput-byte v7, v4, v6

    add-int/lit8 v6, v5, 0x2

    and-int/2addr p1, v2

    or-int/2addr p1, v0

    int-to-byte p1, p1

    aput-byte p1, v4, v6

    add-int/2addr v5, v1

    iput v5, v3, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x3

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    goto :goto_b1

    :cond_76
    const v1, 0x10ffff

    if-gt p1, v1, :cond_b2

    const/4 v1, 0x4

    invoke-virtual {p0, v1}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v3

    iget-object v4, v3, Lokio/Segment;->a:[B

    iget v5, v3, Lokio/Segment;->c:I

    shr-int/lit8 v6, p1, 0x12

    or-int/lit16 v6, v6, 0xf0

    int-to-byte v6, v6

    aput-byte v6, v4, v5

    add-int/lit8 v6, v5, 0x1

    shr-int/lit8 v7, p1, 0xc

    and-int/2addr v7, v2

    or-int/2addr v7, v0

    int-to-byte v7, v7

    aput-byte v7, v4, v6

    add-int/lit8 v6, v5, 0x2

    shr-int/lit8 v7, p1, 0x6

    and-int/2addr v7, v2

    or-int/2addr v7, v0

    int-to-byte v7, v7

    aput-byte v7, v4, v6

    add-int/lit8 v6, v5, 0x3

    and-int/2addr p1, v2

    or-int/2addr p1, v0

    int-to-byte p1, p1

    aput-byte p1, v4, v6

    add-int/2addr v5, v1

    iput v5, v3, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x4

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    :goto_b1
    return-object p0

    :cond_b2
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Unexpected code point: 0x"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {p1}, Lokio/-Util;->g(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public H1(Lokio/Options;)I
    .registers 5

    const-string v0, "options"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x0

    const/4 v1, 0x2

    const/4 v2, 0x0

    invoke-static {p0, p1, v0, v1, v2}, Lokio/internal/BufferKt;->e(Lokio/Buffer;Lokio/Options;ZILjava/lang/Object;)I

    move-result v0

    const/4 v1, -0x1

    if-ne v0, v1, :cond_11

    const/4 v0, -0x1

    goto :goto_1f

    :cond_11
    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

    int-to-long v1, p1

    invoke-virtual {p0, v1, v2}, Lokio/Buffer;->N0(J)V

    :goto_1f
    return v0
.end method

.method public I(JLjava/nio/charset/Charset;)Ljava/lang/String;
    .registers 11
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    const-string v0, "charset"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-ltz v2, :cond_15

    const v0, 0x7fffffff

    int-to-long v0, v0

    cmp-long v3, p1, v0

    if-gtz v3, :cond_15

    const/4 v0, 0x1

    goto :goto_16

    :cond_15
    const/4 v0, 0x0

    :goto_16
    if-eqz v0, :cond_69

    iget-wide v0, p0, Lokio/Buffer;->g:J

    cmp-long v3, v0, p1

    if-ltz v3, :cond_63

    if-nez v2, :cond_23

    const-string p1, ""

    return-object p1

    :cond_23
    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_5e

    iget v1, v0, Lokio/Segment;->b:I

    int-to-long v2, v1

    add-long/2addr v2, p1

    iget v4, v0, Lokio/Segment;->c:I

    int-to-long v4, v4

    cmp-long v6, v2, v4

    if-lez v6, :cond_3c

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->c1(J)[B

    move-result-object p1

    new-instance p2, Ljava/lang/String;

    invoke-direct {p2, p1, p3}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V

    return-object p2

    :cond_3c
    iget-object v2, v0, Lokio/Segment;->a:[B

    long-to-int v3, p1

    new-instance v4, Ljava/lang/String;

    invoke-direct {v4, v2, v1, v3, p3}, Ljava/lang/String;-><init>([BIILjava/nio/charset/Charset;)V

    iget p3, v0, Lokio/Segment;->b:I

    add-int/2addr p3, v3

    iput p3, v0, Lokio/Segment;->b:I

    iget-wide v1, p0, Lokio/Buffer;->g:J

    sub-long/2addr v1, p1

    iput-wide v1, p0, Lokio/Buffer;->g:J

    iget p1, v0, Lokio/Segment;->c:I

    if-ne p3, p1, :cond_5d

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object p1

    iput-object p1, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object p1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {p1, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    :cond_5d
    return-object v4

    :cond_5e
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 p1, 0x0

    throw p1

    :cond_63
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_69
    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "byteCount: "

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, 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 I0(Lokio/Source;)J
    .registers 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const-wide/16 v0, 0x0

    :goto_7
    const/16 v2, 0x2000

    int-to-long v2, v2

    invoke-interface {p1, p0, v2, v3}, 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_15

    return-wide v0

    :cond_15
    add-long/2addr v0, v2

    goto :goto_7
.end method

.method public final J(J)V
    .registers 3

    iput-wide p1, p0, Lokio/Buffer;->g:J

    return-void
.end method

.method public bridge synthetic J0(J)Lokio/BufferedSink;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->h0(J)Lokio/Buffer;

    return-object p0
.end method

.method public L(Lokio/ByteString;)J
    .registers 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    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/Buffer;->t(Lokio/ByteString;J)J

    move-result-wide v0

    return-wide v0
.end method

.method public L0()Lokio/ByteString;
    .registers 3

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->m(J)Lokio/ByteString;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic M(I)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->j0(I)Lokio/Buffer;

    return-object p0
.end method

.method public N()Z
    .registers 6

    iget-wide v0, p0, Lokio/Buffer;->g:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_a

    const/4 v0, 0x1

    goto :goto_b

    :cond_a
    const/4 v0, 0x0

    :goto_b
    return v0
.end method

.method public N0(J)V
    .registers 10
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    :cond_0
    :goto_0
    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-lez v2, :cond_3a

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_34

    iget v1, v0, Lokio/Segment;->c:I

    iget v2, v0, Lokio/Segment;->b:I

    sub-int/2addr v1, v2

    int-to-long v1, v1

    invoke-static {p1, p2, v1, v2}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v1

    long-to-int v2, v1

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v3

    int-to-long v5, v2

    sub-long/2addr v3, v5

    invoke-virtual {p0, v3, v4}, Lokio/Buffer;->J(J)V

    sub-long/2addr p1, v5

    iget v1, v0, Lokio/Segment;->b:I

    add-int/2addr v1, v2

    iput v1, v0, Lokio/Segment;->b:I

    iget v2, v0, Lokio/Segment;->c:I

    if-ne v1, v2, :cond_0

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v1

    iput-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v1, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_0

    :cond_34
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_3a
    return-void
.end method

.method public bridge synthetic O(I)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    return-object p0
.end method

.method public final P()Lokio/ByteString;
    .registers 6

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const v2, 0x7fffffff

    int-to-long v2, v2

    cmp-long v4, v0, v2

    if-gtz v4, :cond_e

    const/4 v0, 0x1

    goto :goto_f

    :cond_e
    const/4 v0, 0x0

    :goto_f
    if-eqz v0, :cond_1b

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    long-to-int v1, v0

    invoke-virtual {p0, v1}, Lokio/Buffer;->Q(I)Lokio/ByteString;

    move-result-object v0

    return-object v0

    :cond_1b
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "size > Int.MAX_VALUE: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/IllegalStateException;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v1
.end method

.method public P0(J)Z
    .registers 6

    iget-wide v0, p0, Lokio/Buffer;->g:J

    cmp-long v2, v0, p1

    if-ltz v2, :cond_8

    const/4 p1, 0x1

    goto :goto_9

    :cond_8
    const/4 p1, 0x0

    :goto_9
    return p1
.end method

.method public final Q(I)Lokio/ByteString;
    .registers 11

    if-nez p1, :cond_5

    sget-object p1, Lokio/ByteString;->i:Lokio/ByteString;

    goto :goto_66

    :cond_5
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    int-to-long v4, p1

    invoke-static/range {v0 .. v5}, Lokio/-Util;->b(JJJ)V

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v1, 0x0

    const/4 v2, 0x0

    const/4 v3, 0x0

    :goto_14
    const/4 v4, 0x0

    if-ge v2, p1, :cond_32

    if-eqz v0, :cond_2e

    iget v4, v0, Lokio/Segment;->c:I

    iget v5, v0, Lokio/Segment;->b:I

    if-eq v4, v5, :cond_26

    sub-int/2addr v4, v5

    add-int/2addr v2, v4

    add-int/lit8 v3, v3, 0x1

    iget-object v0, v0, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_14

    :cond_26
    new-instance p1, Ljava/lang/AssertionError;

    const-string v0, "s.limit == s.pos"

    invoke-direct {p1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    throw p1

    :cond_2e
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v4

    :cond_32
    new-array v0, v3, [[B

    mul-int/lit8 v2, v3, 0x2

    new-array v2, v2, [I

    iget-object v5, p0, Lokio/Buffer;->f:Lokio/Segment;

    move-object v6, v5

    const/4 v5, 0x0

    :goto_3c
    if-ge v1, p1, :cond_61

    if-eqz v6, :cond_5d

    iget-object v7, v6, Lokio/Segment;->a:[B

    aput-object v7, v0, v5

    iget v7, v6, Lokio/Segment;->c:I

    iget v8, v6, Lokio/Segment;->b:I

    sub-int/2addr v7, v8

    add-int/2addr v1, v7

    invoke-static {v1, p1}, Ljava/lang/Math;->min(II)I

    move-result v7

    aput v7, v2, v5

    add-int v7, v5, v3

    iget v8, v6, Lokio/Segment;->b:I

    aput v8, v2, v7

    const/4 v7, 0x1

    iput-boolean v7, v6, Lokio/Segment;->d:Z

    add-int/2addr v5, v7

    iget-object v6, v6, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_3c

    :cond_5d
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v4

    :cond_61
    new-instance p1, Lokio/SegmentedByteString;

    invoke-direct {p1, v0, v2}, Lokio/SegmentedByteString;-><init>([[B[I)V

    :goto_66
    return-object p1
.end method

.method public final S(I)Lokio/Segment;
    .registers 5

    const/16 v0, 0x2000

    const/4 v1, 0x1

    if-lt p1, v1, :cond_8

    if-gt p1, v0, :cond_8

    goto :goto_9

    :cond_8
    const/4 v1, 0x0

    :goto_9
    if-eqz v1, :cond_41

    iget-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-nez v1, :cond_1c

    sget-object p1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {p1}, Lokio/SegmentPool;->b()Lokio/Segment;

    move-result-object p1

    iput-object p1, p0, Lokio/Buffer;->f:Lokio/Segment;

    iput-object p1, p1, Lokio/Segment;->g:Lokio/Segment;

    iput-object p1, p1, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_38

    :cond_1c
    const/4 v2, 0x0

    if-eqz v1, :cond_3d

    iget-object v1, v1, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v1, :cond_39

    iget v2, v1, Lokio/Segment;->c:I

    add-int/2addr v2, p1

    if-gt v2, v0, :cond_2f

    iget-boolean p1, v1, Lokio/Segment;->e:Z

    if-nez p1, :cond_2d

    goto :goto_2f

    :cond_2d
    move-object p1, v1

    goto :goto_38

    :cond_2f
    :goto_2f
    sget-object p1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {p1}, Lokio/SegmentPool;->b()Lokio/Segment;

    move-result-object p1

    invoke-virtual {v1, p1}, Lokio/Segment;->c(Lokio/Segment;)Lokio/Segment;

    :goto_38
    return-object p1

    :cond_39
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_3d
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_41
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "unexpected capacity"

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public T(Lokio/ByteString;)Lokio/Buffer;
    .registers 4

    const-string v0, "byteString"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Lokio/ByteString;->Q()I

    move-result v0

    const/4 v1, 0x0

    invoke-virtual {p1, p0, v1, v0}, Lokio/ByteString;->V(Lokio/Buffer;II)V

    return-object p0
.end method

.method public U(Lokio/Source;J)Lokio/Buffer;
    .registers 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    :goto_5
    const-wide/16 v0, 0x0

    cmp-long v2, p2, v0

    if-lez v2, :cond_1d

    invoke-interface {p1, p0, p2, p3}, 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_17

    sub-long/2addr p2, v0

    goto :goto_5

    :cond_17
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_1d
    return-object p0
.end method

.method public W0()Ljava/lang/String;
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    const-wide v0, 0x7fffffffffffffffL

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->f0(J)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public X([B)Lokio/Buffer;
    .registers 4

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    array-length v0, p1

    const/4 v1, 0x0

    invoke-virtual {p0, p1, v1, v0}, Lokio/Buffer;->Y([BII)Lokio/Buffer;

    return-object p0
.end method

.method public Y([BII)Lokio/Buffer;
    .registers 13

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    array-length v0, p1

    int-to-long v1, v0

    int-to-long v3, p2

    int-to-long v7, p3

    move-wide v5, v7

    invoke-static/range {v1 .. v6}, Lokio/-Util;->b(JJJ)V

    add-int/2addr p3, p2

    :goto_e
    if-ge p2, p3, :cond_2f

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v0

    sub-int v1, p3, p2

    iget v2, v0, Lokio/Segment;->c:I

    rsub-int v2, v2, 0x2000

    invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I

    move-result v1

    iget-object v2, v0, Lokio/Segment;->a:[B

    iget v3, v0, Lokio/Segment;->c:I

    add-int v4, p2, v1

    invoke-static {p1, v2, v3, p2, v4}, Lkotlin/collections/ArraysKt;->d([B[BIII)[B

    iget p2, v0, Lokio/Segment;->c:I

    add-int/2addr p2, v1

    iput p2, v0, Lokio/Segment;->c:I

    move p2, v4

    goto :goto_e

    :cond_2f
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p1

    add-long/2addr p1, v7

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->J(J)V

    return-object p0
.end method

.method public Y0()I
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->readInt()I

    move-result v0

    invoke-static {v0}, Lokio/-Util;->c(I)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/Buffer;->u(Lokio/ByteString;J)J

    move-result-wide v0

    return-wide v0
.end method

.method public a0(I)Lokio/Buffer;
    .registers 6

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v0

    iget-object v1, v0, Lokio/Segment;->a:[B

    iget v2, v0, Lokio/Segment;->c:I

    add-int/lit8 v3, v2, 0x1

    iput v3, v0, Lokio/Segment;->c:I

    int-to-byte p1, p1

    aput-byte p1, v1, v2

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x1

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    return-object p0
.end method

.method public final b()V
    .registers 3

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->N0(J)V

    return-void
.end method

.method public bridge synthetic b0()Lokio/BufferedSink;
    .registers 1

    invoke-virtual {p0}, Lokio/Buffer;->n()Lokio/Buffer;

    return-object p0
.end method

.method public c()Lokio/Buffer;
    .registers 1

    return-object p0
.end method

.method public c0()J
    .registers 18
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    move-object/from16 v0, p0

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    const-wide/16 v3, 0x0

    cmp-long v5, v1, v3

    if-eqz v5, :cond_d6

    const-wide/16 v1, -0x7

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x0

    :cond_11
    iget-object v8, v0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v8, :cond_d1

    iget-object v9, v8, Lokio/Segment;->a:[B

    iget v10, v8, Lokio/Segment;->b:I

    iget v11, v8, Lokio/Segment;->c:I

    :goto_1b
    const/4 v12, 0x1

    if-ge v10, v11, :cond_a6

    aget-byte v13, v9, v10

    const/16 v14, 0x30

    int-to-byte v14, v14

    if-lt v13, v14, :cond_71

    const/16 v15, 0x39

    int-to-byte v15, v15

    if-gt v13, v15, :cond_71

    sub-int/2addr v14, v13

    const-wide v15, -0xcccccccccccccccL

    cmp-long v12, v3, v15

    if-ltz v12, :cond_46

    move v15, v7

    move-object/from16 v16, v8

    if-nez v12, :cond_3f

    int-to-long v7, v14

    cmp-long v12, v7, v1

    if-gez v12, :cond_3f

    goto :goto_46

    :cond_3f
    const-wide/16 v7, 0xa

    mul-long v3, v3, v7

    int-to-long v7, v14

    add-long/2addr v3, v7

    goto :goto_7f

    :cond_46
    :goto_46
    new-instance v1, Lokio/Buffer;

    invoke-direct {v1}, Lokio/Buffer;-><init>()V

    invoke-virtual {v1, v3, v4}, Lokio/Buffer;->d0(J)Lokio/Buffer;

    invoke-virtual {v1, v13}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    if-nez v6, :cond_56

    invoke-virtual {v1}, Lokio/Buffer;->readByte()B

    :cond_56
    new-instance v2, Ljava/lang/NumberFormatException;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Number too large: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Lokio/Buffer;->d1()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V

    throw v2

    :cond_71
    move v15, v7

    move-object/from16 v16, v8

    const/16 v7, 0x2d

    int-to-byte v7, v7

    if-ne v13, v7, :cond_87

    if-nez v5, :cond_87

    const-wide/16 v6, 0x1

    sub-long/2addr v1, v6

    const/4 v6, 0x1

    :goto_7f
    add-int/lit8 v10, v10, 0x1

    add-int/lit8 v5, v5, 0x1

    move v7, v15

    move-object/from16 v8, v16

    goto :goto_1b

    :cond_87
    if-eqz v5, :cond_8b

    const/4 v7, 0x1

    goto :goto_a9

    :cond_8b
    new-instance v1, Ljava/lang/NumberFormatException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Expected leading [0-9] or \'-\' character but was 0x"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {v13}, Lokio/-Util;->f(B)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_a6
    move v15, v7

    move-object/from16 v16, v8

    :goto_a9
    if-ne v10, v11, :cond_b9

    invoke-virtual/range {v16 .. v16}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v8

    iput-object v8, v0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v8, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    move-object/from16 v9, v16

    invoke-virtual {v8, v9}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_bd

    :cond_b9
    move-object/from16 v9, v16

    iput v10, v9, Lokio/Segment;->b:I

    :goto_bd
    if-nez v7, :cond_c3

    iget-object v8, v0, Lokio/Buffer;->f:Lokio/Segment;

    if-nez v8, :cond_11

    :cond_c3
    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    int-to-long v7, v5

    sub-long/2addr v1, v7

    invoke-virtual {v0, v1, v2}, Lokio/Buffer;->J(J)V

    if-eqz v6, :cond_cf

    goto :goto_d0

    :cond_cf
    neg-long v3, v3

    :goto_d0
    return-wide v3

    :cond_d1
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v1, 0x0

    throw v1

    :cond_d6
    new-instance v1, Ljava/io/EOFException;

    invoke-direct {v1}, Ljava/io/EOFException;-><init>()V

    throw v1
.end method

.method public c1(J)[B
    .registers 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-ltz v2, :cond_10

    const v0, 0x7fffffff

    int-to-long v0, v0

    cmp-long v2, p1, v0

    if-gtz v2, :cond_10

    const/4 v0, 0x1

    goto :goto_11

    :cond_10
    const/4 v0, 0x0

    :goto_11
    if-eqz v0, :cond_28

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    cmp-long v2, v0, p1

    if-ltz v2, :cond_22

    long-to-int p2, p1

    new-array p1, p2, [B

    invoke-virtual {p0, p1}, Lokio/Buffer;->D([B)V

    return-object p1

    :cond_22
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_28
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "byteCount: "

    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 bridge synthetic clone()Ljava/lang/Object;
    .registers 2

    invoke-virtual {p0}, Lokio/Buffer;->d()Lokio/Buffer;

    move-result-object v0

    return-object v0
.end method

.method public close()V
    .registers 1

    return-void
.end method

.method public d()Lokio/Buffer;
    .registers 2

    invoke-virtual {p0}, Lokio/Buffer;->f()Lokio/Buffer;

    move-result-object v0

    return-object v0
.end method

.method public d0(J)Lokio/Buffer;
    .registers 15

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-nez v2, :cond_d

    const/16 p1, 0x30

    invoke-virtual {p0, p1}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    goto/16 :goto_11c

    :cond_d
    const/4 v3, 0x0

    const/4 v4, 0x1

    if-gez v2, :cond_1e

    neg-long p1, p1

    cmp-long v2, p1, v0

    if-gez v2, :cond_1d

    const-string p1, "-9223372036854775808"

    invoke-virtual {p0, p1}, Lokio/Buffer;->t0(Ljava/lang/String;)Lokio/Buffer;

    goto/16 :goto_11c

    :cond_1d
    const/4 v3, 0x1

    :cond_1e
    const-wide/32 v5, 0x5f5e100

    const/16 v2, 0xa

    cmp-long v7, p1, v5

    if-gez v7, :cond_6c

    const-wide/16 v5, 0x2710

    cmp-long v7, p1, v5

    if-gez v7, :cond_4a

    const-wide/16 v5, 0x64

    cmp-long v7, p1, v5

    if-gez v7, :cond_3e

    const-wide/16 v5, 0xa

    cmp-long v7, p1, v5

    if-gez v7, :cond_3b

    goto/16 :goto_e4

    :cond_3b
    const/4 v4, 0x2

    goto/16 :goto_e4

    :cond_3e
    const-wide/16 v4, 0x3e8

    cmp-long v6, p1, v4

    if-gez v6, :cond_47

    const/4 v4, 0x3

    goto/16 :goto_e4

    :cond_47
    const/4 v4, 0x4

    goto/16 :goto_e4

    :cond_4a
    const-wide/32 v4, 0xf4240

    cmp-long v6, p1, v4

    if-gez v6, :cond_5e

    const-wide/32 v4, 0x186a0

    cmp-long v6, p1, v4

    if-gez v6, :cond_5b

    const/4 v4, 0x5

    goto/16 :goto_e4

    :cond_5b
    const/4 v4, 0x6

    goto/16 :goto_e4

    :cond_5e
    const-wide/32 v4, 0x989680

    cmp-long v6, p1, v4

    if-gez v6, :cond_68

    const/4 v4, 0x7

    goto/16 :goto_e4

    :cond_68
    const/16 v4, 0x8

    goto/16 :goto_e4

    :cond_6c
    const-wide v4, 0xe8d4a51000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_9a

    const-wide v4, 0x2540be400L

    cmp-long v6, p1, v4

    if-gez v6, :cond_8b

    const-wide/32 v4, 0x3b9aca00

    cmp-long v6, p1, v4

    if-gez v6, :cond_88

    const/16 v4, 0x9

    goto :goto_e4

    :cond_88
    const/16 v4, 0xa

    goto :goto_e4

    :cond_8b
    const-wide v4, 0x174876e800L

    cmp-long v6, p1, v4

    if-gez v6, :cond_97

    const/16 v4, 0xb

    goto :goto_e4

    :cond_97
    const/16 v4, 0xc

    goto :goto_e4

    :cond_9a
    const-wide v4, 0x38d7ea4c68000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_be

    const-wide v4, 0x9184e72a000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_af

    const/16 v4, 0xd

    goto :goto_e4

    :cond_af
    const-wide v4, 0x5af3107a4000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_bb

    const/16 v4, 0xe

    goto :goto_e4

    :cond_bb
    const/16 v4, 0xf

    goto :goto_e4

    :cond_be
    const-wide v4, 0x16345785d8a0000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_d6

    const-wide v4, 0x2386f26fc10000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_d3

    const/16 v4, 0x10

    goto :goto_e4

    :cond_d3
    const/16 v4, 0x11

    goto :goto_e4

    :cond_d6
    const-wide v4, 0xde0b6b3a7640000L

    cmp-long v6, p1, v4

    if-gez v6, :cond_e2

    const/16 v4, 0x12

    goto :goto_e4

    :cond_e2
    const/16 v4, 0x13

    :goto_e4
    if-eqz v3, :cond_e8

    add-int/lit8 v4, v4, 0x1

    :cond_e8
    invoke-virtual {p0, v4}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v5

    iget-object v6, v5, Lokio/Segment;->a:[B

    iget v7, v5, Lokio/Segment;->c:I

    add-int/2addr v7, v4

    :goto_f1
    cmp-long v8, p1, v0

    if-eqz v8, :cond_105

    int-to-long v8, v2

    rem-long v10, p1, v8

    long-to-int v11, v10

    add-int/lit8 v7, v7, -0x1

    invoke-static {}, Lokio/internal/BufferKt;->a()[B

    move-result-object v10

    aget-byte v10, v10, v11

    aput-byte v10, v6, v7

    div-long/2addr p1, v8

    goto :goto_f1

    :cond_105
    if-eqz v3, :cond_10e

    add-int/lit8 v7, v7, -0x1

    const/16 p1, 0x2d

    int-to-byte p1, p1

    aput-byte p1, v6, v7

    :cond_10e
    iget p1, v5, Lokio/Segment;->c:I

    add-int/2addr p1, v4

    iput p1, v5, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p1

    int-to-long v0, v4

    add-long/2addr p1, v0

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->J(J)V

    :goto_11c
    return-object p0
.end method

.method public d1()Ljava/lang/String;
    .registers 4

    iget-wide v0, p0, Lokio/Buffer;->g:J

    sget-object v2, Lkotlin/text/Charsets;->a:Ljava/nio/charset/Charset;

    invoke-virtual {p0, v0, v1, v2}, Lokio/Buffer;->I(JLjava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public final e()J
    .registers 6

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_b

    goto :goto_24

    :cond_b
    iget-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v3, 0x0

    if-eqz v2, :cond_29

    iget-object v2, v2, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v2, :cond_25

    iget v3, v2, Lokio/Segment;->c:I

    const/16 v4, 0x2000

    if-ge v3, v4, :cond_23

    iget-boolean v4, v2, Lokio/Segment;->e:Z

    if-eqz v4, :cond_23

    iget v2, v2, Lokio/Segment;->b:I

    sub-int/2addr v3, v2

    int-to-long v2, v3

    sub-long/2addr v0, v2

    :cond_23
    move-wide v2, v0

    :goto_24
    return-wide v2

    :cond_25
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3

    :cond_29
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3
.end method

.method public equals(Ljava/lang/Object;)Z
    .registers 21

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    const/4 v3, 0x1

    if-ne v0, v1, :cond_a

    :cond_7
    :goto_7
    const/4 v2, 0x1

    goto/16 :goto_8b

    :cond_a
    instance-of v4, v1, Lokio/Buffer;

    if-nez v4, :cond_11

    :goto_e
    const/4 v2, 0x0

    goto/16 :goto_8b

    :cond_11
    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v4

    check-cast v1, Lokio/Buffer;

    invoke-virtual {v1}, Lokio/Buffer;->size()J

    move-result-wide v6

    cmp-long v8, v4, v6

    if-eqz v8, :cond_20

    goto :goto_e

    :cond_20
    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v4

    const-wide/16 v6, 0x0

    cmp-long v8, v4, v6

    if-nez v8, :cond_2b

    goto :goto_7

    :cond_2b
    iget-object v4, v0, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v5, 0x0

    if-eqz v4, :cond_90

    iget-object v1, v1, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v1, :cond_8c

    iget v8, v4, Lokio/Segment;->b:I

    iget v9, v1, Lokio/Segment;->b:I

    move-wide v10, v6

    :goto_39
    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v12

    cmp-long v14, v10, v12

    if-gez v14, :cond_7

    iget v12, v4, Lokio/Segment;->c:I

    sub-int/2addr v12, v8

    iget v13, v1, Lokio/Segment;->c:I

    sub-int/2addr v13, v9

    invoke-static {v12, v13}, Ljava/lang/Math;->min(II)I

    move-result v12

    int-to-long v12, v12

    move-wide v14, v6

    :goto_4d
    cmp-long v16, v14, v12

    if-gez v16, :cond_68

    iget-object v2, v4, Lokio/Segment;->a:[B

    add-int/lit8 v17, v8, 0x1

    aget-byte v2, v2, v8

    iget-object v8, v1, Lokio/Segment;->a:[B

    add-int/lit8 v18, v9, 0x1

    aget-byte v8, v8, v9

    if-eq v2, v8, :cond_60

    goto :goto_e

    :cond_60
    const-wide/16 v8, 0x1

    add-long/2addr v14, v8

    move/from16 v8, v17

    move/from16 v9, v18

    goto :goto_4d

    :cond_68
    iget v2, v4, Lokio/Segment;->c:I

    if-ne v8, v2, :cond_79

    iget-object v2, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v2, :cond_75

    iget v4, v2, Lokio/Segment;->b:I

    move v8, v4

    move-object v4, v2

    goto :goto_79

    :cond_75
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v5

    :cond_79
    :goto_79
    iget v2, v1, Lokio/Segment;->c:I

    if-ne v9, v2, :cond_89

    iget-object v1, v1, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v1, :cond_85

    iget v2, v1, Lokio/Segment;->b:I

    move v9, v2

    goto :goto_89

    :cond_85
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v5

    :cond_89
    :goto_89
    add-long/2addr v10, v12

    goto :goto_39

    :goto_8b
    return v2

    :cond_8c
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v5

    :cond_90
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v5
.end method

.method public final f()Lokio/Buffer;
    .registers 8

    new-instance v0, Lokio/Buffer;

    invoke-direct {v0}, Lokio/Buffer;-><init>()V

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    const-wide/16 v3, 0x0

    cmp-long v5, v1, v3

    if-nez v5, :cond_10

    goto :goto_42

    :cond_10
    iget-object v1, p0, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v2, 0x0

    if-eqz v1, :cond_43

    invoke-virtual {v1}, Lokio/Segment;->d()Lokio/Segment;

    move-result-object v3

    iput-object v3, v0, Lokio/Buffer;->f:Lokio/Segment;

    iput-object v3, v3, Lokio/Segment;->g:Lokio/Segment;

    iput-object v3, v3, Lokio/Segment;->f:Lokio/Segment;

    iget-object v4, v1, Lokio/Segment;->f:Lokio/Segment;

    :goto_21
    if-eq v4, v1, :cond_3b

    iget-object v5, v3, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v5, :cond_37

    if-eqz v4, :cond_33

    invoke-virtual {v4}, Lokio/Segment;->d()Lokio/Segment;

    move-result-object v6

    invoke-virtual {v5, v6}, Lokio/Segment;->c(Lokio/Segment;)Lokio/Segment;

    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_21

    :cond_33
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_37
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2

    :cond_3b
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Lokio/Buffer;->J(J)V

    :goto_42
    return-object v0

    :cond_43
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v2
.end method

.method public f0(J)Ljava/lang/String;
    .registers 14
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    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_99

    const-wide/16 v0, 0x1

    const-wide v2, 0x7fffffffffffffffL

    cmp-long v4, p1, v2

    if-nez v4, :cond_17

    goto :goto_19

    :cond_17
    add-long v2, p1, v0

    :goto_19
    const/16 v4, 0xa

    int-to-byte v10, v4

    const-wide/16 v6, 0x0

    move-object v4, p0

    move v5, v10

    move-wide v8, v2

    invoke-virtual/range {v4 .. v9}, Lokio/Buffer;->s(BJJ)J

    move-result-wide v4

    const-wide/16 v6, -0x1

    cmp-long v8, v4, v6

    if-eqz v8, :cond_30

    invoke-static {p0, v4, v5}, Lokio/internal/BufferKt;->c(Lokio/Buffer;J)Ljava/lang/String;

    move-result-object p1

    goto :goto_4d

    :cond_30
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v4

    cmp-long v6, v2, v4

    if-gez v6, :cond_4e

    sub-long v0, v2, v0

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->o(J)B

    move-result v0

    const/16 v1, 0xd

    int-to-byte v1, v1

    if-ne v0, v1, :cond_4e

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->o(J)B

    move-result v0

    if-ne v0, v10, :cond_4e

    invoke-static {p0, v2, v3}, Lokio/internal/BufferKt;->c(Lokio/Buffer;J)Ljava/lang/String;

    move-result-object p1

    :goto_4d
    return-object p1

    :cond_4e
    new-instance v6, Lokio/Buffer;

    invoke-direct {v6}, Lokio/Buffer;-><init>()V

    const-wide/16 v2, 0x0

    const/16 v0, 0x20

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v4

    int-to-long v0, v0

    invoke-static {v0, v1, v4, v5}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v4

    move-object v0, p0

    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;

    invoke-virtual {p0}, 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/16 p1, 0x2026

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)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_99
    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 flush()V
    .registers 1

    return-void
.end method

.method public final g(Lokio/Buffer;JJ)Lokio/Buffer;
    .registers 15

    const-string v0, "out"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    move-wide v3, p2

    move-wide v5, p4

    invoke-static/range {v1 .. v6}, Lokio/-Util;->b(JJJ)V

    const-wide/16 v0, 0x0

    cmp-long v2, p4, v0

    if-nez v2, :cond_15

    goto :goto_78

    :cond_15
    invoke-virtual {p1}, Lokio/Buffer;->size()J

    move-result-wide v2

    add-long/2addr v2, p4

    invoke-virtual {p1, v2, v3}, Lokio/Buffer;->J(J)V

    iget-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    :goto_1f
    const/4 v3, 0x0

    if-eqz v2, :cond_79

    iget v4, v2, Lokio/Segment;->c:I

    iget v5, v2, Lokio/Segment;->b:I

    sub-int v6, v4, v5

    int-to-long v6, v6

    cmp-long v8, p2, v6

    if-ltz v8, :cond_33

    sub-int/2addr v4, v5

    int-to-long v3, v4

    sub-long/2addr p2, v3

    iget-object v2, v2, Lokio/Segment;->f:Lokio/Segment;

    goto :goto_1f

    :cond_33
    :goto_33
    cmp-long v4, p4, v0

    if-lez v4, :cond_78

    if-eqz v2, :cond_74

    invoke-virtual {v2}, Lokio/Segment;->d()Lokio/Segment;

    move-result-object v4

    iget v5, v4, Lokio/Segment;->b:I

    long-to-int p3, p2

    add-int/2addr v5, p3

    iput v5, v4, Lokio/Segment;->b:I

    long-to-int p2, p4

    add-int/2addr v5, p2

    iget p2, v4, Lokio/Segment;->c:I

    invoke-static {v5, p2}, Ljava/lang/Math;->min(II)I

    move-result p2

    iput p2, v4, Lokio/Segment;->c:I

    iget-object p2, p1, Lokio/Buffer;->f:Lokio/Segment;

    if-nez p2, :cond_58

    iput-object v4, v4, Lokio/Segment;->g:Lokio/Segment;

    iput-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    iput-object v4, p1, Lokio/Buffer;->f:Lokio/Segment;

    goto :goto_61

    :cond_58
    if-eqz p2, :cond_70

    iget-object p2, p2, Lokio/Segment;->g:Lokio/Segment;

    if-eqz p2, :cond_6c

    invoke-virtual {p2, v4}, Lokio/Segment;->c(Lokio/Segment;)Lokio/Segment;

    :goto_61
    iget p2, v4, Lokio/Segment;->c:I

    iget p3, v4, Lokio/Segment;->b:I

    sub-int/2addr p2, p3

    int-to-long p2, p2

    sub-long/2addr p4, p2

    iget-object v2, v2, Lokio/Segment;->f:Lokio/Segment;

    move-wide p2, v0

    goto :goto_33

    :cond_6c
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3

    :cond_70
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3

    :cond_74
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3

    :cond_78
    :goto_78
    return-object p0

    :cond_79
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v3
.end method

.method public bridge synthetic g1([B)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->X([B)Lokio/Buffer;

    return-object p0
.end method

.method public h0(J)Lokio/Buffer;
    .registers 15

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-nez v2, :cond_c

    const/16 p1, 0x30

    invoke-virtual {p0, p1}, Lokio/Buffer;->a0(I)Lokio/Buffer;

    goto :goto_81

    :cond_c
    const/4 v0, 0x1

    ushr-long v1, p1, v0

    or-long/2addr v1, p1

    const/4 v3, 0x2

    ushr-long v4, v1, v3

    or-long/2addr v1, v4

    const/4 v4, 0x4

    ushr-long v5, v1, v4

    or-long/2addr v1, v5

    const/16 v5, 0x8

    ushr-long v6, v1, v5

    or-long/2addr v1, v6

    const/16 v6, 0x10

    ushr-long v7, v1, v6

    or-long/2addr v1, v7

    const/16 v7, 0x20

    ushr-long v8, v1, v7

    or-long/2addr v1, v8

    ushr-long v8, v1, v0

    const-wide v10, 0x5555555555555555L    # 1.1945305291614955E103

    and-long/2addr v8, v10

    sub-long/2addr v1, v8

    ushr-long v8, v1, v3

    const-wide v10, 0x3333333333333333L    # 4.667261458395856E-62

    and-long/2addr v8, v10

    and-long/2addr v1, v10

    add-long/2addr v8, v1

    ushr-long v1, v8, v4

    add-long/2addr v1, v8

    const-wide v8, 0xf0f0f0f0f0f0f0fL    # 3.815736827118017E-236

    and-long/2addr v1, v8

    ushr-long v8, v1, v5

    add-long/2addr v1, v8

    ushr-long v5, v1, v6

    add-long/2addr v1, v5

    const-wide/16 v5, 0x3f

    and-long v8, v1, v5

    ushr-long/2addr v1, v7

    and-long/2addr v1, v5

    add-long/2addr v8, v1

    const/4 v1, 0x3

    int-to-long v1, v1

    add-long/2addr v8, v1

    int-to-long v1, v4

    div-long/2addr v8, v1

    long-to-int v1, v8

    invoke-virtual {p0, v1}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v2

    iget-object v3, v2, Lokio/Segment;->a:[B

    iget v5, v2, Lokio/Segment;->c:I

    add-int v6, v5, v1

    sub-int/2addr v6, v0

    :goto_61
    if-lt v6, v5, :cond_73

    invoke-static {}, Lokio/internal/BufferKt;->a()[B

    move-result-object v0

    const-wide/16 v7, 0xf

    and-long/2addr v7, p1

    long-to-int v8, v7

    aget-byte v0, v0, v8

    aput-byte v0, v3, v6

    ushr-long/2addr p1, v4

    add-int/lit8 v6, v6, -0x1

    goto :goto_61

    :cond_73
    iget p1, v2, Lokio/Segment;->c:I

    add-int/2addr p1, v1

    iput p1, v2, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p1

    int-to-long v0, v1

    add-long/2addr p1, v0

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->J(J)V

    :goto_81
    return-object p0
.end method

.method public hashCode()I
    .registers 6

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_23

    const/4 v1, 0x1

    :cond_5
    iget v2, v0, Lokio/Segment;->b:I

    iget v3, v0, Lokio/Segment;->c:I

    :goto_9
    if-ge v2, v3, :cond_15

    mul-int/lit8 v1, v1, 0x1f

    iget-object v4, v0, Lokio/Segment;->a:[B

    aget-byte v4, v4, v2

    add-int/2addr v1, v4

    add-int/lit8 v2, v2, 0x1

    goto :goto_9

    :cond_15
    iget-object v0, v0, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v0, :cond_1e

    iget-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-ne v0, v2, :cond_5

    goto :goto_24

    :cond_1e
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_23
    const/4 v1, 0x0

    :goto_24
    return v1
.end method

.method public i(J)Ljava/lang/String;
    .registers 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    sget-object v0, Lkotlin/text/Charsets;->a:Ljava/nio/charset/Charset;

    invoke-virtual {p0, p1, p2, v0}, Lokio/Buffer;->I(JLjava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method public i0(I)Lokio/Buffer;
    .registers 7

    const/4 v0, 0x4

    invoke-virtual {p0, v0}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v0

    iget-object v1, v0, Lokio/Segment;->a:[B

    iget v2, v0, Lokio/Segment;->c:I

    add-int/lit8 v3, v2, 0x1

    ushr-int/lit8 v4, p1, 0x18

    and-int/lit16 v4, v4, 0xff

    int-to-byte v4, v4

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    ushr-int/lit8 v4, p1, 0x10

    and-int/lit16 v4, v4, 0xff

    int-to-byte v4, v4

    aput-byte v4, v1, v3

    add-int/lit8 v3, v2, 0x1

    ushr-int/lit8 v4, p1, 0x8

    and-int/lit16 v4, v4, 0xff

    int-to-byte v4, v4

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    and-int/lit16 p1, p1, 0xff

    int-to-byte p1, p1

    aput-byte p1, v1, v3

    iput v2, v0, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x4

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    return-object p0
.end method

.method public bridge synthetic i1(Lokio/ByteString;)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->T(Lokio/ByteString;)Lokio/Buffer;

    return-object p0
.end method

.method public inputStream()Ljava/io/InputStream;
    .registers 2

    new-instance v0, Lokio/Buffer$inputStream$1;

    invoke-direct {v0, p0}, Lokio/Buffer$inputStream$1;-><init>(Lokio/Buffer;)V

    return-object v0
.end method

.method public isOpen()Z
    .registers 2

    const/4 v0, 0x1

    return v0
.end method

.method public j()Lokio/Buffer;
    .registers 1

    return-object p0
.end method

.method public j0(I)Lokio/Buffer;
    .registers 2

    invoke-static {p1}, Lokio/-Util;->c(I)I

    move-result p1

    invoke-virtual {p0, p1}, Lokio/Buffer;->i0(I)Lokio/Buffer;

    return-object p0
.end method

.method public k0(J)Lokio/Buffer;
    .registers 12

    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v1

    iget-object v2, v1, Lokio/Segment;->a:[B

    iget v3, v1, Lokio/Segment;->c:I

    add-int/lit8 v4, v3, 0x1

    const/16 v5, 0x38

    ushr-long v5, p1, v5

    const-wide/16 v7, 0xff

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v3

    add-int/lit8 v3, v4, 0x1

    const/16 v5, 0x30

    ushr-long v5, p1, v5

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v4

    add-int/lit8 v4, v3, 0x1

    const/16 v5, 0x28

    ushr-long v5, p1, v5

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v3

    add-int/lit8 v3, v4, 0x1

    const/16 v5, 0x20

    ushr-long v5, p1, v5

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v4

    add-int/lit8 v4, v3, 0x1

    const/16 v5, 0x18

    ushr-long v5, p1, v5

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v3

    add-int/lit8 v3, v4, 0x1

    const/16 v5, 0x10

    ushr-long v5, p1, v5

    and-long/2addr v5, v7

    long-to-int v6, v5

    int-to-byte v5, v6

    aput-byte v5, v2, v4

    add-int/lit8 v4, v3, 0x1

    ushr-long v5, p1, v0

    and-long/2addr v5, v7

    long-to-int v0, v5

    int-to-byte v0, v0

    aput-byte v0, v2, v3

    add-int/lit8 v0, v4, 0x1

    and-long/2addr p1, v7

    long-to-int p2, p1

    int-to-byte p1, p2

    aput-byte p1, v2, v4

    iput v0, v1, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p1

    const-wide/16 v0, 0x8

    add-long/2addr p1, v0

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->J(J)V

    return-object p0
.end method

.method public l0(J)Lokio/Buffer;
    .registers 3

    invoke-static {p1, p2}, Lokio/-Util;->d(J)J

    move-result-wide p1

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->k0(J)Lokio/Buffer;

    return-object p0
.end method

.method public m(J)Lokio/ByteString;
    .registers 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-ltz v2, :cond_10

    const v0, 0x7fffffff

    int-to-long v0, v0

    cmp-long v2, p1, v0

    if-gtz v2, :cond_10

    const/4 v0, 0x1

    goto :goto_11

    :cond_10
    const/4 v0, 0x0

    :goto_11
    if-eqz v0, :cond_3b

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    cmp-long v2, v0, p1

    if-ltz v2, :cond_35

    const/16 v0, 0x1000

    int-to-long v0, v0

    cmp-long v2, p1, v0

    if-ltz v2, :cond_2b

    long-to-int v0, p1

    invoke-virtual {p0, v0}, Lokio/Buffer;->Q(I)Lokio/ByteString;

    move-result-object v0

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->N0(J)V

    goto :goto_34

    :cond_2b
    new-instance v0, Lokio/ByteString;

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->c1(J)[B

    move-result-object p1

    invoke-direct {v0, p1}, Lokio/ByteString;-><init>([B)V

    :goto_34
    return-object v0

    :cond_35
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1

    :cond_3b
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "byteCount: "

    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 m0(I)Lokio/Buffer;
    .registers 7

    const/4 v0, 0x2

    invoke-virtual {p0, v0}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v0

    iget-object v1, v0, Lokio/Segment;->a:[B

    iget v2, v0, Lokio/Segment;->c:I

    add-int/lit8 v3, v2, 0x1

    ushr-int/lit8 v4, p1, 0x8

    and-int/lit16 v4, v4, 0xff

    int-to-byte v4, v4

    aput-byte v4, v1, v2

    add-int/lit8 v2, v3, 0x1

    and-int/lit16 p1, p1, 0xff

    int-to-byte p1, p1

    aput-byte p1, v1, v3

    iput v2, v0, Lokio/Segment;->c:I

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x2

    add-long/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Lokio/Buffer;->J(J)V

    return-object p0
.end method

.method public n()Lokio/Buffer;
    .registers 1

    return-object p0
.end method

.method public final o(J)B
    .registers 11

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v4, 0x1

    move-wide v2, p1

    invoke-static/range {v0 .. v5}, Lokio/-Util;->b(JJJ)V

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    const/4 v1, 0x0

    if-eqz v0, :cond_67

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    sub-long/2addr v2, p1

    cmp-long v4, v2, p1

    if-gez v4, :cond_41

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    :goto_1c
    cmp-long v4, v2, p1

    if-lez v4, :cond_30

    iget-object v0, v0, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v0, :cond_2c

    iget v4, v0, Lokio/Segment;->c:I

    iget v5, v0, Lokio/Segment;->b:I

    sub-int/2addr v4, v5

    int-to-long v4, v4

    sub-long/2addr v2, v4

    goto :goto_1c

    :cond_2c
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v1

    :cond_30
    if-eqz v0, :cond_3d

    iget-object v1, v0, Lokio/Segment;->a:[B

    iget v0, v0, Lokio/Segment;->b:I

    int-to-long v4, v0

    add-long/2addr v4, p1

    sub-long/2addr v4, v2

    long-to-int p1, v4

    aget-byte p1, v1, p1

    goto :goto_58

    :cond_3d
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v1

    :cond_41
    const-wide/16 v2, 0x0

    :goto_43
    iget v4, v0, Lokio/Segment;->c:I

    iget v5, v0, Lokio/Segment;->b:I

    sub-int/2addr v4, v5

    int-to-long v6, v4

    add-long/2addr v6, v2

    cmp-long v4, v6, p1

    if-lez v4, :cond_5d

    if-eqz v0, :cond_59

    iget-object v0, v0, Lokio/Segment;->a:[B

    int-to-long v4, v5

    add-long/2addr v4, p1

    sub-long/2addr v4, v2

    long-to-int p1, v4

    aget-byte p1, v0, p1

    :goto_58
    return p1

    :cond_59
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v1

    :cond_5d
    iget-object v0, v0, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v0, :cond_63

    move-wide v2, v6

    goto :goto_43

    :cond_63
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v1

    :cond_67
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v1
.end method

.method public o0(Ljava/lang/String;IILjava/nio/charset/Charset;)Lokio/Buffer;
    .registers 8

    const-string v0, "string"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "charset"

    invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-ltz p2, :cond_10

    const/4 v2, 0x1

    goto :goto_11

    :cond_10
    const/4 v2, 0x0

    :goto_11
    if-eqz v2, :cond_9b

    if-lt p3, p2, :cond_17

    const/4 v2, 0x1

    goto :goto_18

    :cond_17
    const/4 v2, 0x0

    :goto_18
    if-eqz v2, :cond_78

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    if-gt p3, v2, :cond_21

    goto :goto_22

    :cond_21
    const/4 v0, 0x0

    :goto_22
    if-eqz v0, :cond_51

    sget-object v0, Lkotlin/text/Charsets;->a:Ljava/nio/charset/Charset;

    invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_30

    invoke-virtual {p0, p1, p2, p3}, Lokio/Buffer;->A0(Ljava/lang/String;II)Lokio/Buffer;

    return-object p0

    :cond_30
    invoke-virtual {p1, p2, p3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    const-string p2, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"

    invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V

    if-eqz p1, :cond_49

    invoke-virtual {p1, p4}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B

    move-result-object p1

    const-string p2, "(this as java.lang.String).getBytes(charset)"

    invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->b(Ljava/lang/Object;Ljava/lang/String;)V

    array-length p2, p1

    invoke-virtual {p0, p1, v1, p2}, Lokio/Buffer;->Y([BII)Lokio/Buffer;

    return-object p0

    :cond_49
    new-instance p1, Lkotlin/TypeCastException;

    const-string p2, "null cannot be cast to non-null type java.lang.String"

    invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_51
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string p4, "endIndex > string.length: "

    invoke-virtual {p2, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, " > "

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result 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

    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_78
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p4, "endIndex < beginIndex: "

    invoke-virtual {p1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, " < "

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)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_9b
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p3, "beginIndex < 0: "

    invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)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 o1(Lokio/Buffer;J)J
    .registers 9

    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

    cmp-long v2, p2, v0

    if-ltz v2, :cond_d

    const/4 v2, 0x1

    goto :goto_e

    :cond_d
    const/4 v2, 0x0

    :goto_e
    if-eqz v2, :cond_2c

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v2

    cmp-long v4, v2, v0

    if-nez v4, :cond_1b

    const-wide/16 p1, -0x1

    goto :goto_2b

    :cond_1b
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    cmp-long v2, p2, v0

    if-lez v2, :cond_27

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide p2

    :cond_27
    invoke-virtual {p1, p0, p2, p3}, Lokio/Buffer;->D0(Lokio/Buffer;J)V

    move-wide p1, p2

    :goto_2b
    return-wide p1

    :cond_2c
    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 bridge synthetic q()Lokio/BufferedSink;
    .registers 1

    invoke-virtual {p0}, Lokio/Buffer;->j()Lokio/Buffer;

    return-object p0
.end method

.method public bridge synthetic q0(Ljava/lang/String;)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->t0(Ljava/lang/String;)Lokio/Buffer;

    return-object p0
.end method

.method public q1()J
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->E()J

    move-result-wide v0

    invoke-static {v0, v1}, Lokio/-Util;->d(J)J

    move-result-wide v0

    return-wide v0
.end method

.method public r1(Lokio/Sink;)J
    .registers 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "sink"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-lez v4, :cond_12

    invoke-interface {p1, p0, v0, v1}, Lokio/Sink;->D0(Lokio/Buffer;J)V

    :cond_12
    return-wide v0
.end method

.method public read(Ljava/nio/ByteBuffer;)I
    .registers 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    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/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_38

    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v1

    iget v2, v0, Lokio/Segment;->c:I

    iget v3, v0, Lokio/Segment;->b:I

    sub-int/2addr v2, v3

    invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I

    move-result v1

    iget-object v2, v0, Lokio/Segment;->a:[B

    iget v3, v0, Lokio/Segment;->b:I

    invoke-virtual {p1, v2, v3, v1}, Ljava/nio/ByteBuffer;->put([BII)Ljava/nio/ByteBuffer;

    iget p1, v0, Lokio/Segment;->b:I

    add-int/2addr p1, v1

    iput p1, v0, Lokio/Segment;->b:I

    iget-wide v2, p0, Lokio/Buffer;->g:J

    int-to-long v4, v1

    sub-long/2addr v2, v4

    iput-wide v2, p0, Lokio/Buffer;->g:J

    iget v2, v0, Lokio/Segment;->c:I

    if-ne p1, v2, :cond_37

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object p1

    iput-object p1, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object p1, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {p1, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    :cond_37
    return v1

    :cond_38
    const/4 p1, -0x1

    return p1
.end method

.method public readByte()B
    .registers 10
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-eqz v4, :cond_38

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_33

    iget v1, v0, Lokio/Segment;->b:I

    iget v2, v0, Lokio/Segment;->c:I

    iget-object v3, v0, Lokio/Segment;->a:[B

    add-int/lit8 v4, v1, 0x1

    aget-byte v1, v3, v1

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v5

    const-wide/16 v7, 0x1

    sub-long/2addr v5, v7

    invoke-virtual {p0, v5, v6}, Lokio/Buffer;->J(J)V

    if-ne v4, v2, :cond_30

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v2

    iput-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v2, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v2, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_32

    :cond_30
    iput v4, v0, Lokio/Segment;->b:I

    :goto_32
    return v1

    :cond_33
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_38
    new-instance v0, Ljava/io/EOFException;

    invoke-direct {v0}, Ljava/io/EOFException;-><init>()V

    throw v0
.end method

.method public readInt()I
    .registers 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x4

    cmp-long v4, v0, v2

    if-ltz v4, :cond_7d

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_78

    iget v1, v0, Lokio/Segment;->b:I

    iget v4, v0, Lokio/Segment;->c:I

    sub-int v5, v4, v1

    int-to-long v5, v5

    cmp-long v7, v5, v2

    if-gez v7, :cond_3b

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v0

    and-int/lit16 v0, v0, 0xff

    shl-int/lit8 v0, v0, 0x18

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x10

    or-int/2addr v0, v1

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x8

    or-int/2addr v0, v1

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    or-int/2addr v0, v1

    goto :goto_77

    :cond_3b
    iget-object v5, v0, Lokio/Segment;->a:[B

    add-int/lit8 v6, v1, 0x1

    aget-byte v1, v5, v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x18

    add-int/lit8 v7, v6, 0x1

    aget-byte v6, v5, v6

    and-int/lit16 v6, v6, 0xff

    shl-int/lit8 v6, v6, 0x10

    or-int/2addr v1, v6

    add-int/lit8 v6, v7, 0x1

    aget-byte v7, v5, v7

    and-int/lit16 v7, v7, 0xff

    shl-int/lit8 v7, v7, 0x8

    or-int/2addr v1, v7

    add-int/lit8 v7, v6, 0x1

    aget-byte v5, v5, v6

    and-int/lit16 v5, v5, 0xff

    or-int/2addr v1, v5

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v5

    sub-long/2addr v5, v2

    invoke-virtual {p0, v5, v6}, Lokio/Buffer;->J(J)V

    if-ne v7, v4, :cond_74

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v2

    iput-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v2, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v2, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_76

    :cond_74
    iput v7, v0, Lokio/Segment;->b:I

    :goto_76
    move v0, v1

    :goto_77
    return v0

    :cond_78
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_7d
    new-instance v0, Ljava/io/EOFException;

    invoke-direct {v0}, Ljava/io/EOFException;-><init>()V

    throw v0
.end method

.method public readShort()S
    .registers 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    const-wide/16 v2, 0x2

    cmp-long v4, v0, v2

    if-ltz v4, :cond_58

    iget-object v0, p0, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v0, :cond_53

    iget v1, v0, Lokio/Segment;->b:I

    iget v4, v0, Lokio/Segment;->c:I

    sub-int v5, v4, v1

    const/4 v6, 0x2

    if-ge v5, v6, :cond_28

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v0

    and-int/lit16 v0, v0, 0xff

    shl-int/lit8 v0, v0, 0x8

    invoke-virtual {p0}, Lokio/Buffer;->readByte()B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    or-int/2addr v0, v1

    int-to-short v0, v0

    goto :goto_52

    :cond_28
    iget-object v5, v0, Lokio/Segment;->a:[B

    add-int/lit8 v6, v1, 0x1

    aget-byte v1, v5, v1

    and-int/lit16 v1, v1, 0xff

    shl-int/lit8 v1, v1, 0x8

    add-int/lit8 v7, v6, 0x1

    aget-byte v5, v5, v6

    and-int/lit16 v5, v5, 0xff

    or-int/2addr v1, v5

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v5

    sub-long/2addr v5, v2

    invoke-virtual {p0, v5, v6}, Lokio/Buffer;->J(J)V

    if-ne v7, v4, :cond_4f

    invoke-virtual {v0}, Lokio/Segment;->b()Lokio/Segment;

    move-result-object v2

    iput-object v2, p0, Lokio/Buffer;->f:Lokio/Segment;

    sget-object v2, Lokio/SegmentPool;->c:Lokio/SegmentPool;

    invoke-virtual {v2, v0}, Lokio/SegmentPool;->a(Lokio/Segment;)V

    goto :goto_51

    :cond_4f
    iput v7, v0, Lokio/Segment;->b:I

    :goto_51
    int-to-short v0, v1

    :goto_52
    return v0

    :cond_53
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    const/4 v0, 0x0

    throw v0

    :cond_58
    new-instance v0, Ljava/io/EOFException;

    invoke-direct {v0}, Ljava/io/EOFException;-><init>()V

    throw v0
.end method

.method public s(BJJ)J
    .registers 22

    move/from16 v0, p1

    move-wide/from16 v1, p2

    move-wide/from16 v3, p4

    const-wide/16 v5, 0x0

    cmp-long v7, v5, v1

    if-lez v7, :cond_d

    goto :goto_13

    :cond_d
    cmp-long v7, v3, v1

    if-ltz v7, :cond_13

    const/4 v7, 0x1

    goto :goto_14

    :cond_13
    :goto_13
    const/4 v7, 0x0

    :goto_14
    if-eqz v7, :cond_de

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    cmp-long v9, v3, v7

    if-lez v9, :cond_22

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v3

    :cond_22
    cmp-long v9, v1, v3

    if-nez v9, :cond_2c

    const-wide/16 v7, -0x1

    move-object/from16 v9, p0

    goto/16 :goto_dd

    :cond_2c
    move-object/from16 v9, p0

    iget-object v10, v9, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v10, :cond_db

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v11

    sub-long/2addr v11, v1

    const/4 v13, 0x0

    cmp-long v14, v11, v1

    if-gez v14, :cond_90

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v5

    :goto_40
    cmp-long v11, v5, v1

    if-lez v11, :cond_54

    iget-object v10, v10, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v10, :cond_50

    iget v11, v10, Lokio/Segment;->c:I

    iget v12, v10, Lokio/Segment;->b:I

    sub-int/2addr v11, v12

    int-to-long v11, v11

    sub-long/2addr v5, v11

    goto :goto_40

    :cond_50
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v13

    :cond_54
    if-eqz v10, :cond_db

    :goto_56
    cmp-long v11, v5, v3

    if-gez v11, :cond_db

    iget-object v11, v10, Lokio/Segment;->a:[B

    iget v12, v10, Lokio/Segment;->c:I

    int-to-long v14, v12

    iget v12, v10, Lokio/Segment;->b:I

    int-to-long v7, v12

    add-long/2addr v7, v3

    sub-long/2addr v7, v5

    invoke-static {v14, v15, v7, v8}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v7

    long-to-int v8, v7

    iget v7, v10, Lokio/Segment;->b:I

    int-to-long v14, v7

    add-long/2addr v14, v1

    sub-long/2addr v14, v5

    long-to-int v1, v14

    :goto_6f
    if-ge v1, v8, :cond_7f

    aget-byte v2, v11, v1

    if-ne v2, v0, :cond_7c

    :goto_75
    iget v0, v10, Lokio/Segment;->b:I

    sub-int/2addr v1, v0

    int-to-long v0, v1

    add-long v7, v0, v5

    goto :goto_dd

    :cond_7c
    add-int/lit8 v1, v1, 0x1

    goto :goto_6f

    :cond_7f
    iget v1, v10, Lokio/Segment;->c:I

    iget v2, v10, Lokio/Segment;->b:I

    sub-int/2addr v1, v2

    int-to-long v1, v1

    add-long/2addr v5, v1

    iget-object v10, v10, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v10, :cond_8c

    move-wide v1, v5

    goto :goto_56

    :cond_8c
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v13

    :cond_90
    :goto_90
    iget v7, v10, Lokio/Segment;->c:I

    iget v8, v10, Lokio/Segment;->b:I

    sub-int/2addr v7, v8

    int-to-long v7, v7

    add-long/2addr v7, v5

    cmp-long v11, v7, v1

    if-lez v11, :cond_d1

    if-eqz v10, :cond_db

    :goto_9d
    cmp-long v7, v5, v3

    if-gez v7, :cond_db

    iget-object v7, v10, Lokio/Segment;->a:[B

    iget v8, v10, Lokio/Segment;->c:I

    int-to-long v11, v8

    iget v8, v10, Lokio/Segment;->b:I

    int-to-long v14, v8

    add-long/2addr v14, v3

    sub-long/2addr v14, v5

    invoke-static {v11, v12, v14, v15}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v11

    long-to-int v8, v11

    iget v11, v10, Lokio/Segment;->b:I

    int-to-long v11, v11

    add-long/2addr v11, v1

    sub-long/2addr v11, v5

    long-to-int v1, v11

    :goto_b6
    if-ge v1, v8, :cond_c0

    aget-byte v2, v7, v1

    if-ne v2, v0, :cond_bd

    goto :goto_75

    :cond_bd
    add-int/lit8 v1, v1, 0x1

    goto :goto_b6

    :cond_c0
    iget v1, v10, Lokio/Segment;->c:I

    iget v2, v10, Lokio/Segment;->b:I

    sub-int/2addr v1, v2

    int-to-long v1, v1

    add-long/2addr v5, v1

    iget-object v10, v10, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v10, :cond_cd

    move-wide v1, v5

    goto :goto_9d

    :cond_cd
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v13

    :cond_d1
    iget-object v10, v10, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v10, :cond_d7

    move-wide v5, v7

    goto :goto_90

    :cond_d7
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v13

    :cond_db
    const-wide/16 v7, -0x1

    :goto_dd
    return-wide v7

    :cond_de
    move-object/from16 v9, p0

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "size="

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v5

    invoke-virtual {v0, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v5, " fromIndex="

    invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v1, " toIndex="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/IllegalArgumentException;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1
.end method

.method public final size()J
    .registers 3

    iget-wide v0, p0, Lokio/Buffer;->g:J

    return-wide v0
.end method

.method public t(Lokio/ByteString;J)J
    .registers 22
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    move-wide/from16 v0, p2

    const-string v2, "bytes"

    move-object/from16 v3, p1

    invoke-static {v3, v2}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual/range {p1 .. p1}, Lokio/ByteString;->Q()I

    move-result v2

    const/4 v4, 0x0

    if-lez v2, :cond_12

    const/4 v2, 0x1

    goto :goto_13

    :cond_12
    const/4 v2, 0x0

    :goto_13
    if-eqz v2, :cond_13a

    const-wide/16 v6, 0x0

    cmp-long v2, v0, v6

    if-ltz v2, :cond_1d

    const/4 v2, 0x1

    goto :goto_1e

    :cond_1d
    const/4 v2, 0x0

    :goto_1e
    if-eqz v2, :cond_11d

    move-object/from16 v2, p0

    iget-object v8, v2, Lokio/Buffer;->f:Lokio/Segment;

    if-eqz v8, :cond_11a

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v11

    sub-long/2addr v11, v0

    const-wide/16 v13, 0x1

    const/4 v15, 0x0

    cmp-long v16, v11, v0

    if-gez v16, :cond_a8

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v6

    :goto_36
    cmp-long v11, v6, v0

    if-lez v11, :cond_4a

    iget-object v8, v8, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v8, :cond_46

    iget v11, v8, Lokio/Segment;->c:I

    iget v12, v8, Lokio/Segment;->b:I

    sub-int/2addr v11, v12

    int-to-long v11, v11

    sub-long/2addr v6, v11

    goto :goto_36

    :cond_46
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v15

    :cond_4a
    if-eqz v8, :cond_11a

    invoke-virtual/range {p1 .. p1}, Lokio/ByteString;->v()[B

    move-result-object v11

    aget-byte v4, v11, v4

    invoke-virtual/range {p1 .. p1}, Lokio/ByteString;->Q()I

    move-result v3

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v16

    int-to-long v9, v3

    sub-long v16, v16, v9

    add-long v16, v16, v13

    :goto_5f
    cmp-long v9, v6, v16

    if-gez v9, :cond_11a

    iget-object v9, v8, Lokio/Segment;->a:[B

    iget v10, v8, Lokio/Segment;->c:I

    iget v12, v8, Lokio/Segment;->b:I

    int-to-long v12, v12

    add-long v12, v12, v16

    sub-long/2addr v12, v6

    move-wide/from16 p1, v6

    int-to-long v5, v10

    invoke-static {v5, v6, v12, v13}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v5

    long-to-int v6, v5

    iget v5, v8, Lokio/Segment;->b:I

    int-to-long v12, v5

    add-long/2addr v12, v0

    sub-long v12, v12, p1

    long-to-int v0, v12

    :goto_7c
    if-ge v0, v6, :cond_96

    aget-byte v1, v9, v0

    if-ne v1, v4, :cond_93

    add-int/lit8 v1, v0, 0x1

    const/4 v5, 0x1

    invoke-static {v8, v1, v11, v5, v3}, Lokio/internal/BufferKt;->b(Lokio/Segment;I[BII)Z

    move-result v1

    if-eqz v1, :cond_93

    iget v1, v8, Lokio/Segment;->b:I

    sub-int/2addr v0, v1

    int-to-long v0, v0

    add-long v9, v0, p1

    goto/16 :goto_11c

    :cond_93
    add-int/lit8 v0, v0, 0x1

    goto :goto_7c

    :cond_96
    iget v0, v8, Lokio/Segment;->c:I

    iget v1, v8, Lokio/Segment;->b:I

    sub-int/2addr v0, v1

    int-to-long v0, v0

    add-long v6, p1, v0

    iget-object v8, v8, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v8, :cond_a4

    move-wide v0, v6

    goto :goto_5f

    :cond_a4
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v15

    :cond_a8
    :goto_a8
    iget v5, v8, Lokio/Segment;->c:I

    iget v9, v8, Lokio/Segment;->b:I

    sub-int/2addr v5, v9

    int-to-long v9, v5

    add-long/2addr v9, v6

    cmp-long v5, v9, v0

    if-lez v5, :cond_10f

    if-eqz v8, :cond_11a

    invoke-virtual/range {p1 .. p1}, Lokio/ByteString;->v()[B

    move-result-object v5

    aget-byte v4, v5, v4

    invoke-virtual/range {p1 .. p1}, Lokio/ByteString;->Q()I

    move-result v3

    invoke-virtual/range {p0 .. p0}, Lokio/Buffer;->size()J

    move-result-wide v9

    int-to-long v11, v3

    sub-long/2addr v9, v11

    add-long/2addr v9, v13

    :goto_c6
    cmp-long v11, v6, v9

    if-gez v11, :cond_11a

    iget-object v11, v8, Lokio/Segment;->a:[B

    iget v12, v8, Lokio/Segment;->c:I

    iget v13, v8, Lokio/Segment;->b:I

    int-to-long v13, v13

    add-long/2addr v13, v9

    sub-long/2addr v13, v6

    move-wide/from16 v16, v9

    int-to-long v9, v12

    invoke-static {v9, v10, v13, v14}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v9

    long-to-int v10, v9

    iget v9, v8, Lokio/Segment;->b:I

    int-to-long v12, v9

    add-long/2addr v12, v0

    sub-long/2addr v12, v6

    long-to-int v0, v12

    :goto_e1
    if-ge v0, v10, :cond_fb

    aget-byte v1, v11, v0

    if-ne v1, v4, :cond_f7

    add-int/lit8 v1, v0, 0x1

    const/4 v12, 0x1

    invoke-static {v8, v1, v5, v12, v3}, Lokio/internal/BufferKt;->b(Lokio/Segment;I[BII)Z

    move-result v1

    if-eqz v1, :cond_f8

    iget v1, v8, Lokio/Segment;->b:I

    sub-int/2addr v0, v1

    int-to-long v0, v0

    add-long v9, v0, v6

    goto :goto_11c

    :cond_f7
    const/4 v12, 0x1

    :cond_f8
    add-int/lit8 v0, v0, 0x1

    goto :goto_e1

    :cond_fb
    const/4 v12, 0x1

    iget v0, v8, Lokio/Segment;->c:I

    iget v1, v8, Lokio/Segment;->b:I

    sub-int/2addr v0, v1

    int-to-long v0, v0

    add-long/2addr v6, v0

    iget-object v8, v8, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v8, :cond_10b

    move-wide v0, v6

    move-wide/from16 v9, v16

    goto :goto_c6

    :cond_10b
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v15

    :cond_10f
    const/4 v12, 0x1

    iget-object v8, v8, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v8, :cond_116

    move-wide v6, v9

    goto :goto_a8

    :cond_116
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v15

    :cond_11a
    const-wide/16 v9, -0x1

    :goto_11c
    return-wide v9

    :cond_11d
    move-object/from16 v2, p0

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "fromIndex < 0: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/IllegalArgumentException;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_13a
    move-object/from16 v2, p0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "bytes is empty"

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public t0(Ljava/lang/String;)Lokio/Buffer;
    .registers 4

    const-string v0, "string"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    const/4 v1, 0x0

    invoke-virtual {p0, p1, v1, v0}, Lokio/Buffer;->A0(Ljava/lang/String;II)Lokio/Buffer;

    return-object p0
.end method

.method public timeout()Lokio/Timeout;
    .registers 2

    sget-object v0, Lokio/Timeout;->d:Lokio/Timeout;

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .registers 2

    invoke-virtual {p0}, Lokio/Buffer;->P()Lokio/ByteString;

    move-result-object v0

    invoke-virtual {v0}, Lokio/ByteString;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public u(Lokio/ByteString;J)J
    .registers 16

    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

    const/4 v2, 0x0

    const/4 v3, 0x1

    cmp-long v4, p2, v0

    if-ltz v4, :cond_f

    const/4 v4, 0x1

    goto :goto_10

    :cond_f
    const/4 v4, 0x0

    :goto_10
    if-eqz v4, :cond_150

    iget-object v4, p0, Lokio/Buffer;->f:Lokio/Segment;

    const-wide/16 v5, -0x1

    if-eqz v4, :cond_14f

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    sub-long/2addr v7, p2

    const/4 v9, 0x2

    const/4 v10, 0x0

    cmp-long v11, v7, p2

    if-gez v11, :cond_be

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v0

    :goto_27
    cmp-long v7, v0, p2

    if-lez v7, :cond_3b

    iget-object v4, v4, Lokio/Segment;->g:Lokio/Segment;

    if-eqz v4, :cond_37

    iget v7, v4, Lokio/Segment;->c:I

    iget v8, v4, Lokio/Segment;->b:I

    sub-int/2addr v7, v8

    int-to-long v7, v7

    sub-long/2addr v0, v7

    goto :goto_27

    :cond_37
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_3b
    if-eqz v4, :cond_14f

    invoke-virtual {p1}, Lokio/ByteString;->Q()I

    move-result v7

    if-ne v7, v9, :cond_82

    invoke-virtual {p1, v2}, Lokio/ByteString;->o(I)B

    move-result v2

    invoke-virtual {p1, v3}, Lokio/ByteString;->o(I)B

    move-result p1

    :goto_4b
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    cmp-long v3, v0, v7

    if-gez v3, :cond_14f

    iget-object v3, v4, Lokio/Segment;->a:[B

    iget v7, v4, Lokio/Segment;->b:I

    int-to-long v7, v7

    add-long/2addr v7, p2

    sub-long/2addr v7, v0

    long-to-int p2, v7

    iget p3, v4, Lokio/Segment;->c:I

    :goto_5d
    if-ge p2, p3, :cond_71

    aget-byte v7, v3, p2

    if-eq v7, v2, :cond_69

    if-ne v7, p1, :cond_66

    goto :goto_69

    :cond_66
    add-int/lit8 p2, p2, 0x1

    goto :goto_5d

    :cond_69
    :goto_69
    iget p1, v4, Lokio/Segment;->b:I

    :goto_6b
    sub-int/2addr p2, p1

    int-to-long p1, p2

    add-long v5, p1, v0

    goto/16 :goto_14f

    :cond_71
    iget p2, v4, Lokio/Segment;->c:I

    iget p3, v4, Lokio/Segment;->b:I

    sub-int/2addr p2, p3

    int-to-long p2, p2

    add-long/2addr v0, p2

    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v4, :cond_7e

    move-wide p2, v0

    goto :goto_4b

    :cond_7e
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_82
    invoke-virtual {p1}, Lokio/ByteString;->v()[B

    move-result-object p1

    :goto_86
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    cmp-long v3, v0, v7

    if-gez v3, :cond_14f

    iget-object v3, v4, Lokio/Segment;->a:[B

    iget v7, v4, Lokio/Segment;->b:I

    int-to-long v7, v7

    add-long/2addr v7, p2

    sub-long/2addr v7, v0

    long-to-int p2, v7

    iget p3, v4, Lokio/Segment;->c:I

    :goto_98
    if-ge p2, p3, :cond_ad

    aget-byte v7, v3, p2

    array-length v8, p1

    const/4 v9, 0x0

    :goto_9e
    if-ge v9, v8, :cond_aa

    aget-byte v11, p1, v9

    if-ne v7, v11, :cond_a7

    :goto_a4
    iget p1, v4, Lokio/Segment;->b:I

    goto :goto_6b

    :cond_a7
    add-int/lit8 v9, v9, 0x1

    goto :goto_9e

    :cond_aa
    add-int/lit8 p2, p2, 0x1

    goto :goto_98

    :cond_ad
    iget p2, v4, Lokio/Segment;->c:I

    iget p3, v4, Lokio/Segment;->b:I

    sub-int/2addr p2, p3

    int-to-long p2, p2

    add-long/2addr v0, p2

    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v4, :cond_ba

    move-wide p2, v0

    goto :goto_86

    :cond_ba
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_be
    :goto_be
    iget v7, v4, Lokio/Segment;->c:I

    iget v8, v4, Lokio/Segment;->b:I

    sub-int/2addr v7, v8

    int-to-long v7, v7

    add-long/2addr v7, v0

    cmp-long v11, v7, p2

    if-lez v11, :cond_144

    if-eqz v4, :cond_14f

    invoke-virtual {p1}, Lokio/ByteString;->Q()I

    move-result v7

    if-ne v7, v9, :cond_109

    invoke-virtual {p1, v2}, Lokio/ByteString;->o(I)B

    move-result v2

    invoke-virtual {p1, v3}, Lokio/ByteString;->o(I)B

    move-result p1

    :goto_d9
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    cmp-long v3, v0, v7

    if-gez v3, :cond_14f

    iget-object v3, v4, Lokio/Segment;->a:[B

    iget v7, v4, Lokio/Segment;->b:I

    int-to-long v7, v7

    add-long/2addr v7, p2

    sub-long/2addr v7, v0

    long-to-int p2, v7

    iget p3, v4, Lokio/Segment;->c:I

    :goto_eb
    if-ge p2, p3, :cond_f8

    aget-byte v7, v3, p2

    if-eq v7, v2, :cond_69

    if-ne v7, p1, :cond_f5

    goto/16 :goto_69

    :cond_f5
    add-int/lit8 p2, p2, 0x1

    goto :goto_eb

    :cond_f8
    iget p2, v4, Lokio/Segment;->c:I

    iget p3, v4, Lokio/Segment;->b:I

    sub-int/2addr p2, p3

    int-to-long p2, p2

    add-long/2addr v0, p2

    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v4, :cond_105

    move-wide p2, v0

    goto :goto_d9

    :cond_105
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_109
    invoke-virtual {p1}, Lokio/ByteString;->v()[B

    move-result-object p1

    :goto_10d
    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v7

    cmp-long v3, v0, v7

    if-gez v3, :cond_14f

    iget-object v3, v4, Lokio/Segment;->a:[B

    iget v7, v4, Lokio/Segment;->b:I

    int-to-long v7, v7

    add-long/2addr v7, p2

    sub-long/2addr v7, v0

    long-to-int p2, v7

    iget p3, v4, Lokio/Segment;->c:I

    :goto_11f
    if-ge p2, p3, :cond_133

    aget-byte v7, v3, p2

    array-length v8, p1

    const/4 v9, 0x0

    :goto_125
    if-ge v9, v8, :cond_130

    aget-byte v11, p1, v9

    if-ne v7, v11, :cond_12d

    goto/16 :goto_a4

    :cond_12d
    add-int/lit8 v9, v9, 0x1

    goto :goto_125

    :cond_130
    add-int/lit8 p2, p2, 0x1

    goto :goto_11f

    :cond_133
    iget p2, v4, Lokio/Segment;->c:I

    iget p3, v4, Lokio/Segment;->b:I

    sub-int/2addr p2, p3

    int-to-long p2, p2

    add-long/2addr v0, p2

    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v4, :cond_140

    move-wide p2, v0

    goto :goto_10d

    :cond_140
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_144
    iget-object v4, v4, Lokio/Segment;->f:Lokio/Segment;

    if-eqz v4, :cond_14b

    move-wide v0, v7

    goto/16 :goto_be

    :cond_14b
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->h()V

    throw v10

    :cond_14f
    :goto_14f
    return-wide v5

    :cond_150
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "fromIndex < 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 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/Buffer;->x(JLokio/ByteString;II)Z

    move-result p1

    return p1
.end method

.method public bridge synthetic w(I)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->m0(I)Lokio/Buffer;

    return-object p0
.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-wide v0, p0, Lokio/Buffer;->g:J

    invoke-virtual {p0, v0, v1, p1}, Lokio/Buffer;->I(JLjava/nio/charset/Charset;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method public write(Ljava/nio/ByteBuffer;)I
    .registers 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const-string v0, "source"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v0

    move v1, v0

    :goto_a
    if-lez v1, :cond_27

    const/4 v2, 0x1

    invoke-virtual {p0, v2}, Lokio/Buffer;->S(I)Lokio/Segment;

    move-result-object v2

    iget v3, v2, Lokio/Segment;->c:I

    rsub-int v3, v3, 0x2000

    invoke-static {v1, v3}, Ljava/lang/Math;->min(II)I

    move-result v3

    iget-object v4, v2, Lokio/Segment;->a:[B

    iget v5, v2, Lokio/Segment;->c:I

    invoke-virtual {p1, v4, v5, v3}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;

    sub-int/2addr v1, v3

    iget v4, v2, Lokio/Segment;->c:I

    add-int/2addr v4, v3

    iput v4, v2, Lokio/Segment;->c:I

    goto :goto_a

    :cond_27
    iget-wide v1, p0, Lokio/Buffer;->g:J

    int-to-long v3, v0

    add-long/2addr v1, v3

    iput-wide v1, p0, Lokio/Buffer;->g:J

    return v0
.end method

.method public x(JLokio/ByteString;II)Z
    .registers 12

    const-string v0, "bytes"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->c(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v0, 0x0

    const-wide/16 v1, 0x0

    cmp-long v3, p1, v1

    if-ltz v3, :cond_38

    if-ltz p4, :cond_38

    if-ltz p5, :cond_38

    invoke-virtual {p0}, Lokio/Buffer;->size()J

    move-result-wide v1

    sub-long/2addr v1, p1

    int-to-long v3, p5

    cmp-long v5, v1, v3

    if-ltz v5, :cond_38

    invoke-virtual {p3}, Lokio/ByteString;->Q()I

    move-result v1

    sub-int/2addr v1, p4

    if-ge v1, p5, :cond_22

    goto :goto_38

    :cond_22
    const/4 v1, 0x0

    :goto_23
    if-ge v1, p5, :cond_37

    int-to-long v2, v1

    add-long/2addr v2, p1

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->o(J)B

    move-result v2

    add-int v3, p4, v1

    invoke-virtual {p3, v3}, Lokio/ByteString;->o(I)B

    move-result v3

    if-eq v2, v3, :cond_34

    goto :goto_38

    :cond_34
    add-int/lit8 v1, v1, 0x1

    goto :goto_23

    :cond_37
    const/4 v0, 0x1

    :cond_38
    :goto_38
    return v0
.end method

.method public y1(J)V
    .registers 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/EOFException;
        }
    .end annotation

    iget-wide v0, p0, Lokio/Buffer;->g:J

    cmp-long v2, v0, p1

    if-ltz v2, :cond_7

    return-void

    :cond_7
    new-instance p1, Ljava/io/EOFException;

    invoke-direct {p1}, Ljava/io/EOFException;-><init>()V

    throw p1
.end method

.method public bridge synthetic z(I)Lokio/BufferedSink;
    .registers 2

    invoke-virtual {p0, p1}, Lokio/Buffer;->i0(I)Lokio/Buffer;

    return-object p0
.end method

.method public bridge synthetic z1(J)Lokio/BufferedSink;
    .registers 3

    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->d0(J)Lokio/Buffer;

    return-object p0
.end method