.class public final Lcom/google/android/gms/internal/ads/m9;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lz5/zt1;


# instance fields
.field public a:Lz5/bu1;

.field public b:Lcom/google/android/gms/internal/ads/o9;

.field public c:Z


# 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 final a(Lz5/au1;)Z
    .registers 11
    .annotation runtime Lorg/checkerframework/checker/nullness/qual/EnsuresNonNullIf;
        expression = {
            "streamReader"
        }
        result = true
    .end annotation

    new-instance v0, Lz5/jw1;

    invoke-direct {v0}, Lz5/jw1;-><init>()V

    const/4 v1, 0x1

    invoke-virtual {v0, p1, v1}, Lz5/jw1;->c(Lz5/au1;Z)Z

    move-result v2

    const/4 v3, 0x0

    if-eqz v2, :cond_85

    iget v2, v0, Lz5/jw1;->a:I

    const/4 v4, 0x2

    and-int/2addr v2, v4

    if-eq v2, v4, :cond_15

    goto/16 :goto_85

    :cond_15
    iget v0, v0, Lz5/jw1;->e:I

    const/16 v2, 0x8

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

    move-result v0

    new-instance v4, Lz5/j7;

    invoke-direct {v4, v0, v3}, Lz5/j7;-><init>(II)V

    .line 1
    iget-object v5, v4, Lz5/j7;->b:[B

    .line 2
    check-cast p1, Lz5/vt1;

    invoke-virtual {p1, v5, v3, v0, v3}, Lz5/vt1;->k([BIIZ)Z

    invoke-virtual {v4, v3}, Lz5/j7;->q(I)V

    invoke-virtual {v4}, Lz5/j7;->l()I

    move-result p1

    const/4 v0, 0x5

    if-lt p1, v0, :cond_4e

    invoke-virtual {v4}, Lz5/j7;->A()I

    move-result p1

    const/16 v0, 0x7f

    if-ne p1, v0, :cond_4e

    invoke-virtual {v4}, Lz5/j7;->H()J

    move-result-wide v5

    const-wide/32 v7, 0x464c4143

    cmp-long p1, v5, v7

    if-nez p1, :cond_4e

    new-instance p1, Lcom/google/android/gms/internal/ads/l9;

    invoke-direct {p1}, Lcom/google/android/gms/internal/ads/l9;-><init>()V

    :goto_4b
    iput-object p1, p0, Lcom/google/android/gms/internal/ads/m9;->b:Lcom/google/android/gms/internal/ads/o9;

    goto :goto_84

    :cond_4e
    invoke-virtual {v4, v3}, Lz5/j7;->q(I)V

    :try_start_51
    invoke-static {v1, v4, v1}, Lcom/google/android/gms/internal/ads/f;->l(ILz5/j7;Z)Z

    move-result p1
    :try_end_55
    .catch Lz5/r3; {:try_start_51 .. :try_end_55} :catch_5d

    if-eqz p1, :cond_5d

    new-instance p1, Lcom/google/android/gms/internal/ads/p9;

    invoke-direct {p1}, Lcom/google/android/gms/internal/ads/p9;-><init>()V

    goto :goto_4b

    :catch_5d
    :cond_5d
    invoke-virtual {v4, v3}, Lz5/j7;->q(I)V

    .line 3
    invoke-virtual {v4}, Lz5/j7;->l()I

    move-result p1

    if-ge p1, v2, :cond_68

    move p1, v3

    goto :goto_7c

    :cond_68
    new-array p1, v2, [B

    .line 4
    iget-object v0, v4, Lz5/j7;->b:[B

    iget v5, v4, Lz5/j7;->c:I

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

    iget v0, v4, Lz5/j7;->c:I

    add-int/2addr v0, v2

    iput v0, v4, Lz5/j7;->c:I

    .line 5
    sget-object v0, Lcom/google/android/gms/internal/ads/n9;->o:[B

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

    move-result p1

    :goto_7c
    if-eqz p1, :cond_85

    .line 6
    new-instance p1, Lcom/google/android/gms/internal/ads/n9;

    invoke-direct {p1}, Lcom/google/android/gms/internal/ads/n9;-><init>()V

    goto :goto_4b

    :goto_84
    return v1

    :cond_85
    :goto_85
    return v3
.end method

.method public final c(Lz5/au1;)Z
    .registers 2

    :try_start_0
    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/ads/m9;->a(Lz5/au1;)Z

    move-result p1
    :try_end_4
    .catch Lz5/r3; {:try_start_0 .. :try_end_4} :catch_5

    return p1

    :catch_5
    const/4 p1, 0x0

    return p1
.end method

.method public final d(Lz5/au1;Lz5/p8;)I
    .registers 23

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    iget-object v2, v0, Lcom/google/android/gms/internal/ads/m9;->a:Lz5/bu1;

    invoke-static {v2}, Lcom/google/android/gms/internal/ads/d;->p(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v2, v0, Lcom/google/android/gms/internal/ads/m9;->b:Lcom/google/android/gms/internal/ads/o9;

    if-nez v2, :cond_1f

    invoke-virtual/range {p0 .. p1}, Lcom/google/android/gms/internal/ads/m9;->a(Lz5/au1;)Z

    move-result v2

    if-eqz v2, :cond_17

    invoke-interface/range {p1 .. p1}, Lz5/au1;->zzl()V

    goto :goto_1f

    :cond_17
    const/4 v1, 0x0

    const-string v2, "Failed to determine bitstream type"

    invoke-static {v2, v1}, Lz5/r3;->b(Ljava/lang/String;Ljava/lang/Throwable;)Lz5/r3;

    move-result-object v1

    throw v1

    :cond_1f
    :goto_1f
    iget-boolean v2, v0, Lcom/google/android/gms/internal/ads/m9;->c:Z

    const/4 v3, 0x0

    const/4 v4, 0x1

    if-nez v2, :cond_3d

    iget-object v2, v0, Lcom/google/android/gms/internal/ads/m9;->a:Lz5/bu1;

    invoke-interface {v2, v3, v4}, Lz5/bu1;->c(II)Lz5/ou1;

    move-result-object v2

    iget-object v5, v0, Lcom/google/android/gms/internal/ads/m9;->a:Lz5/bu1;

    invoke-interface {v5}, Lz5/bu1;->zzC()V

    iget-object v5, v0, Lcom/google/android/gms/internal/ads/m9;->b:Lcom/google/android/gms/internal/ads/o9;

    iget-object v6, v0, Lcom/google/android/gms/internal/ads/m9;->a:Lz5/bu1;

    .line 1
    iput-object v6, v5, Lcom/google/android/gms/internal/ads/o9;->c:Lz5/bu1;

    iput-object v2, v5, Lcom/google/android/gms/internal/ads/o9;->b:Lz5/ou1;

    invoke-virtual {v5, v4}, Lcom/google/android/gms/internal/ads/o9;->a(Z)V

    .line 2
    iput-boolean v4, v0, Lcom/google/android/gms/internal/ads/m9;->c:Z

    :cond_3d
    iget-object v2, v0, Lcom/google/android/gms/internal/ads/m9;->b:Lcom/google/android/gms/internal/ads/o9;

    .line 3
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->b:Lz5/ou1;

    invoke-static {v5}, Lcom/google/android/gms/internal/ads/d;->p(Ljava/lang/Object;)Ljava/lang/Object;

    sget v5, Lz5/r7;->a:I

    iget v5, v2, Lcom/google/android/gms/internal/ads/o9;->h:I

    const/4 v6, 0x3

    const-wide/16 v7, -0x1

    const/4 v9, -0x1

    const/4 v15, 0x2

    if-eqz v5, :cond_e8

    if-eq v5, v4, :cond_dc

    if-eq v5, v15, :cond_54

    goto :goto_97

    :cond_54
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    invoke-interface {v5, v1}, Lz5/kw1;->b(Lz5/au1;)J

    move-result-wide v10

    const-wide/16 v12, 0x0

    cmp-long v5, v10, v12

    if-ltz v5, :cond_67

    move-object/from16 v5, p2

    iput-wide v10, v5, Lz5/p8;->a:J

    move v3, v4

    goto/16 :goto_18b

    :cond_67
    cmp-long v5, v10, v7

    if-gez v5, :cond_72

    const-wide/16 v14, 0x2

    add-long/2addr v10, v14

    neg-long v10, v10

    invoke-virtual {v2, v10, v11}, Lcom/google/android/gms/internal/ads/o9;->e(J)V

    :cond_72
    iget-boolean v5, v2, Lcom/google/android/gms/internal/ads/o9;->l:Z

    if-nez v5, :cond_86

    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    invoke-interface {v5}, Lz5/kw1;->zzg()Lz5/lu1;

    move-result-object v5

    invoke-static {v5}, Lcom/google/android/gms/internal/ads/d;->p(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v10, v2, Lcom/google/android/gms/internal/ads/o9;->c:Lz5/bu1;

    invoke-interface {v10, v5}, Lz5/bu1;->i(Lz5/lu1;)V

    iput-boolean v4, v2, Lcom/google/android/gms/internal/ads/o9;->l:Z

    :cond_86
    iget-wide v4, v2, Lcom/google/android/gms/internal/ads/o9;->k:J

    cmp-long v4, v4, v12

    if-gtz v4, :cond_9a

    iget-object v4, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    invoke-virtual {v4, v1}, Lz5/iw1;->a(Lz5/au1;)Z

    move-result v1

    if-eqz v1, :cond_95

    goto :goto_9a

    :cond_95
    :goto_95
    iput v6, v2, Lcom/google/android/gms/internal/ads/o9;->h:I

    :goto_97
    move v3, v9

    goto/16 :goto_18b

    :cond_9a
    :goto_9a
    iput-wide v12, v2, Lcom/google/android/gms/internal/ads/o9;->k:J

    iget-object v1, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    .line 4
    iget-object v1, v1, Lz5/iw1;->b:Lz5/j7;

    .line 5
    invoke-virtual {v2, v1}, Lcom/google/android/gms/internal/ads/o9;->b(Lz5/j7;)J

    move-result-wide v4

    cmp-long v6, v4, v12

    if-ltz v6, :cond_d5

    iget-wide v9, v2, Lcom/google/android/gms/internal/ads/o9;->g:J

    add-long v11, v9, v4

    iget-wide v13, v2, Lcom/google/android/gms/internal/ads/o9;->e:J

    cmp-long v6, v11, v13

    if-ltz v6, :cond_d5

    const-wide/32 v11, 0xf4240

    mul-long/2addr v9, v11

    .line 6
    iget v6, v2, Lcom/google/android/gms/internal/ads/o9;->i:I

    int-to-long v11, v6

    div-long v14, v9, v11

    .line 7
    iget-object v6, v2, Lcom/google/android/gms/internal/ads/o9;->b:Lz5/ou1;

    invoke-virtual {v1}, Lz5/j7;->m()I

    move-result v9

    .line 8
    invoke-interface {v6, v1, v9, v3}, Lz5/ou1;->e(Lz5/j7;II)V

    .line 9
    iget-object v13, v2, Lcom/google/android/gms/internal/ads/o9;->b:Lz5/ou1;

    const/16 v16, 0x1

    invoke-virtual {v1}, Lz5/j7;->m()I

    move-result v17

    const/16 v18, 0x0

    const/16 v19, 0x0

    invoke-interface/range {v13 .. v19}, Lz5/ou1;->d(JIIILz5/nu1;)V

    iput-wide v7, v2, Lcom/google/android/gms/internal/ads/o9;->e:J

    :cond_d5
    iget-wide v6, v2, Lcom/google/android/gms/internal/ads/o9;->g:J

    add-long/2addr v6, v4

    iput-wide v6, v2, Lcom/google/android/gms/internal/ads/o9;->g:J

    goto/16 :goto_18b

    :cond_dc
    iget-wide v4, v2, Lcom/google/android/gms/internal/ads/o9;->f:J

    check-cast v1, Lz5/vt1;

    long-to-int v4, v4

    invoke-virtual {v1, v4, v3}, Lz5/vt1;->c(IZ)Z

    iput v15, v2, Lcom/google/android/gms/internal/ads/o9;->h:I

    goto/16 :goto_18b

    :cond_e8
    :goto_e8
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    invoke-virtual {v5, v1}, Lz5/iw1;->a(Lz5/au1;)Z

    move-result v5

    if-nez v5, :cond_f1

    goto :goto_95

    :cond_f1
    invoke-interface/range {p1 .. p1}, Lz5/au1;->zzn()J

    move-result-wide v10

    iget-wide v12, v2, Lcom/google/android/gms/internal/ads/o9;->f:J

    sub-long/2addr v10, v12

    iput-wide v10, v2, Lcom/google/android/gms/internal/ads/o9;->k:J

    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    .line 10
    iget-object v5, v5, Lz5/iw1;->b:Lz5/j7;

    .line 11
    iget-object v10, v2, Lcom/google/android/gms/internal/ads/o9;->j:Lz5/ll0;

    invoke-virtual {v2, v5, v12, v13, v10}, Lcom/google/android/gms/internal/ads/o9;->c(Lz5/j7;JLz5/ll0;)Z

    move-result v5

    if-eqz v5, :cond_10d

    invoke-interface/range {p1 .. p1}, Lz5/au1;->zzn()J

    move-result-wide v10

    iput-wide v10, v2, Lcom/google/android/gms/internal/ads/o9;->f:J

    goto :goto_e8

    :cond_10d
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->j:Lz5/ll0;

    iget-object v5, v5, Lz5/ll0;->s:Ljava/lang/Object;

    check-cast v5, Lz5/x2;

    iget v6, v5, Lz5/x2;->y:I

    iput v6, v2, Lcom/google/android/gms/internal/ads/o9;->i:I

    iget-boolean v6, v2, Lcom/google/android/gms/internal/ads/o9;->m:Z

    if-nez v6, :cond_122

    iget-object v6, v2, Lcom/google/android/gms/internal/ads/o9;->b:Lz5/ou1;

    invoke-interface {v6, v5}, Lz5/ou1;->a(Lz5/x2;)V

    iput-boolean v4, v2, Lcom/google/android/gms/internal/ads/o9;->m:Z

    :cond_122
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->j:Lz5/ll0;

    iget-object v5, v5, Lz5/ll0;->t:Ljava/lang/Object;

    check-cast v5, Lz5/kw1;

    if-eqz v5, :cond_12e

    iput-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    :goto_12c
    move v1, v15

    goto :goto_167

    :cond_12e
    invoke-interface/range {p1 .. p1}, Lz5/au1;->zzo()J

    move-result-wide v5

    cmp-long v5, v5, v7

    if-nez v5, :cond_13f

    new-instance v1, Lz5/li;

    const/4 v4, 0x6

    invoke-direct {v1, v4}, Lz5/li;-><init>(I)V

    iput-object v1, v2, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    goto :goto_12c

    :cond_13f
    iget-object v5, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    .line 12
    iget-object v5, v5, Lz5/iw1;->a:Lz5/jw1;

    .line 13
    iget v6, v5, Lz5/jw1;->a:I

    and-int/lit8 v6, v6, 0x4

    if-eqz v6, :cond_14c

    move/from16 v17, v4

    goto :goto_14e

    :cond_14c
    move/from16 v17, v3

    :goto_14e
    new-instance v4, Lz5/gw1;

    iget-wide v9, v2, Lcom/google/android/gms/internal/ads/o9;->f:J

    invoke-interface/range {p1 .. p1}, Lz5/au1;->zzo()J

    move-result-wide v11

    iget v1, v5, Lz5/jw1;->d:I

    iget v6, v5, Lz5/jw1;->e:I

    add-int/2addr v1, v6

    int-to-long v13, v1

    iget-wide v5, v5, Lz5/jw1;->b:J

    move-object v7, v4

    move-object v8, v2

    move v1, v15

    move-wide v15, v5

    invoke-direct/range {v7 .. v17}, Lz5/gw1;-><init>(Lcom/google/android/gms/internal/ads/o9;JJJJZ)V

    iput-object v4, v2, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    :goto_167
    iput v1, v2, Lcom/google/android/gms/internal/ads/o9;->h:I

    iget-object v1, v2, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    .line 14
    iget-object v2, v1, Lz5/iw1;->b:Lz5/j7;

    .line 15
    iget-object v4, v2, Lz5/j7;->b:[B

    .line 16
    array-length v5, v4

    const v6, 0xfe01

    if-ne v5, v6, :cond_176

    goto :goto_18b

    :cond_176
    invoke-virtual {v2}, Lz5/j7;->m()I

    move-result v5

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

    move-result v5

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

    move-result-object v4

    iget-object v1, v1, Lz5/iw1;->b:Lz5/j7;

    invoke-virtual {v1}, Lz5/j7;->m()I

    move-result v1

    invoke-virtual {v2, v4, v1}, Lz5/j7;->j([BI)V

    :goto_18b
    return v3
.end method

.method public final e(Lz5/bu1;)V
    .registers 2

    iput-object p1, p0, Lcom/google/android/gms/internal/ads/m9;->a:Lz5/bu1;

    return-void
.end method

.method public final f(JJ)V
    .registers 9

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/m9;->b:Lcom/google/android/gms/internal/ads/o9;

    if-eqz v0, :cond_3c

    .line 1
    iget-object v1, v0, Lcom/google/android/gms/internal/ads/o9;->a:Lz5/iw1;

    .line 2
    iget-object v2, v1, Lz5/iw1;->a:Lz5/jw1;

    invoke-virtual {v2}, Lz5/jw1;->a()V

    iget-object v2, v1, Lz5/iw1;->b:Lz5/j7;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Lz5/j7;->i(I)V

    const/4 v2, -0x1

    iput v2, v1, Lz5/iw1;->c:I

    iput-boolean v3, v1, Lz5/iw1;->e:Z

    const-wide/16 v1, 0x0

    cmp-long p1, p1, v1

    if-nez p1, :cond_24

    .line 3
    iget-boolean p1, v0, Lcom/google/android/gms/internal/ads/o9;->l:Z

    xor-int/lit8 p1, p1, 0x1

    invoke-virtual {v0, p1}, Lcom/google/android/gms/internal/ads/o9;->a(Z)V

    goto :goto_3c

    :cond_24
    iget p1, v0, Lcom/google/android/gms/internal/ads/o9;->h:I

    if-eqz p1, :cond_3c

    .line 4
    iget p1, v0, Lcom/google/android/gms/internal/ads/o9;->i:I

    int-to-long p1, p1

    mul-long/2addr p1, p3

    const-wide/32 p3, 0xf4240

    div-long/2addr p1, p3

    .line 5
    iput-wide p1, v0, Lcom/google/android/gms/internal/ads/o9;->e:J

    iget-object p3, v0, Lcom/google/android/gms/internal/ads/o9;->d:Lz5/kw1;

    sget p4, Lz5/r7;->a:I

    invoke-interface {p3, p1, p2}, Lz5/kw1;->a(J)V

    const/4 p1, 0x2

    iput p1, v0, Lcom/google/android/gms/internal/ads/o9;->h:I

    :cond_3c
    :goto_3c
    return-void
.end method
