.class public final Lz5/j9;
.super Lz5/gb;
.source ""

# interfaces
.implements Lz5/yd;


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x10
.end annotation


# instance fields
.field public final Q:Landroidx/appcompat/widget/n;

.field public final R:Lz5/g9;

.field public S:Z

.field public T:I

.field public U:I

.field public V:J

.field public W:Z


# direct methods
.method public constructor <init>(Lz5/ib;Lz5/u9;ZLandroid/os/Handler;Lz5/y8;)V
    .registers 6

    const/4 p2, 0x0

    new-array p2, p2, [Lz5/v8;

    const/4 p3, 0x1

    invoke-direct {p0, p3, p1}, Lz5/gb;-><init>(ILz5/ib;)V

    new-instance p1, Lz5/g9;

    new-instance p3, Lz5/i9;

    invoke-direct {p3, p0}, Lz5/i9;-><init>(Lz5/j9;)V

    invoke-direct {p1, p2, p3}, Lz5/g9;-><init>([Lz5/v8;Lz5/i9;)V

    iput-object p1, p0, Lz5/j9;->R:Lz5/g9;

    new-instance p1, Landroidx/appcompat/widget/n;

    invoke-direct {p1, p4, p5}, Landroidx/appcompat/widget/n;-><init>(Landroid/os/Handler;Lz5/y8;)V

    iput-object p1, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    return-void
.end method


# virtual methods
.method public final a(Lz5/l8;)Lz5/l8;
    .registers 3

    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual {v0, p1}, Lz5/g9;->e(Lz5/l8;)Lz5/l8;

    move-result-object p1

    return-object p1
.end method

.method public final c()Z
    .registers 5

    .line 1
    iget-boolean v0, p0, Lz5/gb;->M:Z

    const/4 v1, 0x0

    if-eqz v0, :cond_1f

    .line 2
    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    .line 3
    invoke-virtual {v0}, Lz5/g9;->l()Z

    move-result v2

    const/4 v3, 0x1

    if-eqz v2, :cond_1b

    iget-boolean v2, v0, Lz5/g9;->Q:Z

    if-eqz v2, :cond_19

    invoke-virtual {v0}, Lz5/g9;->d()Z

    move-result v0

    if-nez v0, :cond_19

    goto :goto_1b

    :cond_19
    move v0, v1

    goto :goto_1c

    :cond_1b
    :goto_1b
    move v0, v3

    :goto_1c
    if-eqz v0, :cond_1f

    return v3

    :cond_1f
    return v1
.end method

.method public final f()J
    .registers 21

    move-object/from16 v0, p0

    iget-object v1, v0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual/range {p0 .. p0}, Lz5/j9;->c()Z

    move-result v2

    .line 1
    invoke-virtual {v1}, Lz5/g9;->l()Z

    move-result v3

    if-eqz v3, :cond_1e8

    iget v3, v1, Lz5/g9;->E:I

    if-eqz v3, :cond_1e8

    iget-object v3, v1, Lz5/g9;->i:Landroid/media/AudioTrack;

    invoke-virtual {v3}, Landroid/media/AudioTrack;->getPlayState()I

    move-result v3

    const/4 v5, 0x3

    const-wide/32 v6, 0xf4240

    const-wide/16 v8, 0x3e8

    if-ne v3, v5, :cond_131

    iget-object v3, v1, Lz5/g9;->g:Lz5/a9;

    .line 2
    invoke-virtual {v3}, Lz5/a9;->b()J

    move-result-wide v10

    mul-long/2addr v10, v6

    iget v3, v3, Lz5/a9;->c:I

    int-to-long v5, v3

    div-long/2addr v10, v5

    const-wide/16 v5, 0x0

    cmp-long v3, v10, v5

    if-nez v3, :cond_33

    goto/16 :goto_131

    .line 3
    :cond_33
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v12

    div-long/2addr v12, v8

    iget-wide v14, v1, Lz5/g9;->w:J

    sub-long v14, v12, v14

    const-wide/16 v16, 0x7530

    cmp-long v3, v14, v16

    if-ltz v3, :cond_71

    iget-object v3, v1, Lz5/g9;->f:[J

    iget v7, v1, Lz5/g9;->t:I

    sub-long v14, v10, v12

    aput-wide v14, v3, v7

    add-int/lit8 v7, v7, 0x1

    const/16 v3, 0xa

    rem-int/2addr v7, v3

    iput v7, v1, Lz5/g9;->t:I

    iget v7, v1, Lz5/g9;->u:I

    if-ge v7, v3, :cond_59

    add-int/lit8 v7, v7, 0x1

    iput v7, v1, Lz5/g9;->u:I

    :cond_59
    iput-wide v12, v1, Lz5/g9;->w:J

    iput-wide v5, v1, Lz5/g9;->v:J

    const/4 v3, 0x0

    :goto_5e
    iget v5, v1, Lz5/g9;->u:I

    if-ge v3, v5, :cond_71

    iget-wide v6, v1, Lz5/g9;->v:J

    iget-object v14, v1, Lz5/g9;->f:[J

    aget-wide v15, v14, v3

    int-to-long v4, v5

    div-long/2addr v15, v4

    add-long v4, v15, v6

    iput-wide v4, v1, Lz5/g9;->v:J

    add-int/lit8 v3, v3, 0x1

    goto :goto_5e

    :cond_71
    invoke-virtual {v1}, Lz5/g9;->p()Z

    move-result v3

    if-nez v3, :cond_131

    iget-wide v3, v1, Lz5/g9;->y:J

    sub-long v3, v12, v3

    const-wide/32 v5, 0x7a120

    cmp-long v3, v3, v5

    if-ltz v3, :cond_131

    iget-object v3, v1, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v3}, Lz5/a9;->c()Z

    move-result v3

    iput-boolean v3, v1, Lz5/g9;->x:Z

    const-string v4, "AudioTrack"

    if-eqz v3, :cond_e9

    iget-object v3, v1, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v3}, Lz5/a9;->d()J

    move-result-wide v5

    div-long/2addr v5, v8

    iget-object v3, v1, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v3}, Lz5/a9;->e()J

    move-result-wide v7

    iget-wide v14, v1, Lz5/g9;->G:J

    cmp-long v9, v5, v14

    if-gez v9, :cond_a3

    :goto_a1
    const/4 v3, 0x0

    goto :goto_e7

    :cond_a3
    sub-long v14, v5, v12

    invoke-static {v14, v15}, Ljava/lang/Math;->abs(J)J

    move-result-wide v14

    const-wide/32 v16, 0x4c4b40

    cmp-long v9, v14, v16

    const-string v14, ", "

    if-lez v9, :cond_bc

    new-instance v9, Ljava/lang/StringBuilder;

    const/16 v15, 0x88

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

    const-string v15, "Spurious audio timestamp (system clock mismatch): "

    goto :goto_d3

    :cond_bc
    invoke-virtual {v1, v7, v8}, Lz5/g9;->m(J)J

    move-result-wide v18

    sub-long v18, v18, v10

    invoke-static/range {v18 .. v19}, Ljava/lang/Math;->abs(J)J

    move-result-wide v18

    cmp-long v9, v18, v16

    if-lez v9, :cond_e9

    new-instance v9, Ljava/lang/StringBuilder;

    const/16 v15, 0x8a

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

    const-string v15, "Spurious audio timestamp (frame position mismatch): "

    :goto_d3
    invoke-static {v9, v15, v7, v8, v14}, Li/c;->a(Ljava/lang/StringBuilder;Ljava/lang/String;JLjava/lang/String;)V

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

    invoke-static {v9, v14, v12, v13, v14}, Li/c;->a(Ljava/lang/StringBuilder;Ljava/lang/String;JLjava/lang/String;)V

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

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

    move-result-object v5

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

    goto :goto_a1

    :goto_e7
    iput-boolean v3, v1, Lz5/g9;->x:Z

    :cond_e9
    iget-object v3, v1, Lz5/g9;->z:Ljava/lang/reflect/Method;

    if-eqz v3, :cond_12f

    const/4 v5, 0x0

    :try_start_ee
    iget-object v6, v1, Lz5/g9;->i:Landroid/media/AudioTrack;

    invoke-virtual {v3, v6, v5}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Integer;

    invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I

    move-result v3

    int-to-long v6, v3

    const-wide/16 v8, 0x3e8

    mul-long/2addr v6, v8

    iget-wide v8, v1, Lz5/g9;->o:J

    sub-long/2addr v6, v8

    iput-wide v6, v1, Lz5/g9;->H:J

    const-wide/16 v8, 0x0

    invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v6

    iput-wide v6, v1, Lz5/g9;->H:J

    const-wide/32 v8, 0x4c4b40

    cmp-long v3, v6, v8

    if-lez v3, :cond_12f

    new-instance v3, Ljava/lang/StringBuilder;

    const/16 v8, 0x3d

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

    const-string v8, "Ignoring impossibly large audio latency: "

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

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

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

    move-result-object v3

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

    const-wide/16 v3, 0x0

    iput-wide v3, v1, Lz5/g9;->H:J
    :try_end_12c
    .catch Ljava/lang/Exception; {:try_start_ee .. :try_end_12c} :catch_12d

    goto :goto_12f

    :catch_12d
    iput-object v5, v1, Lz5/g9;->z:Ljava/lang/reflect/Method;

    :cond_12f
    :goto_12f
    iput-wide v12, v1, Lz5/g9;->y:J

    :cond_131
    :goto_131
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v3

    const-wide/16 v5, 0x3e8

    div-long/2addr v3, v5

    iget-boolean v7, v1, Lz5/g9;->x:Z

    if-eqz v7, :cond_154

    iget-object v2, v1, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v2}, Lz5/a9;->d()J

    move-result-wide v7

    div-long/2addr v7, v5

    sub-long/2addr v3, v7

    invoke-virtual {v1, v3, v4}, Lz5/g9;->n(J)J

    move-result-wide v2

    iget-object v4, v1, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v4}, Lz5/a9;->e()J

    move-result-wide v4

    add-long/2addr v4, v2

    invoke-virtual {v1, v4, v5}, Lz5/g9;->m(J)J

    move-result-wide v2

    goto :goto_173

    :cond_154
    iget v5, v1, Lz5/g9;->u:I

    if-nez v5, :cond_168

    iget-object v3, v1, Lz5/g9;->g:Lz5/a9;

    .line 4
    invoke-virtual {v3}, Lz5/a9;->b()J

    move-result-wide v4

    const-wide/32 v6, 0xf4240

    mul-long/2addr v4, v6

    iget v3, v3, Lz5/a9;->c:I

    int-to-long v6, v3

    div-long/2addr v4, v6

    move-wide v3, v4

    goto :goto_16b

    .line 5
    :cond_168
    iget-wide v5, v1, Lz5/g9;->v:J

    add-long/2addr v3, v5

    :goto_16b
    if-nez v2, :cond_172

    iget-wide v5, v1, Lz5/g9;->H:J

    sub-long v2, v3, v5

    goto :goto_173

    :cond_172
    move-wide v2, v3

    :goto_173
    iget-wide v4, v1, Lz5/g9;->F:J

    :goto_175
    iget-object v6, v1, Lz5/g9;->h:Ljava/util/LinkedList;

    invoke-virtual {v6}, Ljava/util/LinkedList;->isEmpty()Z

    move-result v6

    if-nez v6, :cond_1a3

    iget-object v6, v1, Lz5/g9;->h:Ljava/util/LinkedList;

    invoke-virtual {v6}, Ljava/util/LinkedList;->getFirst()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lz5/e9;

    .line 6
    iget-wide v6, v6, Lz5/e9;->c:J

    cmp-long v6, v2, v6

    if-ltz v6, :cond_1a3

    .line 7
    iget-object v6, v1, Lz5/g9;->h:Ljava/util/LinkedList;

    invoke-virtual {v6}, Ljava/util/LinkedList;->remove()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lz5/e9;

    .line 8
    iget-object v7, v6, Lz5/e9;->a:Lz5/l8;

    .line 9
    iput-object v7, v1, Lz5/g9;->q:Lz5/l8;

    .line 10
    iget-wide v7, v6, Lz5/e9;->c:J

    .line 11
    iput-wide v7, v1, Lz5/g9;->s:J

    .line 12
    iget-wide v6, v6, Lz5/e9;->b:J

    .line 13
    iget-wide v8, v1, Lz5/g9;->F:J

    sub-long/2addr v6, v8

    iput-wide v6, v1, Lz5/g9;->r:J

    goto :goto_175

    :cond_1a3
    iget-object v6, v1, Lz5/g9;->q:Lz5/l8;

    iget v6, v6, Lz5/l8;->a:F

    const/high16 v7, 0x3f800000    # 1.0f

    cmpl-float v6, v6, v7

    if-nez v6, :cond_1b4

    iget-wide v6, v1, Lz5/g9;->r:J

    add-long/2addr v2, v6

    iget-wide v6, v1, Lz5/g9;->s:J

    sub-long/2addr v2, v6

    goto :goto_1e6

    :cond_1b4
    iget-object v6, v1, Lz5/g9;->h:Ljava/util/LinkedList;

    invoke-virtual {v6}, Ljava/util/LinkedList;->isEmpty()Z

    move-result v6

    if-eqz v6, :cond_1d7

    iget-object v6, v1, Lz5/g9;->b:Lz5/m9;

    .line 14
    iget-wide v11, v6, Lz5/m9;->k:J

    const-wide/16 v7, 0x400

    cmp-long v7, v11, v7

    if-ltz v7, :cond_1d7

    .line 15
    iget-wide v9, v1, Lz5/g9;->r:J

    iget-wide v7, v1, Lz5/g9;->s:J

    sub-long v7, v2, v7

    .line 16
    iget-wide v1, v6, Lz5/m9;->j:J

    move-wide v15, v9

    move-wide v9, v1

    .line 17
    invoke-static/range {v7 .. v12}, Lz5/be;->e(JJJ)J

    move-result-wide v1

    add-long v2, v1, v15

    goto :goto_1e6

    :cond_1d7
    iget-wide v6, v1, Lz5/g9;->r:J

    iget-object v8, v1, Lz5/g9;->q:Lz5/l8;

    iget v8, v8, Lz5/l8;->a:F

    float-to-double v8, v8

    iget-wide v10, v1, Lz5/g9;->s:J

    sub-long/2addr v2, v10

    long-to-double v1, v2

    mul-double/2addr v8, v1

    double-to-long v1, v8

    add-long v2, v1, v6

    :goto_1e6
    add-long/2addr v4, v2

    goto :goto_1ea

    :cond_1e8
    const-wide/high16 v4, -0x8000000000000000L

    :goto_1ea
    const-wide/high16 v1, -0x8000000000000000L

    cmp-long v1, v4, v1

    if-eqz v1, :cond_200

    .line 18
    iget-boolean v1, v0, Lz5/j9;->W:Z

    if-eqz v1, :cond_1f5

    goto :goto_1fb

    :cond_1f5
    iget-wide v1, v0, Lz5/j9;->V:J

    invoke-static {v1, v2, v4, v5}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v4

    :goto_1fb
    iput-wide v4, v0, Lz5/j9;->V:J

    const/4 v1, 0x0

    iput-boolean v1, v0, Lz5/j9;->W:Z

    :cond_200
    iget-wide v1, v0, Lz5/j9;->V:J

    return-wide v1
