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

# interfaces
.implements Lz5/zt1;


# static fields
.field public static final m:[I

.field public static final n:[I

.field public static final o:[B

.field public static final p:[B

.field public static final q:I


# instance fields
.field public final a:[B

.field public b:Z

.field public c:J

.field public d:I

.field public e:I

.field public f:Z

.field public g:I

.field public h:I

.field public i:Lz5/bu1;

.field public j:Lz5/ou1;

.field public k:Lz5/lu1;

.field public l:Z


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

    const/16 v0, 0x10

    new-array v1, v0, [I

    fill-array-data v1, :array_28

    sput-object v1, Lz5/pu1;->m:[I

    new-array v0, v0, [I

    fill-array-data v0, :array_4c

    sput-object v0, Lz5/pu1;->n:[I

    const-string v1, "#!AMR\n"

    invoke-static {v1}, Lz5/r7;->r(Ljava/lang/String;)[B

    move-result-object v1

    sput-object v1, Lz5/pu1;->o:[B

    const-string v1, "#!AMR-WB\n"

    invoke-static {v1}, Lz5/r7;->r(Ljava/lang/String;)[B

    move-result-object v1

    sput-object v1, Lz5/pu1;->p:[B

    const/16 v1, 0x8

    aget v0, v0, v1

    sput v0, Lz5/pu1;->q:I

    return-void

    nop

    :array_28
    .array-data 4
        0xd
        0xe
        0x10
        0x12
        0x14
        0x15
        0x1b
        0x20
        0x6
        0x7
        0x6
        0x6
        0x1
        0x1
        0x1
        0x1
    .end array-data

    :array_4c
    .array-data 4
        0x12
        0x18
        0x21
        0x25
        0x29
        0x2f
        0x33
        0x3b
        0x3d
        0x6
        0x1
        0x1
        0x1
        0x1
        0x1
        0x1
    .end array-data
.end method

.method public constructor <init>()V
    .registers 2

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

    const/4 v0, 0x1

    new-array v0, v0, [B

    iput-object v0, p0, Lz5/pu1;->a:[B

    const/4 v0, -0x1

    iput v0, p0, Lz5/pu1;->g:I

    return-void
.end method


# virtual methods
.method public final a(Lz5/au1;)Z
    .registers 7

    sget-object v0, Lz5/pu1;->o:[B

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

    array-length v1, v0

    new-array v2, v1, [B

    move-object v3, p1

    check-cast v3, Lz5/vt1;

    const/4 v4, 0x0

    invoke-virtual {v3, v2, v4, v1, v4}, Lz5/vt1;->k([BIIZ)Z

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

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_1a

    .line 2
    iput-boolean v4, p0, Lz5/pu1;->b:Z

    array-length p1, v0

    goto :goto_2e

    :cond_1a
    sget-object v0, Lz5/pu1;->p:[B

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

    array-length p1, v0

    new-array v1, p1, [B

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

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

    move-result p1

    if-eqz p1, :cond_32

    .line 4
    iput-boolean v2, p0, Lz5/pu1;->b:Z

    array-length p1, v0

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

    return v2

    :cond_32
    return v4
.end method

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

    invoke-virtual {p0, p1}, Lz5/pu1;->a(Lz5/au1;)Z

    move-result p1

    return p1
.end method

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

    iget-object p2, p0, Lz5/pu1;->j:Lz5/ou1;

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

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

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

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long p2, v0, v2

    const/4 v0, 0x0

    if-nez p2, :cond_20

    invoke-virtual {p0, p1}, Lz5/pu1;->a(Lz5/au1;)Z

    move-result p2

    if-eqz p2, :cond_19

    goto :goto_20

    :cond_19
    const-string p1, "Could not find AMR header."

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

    move-result-object p1

    throw p1

    :cond_20
    :goto_20
    iget-boolean p2, p0, Lz5/pu1;->l:Z

    const/4 v1, 0x1

    if-nez p2, :cond_50

    iput-boolean v1, p0, Lz5/pu1;->l:Z

    iget-boolean p2, p0, Lz5/pu1;->b:Z

    if-eq v1, p2, :cond_2e

    const-string v4, "audio/3gpp"

    goto :goto_30

    :cond_2e
    const-string v4, "audio/amr-wb"

    :goto_30
    if-eq v1, p2, :cond_35

    const/16 p2, 0x1f40

    goto :goto_37

    :cond_35
    const/16 p2, 0x3e80

    :goto_37
    iget-object v5, p0, Lz5/pu1;->j:Lz5/ou1;

    new-instance v6, Lz5/w2;

    invoke-direct {v6}, Lz5/w2;-><init>()V

    .line 1
    iput-object v4, v6, Lz5/w2;->j:Ljava/lang/String;

    .line 2
    sget v4, Lz5/pu1;->q:I

    .line 3
    iput v4, v6, Lz5/w2;->k:I

    .line 4
    iput v1, v6, Lz5/w2;->w:I

    .line 5
    iput p2, v6, Lz5/w2;->x:I

    .line 6
    new-instance p2, Lz5/x2;

    .line 7
    invoke-direct {p2, v6}, Lz5/x2;-><init>(Lz5/w2;)V

    .line 8
    invoke-interface {v5, p2}, Lz5/ou1;->a(Lz5/x2;)V

    .line 9
    :cond_50
    iget p2, p0, Lz5/pu1;->e:I

    const/4 v4, -0x1

    const/4 v5, 0x0

    if-nez p2, :cond_e6

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

    iget-object p2, p0, Lz5/pu1;->a:[B

    move-object v6, p1

    check-cast v6, Lz5/vt1;

    invoke-virtual {v6, p2, v5, v1, v5}, Lz5/vt1;->k([BIIZ)Z

    iget-object p2, p0, Lz5/pu1;->a:[B

    aget-byte p2, p2, v5

    and-int/lit16 v6, p2, 0x83

    if-gtz v6, :cond_ce

    shr-int/lit8 p2, p2, 0x3

    and-int/lit8 p2, p2, 0xf

    iget-boolean v6, p0, Lz5/pu1;->b:Z

    if-eqz v6, :cond_7a

    const/16 v7, 0xa

    if-lt p2, v7, :cond_85

    const/16 v7, 0xd

    if-le p2, v7, :cond_7a

    goto :goto_85

    :cond_7a
    if-nez v6, :cond_a3

    const/16 v7, 0xc

    if-lt p2, v7, :cond_85

    const/16 v7, 0xe

    if-gt p2, v7, :cond_85

    goto :goto_a3

    :cond_85
    :goto_85
    if-eqz v6, :cond_8c

    sget-object v0, Lz5/pu1;->n:[I

    aget p2, v0, p2

    goto :goto_90

    :cond_8c
    sget-object v0, Lz5/pu1;->m:[I

    aget p2, v0, p2

    :goto_90
    iput p2, p0, Lz5/pu1;->d:I
    :try_end_92
    .catch Ljava/io/EOFException; {:try_start_56 .. :try_end_92} :catch_10b

    iput p2, p0, Lz5/pu1;->e:I

    iget v0, p0, Lz5/pu1;->g:I

    if-ne v0, v4, :cond_9b

    iput p2, p0, Lz5/pu1;->g:I

    move v0, p2

    :cond_9b
    if-ne v0, p2, :cond_e6

    iget v0, p0, Lz5/pu1;->h:I

    add-int/2addr v0, v1

    iput v0, p0, Lz5/pu1;->h:I

    goto :goto_e6

    :cond_a3
    :goto_a3
    :try_start_a3
    const-string p1, "WB"

    const-string v5, "NB"

    if-eq v1, v6, :cond_aa

    move-object p1, v5

    :cond_aa
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v5

    add-int/lit8 v5, v5, 0x23

    new-instance v6, Ljava/lang/StringBuilder;

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

    const-string v5, "Illegal AMR "

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

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

    const-string p1, " frame type "

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

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

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

    move-result-object p1

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

    move-result-object p1

    throw p1

    :cond_ce
    new-instance p1, Ljava/lang/StringBuilder;

    const/16 v5, 0x2a

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

    const-string v5, "Invalid padding bits for frame header "

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

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

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

    move-result-object p1

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

    move-result-object p1

    throw p1
    :try_end_e6
    .catch Ljava/io/EOFException; {:try_start_a3 .. :try_end_e6} :catch_10b

    :cond_e6
    :goto_e6
    iget-object v0, p0, Lz5/pu1;->j:Lz5/ou1;

    invoke-static {v0, p1, p2, v1}, Lz5/vo;->a(Lz5/ou1;Lz5/q3;IZ)I

    move-result p1

    if-ne p1, v4, :cond_ef

    goto :goto_10b

    :cond_ef
    iget p2, p0, Lz5/pu1;->e:I

    sub-int/2addr p2, p1

    iput p2, p0, Lz5/pu1;->e:I

    if-lez p2, :cond_f7

    goto :goto_10a

    :cond_f7
    iget-object v6, p0, Lz5/pu1;->j:Lz5/ou1;

    iget-wide v7, p0, Lz5/pu1;->c:J

    const/4 v9, 0x1

    iget v10, p0, Lz5/pu1;->d:I

    const/4 v11, 0x0

    const/4 v12, 0x0

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

    iget-wide p1, p0, Lz5/pu1;->c:J

    const-wide/16 v6, 0x4e20

    add-long/2addr p1, v6

    iput-wide p1, p0, Lz5/pu1;->c:J

    :goto_10a
    move v4, v5

    .line 10
    :catch_10b
    :goto_10b
    iget-boolean p1, p0, Lz5/pu1;->f:Z

    if-eqz p1, :cond_110

    return v4

    :cond_110
    new-instance p1, Lz5/eu1;

    const-wide v5, -0x7fffffffffffffffL    # -4.9E-324

    invoke-direct {p1, v5, v6, v2, v3}, Lz5/eu1;-><init>(JJ)V

    iput-object p1, p0, Lz5/pu1;->k:Lz5/lu1;

    iget-object p2, p0, Lz5/pu1;->i:Lz5/bu1;

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

    iput-boolean v1, p0, Lz5/pu1;->f:Z

    return v4
.end method

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

    iput-object p1, p0, Lz5/pu1;->i:Lz5/bu1;

    const/4 v0, 0x0

    const/4 v1, 0x1

    invoke-interface {p1, v0, v1}, Lz5/bu1;->c(II)Lz5/ou1;

    move-result-object v0

    iput-object v0, p0, Lz5/pu1;->j:Lz5/ou1;

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

    return-void
.end method

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

    const-wide/16 p1, 0x0

    iput-wide p1, p0, Lz5/pu1;->c:J

    const/4 p1, 0x0

    iput p1, p0, Lz5/pu1;->d:I

    iput p1, p0, Lz5/pu1;->e:I

    return-void
.end method
