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

# interfaces
.implements Lz5/zt1;


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

.field public b:Lz5/ou1;

.field public c:Lz5/ux1;

.field public d:I

.field public e:J


# direct methods
.method public constructor <init>()V
    .registers 3

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

    const/4 v0, -0x1

    iput v0, p0, Lz5/wx1;->d:I

    const-wide/16 v0, -0x1

    iput-wide v0, p0, Lz5/wx1;->e:J

    return-void
.end method


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

    invoke-static {p1}, Lcom/google/android/gms/internal/ads/h8;->d(Lz5/au1;)Lz5/d41;

    move-result-object p1

    if-eqz p1, :cond_8

    const/4 p1, 0x1

    return p1

    :cond_8
    const/4 p1, 0x0

    return p1
.end method

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

    iget-object p2, p0, Lz5/wx1;->b: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

    iget-object p2, p0, Lz5/wx1;->c:Lz5/ux1;

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-nez p2, :cond_92

    invoke-static {p1}, Lcom/google/android/gms/internal/ads/h8;->d(Lz5/au1;)Lz5/d41;

    move-result-object v5

    if-eqz v5, :cond_8a

    iget p2, v5, Lz5/d41;->b:I

    const/16 v2, 0x11

    if-ne p2, v2, :cond_23

    new-instance p2, Lz5/tx1;

    iget-object v2, p0, Lz5/wx1;->a:Lz5/bu1;

    iget-object v3, p0, Lz5/wx1;->b:Lz5/ou1;

    invoke-direct {p2, v2, v3, v5}, Lz5/tx1;-><init>(Lz5/bu1;Lz5/ou1;Lz5/d41;)V

    goto :goto_6d

    :cond_23
    const/4 v2, 0x6

    if-ne p2, v2, :cond_34

    new-instance p2, Lz5/vx1;

    iget-object v3, p0, Lz5/wx1;->a:Lz5/bu1;

    iget-object v4, p0, Lz5/wx1;->b:Lz5/ou1;

    const/4 v7, -0x1

    const-string v6, "audio/g711-alaw"

    move-object v2, p2

    invoke-direct/range {v2 .. v7}, Lz5/vx1;-><init>(Lz5/bu1;Lz5/ou1;Lz5/d41;Ljava/lang/String;I)V

    goto :goto_6d

    :cond_34
    const/4 v2, 0x7

    if-ne p2, v2, :cond_45

    new-instance p2, Lz5/vx1;

    iget-object v3, p0, Lz5/wx1;->a:Lz5/bu1;

    iget-object v4, p0, Lz5/wx1;->b:Lz5/ou1;

    const/4 v7, -0x1

    const-string v6, "audio/g711-mlaw"

    move-object v2, p2

    invoke-direct/range {v2 .. v7}, Lz5/vx1;-><init>(Lz5/bu1;Lz5/ou1;Lz5/d41;Ljava/lang/String;I)V

    goto :goto_6d

    :cond_45
    iget v2, v5, Lz5/d41;->f:I

    if-eq p2, v0, :cond_5a

    const/4 v3, 0x3

    if-eq p2, v3, :cond_52

    const v3, 0xfffe

    if-eq p2, v3, :cond_5a

    goto :goto_58

    :cond_52
    const/16 p2, 0x20

    if-ne v2, p2, :cond_58

    const/4 p2, 0x4

    goto :goto_5e

    :cond_58
    :goto_58
    move v7, v1

    goto :goto_5f

    :cond_5a
    invoke-static {v2}, Lz5/r7;->g(I)I

    move-result p2

    :goto_5e
    move v7, p2

    :goto_5f
    if-eqz v7, :cond_70

    new-instance p2, Lz5/vx1;

    iget-object v3, p0, Lz5/wx1;->a:Lz5/bu1;

    iget-object v4, p0, Lz5/wx1;->b:Lz5/ou1;

    const-string v6, "audio/raw"

    move-object v2, p2

    invoke-direct/range {v2 .. v7}, Lz5/vx1;-><init>(Lz5/bu1;Lz5/ou1;Lz5/d41;Ljava/lang/String;I)V

    :goto_6d
    iput-object p2, p0, Lz5/wx1;->c:Lz5/ux1;

    goto :goto_92

    :cond_70
    iget p1, v5, Lz5/d41;->b:I

    new-instance p2, Ljava/lang/StringBuilder;

    const/16 v0, 0x28

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

    const-string v0, "Unsupported WAV format type: "

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

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

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

    move-result-object p1

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

    move-result-object p1

    throw p1

    :cond_8a
    const/4 p1, 0x0

    const-string p2, "Unsupported or unrecognized wav header."

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

    move-result-object p1

    throw p1

    :cond_92
    :goto_92
    iget p2, p0, Lz5/wx1;->d:I

    const-wide/16 v2, -0x1

    const/4 v4, -0x1

    if-ne p2, v4, :cond_162

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

    new-instance p2, Lz5/j7;

    const/16 v5, 0x8

    invoke-direct {p2, v5, v1}, Lz5/j7;-><init>(II)V

    :goto_a3
    invoke-static {p1, p2}, Lz5/hs1;->a(Lz5/au1;Lz5/j7;)Lz5/hs1;

    move-result-object v6

    iget v7, v6, Lz5/hs1;->a:I

    const v8, 0x64617461

    const-string v9, "WavHeaderReader"

    if-eq v7, v8, :cond_102

    const v8, 0x52494646

    if-eq v7, v8, :cond_d0

    const v10, 0x666d7420

    if-eq v7, v10, :cond_d0

    new-instance v10, Ljava/lang/StringBuilder;

    const/16 v11, 0x27

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

    const-string v11, "Ignoring unknown WAV chunk: "

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

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

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

    move-result-object v7

    invoke-static {v9, v7}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_d0
    iget-wide v9, v6, Lz5/hs1;->b:J

    const-wide/16 v11, 0x8

    add-long/2addr v9, v11

    iget v6, v6, Lz5/hs1;->a:I

    if-ne v6, v8, :cond_db

    const-wide/16 v9, 0xc

    :cond_db
    const-wide/32 v7, 0x7fffffff

    cmp-long v7, v9, v7

    if-gtz v7, :cond_ea

    move-object v6, p1

    check-cast v6, Lz5/vt1;

    long-to-int v7, v9

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

    goto :goto_a3

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

    const/16 p2, 0x33

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

    const-string p2, "Chunk is too large (~2GB+) to skip; id: "

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

    invoke-virtual {p1, v6}, 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}, Lz5/r3;->d(Ljava/lang/String;)Lz5/r3;

    move-result-object p1

    throw p1

    :cond_102
    move-object p2, p1

    check-cast p2, Lz5/vt1;

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

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

    move-result-wide v7

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

    add-long/2addr v5, v7

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

    move-result-wide v10

    cmp-long p2, v10, v2

    if-eqz p2, :cond_13a

    cmp-long p2, v5, v10

    if-lez p2, :cond_13a

    new-instance p2, Ljava/lang/StringBuilder;

    const/16 v12, 0x45

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

    const-string v12, "Data exceeds input length: "

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

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

    const-string v5, ", "

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

    invoke-virtual {p2, v10, v11}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

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

    move-result-object p2

    invoke-static {v9, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    move-wide v5, v10

    :cond_13a
    invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p2

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    invoke-static {p2, v5}, Landroid/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroid/util/Pair;

    move-result-object p2

    iget-object v5, p2, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v5, Ljava/lang/Long;

    invoke-virtual {v5}, Ljava/lang/Long;->intValue()I

    move-result v5

    iput v5, p0, Lz5/wx1;->d:I

    iget-object p2, p2, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast p2, Ljava/lang/Long;

    invoke-virtual {p2}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    iput-wide v5, p0, Lz5/wx1;->e:J

    iget-object p2, p0, Lz5/wx1;->c:Lz5/ux1;

    iget v7, p0, Lz5/wx1;->d:I

    invoke-interface {p2, v7, v5, v6}, Lz5/ux1;->b(IJ)V

    goto :goto_174

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

    move-result-wide v5

    const-wide/16 v7, 0x0

    cmp-long p2, v5, v7

    if-nez p2, :cond_174

    iget p2, p0, Lz5/wx1;->d:I

    move-object v5, p1

    check-cast v5, Lz5/vt1;

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

    :cond_174
    :goto_174
    iget-wide v5, p0, Lz5/wx1;->e:J

    cmp-long p2, v5, v2

    if-eqz p2, :cond_17b

    goto :goto_17c

    :cond_17b
    move v0, v1

    :goto_17c
    invoke-static {v0}, Lcom/google/android/gms/internal/ads/d;->n(Z)V

    iget-wide v2, p0, Lz5/wx1;->e:J

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

    move-result-wide v5

    iget-object p2, p0, Lz5/wx1;->c:Lz5/ux1;

    sub-long/2addr v2, v5

    invoke-interface {p2, p1, v2, v3}, Lz5/ux1;->c(Lz5/au1;J)Z

    move-result p1

    if-eqz p1, :cond_18f

    return v4

    :cond_18f
    return v1
.end method

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

    iput-object p1, p0, Lz5/wx1;->a: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/wx1;->b:Lz5/ou1;

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

    return-void
.end method

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

    iget-object p1, p0, Lz5/wx1;->c:Lz5/ux1;

    if-eqz p1, :cond_7

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

    :cond_7
    return-void
.end method