.end method

.method public final i(ILjava/lang/Object;)V
    .registers 4

    const/4 v0, 0x2

    if-eq p1, v0, :cond_4

    return-void

    :cond_4
    iget-object p1, p0, Lz5/j9;->R:Lz5/g9;

    check-cast p2, Ljava/lang/Float;

    invoke-virtual {p2}, Ljava/lang/Float;->floatValue()F

    move-result p2

    .line 1
    iget v0, p1, Lz5/g9;->I:F

    cmpl-float v0, v0, p2

    if-eqz v0, :cond_17

    iput p2, p1, Lz5/g9;->I:F

    invoke-virtual {p1}, Lz5/g9;->k()V

    :cond_17
    return-void
.end method

.method public final k(Z)V
    .registers 5

    .line 1
    new-instance p1, Lz5/p9;

    invoke-direct {p1}, Lz5/p9;-><init>()V

    iput-object p1, p0, Lz5/gb;->O:Lz5/p9;

    .line 2
    iget-object v0, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    .line 3
    iget-object v1, v0, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

    check-cast v1, Landroid/os/Handler;

    new-instance v2, Ll5/m;

    invoke-direct {v2, v0, p1}, Ll5/m;-><init>(Landroidx/appcompat/widget/n;Lz5/p9;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 4
    iget-object p1, p0, Lz5/w7;->b:Lz5/n8;

    .line 5
    invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method public final l()Lz5/l8;
    .registers 2

    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    .line 1
    iget-object v0, v0, Lz5/g9;->q:Lz5/l8;

    return-object v0
.end method

.method public final n(JZ)V
    .registers 4

    invoke-super {p0, p1, p2, p3}, Lz5/gb;->n(JZ)V

    iget-object p3, p0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual {p3}, Lz5/g9;->f()V

    iput-wide p1, p0, Lz5/j9;->V:J

    const/4 p1, 0x1

    iput-boolean p1, p0, Lz5/j9;->W:Z

    return-void
.end method

.method public final o()V
    .registers 2

    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual {v0}, Lz5/g9;->b()V

    return-void
.end method

.method public final p()V
    .registers 6

    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    const/4 v1, 0x0

    .line 1
    iput-boolean v1, v0, Lz5/g9;->R:Z

    invoke-virtual {v0}, Lz5/g9;->l()Z

    move-result v2

    if-eqz v2, :cond_2c

    const-wide/16 v2, 0x0

    .line 2
    iput-wide v2, v0, Lz5/g9;->v:J

    iput v1, v0, Lz5/g9;->u:I

    iput v1, v0, Lz5/g9;->t:I

    iput-wide v2, v0, Lz5/g9;->w:J

    iput-boolean v1, v0, Lz5/g9;->x:Z

    iput-wide v2, v0, Lz5/g9;->y:J

    .line 3
    iget-object v0, v0, Lz5/g9;->g:Lz5/a9;

    .line 4
    iget-wide v1, v0, Lz5/a9;->g:J

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

    cmp-long v1, v1, v3

    if-eqz v1, :cond_27

    goto :goto_2c

    :cond_27
    iget-object v0, v0, Lz5/a9;->a:Landroid/media/AudioTrack;

    invoke-virtual {v0}, Landroid/media/AudioTrack;->pause()V

    :cond_2c
    :goto_2c
    return-void
.end method

.method public final q()V
    .registers 6

    :try_start_0
    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    .line 1
    invoke-virtual {v0}, Lz5/g9;->f()V

    iget-object v1, v0, Lz5/g9;->c:[Lz5/v8;

    const/4 v2, 0x0

    move v3, v2

    :goto_9
    const/4 v4, 0x3

    if-ge v3, v4, :cond_16

    aget-object v4, v1, v3

    invoke-interface {v4}, Lz5/v8;->zzj()V

    add-int/lit8 v3, v3, 0x1

    goto :goto_9

    :catchall_14
    move-exception v0

    goto :goto_36

    :cond_16
    iput v2, v0, Lz5/g9;->S:I

    iput-boolean v2, v0, Lz5/g9;->R:Z
    :try_end_1a
    .catchall {:try_start_0 .. :try_end_1a} :catchall_14

    .line 2
    :try_start_1a
    invoke-super {p0}, Lz5/gb;->q()V
    :try_end_1d
    .catchall {:try_start_1a .. :try_end_1d} :catchall_29

    iget-object v0, p0, Lz5/gb;->O:Lz5/p9;

    .line 3
    monitor-enter v0

    monitor-exit v0

    .line 4
    iget-object v0, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    iget-object v1, p0, Lz5/gb;->O:Lz5/p9;

    invoke-virtual {v0, v1}, Landroidx/appcompat/widget/n;->w(Lz5/p9;)V

    return-void

    :catchall_29
    move-exception v0

    iget-object v1, p0, Lz5/gb;->O:Lz5/p9;

    .line 5
    monitor-enter v1

    monitor-exit v1

    .line 6
    iget-object v1, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    iget-object v2, p0, Lz5/gb;->O:Lz5/p9;

    invoke-virtual {v1, v2}, Landroidx/appcompat/widget/n;->w(Lz5/p9;)V

    throw v0

    :goto_36
    :try_start_36
    invoke-super {p0}, Lz5/gb;->q()V
    :try_end_39
    .catchall {:try_start_36 .. :try_end_39} :catchall_45

    iget-object v1, p0, Lz5/gb;->O:Lz5/p9;

    .line 7
    monitor-enter v1

    monitor-exit v1

    .line 8
    iget-object v1, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    iget-object v2, p0, Lz5/gb;->O:Lz5/p9;

    invoke-virtual {v1, v2}, Landroidx/appcompat/widget/n;->w(Lz5/p9;)V

    throw v0

    :catchall_45
    move-exception v0

    iget-object v1, p0, Lz5/gb;->O:Lz5/p9;

    .line 9
    monitor-enter v1

    monitor-exit v1

    .line 10
    iget-object v1, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    iget-object v2, p0, Lz5/gb;->O:Lz5/p9;

    invoke-virtual {v1, v2}, Landroidx/appcompat/widget/n;->w(Lz5/p9;)V

    throw v0
.end method

.method public final s(Lz5/ib;Lz5/j8;)I
    .registers 12

    iget-object p1, p2, Lz5/j8;->w:Ljava/lang/String;

    invoke-static {p1}, Lz5/vo;->e(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_a

    return v1

    :cond_a
    sget v0, Lz5/be;->a:I

    const/16 v2, 0x15

    if-lt v0, v2, :cond_13

    const/16 v3, 0x10

    goto :goto_14

    :cond_13
    move v3, v1

    :goto_14
    invoke-static {p1, v1}, Lz5/ob;->a(Ljava/lang/String;Z)Lz5/eb;

    move-result-object p1

    const/4 v4, 0x1

    if-nez p1, :cond_1c

    return v4

    :cond_1c
    const/4 v5, 0x2

    const/4 v6, 0x3

    if-lt v0, v2, :cond_74

    iget v0, p2, Lz5/j8;->J:I

    const/4 v2, -0x1

    if-eq v0, v2, :cond_4b

    .line 1
    iget-object v7, p1, Lz5/eb;->f:Landroid/media/MediaCodecInfo$CodecCapabilities;

    if-nez v7, :cond_2c

    const-string v0, "sampleRate.caps"

    goto :goto_43

    :cond_2c
    invoke-virtual {v7}, Landroid/media/MediaCodecInfo$CodecCapabilities;->getAudioCapabilities()Landroid/media/MediaCodecInfo$AudioCapabilities;

    move-result-object v7

    if-nez v7, :cond_35

    const-string v0, "sampleRate.aCaps"

    goto :goto_43

    :cond_35
    invoke-virtual {v7, v0}, Landroid/media/MediaCodecInfo$AudioCapabilities;->isSampleRateSupported(I)Z

    move-result v7

    if-nez v7, :cond_48

    const/16 v7, 0x1f

    const-string v8, "sampleRate.support, "

    invoke-static {v7, v8, v0}, Le/f;->a(ILjava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    :goto_43
    invoke-virtual {p1, v0}, Lz5/eb;->a(Ljava/lang/String;)V

    move v0, v1

    goto :goto_49

    :cond_48
    move v0, v4

    :goto_49
    if-eqz v0, :cond_75

    .line 2
    :cond_4b
    iget p2, p2, Lz5/j8;->I:I

    if-eq p2, v2, :cond_74

    .line 3
    iget-object v0, p1, Lz5/eb;->f:Landroid/media/MediaCodecInfo$CodecCapabilities;

    if-nez v0, :cond_56

    const-string p2, "channelCount.caps"

    goto :goto_6d

    :cond_56
    invoke-virtual {v0}, Landroid/media/MediaCodecInfo$CodecCapabilities;->getAudioCapabilities()Landroid/media/MediaCodecInfo$AudioCapabilities;

    move-result-object v0

    if-nez v0, :cond_5f

    const-string p2, "channelCount.aCaps"

    goto :goto_6d

    :cond_5f
    invoke-virtual {v0}, Landroid/media/MediaCodecInfo$AudioCapabilities;->getMaxInputChannelCount()I

    move-result v0

    if-ge v0, p2, :cond_71

    const/16 v0, 0x21

    const-string v2, "channelCount.support, "

    invoke-static {v0, v2, p2}, Le/f;->a(ILjava/lang/String;I)Ljava/lang/String;

    move-result-object p2

    :goto_6d
    invoke-virtual {p1, p2}, Lz5/eb;->a(Ljava/lang/String;)V

    goto :goto_72

    :cond_71
    move v1, v4

    :goto_72
    if-eqz v1, :cond_75

    :cond_74
    move v5, v6

    :cond_75
    or-int/lit8 p1, v3, 0x4

    or-int/2addr p1, v5

    return p1
.end method

.method public final t(Lz5/ib;Lz5/j8;Z)Lz5/eb;
    .registers 4

    .line 1
    iget-object p1, p2, Lz5/j8;->w:Ljava/lang/String;

    const/4 p2, 0x0

    invoke-static {p1, p2}, Lz5/ob;->a(Ljava/lang/String;Z)Lz5/eb;

    move-result-object p1

    return-object p1
.end method

.method public final u(Lz5/eb;Landroid/media/MediaCodec;Lz5/j8;Landroid/media/MediaCrypto;)V
    .registers 7

    iget-object p1, p1, Lz5/eb;->a:Ljava/lang/String;

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

    const/4 v0, 0x0

    const/16 v1, 0x18

    if-ge p4, v1, :cond_37

    const-string p4, "OMX.SEC.aac.dec"

    invoke-virtual {p4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_37

    sget-object p1, Lz5/be;->c:Ljava/lang/String;

    const-string p4, "samsung"

    invoke-virtual {p4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_37

    sget-object p1, Lz5/be;->b:Ljava/lang/String;

    const-string p4, "zeroflte"

    invoke-virtual {p1, p4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p4

    if-nez p4, :cond_35

    const-string p4, "herolte"

    invoke-virtual {p1, p4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p4

    if-nez p4, :cond_35

    const-string p4, "heroqlte"

    invoke-virtual {p1, p4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_37

    :cond_35
    const/4 p1, 0x1

    goto :goto_38

    :cond_37
    move p1, v0

    :goto_38
    iput-boolean p1, p0, Lz5/j9;->S:Z

    invoke-virtual {p3}, Lz5/j8;->h()Landroid/media/MediaFormat;

    move-result-object p1

    const/4 p3, 0x0

    invoke-virtual {p2, p1, p3, p3, v0}, Landroid/media/MediaCodec;->configure(Landroid/media/MediaFormat;Landroid/view/Surface;Landroid/media/MediaCrypto;I)V

    return-void
.end method

.method public final v(Ljava/lang/String;JJ)V
    .registers 6

    iget-object p2, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    .line 1
    iget-object p3, p2, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

    check-cast p3, Landroid/os/Handler;

    new-instance p4, Lz5/w8;

    invoke-direct {p4, p2, p1}, Lz5/w8;-><init>(Landroidx/appcompat/widget/n;Ljava/lang/String;)V

    invoke-virtual {p3, p4}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public final w(Lz5/j8;)V
    .registers 5

    invoke-super {p0, p1}, Lz5/gb;->w(Lz5/j8;)V

    iget-object v0, p0, Lz5/j9;->Q:Landroidx/appcompat/widget/n;

    .line 1
    iget-object v1, v0, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

    check-cast v1, Landroid/os/Handler;

    new-instance v2, Lz5/j2;

    invoke-direct {v2, v0, p1}, Lz5/j2;-><init>(Landroidx/appcompat/widget/n;Lz5/j8;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 2
    iget-object v0, p1, Lz5/j8;->w:Ljava/lang/String;

    const-string v1, "audio/raw"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1e

    iget v0, p1, Lz5/j8;->K:I

    goto :goto_1f

    :cond_1e
    const/4 v0, 0x2

    :goto_1f
    iput v0, p0, Lz5/j9;->T:I

    iget p1, p1, Lz5/j8;->I:I

    iput p1, p0, Lz5/j9;->U:I

    return-void
.end method

.method public final x(Landroid/media/MediaCodec;Landroid/media/MediaFormat;)V
    .registers 11

    const-string p1, "channel-count"

    invoke-virtual {p2, p1}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result p1

    const-string v0, "sample-rate"

    invoke-virtual {p2, v0}, Landroid/media/MediaFormat;->getInteger(Ljava/lang/String;)I

    move-result v4

    const-string v2, "audio/raw"

    iget-boolean p2, p0, Lz5/j9;->S:Z

    const/4 v0, 0x0

    const/4 v1, 0x6

    if-eqz p2, :cond_2b

    if-ne p1, v1, :cond_2b

    iget p1, p0, Lz5/j9;->U:I

    if-ge p1, v1, :cond_28

    new-array p1, p1, [I

    const/4 p2, 0x0

    :goto_1d
    iget v0, p0, Lz5/j9;->U:I

    if-ge p2, v0, :cond_26

    aput p2, p1, p2

    add-int/lit8 p2, p2, 0x1

    goto :goto_1d

    :cond_26
    move-object v7, p1

    goto :goto_29

    :cond_28
    move-object v7, v0

    :goto_29
    move v3, v1

    goto :goto_2d

    :cond_2b
    move v3, p1

    move-object v7, v0

    :goto_2d
    :try_start_2d
    iget-object v1, p0, Lz5/j9;->R:Lz5/g9;

    iget v5, p0, Lz5/j9;->T:I

    const/4 v6, 0x0

    invoke-virtual/range {v1 .. v7}, Lz5/g9;->a(Ljava/lang/String;IIII[I)V
    :try_end_35
    .catch Lz5/c9; {:try_start_2d .. :try_end_35} :catch_36

    return-void

    :catch_36
    move-exception p1

    .line 1
    new-instance p2, Lz5/y7;

    invoke-direct {p2, p1}, Lz5/y7;-><init>(Ljava/lang/Throwable;)V

    .line 2
    throw p2
.end method

.method public final y(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;IIJZ)Z
    .registers 12

    const/4 p1, 0x0

    const/4 p2, 0x1

    if-eqz p11, :cond_18

    invoke-virtual {p5, p7, p1}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    iget-object p1, p0, Lz5/gb;->O:Lz5/p9;

    iget p3, p1, Lz5/p9;->e:I

    add-int/2addr p3, p2

    iput p3, p1, Lz5/p9;->e:I

    iget-object p1, p0, Lz5/j9;->R:Lz5/g9;

    .line 1
    iget p3, p1, Lz5/g9;->E:I

    if-ne p3, p2, :cond_17

    const/4 p3, 0x2

    iput p3, p1, Lz5/g9;->E:I

    :cond_17
    return p2

    .line 2
    :cond_18
    :try_start_18
    iget-object p3, p0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual {p3, p6, p9, p10}, Lz5/g9;->c(Ljava/nio/ByteBuffer;J)Z

    move-result p3

    if-eqz p3, :cond_2b

    invoke-virtual {p5, p7, p1}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    iget-object p1, p0, Lz5/gb;->O:Lz5/p9;

    iget p3, p1, Lz5/p9;->d:I

    add-int/2addr p3, p2

    iput p3, p1, Lz5/p9;->d:I
    :try_end_2a
    .catch Lz5/d9; {:try_start_18 .. :try_end_2a} :catch_2e
    .catch Lz5/f9; {:try_start_18 .. :try_end_2a} :catch_2c

    return p2

    :cond_2b
    return p1

    :catch_2c
    move-exception p1

    goto :goto_2f

    :catch_2e
    move-exception p1

    .line 3
    :goto_2f
    new-instance p2, Lz5/y7;

    invoke-direct {p2, p1}, Lz5/y7;-><init>(Ljava/lang/Throwable;)V

    .line 4
    throw p2
.end method

.method public final z()V
    .registers 9

    :try_start_0
    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    .line 1
    iget-boolean v1, v0, Lz5/g9;->Q:Z

    if-nez v1, :cond_35

    invoke-virtual {v0}, Lz5/g9;->l()Z

    move-result v1

    if-nez v1, :cond_d

    goto :goto_35

    :cond_d
    invoke-virtual {v0}, Lz5/g9;->j()Z

    move-result v1

    if-eqz v1, :cond_35

    iget-object v1, v0, Lz5/g9;->g:Lz5/a9;

    invoke-virtual {v0}, Lz5/g9;->o()J

    move-result-wide v2

    .line 2
    invoke-virtual {v1}, Lz5/a9;->b()J

    move-result-wide v4

    iput-wide v4, v1, Lz5/a9;->h:J

    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v4

    const-wide/16 v6, 0x3e8

    mul-long/2addr v4, v6

    iput-wide v4, v1, Lz5/a9;->g:J

    iput-wide v2, v1, Lz5/a9;->i:J

    iget-object v1, v1, Lz5/a9;->a:Landroid/media/AudioTrack;

    invoke-virtual {v1}, Landroid/media/AudioTrack;->stop()V

    const/4 v1, 0x1

    .line 3
    iput-boolean v1, v0, Lz5/g9;->Q:Z
    :try_end_32
    .catch Lz5/f9; {:try_start_0 .. :try_end_32} :catch_33

    goto :goto_35

    :catch_33
    move-exception v0

    goto :goto_36

    :cond_35
    :goto_35
    return-void

    .line 4
    :goto_36
    new-instance v1, Lz5/y7;

    invoke-direct {v1, v0}, Lz5/y7;-><init>(Ljava/lang/Throwable;)V

    .line 5
    throw v1
.end method

.method public final zzE()Z
    .registers 2

    iget-object v0, p0, Lz5/j9;->R:Lz5/g9;

    invoke-virtual {v0}, Lz5/g9;->d()Z

    move-result v0

    if-nez v0, :cond_11

    invoke-super {p0}, Lz5/gb;->zzE()Z

    move-result v0

    if-eqz v0, :cond_f

    goto :goto_11

    :cond_f
    const/4 v0, 0x0

    return v0

    :cond_11
    :goto_11
    const/4 v0, 0x1

    return v0
.end method

.method public final zzd()Lz5/yd;
    .registers 1

    return-object p0
.end method
