.class public final Lz5/vt1;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lz5/au1;


# instance fields
.field public final r:[B

.field public final s:Lz5/q3;

.field public final t:J

.field public u:J

.field public v:[B

.field public w:I

.field public x:I


# direct methods
.method public constructor <init>(Lz5/q3;JJ)V
    .registers 6

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

    iput-object p1, p0, Lz5/vt1;->s:Lz5/q3;

    iput-wide p2, p0, Lz5/vt1;->u:J

    iput-wide p4, p0, Lz5/vt1;->t:J

    const/high16 p1, 0x10000

    new-array p1, p1, [B

    iput-object p1, p0, Lz5/vt1;->v:[B

    const/16 p1, 0x1000

    new-array p1, p1, [B

    iput-object p1, p0, Lz5/vt1;->r:[B

    return-void
.end method


# virtual methods
.method public final a([BII)I
    .registers 12

    .line 1
    iget v0, p0, Lz5/vt1;->x:I

    const/4 v1, 0x0

    if-nez v0, :cond_6

    goto :goto_13

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

    move-result v0

    iget-object v2, p0, Lz5/vt1;->v:[B

    invoke-static {v2, v1, p1, p2, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    invoke-virtual {p0, v0}, Lz5/vt1;->n(I)V

    move v1, v0

    :goto_13
    if-nez v1, :cond_1f

    const/4 v6, 0x0

    const/4 v7, 0x1

    move-object v2, p0

    move-object v3, p1

    move v4, p2

    move v5, p3

    .line 2
    invoke-virtual/range {v2 .. v7}, Lz5/vt1;->o([BIIIZ)I

    move-result v1

    :cond_1f
    invoke-virtual {p0, v1}, Lz5/vt1;->p(I)V

    return v1
.end method

.method public final b(I)V
    .registers 3

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lz5/vt1;->c(IZ)Z

    return-void
.end method

.method public final c(IZ)Z
    .registers 9

    .line 1
    iget p2, p0, Lz5/vt1;->x:I

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

    move-result p2

    invoke-virtual {p0, p2}, Lz5/vt1;->n(I)V

    move v4, p2

    :goto_a
    const/4 p2, -0x1

    if-ge v4, p1, :cond_1f

    if-eq v4, p2, :cond_1f

    add-int/lit16 p2, v4, 0x1000

    .line 2
    invoke-static {p1, p2}, Ljava/lang/Math;->min(II)I

    move-result v3

    iget-object v1, p0, Lz5/vt1;->r:[B

    neg-int v2, v4

    const/4 v5, 0x0

    move-object v0, p0

    invoke-virtual/range {v0 .. v5}, Lz5/vt1;->o([BIIIZ)I

    move-result v4

    goto :goto_a

    :cond_1f
    invoke-virtual {p0, v4}, Lz5/vt1;->p(I)V

    if-eq v4, p2, :cond_26

    const/4 p1, 0x1

    return p1

    :cond_26
    const/4 p1, 0x0

    return p1
.end method

.method public final d([BII)V
    .registers 5

    const/4 v0, 0x0

    invoke-virtual {p0, p1, p2, p3, v0}, Lz5/vt1;->j([BIIZ)Z

    return-void
.end method

.method public final e(I)I
    .registers 9

    .line 1
    iget p1, p0, Lz5/vt1;->x:I

    const/4 v0, 0x1

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

    move-result p1

    invoke-virtual {p0, p1}, Lz5/vt1;->n(I)V

    if-nez p1, :cond_1c

    .line 2
    iget-object v2, p0, Lz5/vt1;->r:[B

    const/4 v3, 0x0

    const/16 p1, 0x1000

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

    move-result v4

    const/4 v5, 0x0

    const/4 v6, 0x1

    move-object v1, p0

    invoke-virtual/range {v1 .. v6}, Lz5/vt1;->o([BIIIZ)I

    move-result p1

    :cond_1c
    invoke-virtual {p0, p1}, Lz5/vt1;->p(I)V

    return p1
.end method

.method public final f([BII)V
    .registers 5

    const/4 v0, 0x0

    invoke-virtual {p0, p1, p2, p3, v0}, Lz5/vt1;->k([BIIZ)Z

    return-void
.end method

.method public final i(IZ)Z
    .registers 10

    invoke-virtual {p0, p1}, Lz5/vt1;->m(I)V

    iget v0, p0, Lz5/vt1;->x:I

    iget v1, p0, Lz5/vt1;->w:I

    sub-int/2addr v0, v1

    move v5, v0

    :goto_9
    if-ge v5, p1, :cond_21

    iget-object v2, p0, Lz5/vt1;->v:[B

    iget v3, p0, Lz5/vt1;->w:I

    move-object v1, p0

    move v4, p1

    move v6, p2

    invoke-virtual/range {v1 .. v6}, Lz5/vt1;->o([BIIIZ)I

    move-result v5

    const/4 v0, -0x1

    if-ne v5, v0, :cond_1b

    const/4 p1, 0x0

    return p1

    :cond_1b
    iget v0, p0, Lz5/vt1;->w:I

    add-int/2addr v0, v5

    iput v0, p0, Lz5/vt1;->x:I

    goto :goto_9

    :cond_21
    iget p2, p0, Lz5/vt1;->w:I

    add-int/2addr p2, p1

    iput p2, p0, Lz5/vt1;->w:I

    const/4 p1, 0x1

    return p1
.end method

.method public final j([BIIZ)Z
    .registers 13

    .line 1
    iget v0, p0, Lz5/vt1;->x:I

    const/4 v1, 0x0

    if-nez v0, :cond_7

    move v0, v1

    goto :goto_13

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

    move-result v0

    iget-object v2, p0, Lz5/vt1;->v:[B

    invoke-static {v2, v1, p1, p2, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    invoke-virtual {p0, v0}, Lz5/vt1;->n(I)V

    :goto_13
    move v6, v0

    :goto_14
    const/4 v0, -0x1

    if-ge v6, p3, :cond_23

    if-eq v6, v0, :cond_23

    move-object v2, p0

    move-object v3, p1

    move v4, p2

    move v5, p3

    move v7, p4

    .line 2
    invoke-virtual/range {v2 .. v7}, Lz5/vt1;->o([BIIIZ)I

    move-result v6

    goto :goto_14

    :cond_23
    invoke-virtual {p0, v6}, Lz5/vt1;->p(I)V

    if-eq v6, v0, :cond_2a

    const/4 p1, 0x1

    return p1

    :cond_2a
    return v1
.end method

.method public final k([BIIZ)Z
    .registers 6

    invoke-virtual {p0, p3, p4}, Lz5/vt1;->i(IZ)Z

    move-result p4

    if-nez p4, :cond_8

    const/4 p1, 0x0

    return p1

    :cond_8
    iget-object p4, p0, Lz5/vt1;->v:[B

    iget v0, p0, Lz5/vt1;->w:I

    sub-int/2addr v0, p3

    invoke-static {p4, v0, p1, p2, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    const/4 p1, 0x1

    return p1
.end method

.method public final l([BII)I
    .registers 11

    invoke-virtual {p0, p3}, Lz5/vt1;->m(I)V

    iget v0, p0, Lz5/vt1;->x:I

    iget v3, p0, Lz5/vt1;->w:I

    sub-int/2addr v0, v3

    if-nez v0, :cond_1e

    iget-object v2, p0, Lz5/vt1;->v:[B

    const/4 v5, 0x0

    const/4 v6, 0x1

    move-object v1, p0

    move v4, p3

    invoke-virtual/range {v1 .. v6}, Lz5/vt1;->o([BIIIZ)I

    move-result p3

    const/4 v0, -0x1

    if-ne p3, v0, :cond_18

    return v0

    :cond_18
    iget v0, p0, Lz5/vt1;->x:I

    add-int/2addr v0, p3

    iput v0, p0, Lz5/vt1;->x:I

    goto :goto_22

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

    move-result p3

    :goto_22
    iget-object v0, p0, Lz5/vt1;->v:[B

    iget v1, p0, Lz5/vt1;->w:I

    invoke-static {v0, v1, p1, p2, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget p1, p0, Lz5/vt1;->w:I

    add-int/2addr p1, p3

    iput p1, p0, Lz5/vt1;->w:I

    return p3
.end method

.method public final m(I)V
    .registers 5

    iget v0, p0, Lz5/vt1;->w:I

    add-int/2addr v0, p1

    iget-object p1, p0, Lz5/vt1;->v:[B

    array-length p1, p1

    if-le v0, p1, :cond_1b

    add-int/2addr p1, p1

    const/high16 v1, 0x10000

    add-int/2addr v1, v0

    const/high16 v2, 0x80000

    add-int/2addr v0, v2

    invoke-static {p1, v1, v0}, Lz5/r7;->v(III)I

    move-result p1

    iget-object v0, p0, Lz5/vt1;->v:[B

    invoke-static {v0, p1}, Ljava/util/Arrays;->copyOf([BI)[B

    move-result-object p1

    iput-object p1, p0, Lz5/vt1;->v:[B

    :cond_1b
    return-void
.end method

.method public final n(I)V
    .registers 7

    iget v0, p0, Lz5/vt1;->x:I

    sub-int/2addr v0, p1

    iput v0, p0, Lz5/vt1;->x:I

    const/4 v1, 0x0

    iput v1, p0, Lz5/vt1;->w:I

    iget-object v2, p0, Lz5/vt1;->v:[B

    array-length v3, v2

    const/high16 v4, -0x80000

    add-int/2addr v3, v4

    if-ge v0, v3, :cond_16

    const/high16 v3, 0x10000

    add-int/2addr v3, v0

    new-array v3, v3, [B

    goto :goto_17

    :cond_16
    move-object v3, v2

    :goto_17
    invoke-static {v2, p1, v3, v1, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iput-object v3, p0, Lz5/vt1;->v:[B

    return-void
.end method

.method public final o([BIIIZ)I
    .registers 7

    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v0

    if-nez v0, :cond_1e

    iget-object v0, p0, Lz5/vt1;->s:Lz5/q3;

    add-int/2addr p2, p4

    sub-int/2addr p3, p4

    invoke-interface {v0, p1, p2, p3}, Lz5/q3;->a([BII)I

    move-result p1

    const/4 p2, -0x1

    if-ne p1, p2, :cond_1c

    if-nez p4, :cond_16

    if-eqz p5, :cond_16

    return p2

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

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

    throw p1

    :cond_1c
    add-int/2addr p4, p1

    return p4

    :cond_1e
    new-instance p1, Ljava/io/InterruptedIOException;

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

    throw p1
.end method

.method public final p(I)V
    .registers 6

    const/4 v0, -0x1

    if-eq p1, v0, :cond_9

    iget-wide v0, p0, Lz5/vt1;->u:J

    int-to-long v2, p1

    add-long/2addr v0, v2

    iput-wide v0, p0, Lz5/vt1;->u:J

    :cond_9
    return-void
.end method

.method public final zzk(I)V
    .registers 3

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lz5/vt1;->i(IZ)Z

    return-void
.end method

.method public final zzl()V
    .registers 2

    const/4 v0, 0x0

    iput v0, p0, Lz5/vt1;->w:I

    return-void
.end method

.method public final zzm()J
    .registers 5

    iget-wide v0, p0, Lz5/vt1;->u:J

    iget v2, p0, Lz5/vt1;->w:I

    int-to-long v2, v2

    add-long/2addr v0, v2

    return-wide v0
.end method

.method public final zzn()J
    .registers 3

    iget-wide v0, p0, Lz5/vt1;->u:J

    return-wide v0
.end method

.method public final zzo()J
    .registers 3

    iget-wide v0, p0, Lz5/vt1;->t:J

    return-wide v0
.end method
