BufferKt.smali

.class public final Lokio/internal/BufferKt;
.super Ljava/lang/Object;


# static fields
.field private static final a:[B


# direct methods
.method static constructor <clinit>()V
    .registers 1

    const-string v0, "0123456789abcdef"

    invoke-static {v0}, Lokio/-Platform;->a(Ljava/lang/String;)[B

    move-result-object v0

    sput-object v0, Lokio/internal/BufferKt;->a:[B

    return-void
.end method

.method public static final a()[B
    .registers 1

    sget-object v0, Lokio/internal/BufferKt;->a:[B

    return-object v0
.end method

.method public static final b(Lokio/Segment;I[BII)Z
    .registers 10

    const-string v0, "segment"

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

    const-string v0, "bytes"

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

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

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

    :goto_e
    if-ge p3, p4, :cond_33

    if-ne p1, v0, :cond_26

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

    if-eqz p0, :cond_21

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

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

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

    move v4, v1

    move-object v1, p1

    move p1, v0

    move v0, v4

    goto :goto_26

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

    const/4 p0, 0x0

    throw p0

    :cond_26
    :goto_26
    aget-byte v2, v1, p1

    aget-byte v3, p2, p3

    if-eq v2, v3, :cond_2e

    const/4 p0, 0x0

    return p0

    :cond_2e
    add-int/lit8 p1, p1, 0x1

    add-int/lit8 p3, p3, 0x1

    goto :goto_e

    :cond_33
    const/4 p0, 0x1

    return p0
.end method

.method public static final c(Lokio/Buffer;J)Ljava/lang/String;
    .registers 9

    const-string v0, "$this$readUtf8Line"

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

    const-wide/16 v0, 0x1

    const-wide/16 v2, 0x0

    cmp-long v4, p1, v2

    if-lez v4, :cond_22

    sub-long v2, p1, v0

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

    move-result v4

    const/16 v5, 0xd

    int-to-byte v5, v5

    if-ne v4, v5, :cond_22

    invoke-virtual {p0, v2, v3}, Lokio/Buffer;->i(J)Ljava/lang/String;

    move-result-object p1

    const-wide/16 v0, 0x2

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

    goto :goto_29

    :cond_22
    invoke-virtual {p0, p1, p2}, Lokio/Buffer;->i(J)Ljava/lang/String;

    move-result-object p1

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

    :goto_29
    return-object p1
.end method

.method public static final d(Lokio/Buffer;Lokio/Options;Z)I
    .registers 20

    move-object/from16 v0, p0

    const-string v1, "$this$selectPrefix"

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

    const-string v1, "options"

    move-object/from16 v2, p1

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

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

    const/4 v1, -0x2

    const/4 v3, -0x1

    if-eqz v0, :cond_b6

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

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

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

    invoke-virtual/range {p1 .. p1}, Lokio/Options;->m()[I

    move-result-object v2

    const/4 v7, 0x0

    move-object v9, v0

    const/4 v8, 0x0

    const/4 v10, -0x1

    :goto_22
    add-int/lit8 v11, v8, 0x1

    aget v8, v2, v8

    add-int/lit8 v12, v11, 0x1

    aget v11, v2, v11

    if-eq v11, v3, :cond_2d

    move v10, v11

    :cond_2d
    if-nez v9, :cond_30

    goto :goto_5b

    :cond_30
    const/4 v11, 0x0

    if-gez v8, :cond_83

    mul-int/lit8 v8, v8, -0x1

    add-int v13, v12, v8

    :goto_37
    add-int/lit8 v8, v5, 0x1

    aget-byte v5, v4, v5

    and-int/lit16 v5, v5, 0xff

    add-int/lit8 v14, v12, 0x1

    aget v12, v2, v12

    if-eq v5, v12, :cond_44

    return v10

    :cond_44
    if-ne v14, v13, :cond_48

    const/4 v5, 0x1

    goto :goto_49

    :cond_48
    const/4 v5, 0x0

    :goto_49
    if-ne v8, v6, :cond_70

    if-eqz v9, :cond_6c

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

    if-eqz v4, :cond_68

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

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

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

    if-ne v4, v0, :cond_62

    if-nez v5, :cond_5f

    :goto_5b
    if-eqz p2, :cond_5e

    return v1

    :cond_5e
    return v10

    :cond_5f
    move-object v4, v8

    move-object v8, v11

    goto :goto_76

    :cond_62
    move-object/from16 v16, v8

    move-object v8, v4

    move-object/from16 v4, v16

    goto :goto_76

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

    throw v11

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

    throw v11

    :cond_70
    move-object/from16 v16, v9

    move v9, v6

    move v6, v8

    move-object/from16 v8, v16

    :goto_76
    if-eqz v5, :cond_7e

    aget v5, v2, v14

    move v13, v6

    move v6, v9

    move-object v9, v8

    goto :goto_ac

    :cond_7e
    move v5, v6

    move v6, v9

    move v12, v14

    move-object v9, v8

    goto :goto_37

    :cond_83
    add-int/lit8 v13, v5, 0x1

    aget-byte v5, v4, v5

    and-int/lit16 v5, v5, 0xff

    add-int v14, v12, v8

    :goto_8b
    if-ne v12, v14, :cond_8e

    return v10

    :cond_8e
    aget v15, v2, v12

    if-ne v5, v15, :cond_b3

    add-int/2addr v12, v8

    aget v5, v2, v12

    if-ne v13, v6, :cond_ac

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

    if-eqz v9, :cond_a8

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

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

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

    move v13, v4

    move-object v4, v6

    move v6, v8

    if-ne v9, v0, :cond_ac

    move-object v9, v11

    goto :goto_ac

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

    throw v11

    :cond_ac
    :goto_ac
    if-ltz v5, :cond_af

    return v5

    :cond_af
    neg-int v8, v5

    move v5, v13

    goto/16 :goto_22

    :cond_b3
    add-int/lit8 v12, v12, 0x1

    goto :goto_8b

    :cond_b6
    if-eqz p2, :cond_b9

    goto :goto_ba

    :cond_b9
    const/4 v1, -0x1

    :goto_ba
    return v1
.end method

.method public static synthetic e(Lokio/Buffer;Lokio/Options;ZILjava/lang/Object;)I
    .registers 5

    and-int/lit8 p3, p3, 0x2

    if-eqz p3, :cond_5

    const/4 p2, 0x0

    :cond_5
    invoke-static {p0, p1, p2}, Lokio/internal/BufferKt;->d(Lokio/Buffer;Lokio/Options;Z)I

    move-result p0

    return p0
.end method