.class public final Lca/d$a;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lca/d;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "a"
.end annotation


# instance fields
.field public final a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lca/c;",
            ">;"
        }
    .end annotation
.end field

.field public final b:Lha/h;

.field public c:[Lca/c;

.field public d:I

.field public e:I

.field public f:I

.field public final g:I

.field public h:I


# direct methods
.method public constructor <init>(Lha/z;III)V
    .registers 5

    and-int/lit8 p4, p4, 0x4

    if-eqz p4, :cond_5

    move p3, p2

    .line 1
    :cond_5
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput p2, p0, Lca/d$a;->g:I

    iput p3, p0, Lca/d$a;->h:I

    new-instance p2, Ljava/util/ArrayList;

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

    iput-object p2, p0, Lca/d$a;->a:Ljava/util/List;

    .line 2
    new-instance p2, Lha/t;

    invoke-direct {p2, p1}, Lha/t;-><init>(Lha/z;)V

    .line 3
    iput-object p2, p0, Lca/d$a;->b:Lha/h;

    const/16 p1, 0x8

    new-array p1, p1, [Lca/c;

    iput-object p1, p0, Lca/d$a;->c:[Lca/c;

    const/4 p1, 0x7

    iput p1, p0, Lca/d$a;->d:I

    return-void
.end method


# virtual methods
.method public final a()V
    .registers 5

    iget-object v0, p0, Lca/d$a;->c:[Lca/c;

    .line 1
    array-length v1, v0

    const/4 v2, 0x0

    const/4 v3, 0x0

    .line 2
    invoke-static {v0, v2, v1, v3}, Ljava/util/Arrays;->fill([Ljava/lang/Object;IILjava/lang/Object;)V

    .line 3
    iget-object v0, p0, Lca/d$a;->c:[Lca/c;

    array-length v0, v0

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

    iput v0, p0, Lca/d$a;->d:I

    iput v2, p0, Lca/d$a;->e:I

    iput v2, p0, Lca/d$a;->f:I

    return-void
.end method

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

    iget v0, p0, Lca/d$a;->d:I

    add-int/lit8 v0, v0, 0x1

    add-int/2addr v0, p1

    return v0
.end method

.method public final c(I)I
    .registers 6

    const/4 v0, 0x0

    if-lez p1, :cond_39

    iget-object v1, p0, Lca/d$a;->c:[Lca/c;

    array-length v1, v1

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

    :goto_8
    iget v2, p0, Lca/d$a;->d:I

    if-lt v1, v2, :cond_28

    if-lez p1, :cond_28

    iget-object v2, p0, Lca/d$a;->c:[Lca/c;

    aget-object v2, v2, v1

    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    iget v2, v2, Lca/c;->a:I

    sub-int/2addr p1, v2

    iget v3, p0, Lca/d$a;->f:I

    sub-int/2addr v3, v2

    iput v3, p0, Lca/d$a;->f:I

    iget v2, p0, Lca/d$a;->e:I

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

    iput v2, p0, Lca/d$a;->e:I

    add-int/lit8 v0, v0, 0x1

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

    goto :goto_8

    :cond_28
    iget-object p1, p0, Lca/d$a;->c:[Lca/c;

    add-int/lit8 v1, v2, 0x1

    add-int/lit8 v2, v2, 0x1

    add-int/2addr v2, v0

    iget v3, p0, Lca/d$a;->e:I

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

    iget p1, p0, Lca/d$a;->d:I

    add-int/2addr p1, v0

    iput p1, p0, Lca/d$a;->d:I

    :cond_39
    return v0
.end method

.method public final d(I)Lha/i;
    .registers 6

    const/4 v0, 0x1

    if-ltz p1, :cond_d

    .line 1
    sget-object v1, Lca/d;->c:Lca/d;

    .line 2
    sget-object v1, Lca/d;->a:[Lca/c;

    .line 3
    array-length v1, v1

    sub-int/2addr v1, v0

    if-gt p1, v1, :cond_d

    move v1, v0

    goto :goto_e

    :cond_d
    const/4 v1, 0x0

    :goto_e
    if-eqz v1, :cond_17

    .line 4
    sget-object v0, Lca/d;->c:Lca/d;

    .line 5
    sget-object v0, Lca/d;->a:[Lca/c;

    .line 6
    aget-object p1, v0, p1

    goto :goto_2e

    :cond_17
    sget-object v1, Lca/d;->c:Lca/d;

    .line 7
    sget-object v1, Lca/d;->a:[Lca/c;

    .line 8
    array-length v1, v1

    sub-int v1, p1, v1

    invoke-virtual {p0, v1}, Lca/d$a;->b(I)I

    move-result v1

    if-ltz v1, :cond_31

    iget-object v2, p0, Lca/d$a;->c:[Lca/c;

    array-length v3, v2

    if-ge v1, v3, :cond_31

    aget-object p1, v2, v1

    invoke-static {p1}, Lx/e;->d(Ljava/lang/Object;)V

    :goto_2e
    iget-object p1, p1, Lca/c;->b:Lha/i;

    return-object p1

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

    const-string v2, "Header index too large "

    invoke-static {v2}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    add-int/2addr p1, v0

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

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

    move-result-object p1

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

    throw v1
.end method

.method public final e(ILca/c;)V
    .registers 9

    iget-object v0, p0, Lca/d$a;->a:Ljava/util/List;

    invoke-interface {v0, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget v0, p2, Lca/c;->a:I

    const/4 v1, -0x1

    if-eq p1, v1, :cond_19

    iget-object v2, p0, Lca/d$a;->c:[Lca/c;

    .line 1
    iget v3, p0, Lca/d$a;->d:I

    add-int/lit8 v3, v3, 0x1

    add-int/2addr v3, p1

    .line 2
    aget-object v2, v2, v3

    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    iget v2, v2, Lca/c;->a:I

    sub-int/2addr v0, v2

    :cond_19
    iget v2, p0, Lca/d$a;->h:I

    if-le v0, v2, :cond_21

    invoke-virtual {p0}, Lca/d$a;->a()V

    return-void

    :cond_21
    iget v3, p0, Lca/d$a;->f:I

    add-int/2addr v3, v0

    sub-int/2addr v3, v2

    invoke-virtual {p0, v3}, Lca/d$a;->c(I)I

    move-result v2

    if-ne p1, v1, :cond_58

    iget p1, p0, Lca/d$a;->e:I

    add-int/lit8 p1, p1, 0x1

    iget-object v2, p0, Lca/d$a;->c:[Lca/c;

    array-length v3, v2

    if-le p1, v3, :cond_47

    array-length p1, v2

    mul-int/lit8 p1, p1, 0x2

    new-array p1, p1, [Lca/c;

    const/4 v3, 0x0

    array-length v4, v2

    array-length v5, v2

    invoke-static {v2, v3, p1, v4, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v2, p0, Lca/d$a;->c:[Lca/c;

    array-length v2, v2

    add-int/2addr v2, v1

    iput v2, p0, Lca/d$a;->d:I

    iput-object p1, p0, Lca/d$a;->c:[Lca/c;

    :cond_47
    iget p1, p0, Lca/d$a;->d:I

    add-int/lit8 v1, p1, -0x1

    iput v1, p0, Lca/d$a;->d:I

    iget-object v1, p0, Lca/d$a;->c:[Lca/c;

    aput-object p2, v1, p1

    iget p1, p0, Lca/d$a;->e:I

    add-int/lit8 p1, p1, 0x1

    iput p1, p0, Lca/d$a;->e:I

    goto :goto_63

    .line 3
    :cond_58
    iget v1, p0, Lca/d$a;->d:I

    add-int/lit8 v1, v1, 0x1

    add-int/2addr v1, p1

    add-int/2addr v1, v2

    add-int/2addr v1, p1

    .line 4
    iget-object p1, p0, Lca/d$a;->c:[Lca/c;

    aput-object p2, p1, v1

    :goto_63
    iget p1, p0, Lca/d$a;->f:I

    add-int/2addr p1, v0

    iput p1, p0, Lca/d$a;->f:I

    return-void
.end method

.method public final f()Lha/i;
    .registers 12

    .line 1
    iget-object v0, p0, Lca/d$a;->b:Lha/h;

    invoke-interface {v0}, Lha/h;->readByte()B

    move-result v0

    sget-object v1, Lw9/c;->a:[B

    and-int/lit16 v0, v0, 0xff

    and-int/lit16 v1, v0, 0x80

    const/16 v2, 0x80

    const/4 v3, 0x0

    if-ne v1, v2, :cond_13

    const/4 v1, 0x1

    goto :goto_14

    :cond_13
    move v1, v3

    :goto_14
    const/16 v2, 0x7f

    .line 2
    invoke-virtual {p0, v0, v2}, Lca/d$a;->g(II)I

    move-result v0

    int-to-long v4, v0

    if-eqz v1, :cond_96

    new-instance v0, Lha/e;

    invoke-direct {v0}, Lha/e;-><init>()V

    sget-object v1, Lca/q;->d:Lca/q;

    iget-object v1, p0, Lca/d$a;->b:Lha/h;

    const-string v2, "source"

    .line 3
    invoke-static {v1, v2}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    sget-object v2, Lca/q;->c:Lca/q$a;

    const-wide/16 v6, 0x0

    move-wide v7, v6

    move v6, v3

    :goto_31
    cmp-long v9, v7, v4

    if-gez v9, :cond_6b

    invoke-interface {v1}, Lha/h;->readByte()B

    move-result v9

    sget-object v10, Lw9/c;->a:[B

    and-int/lit16 v9, v9, 0xff

    shl-int/lit8 v3, v3, 0x8

    or-int/2addr v3, v9

    add-int/lit8 v6, v6, 0x8

    :goto_42
    const/16 v9, 0x8

    if-lt v6, v9, :cond_67

    add-int/lit8 v9, v6, -0x8

    ushr-int v10, v3, v9

    and-int/lit16 v10, v10, 0xff

    .line 4
    iget-object v2, v2, Lca/q$a;->a:[Lca/q$a;

    .line 5
    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    aget-object v2, v2, v10

    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    .line 6
    iget-object v10, v2, Lca/q$a;->a:[Lca/q$a;

    if-nez v10, :cond_65

    .line 7
    iget v9, v2, Lca/q$a;->b:I

    .line 8
    invoke-virtual {v0, v9}, Lha/e;->e0(I)Lha/e;

    .line 9
    iget v2, v2, Lca/q$a;->c:I

    sub-int/2addr v6, v2

    .line 10
    sget-object v2, Lca/q;->c:Lca/q$a;

    goto :goto_42

    :cond_65
    move v6, v9

    goto :goto_42

    :cond_67
    const-wide/16 v9, 0x1

    add-long/2addr v7, v9

    goto :goto_31

    :cond_6b
    :goto_6b
    if-lez v6, :cond_91

    rsub-int/lit8 v1, v6, 0x8

    shl-int v1, v3, v1

    and-int/lit16 v1, v1, 0xff

    .line 11
    iget-object v2, v2, Lca/q$a;->a:[Lca/q$a;

    .line 12
    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    aget-object v1, v2, v1

    invoke-static {v1}, Lx/e;->d(Ljava/lang/Object;)V

    .line 13
    iget-object v2, v1, Lca/q$a;->a:[Lca/q$a;

    if-nez v2, :cond_91

    .line 14
    iget v2, v1, Lca/q$a;->c:I

    if-le v2, v6, :cond_86

    goto :goto_91

    .line 15
    :cond_86
    iget v2, v1, Lca/q$a;->b:I

    .line 16
    invoke-virtual {v0, v2}, Lha/e;->e0(I)Lha/e;

    .line 17
    iget v1, v1, Lca/q$a;->c:I

    sub-int/2addr v6, v1

    .line 18
    sget-object v2, Lca/q;->c:Lca/q$a;

    goto :goto_6b

    .line 19
    :cond_91
    :goto_91
    invoke-virtual {v0}, Lha/e;->L()Lha/i;

    move-result-object v0

    goto :goto_9c

    :cond_96
    iget-object v0, p0, Lca/d$a;->b:Lha/h;

    invoke-interface {v0, v4, v5}, Lha/h;->m(J)Lha/i;

    move-result-object v0

    :goto_9c
    return-object v0
.end method

.method public final g(II)I
    .registers 5

    and-int/2addr p1, p2

    if-ge p1, p2, :cond_4

    return p1

    :cond_4
    const/4 p1, 0x0

    .line 1
    :goto_5
    iget-object v0, p0, Lca/d$a;->b:Lha/h;

    invoke-interface {v0}, Lha/h;->readByte()B

    move-result v0

    sget-object v1, Lw9/c;->a:[B

    and-int/lit16 v0, v0, 0xff

    and-int/lit16 v1, v0, 0x80

    if-eqz v1, :cond_1a

    and-int/lit8 v0, v0, 0x7f

    shl-int/2addr v0, p1

    add-int/2addr p2, v0

    add-int/lit8 p1, p1, 0x7

    goto :goto_5

    :cond_1a
    shl-int p1, v0, p1

    add-int/2addr p2, p1

    return p2
.end method
