.class public Lt3/u;
.super Ljava/io/FilterInputStream;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lt3/u$a;
    }
.end annotation


# instance fields
.field public volatile r:[B

.field public s:I

.field public t:I

.field public u:I

.field public v:I

.field public final w:Ln3/b;


# direct methods
.method public constructor <init>(Ljava/io/InputStream;Ln3/b;)V
    .registers 4

    .line 1
    invoke-direct {p0, p1}, Ljava/io/FilterInputStream;-><init>(Ljava/io/InputStream;)V

    const/4 p1, -0x1

    iput p1, p0, Lt3/u;->u:I

    iput-object p2, p0, Lt3/u;->w:Ln3/b;

    const-class p1, [B

    const/high16 v0, 0x10000

    invoke-interface {p2, v0, p1}, Ln3/b;->e(ILjava/lang/Class;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, [B

    iput-object p1, p0, Lt3/u;->r:[B

    return-void
.end method

.method public static g()Ljava/io/IOException;
    .registers 2

    new-instance v0, Ljava/io/IOException;

    const-string v1, "BufferedInputStream is closed"

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

    throw v0
.end method


# virtual methods
.method public declared-synchronized available()I
    .registers 4

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    iget-object v1, p0, Lt3/u;->r:[B

    if-eqz v1, :cond_15

    if-eqz v0, :cond_15

    iget v1, p0, Lt3/u;->s:I

    iget v2, p0, Lt3/u;->v:I

    sub-int/2addr v1, v2

    invoke-virtual {v0}, Ljava/io/InputStream;->available()I

    move-result v0
    :try_end_12
    .catchall {:try_start_1 .. :try_end_12} :catchall_1a

    add-int/2addr v1, v0

    monitor-exit p0

    return v1

    :cond_15
    :try_start_15
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    const/4 v0, 0x0

    throw v0
    :try_end_1a
    .catchall {:try_start_15 .. :try_end_1a} :catchall_1a

    :catchall_1a
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final b(Ljava/io/InputStream;[B)I
    .registers 8

    iget v0, p0, Lt3/u;->u:I

    const/4 v1, -0x1

    const/4 v2, 0x0

    if-eq v0, v1, :cond_57

    iget v3, p0, Lt3/u;->v:I

    sub-int/2addr v3, v0

    iget v4, p0, Lt3/u;->t:I

    if-lt v3, v4, :cond_e

    goto :goto_57

    :cond_e
    if-nez v0, :cond_36

    array-length v1, p2

    if-le v4, v1, :cond_36

    iget v1, p0, Lt3/u;->s:I

    array-length v3, p2

    if-ne v1, v3, :cond_36

    array-length v0, p2

    mul-int/lit8 v0, v0, 0x2

    if-le v0, v4, :cond_1e

    goto :goto_1f

    :cond_1e
    move v4, v0

    :goto_1f
    iget-object v0, p0, Lt3/u;->w:Ln3/b;

    const-class v1, [B

    invoke-interface {v0, v4, v1}, Ln3/b;->e(ILjava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    array-length v1, p2

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

    iput-object v0, p0, Lt3/u;->r:[B

    iget-object v1, p0, Lt3/u;->w:Ln3/b;

    invoke-interface {v1, p2}, Ln3/b;->d(Ljava/lang/Object;)V

    move-object p2, v0

    goto :goto_3d

    :cond_36
    if-lez v0, :cond_3d

    array-length v1, p2

    sub-int/2addr v1, v0

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

    :cond_3d
    :goto_3d
    iget v0, p0, Lt3/u;->v:I

    iget v1, p0, Lt3/u;->u:I

    sub-int/2addr v0, v1

    iput v0, p0, Lt3/u;->v:I

    iput v2, p0, Lt3/u;->u:I

    iput v2, p0, Lt3/u;->s:I

    array-length v1, p2

    sub-int/2addr v1, v0

    invoke-virtual {p1, p2, v0, v1}, Ljava/io/InputStream;->read([BII)I

    move-result p1

    iget p2, p0, Lt3/u;->v:I

    if-gtz p1, :cond_53

    goto :goto_54

    :cond_53
    add-int/2addr p2, p1

    :goto_54
    iput p2, p0, Lt3/u;->s:I

    return p1

    :cond_57
    :goto_57
    invoke-virtual {p1, p2}, Ljava/io/InputStream;->read([B)I

    move-result p1

    if-lez p1, :cond_63

    iput v1, p0, Lt3/u;->u:I

    iput v2, p0, Lt3/u;->v:I

    iput p1, p0, Lt3/u;->s:I

    :cond_63
    return p1
.end method

.method public close()V
    .registers 4

    iget-object v0, p0, Lt3/u;->r:[B

    const/4 v1, 0x0

    if-eqz v0, :cond_e

    iget-object v0, p0, Lt3/u;->w:Ln3/b;

    iget-object v2, p0, Lt3/u;->r:[B

    invoke-interface {v0, v2}, Ln3/b;->d(Ljava/lang/Object;)V

    iput-object v1, p0, Lt3/u;->r:[B

    :cond_e
    iget-object v0, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    iput-object v1, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    if-eqz v0, :cond_17

    invoke-virtual {v0}, Ljava/io/InputStream;->close()V

    :cond_17
    return-void
.end method

.method public declared-synchronized e()V
    .registers 3

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lt3/u;->r:[B

    if-eqz v0, :cond_f

    iget-object v0, p0, Lt3/u;->w:Ln3/b;

    iget-object v1, p0, Lt3/u;->r:[B

    invoke-interface {v0, v1}, Ln3/b;->d(Ljava/lang/Object;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lt3/u;->r:[B
    :try_end_f
    .catchall {:try_start_1 .. :try_end_f} :catchall_11

    :cond_f
    monitor-exit p0

    return-void

    :catchall_11
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized mark(I)V
    .registers 3

    monitor-enter p0

    :try_start_1
    iget v0, p0, Lt3/u;->t:I

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

    move-result p1

    iput p1, p0, Lt3/u;->t:I

    iget p1, p0, Lt3/u;->v:I

    iput p1, p0, Lt3/u;->u:I
    :try_end_d
    .catchall {:try_start_1 .. :try_end_d} :catchall_f

    monitor-exit p0

    return-void

    :catchall_f
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public markSupported()Z
    .registers 2

    const/4 v0, 0x1

    return v0
.end method

.method public declared-synchronized read()I
    .registers 7

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lt3/u;->r:[B

    iget-object v1, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    const/4 v2, 0x0

    if-eqz v0, :cond_39

    if-eqz v1, :cond_39

    iget v3, p0, Lt3/u;->v:I

    iget v4, p0, Lt3/u;->s:I

    const/4 v5, -0x1

    if-lt v3, v4, :cond_19

    invoke-virtual {p0, v1, v0}, Lt3/u;->b(Ljava/io/InputStream;[B)I

    move-result v1
    :try_end_15
    .catchall {:try_start_1 .. :try_end_15} :catchall_3d

    if-ne v1, v5, :cond_19

    monitor-exit p0

    return v5

    :cond_19
    :try_start_19
    iget-object v1, p0, Lt3/u;->r:[B

    if-eq v0, v1, :cond_26

    iget-object v0, p0, Lt3/u;->r:[B

    if-eqz v0, :cond_22

    goto :goto_26

    :cond_22
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v2

    :cond_26
    :goto_26
    iget v1, p0, Lt3/u;->s:I

    iget v2, p0, Lt3/u;->v:I

    sub-int/2addr v1, v2

    if-lez v1, :cond_37

    add-int/lit8 v1, v2, 0x1

    iput v1, p0, Lt3/u;->v:I

    aget-byte v0, v0, v2
    :try_end_33
    .catchall {:try_start_19 .. :try_end_33} :catchall_3d

    and-int/lit16 v0, v0, 0xff

    monitor-exit p0

    return v0

    :cond_37
    monitor-exit p0

    return v5

    :cond_39
    :try_start_39
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v2
    :try_end_3d
    .catchall {:try_start_39 .. :try_end_3d} :catchall_3d

    :catchall_3d
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized read([BII)I
    .registers 11

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lt3/u;->r:[B
    :try_end_3
    .catchall {:try_start_1 .. :try_end_3} :catchall_8e

    const/4 v1, 0x0

    if-eqz v0, :cond_8a

    if-nez p3, :cond_b

    const/4 p1, 0x0

    monitor-exit p0

    return p1

    :cond_b
    :try_start_b
    iget-object v2, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    if-eqz v2, :cond_86

    iget v3, p0, Lt3/u;->v:I

    iget v4, p0, Lt3/u;->s:I

    if-ge v3, v4, :cond_33

    sub-int v5, v4, v3

    if-lt v5, p3, :cond_1b

    move v4, p3

    goto :goto_1c

    :cond_1b
    sub-int/2addr v4, v3

    :goto_1c
    invoke-static {v0, v3, p1, p2, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget v3, p0, Lt3/u;->v:I

    add-int/2addr v3, v4

    iput v3, p0, Lt3/u;->v:I

    if-eq v4, p3, :cond_31

    invoke-virtual {v2}, Ljava/io/InputStream;->available()I

    move-result v3
    :try_end_2a
    .catchall {:try_start_b .. :try_end_2a} :catchall_8e

    if-nez v3, :cond_2d

    goto :goto_31

    :cond_2d
    add-int/2addr p2, v4

    sub-int v3, p3, v4

    goto :goto_34

    :cond_31
    :goto_31
    monitor-exit p0

    return v4

    :cond_33
    move v3, p3

    :goto_34
    :try_start_34
    iget v4, p0, Lt3/u;->u:I

    const/4 v5, -0x1

    if-ne v4, v5, :cond_49

    array-length v4, v0

    if-lt v3, v4, :cond_49

    invoke-virtual {v2, p1, p2, v3}, Ljava/io/InputStream;->read([BII)I

    move-result v4
    :try_end_40
    .catchall {:try_start_34 .. :try_end_40} :catchall_8e

    if-ne v4, v5, :cond_76

    if-ne v3, p3, :cond_45

    goto :goto_47

    :cond_45
    sub-int v5, p3, v3

    :goto_47
    monitor-exit p0

    return v5

    :cond_49
    :try_start_49
    invoke-virtual {p0, v2, v0}, Lt3/u;->b(Ljava/io/InputStream;[B)I

    move-result v4
    :try_end_4d
    .catchall {:try_start_49 .. :try_end_4d} :catchall_8e

    if-ne v4, v5, :cond_56

    if-ne v3, p3, :cond_52

    goto :goto_54

    :cond_52
    sub-int v5, p3, v3

    :goto_54
    monitor-exit p0

    return v5

    :cond_56
    :try_start_56
    iget-object v4, p0, Lt3/u;->r:[B

    if-eq v0, v4, :cond_63

    iget-object v0, p0, Lt3/u;->r:[B

    if-eqz v0, :cond_5f

    goto :goto_63

    :cond_5f
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v1

    :cond_63
    :goto_63
    iget v4, p0, Lt3/u;->s:I

    iget v5, p0, Lt3/u;->v:I

    sub-int v6, v4, v5

    if-lt v6, v3, :cond_6d

    move v4, v3

    goto :goto_6e

    :cond_6d
    sub-int/2addr v4, v5

    :goto_6e
    invoke-static {v0, v5, p1, p2, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget v5, p0, Lt3/u;->v:I

    add-int/2addr v5, v4

    iput v5, p0, Lt3/u;->v:I
    :try_end_76
    .catchall {:try_start_56 .. :try_end_76} :catchall_8e

    :cond_76
    sub-int/2addr v3, v4

    if-nez v3, :cond_7b

    monitor-exit p0

    return p3

    :cond_7b
    :try_start_7b
    invoke-virtual {v2}, Ljava/io/InputStream;->available()I

    move-result v5
    :try_end_7f
    .catchall {:try_start_7b .. :try_end_7f} :catchall_8e

    if-nez v5, :cond_84

    sub-int/2addr p3, v3

    monitor-exit p0

    return p3

    :cond_84
    add-int/2addr p2, v4

    goto :goto_34

    :cond_86
    :try_start_86
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v1

    :cond_8a
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v1
    :try_end_8e
    .catchall {:try_start_86 .. :try_end_8e} :catchall_8e

    :catchall_8e
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized reset()V
    .registers 4

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lt3/u;->r:[B

    if-eqz v0, :cond_31

    const/4 v0, -0x1

    iget v1, p0, Lt3/u;->u:I

    if-eq v0, v1, :cond_e

    iput v1, p0, Lt3/u;->v:I
    :try_end_c
    .catchall {:try_start_1 .. :try_end_c} :catchall_39

    monitor-exit p0

    return-void

    :cond_e
    :try_start_e
    new-instance v0, Lt3/u$a;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "Mark has been invalidated, pos: "

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

    iget v2, p0, Lt3/u;->v:I

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

    const-string v2, " markLimit: "

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

    iget v2, p0, Lt3/u;->t:I

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

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

    move-result-object v1

    invoke-direct {v0, v1}, Lt3/u$a;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_31
    new-instance v0, Ljava/io/IOException;

    const-string v1, "Stream is closed"

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

    throw v0
    :try_end_39
    .catchall {:try_start_e .. :try_end_39} :catchall_39

    :catchall_39
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized skip(J)J
    .registers 13

    monitor-enter p0

    const-wide/16 v0, 0x1

    cmp-long v0, p1, v0

    const-wide/16 v1, 0x0

    if-gez v0, :cond_b

    monitor-exit p0

    return-wide v1

    :cond_b
    :try_start_b
    iget-object v0, p0, Lt3/u;->r:[B

    const/4 v3, 0x0

    if-eqz v0, :cond_6e

    iget-object v4, p0, Ljava/io/FilterInputStream;->in:Ljava/io/InputStream;

    if-eqz v4, :cond_6a

    iget v3, p0, Lt3/u;->s:I

    iget v5, p0, Lt3/u;->v:I

    sub-int v6, v3, v5

    int-to-long v6, v6

    cmp-long v6, v6, p1

    if-ltz v6, :cond_26

    int-to-long v0, v5

    add-long/2addr v0, p1

    long-to-int v0, v0

    iput v0, p0, Lt3/u;->v:I
    :try_end_24
    .catchall {:try_start_b .. :try_end_24} :catchall_72

    monitor-exit p0

    return-wide p1

    :cond_26
    int-to-long v6, v3

    int-to-long v8, v5

    sub-long/2addr v6, v8

    :try_start_29
    iput v3, p0, Lt3/u;->v:I

    iget v3, p0, Lt3/u;->u:I

    const/4 v5, -0x1

    if-eq v3, v5, :cond_5c

    iget v3, p0, Lt3/u;->t:I

    int-to-long v8, v3

    cmp-long v3, p1, v8

    if-gtz v3, :cond_5c

    invoke-virtual {p0, v4, v0}, Lt3/u;->b(Ljava/io/InputStream;[B)I

    move-result v0
    :try_end_3b
    .catchall {:try_start_29 .. :try_end_3b} :catchall_72

    if-ne v0, v5, :cond_3f

    monitor-exit p0

    return-wide v6

    :cond_3f
    :try_start_3f
    iget v0, p0, Lt3/u;->s:I

    iget v1, p0, Lt3/u;->v:I

    sub-int v2, v0, v1

    int-to-long v2, v2

    sub-long v4, p1, v6

    cmp-long v2, v2, v4

    if-ltz v2, :cond_54

    int-to-long v0, v1

    add-long/2addr v0, p1

    sub-long/2addr v0, v6

    long-to-int v0, v0

    iput v0, p0, Lt3/u;->v:I
    :try_end_52
    .catchall {:try_start_3f .. :try_end_52} :catchall_72

    monitor-exit p0

    return-wide p1

    :cond_54
    int-to-long p1, v0

    add-long/2addr v6, p1

    int-to-long p1, v1

    sub-long/2addr v6, p1

    :try_start_58
    iput v0, p0, Lt3/u;->v:I
    :try_end_5a
    .catchall {:try_start_58 .. :try_end_5a} :catchall_72

    monitor-exit p0

    return-wide v6

    :cond_5c
    sub-long/2addr p1, v6

    :try_start_5d
    invoke-virtual {v4, p1, p2}, Ljava/io/InputStream;->skip(J)J

    move-result-wide p1

    cmp-long v0, p1, v1

    if-lez v0, :cond_67

    iput v5, p0, Lt3/u;->u:I
    :try_end_67
    .catchall {:try_start_5d .. :try_end_67} :catchall_72

    :cond_67
    add-long/2addr v6, p1

    monitor-exit p0

    return-wide v6

    :cond_6a
    :try_start_6a
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v3

    :cond_6e
    invoke-static {}, Lt3/u;->g()Ljava/io/IOException;

    throw v3
    :try_end_72
    .catchall {:try_start_6a .. :try_end_72} :catchall_72

    :catchall_72
    move-exception p1

    monitor-exit p0

    throw p1
.end method
