.class public abstract Lz5/gb;
.super Lz5/w7;
.source ""


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


# static fields
.field public static final P:[B


# instance fields
.field public A:[Ljava/nio/ByteBuffer;

.field public B:[Ljava/nio/ByteBuffer;

.field public C:J

.field public D:I

.field public E:I

.field public F:Z

.field public G:Z

.field public H:I

.field public I:I

.field public J:Z

.field public K:Z

.field public L:Z

.field public M:Z

.field public N:Z

.field public O:Lz5/p9;

.field public final i:Lz5/ib;

.field public final j:Lz5/q9;

.field public final k:Lz5/q9;

.field public final l:Lz5/ex0;

.field public final m:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation
.end field

.field public final n:Landroid/media/MediaCodec$BufferInfo;

.field public o:Lz5/j8;

.field public p:Landroid/media/MediaCodec;

.field public q:Lz5/eb;

.field public r:Z

.field public s:Z

.field public t:Z

.field public u:Z

.field public v:Z

.field public w:Z

.field public x:Z

.field public y:Z

.field public z:Z


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

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

    const/16 v0, 0x26

    new-array v1, v0, [B

    const/4 v2, 0x0

    :goto_7
    if-ge v2, v0, :cond_2a

    add-int v3, v2, v2

    const-string v4, "0000016742C00BDA259000000168CE0F13200000016588840DCE7118A0002FBF1C31C3275D78"

    .line 1
    invoke-virtual {v4, v3}, Ljava/lang/String;->charAt(I)C

    move-result v5

    const/16 v6, 0x10

    invoke-static {v5, v6}, Ljava/lang/Character;->digit(CI)I

    move-result v5

    shl-int/lit8 v5, v5, 0x4

    add-int/lit8 v3, v3, 0x1

    invoke-virtual {v4, v3}, Ljava/lang/String;->charAt(I)C

    move-result v3

    invoke-static {v3, v6}, Ljava/lang/Character;->digit(CI)I

    move-result v3

    add-int/2addr v3, v5

    int-to-byte v3, v3

    aput-byte v3, v1, v2

    add-int/lit8 v2, v2, 0x1

    goto :goto_7

    .line 2
    :cond_2a
    sput-object v1, Lz5/gb;->P:[B

    return-void
.end method

.method public constructor <init>(ILz5/ib;)V
    .registers 5

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

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

    const/4 v0, 0x0

    const/16 v1, 0x10

    if-lt p1, v1, :cond_c

    const/4 p1, 0x1

    goto :goto_d

    :cond_c
    move p1, v0

    :goto_d
    invoke-static {p1}, Lcom/google/android/gms/internal/ads/r;->q(Z)V

    iput-object p2, p0, Lz5/gb;->i:Lz5/ib;

    new-instance p1, Lz5/q9;

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

    iput-object p1, p0, Lz5/gb;->j:Lz5/q9;

    new-instance p1, Lz5/q9;

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

    iput-object p1, p0, Lz5/gb;->k:Lz5/q9;

    new-instance p1, Lz5/ex0;

    const/4 p2, 0x3

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

    iput-object p1, p0, Lz5/gb;->l:Lz5/ex0;

    new-instance p1, Ljava/util/ArrayList;

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

    iput-object p1, p0, Lz5/gb;->m:Ljava/util/List;

    new-instance p1, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {p1}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    iput-object p1, p0, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iput v0, p0, Lz5/gb;->H:I

    iput v0, p0, Lz5/gb;->I:I

    return-void
.end method


# virtual methods
.method public final A()V
    .registers 12

    iget-object v0, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    if-nez v0, :cond_1d7

    iget-object v0, p0, Lz5/gb;->o:Lz5/j8;

    if-nez v0, :cond_a

    goto/16 :goto_1d7

    :cond_a
    iget-object v1, p0, Lz5/gb;->q:Lz5/eb;

    const/4 v2, 0x0

    const/4 v3, 0x0

    if-nez v1, :cond_3c

    :try_start_10
    iget-object v1, p0, Lz5/gb;->i:Lz5/ib;

    invoke-virtual {p0, v1, v0, v3}, Lz5/gb;->t(Lz5/ib;Lz5/j8;Z)Lz5/eb;

    move-result-object v1

    iput-object v1, p0, Lz5/gb;->q:Lz5/eb;
    :try_end_18
    .catch Lz5/kb; {:try_start_10 .. :try_end_18} :catch_2b

    if-eqz v1, :cond_1b

    goto :goto_3c

    :cond_1b
    new-instance v0, Lz5/fb;

    iget-object v1, p0, Lz5/gb;->o:Lz5/j8;

    const v4, -0xc34f

    invoke-direct {v0, v1, v2, v3, v4}, Lz5/fb;-><init>(Lz5/j8;Ljava/lang/Throwable;ZI)V

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

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

    .line 2
    throw v1

    :catch_2b
    move-exception v0

    new-instance v1, Lz5/fb;

    iget-object v2, p0, Lz5/gb;->o:Lz5/j8;

    const v4, -0xc34e

    invoke-direct {v1, v2, v0, v3, v4}, Lz5/fb;-><init>(Lz5/j8;Ljava/lang/Throwable;ZI)V

    .line 3
    new-instance v0, Lz5/y7;

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

    .line 4
    throw v0

    :cond_3c
    :goto_3c
    invoke-virtual {p0, v1}, Lz5/gb;->B(Lz5/eb;)Z

    move-result v0

    if-nez v0, :cond_43

    return-void

    :cond_43
    iget-object v0, p0, Lz5/gb;->q:Lz5/eb;

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

    iget-object v1, p0, Lz5/gb;->o:Lz5/j8;

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

    const/16 v5, 0x15

    const/4 v10, 0x1

    if-ge v4, v5, :cond_62

    iget-object v1, v1, Lz5/j8;->y:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_62

    const-string v1, "OMX.MTK.VIDEO.DECODER.AVC"

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

    move-result v1

    if-eqz v1, :cond_62

    move v1, v10

    goto :goto_63

    :cond_62
    move v1, v3

    :goto_63
    iput-boolean v1, p0, Lz5/gb;->r:Z

    const/16 v1, 0x13

    const/16 v6, 0x12

    if-lt v4, v6, :cond_9c

    if-ne v4, v6, :cond_7d

    const-string v7, "OMX.SEC.avc.dec"

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

    move-result v7

    if-nez v7, :cond_9c

    const-string v7, "OMX.SEC.avc.dec.secure"

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

    move-result v7

    if-nez v7, :cond_9c

    :cond_7d
    if-ne v4, v1, :cond_9a

    sget-object v7, Lz5/be;->d:Ljava/lang/String;

    const-string v8, "SM-G800"

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

    move-result v7

    if-eqz v7, :cond_9a

    const-string v7, "OMX.Exynos.avc.dec"

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

    move-result v7

    if-nez v7, :cond_9c

    const-string v7, "OMX.Exynos.avc.dec.secure"

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

    move-result v7

    if-eqz v7, :cond_9a

    goto :goto_9c

    :cond_9a
    move v7, v3

    goto :goto_9d

    :cond_9c
    :goto_9c
    move v7, v10

    :goto_9d
    iput-boolean v7, p0, Lz5/gb;->s:Z

    const/16 v7, 0x18

    if-ge v4, v7, :cond_d7

    const-string v7, "OMX.Nvidia.h264.decode"

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

    move-result v7

    if-nez v7, :cond_b3

    const-string v7, "OMX.Nvidia.h264.decode.secure"

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

    move-result v7

    if-eqz v7, :cond_d7

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

    const-string v8, "flounder"

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

    move-result v8

    if-nez v8, :cond_d5

    const-string v8, "flounder_lte"

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

    move-result v8

    if-nez v8, :cond_d5

    const-string v8, "grouper"

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

    move-result v8

    if-nez v8, :cond_d5

    const-string v8, "tilapia"

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

    move-result v7

    if-eqz v7, :cond_d7

    :cond_d5
    move v7, v10

    goto :goto_d8

    :cond_d7
    move v7, v3

    :goto_d8
    iput-boolean v7, p0, Lz5/gb;->t:Z

    const/16 v7, 0x11

    if-gt v4, v7, :cond_f0

    const-string v7, "OMX.rk.video_decoder.avc"

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

    move-result v7

    if-nez v7, :cond_ee

    const-string v7, "OMX.allwinner.video.decoder.avc"

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

    move-result v7

    if-eqz v7, :cond_f0

    :cond_ee
    move v7, v10

    goto :goto_f1

    :cond_f0
    move v7, v3

    :goto_f1
    iput-boolean v7, p0, Lz5/gb;->u:Z

    const/16 v7, 0x17

    if-gt v4, v7, :cond_102

    const-string v7, "OMX.google.vorbis.decoder"

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

    move-result v7

    if-nez v7, :cond_100

    goto :goto_102

    :cond_100
    :goto_100
    move v1, v10

    goto :goto_120

    :cond_102
    :goto_102
    if-gt v4, v1, :cond_11f

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

    const-string v7, "hb2000"

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

    move-result v1

    if-eqz v1, :cond_11f

    const-string v1, "OMX.amlogic.avc.decoder.awesome"

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

    move-result v1

    if-nez v1, :cond_100

    const-string v1, "OMX.amlogic.avc.decoder.awesome.secure"

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

    move-result v1

    if-eqz v1, :cond_11f

    goto :goto_100

    :cond_11f
    move v1, v3

    :goto_120
    iput-boolean v1, p0, Lz5/gb;->v:Z

    if-ne v4, v5, :cond_12e

    const-string v1, "OMX.google.aac.decoder"

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

    move-result v1

    if-eqz v1, :cond_12e

    move v1, v10

    goto :goto_12f

    :cond_12e
    move v1, v3

    :goto_12f
    iput-boolean v1, p0, Lz5/gb;->w:Z

    iget-object v1, p0, Lz5/gb;->o:Lz5/j8;

    if-gt v4, v6, :cond_143

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

    if-ne v1, v10, :cond_143

    const-string v1, "OMX.MTK.AUDIO.DECODER.MP3"

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

    move-result v1

    if-eqz v1, :cond_143

    move v1, v10

    goto :goto_144

    :cond_143
    move v1, v3

    :goto_144
    iput-boolean v1, p0, Lz5/gb;->x:Z

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

    move-result-wide v4

    const-string v1, "createCodec:"

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

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

    move-result v7

    if-eqz v7, :cond_15b

    invoke-virtual {v1, v6}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    goto :goto_161

    :cond_15b
    new-instance v6, Ljava/lang/String;

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

    move-object v1, v6

    :goto_161
    invoke-static {v1}, Lcom/google/android/gms/internal/ads/h8;->g(Ljava/lang/String;)V

    invoke-static {v0}, Landroid/media/MediaCodec;->createByCodecName(Ljava/lang/String;)Landroid/media/MediaCodec;

    move-result-object v1

    iput-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-static {}, Lcom/google/android/gms/internal/ads/h8;->k()V

    const-string v1, "configureCodec"

    invoke-static {v1}, Lcom/google/android/gms/internal/ads/h8;->g(Ljava/lang/String;)V

    iget-object v1, p0, Lz5/gb;->q:Lz5/eb;

    iget-object v6, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget-object v7, p0, Lz5/gb;->o:Lz5/j8;

    invoke-virtual {p0, v1, v6, v7, v2}, Lz5/gb;->u(Lz5/eb;Landroid/media/MediaCodec;Lz5/j8;Landroid/media/MediaCrypto;)V

    invoke-static {}, Lcom/google/android/gms/internal/ads/h8;->k()V

    const-string v1, "startCodec"

    invoke-static {v1}, Lcom/google/android/gms/internal/ads/h8;->g(Ljava/lang/String;)V

    iget-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v1}, Landroid/media/MediaCodec;->start()V

    invoke-static {}, Lcom/google/android/gms/internal/ads/h8;->k()V

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

    move-result-wide v6

    sub-long v8, v6, v4

    move-object v4, p0

    move-object v5, v0

    invoke-virtual/range {v4 .. v9}, Lz5/gb;->v(Ljava/lang/String;JJ)V

    iget-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v1}, Landroid/media/MediaCodec;->getInputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v1

    iput-object v1, p0, Lz5/gb;->A:[Ljava/nio/ByteBuffer;

    iget-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v1}, Landroid/media/MediaCodec;->getOutputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v1

    iput-object v1, p0, Lz5/gb;->B:[Ljava/nio/ByteBuffer;
    :try_end_1a6
    .catch Ljava/lang/Exception; {:try_start_146 .. :try_end_1a6} :catch_1c9

    .line 5
    iget v0, p0, Lz5/w7;->d:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_1b3

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

    move-result-wide v0

    const-wide/16 v2, 0x3e8

    add-long/2addr v0, v2

    goto :goto_1b8

    :cond_1b3
    const-wide v0, -0x7fffffffffffffffL    # -4.9E-324

    :goto_1b8
    iput-wide v0, p0, Lz5/gb;->C:J

    const/4 v0, -0x1

    iput v0, p0, Lz5/gb;->D:I

    iput v0, p0, Lz5/gb;->E:I

    iput-boolean v10, p0, Lz5/gb;->N:Z

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

    iget v1, v0, Lz5/p9;->a:I

    add-int/2addr v1, v10

    iput v1, v0, Lz5/p9;->a:I

    return-void

    :catch_1c9
    move-exception v1

    new-instance v2, Lz5/fb;

    iget-object v4, p0, Lz5/gb;->o:Lz5/j8;

    invoke-direct {v2, v4, v1, v3, v0}, Lz5/fb;-><init>(Lz5/j8;Ljava/lang/Throwable;ZLjava/lang/String;)V

    .line 7
    new-instance v0, Lz5/y7;

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

    .line 8
    throw v0

    :cond_1d7
    :goto_1d7
    return-void
.end method

.method public B(Lz5/eb;)Z
    .registers 2

    const/4 p1, 0x1

    return p1
.end method

.method public C()V
    .registers 5

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

    iput-wide v0, p0, Lz5/gb;->C:J

    const/4 v0, -0x1

    iput v0, p0, Lz5/gb;->D:I

    iput v0, p0, Lz5/gb;->E:I

    const/4 v0, 0x0

    iput-boolean v0, p0, Lz5/gb;->F:Z

    iget-object v1, p0, Lz5/gb;->m:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->clear()V

    const/4 v1, 0x0

    iput-object v1, p0, Lz5/gb;->A:[Ljava/nio/ByteBuffer;

    iput-object v1, p0, Lz5/gb;->B:[Ljava/nio/ByteBuffer;

    iput-object v1, p0, Lz5/gb;->q:Lz5/eb;

    iput-boolean v0, p0, Lz5/gb;->G:Z

    iput-boolean v0, p0, Lz5/gb;->J:Z

    iput-boolean v0, p0, Lz5/gb;->r:Z

    iput-boolean v0, p0, Lz5/gb;->s:Z

    iput-boolean v0, p0, Lz5/gb;->t:Z

    iput-boolean v0, p0, Lz5/gb;->u:Z

    iput-boolean v0, p0, Lz5/gb;->v:Z

    iput-boolean v0, p0, Lz5/gb;->x:Z

    iput-boolean v0, p0, Lz5/gb;->y:Z

    iput-boolean v0, p0, Lz5/gb;->z:Z

    iput-boolean v0, p0, Lz5/gb;->K:Z

    iput v0, p0, Lz5/gb;->H:I

    iput v0, p0, Lz5/gb;->I:I

    iget-object v0, p0, Lz5/gb;->j:Lz5/q9;

    iput-object v1, v0, Lz5/q9;->c:Ljava/lang/Object;

    iget-object v0, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    if-eqz v0, :cond_61

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

    iget v3, v2, Lz5/p9;->b:I

    add-int/lit8 v3, v3, 0x1

    iput v3, v2, Lz5/p9;->b:I

    :try_start_45
    invoke-virtual {v0}, Landroid/media/MediaCodec;->stop()V
    :try_end_48
    .catchall {:try_start_45 .. :try_end_48} :catchall_54

    :try_start_48
    iget-object v0, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->release()V
    :try_end_4d
    .catchall {:try_start_48 .. :try_end_4d} :catchall_50

    iput-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    return-void

    :catchall_50
    move-exception v0

    iput-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    throw v0

    :catchall_54
    move-exception v0

    :try_start_55
    iget-object v2, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v2}, Landroid/media/MediaCodec;->release()V
    :try_end_5a
    .catchall {:try_start_55 .. :try_end_5a} :catchall_5d

    iput-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    throw v0

    :catchall_5d
    move-exception v0

    iput-object v1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    throw v0

    :cond_61
    return-void
.end method

.method public D(Lz5/q9;)V
    .registers 2

    return-void
.end method

.method public E(Landroid/media/MediaCodec;ZLz5/j8;Lz5/j8;)Z
    .registers 5

    const/4 p1, 0x0

    return p1
.end method

.method public c()Z
    .registers 2

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

    return v0
.end method

.method public final d(JJ)V
    .registers 33

    move-object/from16 v13, p0

    iget-boolean v0, v13, Lz5/gb;->M:Z

    if-eqz v0, :cond_a

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->z()V

    return-void

    :cond_a
    iget-object v0, v13, Lz5/gb;->o:Lz5/j8;

    const/4 v1, -0x4

    const/4 v14, -0x5

    const/4 v15, 0x1

    if-nez v0, :cond_3b

    iget-object v0, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v0}, Lz5/q9;->a()V

    iget-object v0, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v2, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v13, v0, v2, v15}, Lz5/w7;->j(Lz5/ex0;Lz5/q9;Z)I

    move-result v0

    if-ne v0, v14, :cond_2a

    iget-object v0, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v0, v0, Lz5/ex0;->s:Ljava/lang/Object;

    check-cast v0, Lz5/j8;

    invoke-virtual {v13, v0}, Lz5/gb;->w(Lz5/j8;)V

    goto :goto_3b

    :cond_2a
    if-ne v0, v1, :cond_3a

    iget-object v0, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v0}, Lz5/q9;->b()Z

    move-result v0

    invoke-static {v0}, Lcom/google/android/gms/internal/ads/r;->q(Z)V

    iput-boolean v15, v13, Lz5/gb;->L:Z

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    :cond_3a
    return-void

    :cond_3b
    :goto_3b
    invoke-virtual/range {p0 .. p0}, Lz5/gb;->A()V

    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    const/4 v12, 0x0

    if-eqz v0, :cond_3b4

    const-string v0, "drainAndFeed"

    invoke-static {v0}, Lcom/google/android/gms/internal/ads/h8;->g(Ljava/lang/String;)V

    :goto_48
    iget v0, v13, Lz5/gb;->E:I

    const/4 v10, -0x3

    const/4 v11, 0x2

    const-wide/16 v8, 0x0

    const/4 v7, -0x1

    if-gez v0, :cond_12c

    iget-boolean v0, v13, Lz5/gb;->w:Z

    if-eqz v0, :cond_72

    iget-boolean v0, v13, Lz5/gb;->K:Z

    if-eqz v0, :cond_72

    :try_start_59
    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget-object v1, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    invoke-virtual {v0, v1, v8, v9}, Landroid/media/MediaCodec;->dequeueOutputBuffer(Landroid/media/MediaCodec$BufferInfo;J)I

    move-result v0

    iput v0, v13, Lz5/gb;->E:I
    :try_end_63
    .catch Ljava/lang/IllegalStateException; {:try_start_59 .. :try_end_63} :catch_64

    goto :goto_7c

    :catch_64
    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    iget-boolean v0, v13, Lz5/gb;->M:Z

    if-eqz v0, :cond_6e

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->C()V

    :cond_6e
    :goto_6e
    move v14, v7

    move v0, v11

    goto/16 :goto_197

    :cond_72
    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget-object v1, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    invoke-virtual {v0, v1, v8, v9}, Landroid/media/MediaCodec;->dequeueOutputBuffer(Landroid/media/MediaCodec$BufferInfo;J)I

    move-result v0

    iput v0, v13, Lz5/gb;->E:I

    :goto_7c
    if-ltz v0, :cond_dc

    iget-boolean v1, v13, Lz5/gb;->z:Z

    if-eqz v1, :cond_8c

    iput-boolean v12, v13, Lz5/gb;->z:Z

    iget-object v1, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v1, v0, v12}, Landroid/media/MediaCodec;->releaseOutputBuffer(IZ)V

    iput v7, v13, Lz5/gb;->E:I

    goto :goto_48

    :cond_8c
    iget-object v0, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget v1, v0, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 v1, v1, 0x4

    if-eqz v1, :cond_9a

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    iput v7, v13, Lz5/gb;->E:I

    goto :goto_6e

    :cond_9a
    iget-object v1, v13, Lz5/gb;->B:[Ljava/nio/ByteBuffer;

    iget v2, v13, Lz5/gb;->E:I

    aget-object v1, v1, v2

    if-eqz v1, :cond_b1

    iget v0, v0, Landroid/media/MediaCodec$BufferInfo;->offset:I

    invoke-virtual {v1, v0}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    iget-object v0, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget v2, v0, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v0, v0, Landroid/media/MediaCodec$BufferInfo;->size:I

    add-int/2addr v2, v0

    invoke-virtual {v1, v2}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    :cond_b1
    iget-object v0, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget-wide v0, v0, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-object v2, v13, Lz5/gb;->m:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    move v3, v12

    :goto_bc
    if-ge v3, v2, :cond_d8

    iget-object v4, v13, Lz5/gb;->m:Ljava/util/List;

    invoke-interface {v4, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Long;

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

    move-result-wide v4

    cmp-long v4, v4, v0

    if-nez v4, :cond_d5

    iget-object v0, v13, Lz5/gb;->m:Ljava/util/List;

    invoke-interface {v0, v3}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move v0, v15

    goto :goto_d9

    :cond_d5
    add-int/lit8 v3, v3, 0x1

    goto :goto_bc

    :cond_d8
    move v0, v12

    :goto_d9
    iput-boolean v0, v13, Lz5/gb;->F:Z

    goto :goto_12c

    :cond_dc
    const/4 v1, -0x2

    if-ne v0, v1, :cond_10f

    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getOutputFormat()Landroid/media/MediaFormat;

    move-result-object v0

    iget-boolean v1, v13, Lz5/gb;->t:Z

    if-eqz v1, :cond_ff

    const-string v1, "width"

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

    move-result v1

    const/16 v2, 0x20

    if-ne v1, v2, :cond_ff

    const-string v1, "height"

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

    move-result v1

    if-ne v1, v2, :cond_ff

    iput-boolean v15, v13, Lz5/gb;->z:Z

    goto/16 :goto_48

    :cond_ff
    iget-boolean v1, v13, Lz5/gb;->x:Z

    if-eqz v1, :cond_108

    const-string v1, "channel-count"

    invoke-virtual {v0, v1, v15}, Landroid/media/MediaFormat;->setInteger(Ljava/lang/String;I)V

    :cond_108
    iget-object v1, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v13, v1, v0}, Lz5/gb;->x(Landroid/media/MediaCodec;Landroid/media/MediaFormat;)V

    goto/16 :goto_48

    :cond_10f
    if-ne v0, v10, :cond_11b

    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getOutputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, v13, Lz5/gb;->B:[Ljava/nio/ByteBuffer;

    goto/16 :goto_48

    :cond_11b
    iget-boolean v0, v13, Lz5/gb;->u:Z

    if-eqz v0, :cond_6e

    iget-boolean v0, v13, Lz5/gb;->L:Z

    if-nez v0, :cond_127

    iget v0, v13, Lz5/gb;->I:I

    if-ne v0, v11, :cond_6e

    :cond_127
    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    goto/16 :goto_6e

    :cond_12c
    :goto_12c
    iget-boolean v0, v13, Lz5/gb;->w:Z

    if-eqz v0, :cond_16f

    iget-boolean v0, v13, Lz5/gb;->K:Z

    if-eqz v0, :cond_16f

    :try_start_134
    iget-object v6, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget-object v0, v13, Lz5/gb;->B:[Ljava/nio/ByteBuffer;

    iget v4, v13, Lz5/gb;->E:I

    aget-object v0, v0, v4

    iget-object v1, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget v5, v1, Landroid/media/MediaCodec$BufferInfo;->flags:I

    iget-wide v2, v1, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-boolean v1, v13, Lz5/gb;->F:Z
    :try_end_144
    .catch Ljava/lang/IllegalStateException; {:try_start_134 .. :try_end_144} :catch_162

    move/from16 v16, v1

    move-object/from16 v1, p0

    move-wide/from16 v17, v2

    move-wide/from16 v2, p1

    move/from16 v19, v4

    move/from16 v20, v5

    move-wide/from16 v4, p3

    move v14, v7

    move-object v7, v0

    move/from16 v8, v19

    move/from16 v9, v20

    move v0, v11

    move-wide/from16 v10, v17

    move/from16 v12, v16

    :try_start_15d
    invoke-virtual/range {v1 .. v12}, Lz5/gb;->y(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;IIJZ)Z

    move-result v1
    :try_end_161
    .catch Ljava/lang/IllegalStateException; {:try_start_15d .. :try_end_161} :catch_164

    goto :goto_18b

    :catch_162
    move v14, v7

    move v0, v11

    :catch_164
    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    iget-boolean v1, v13, Lz5/gb;->M:Z

    if-eqz v1, :cond_197

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->C()V

    goto :goto_197

    :cond_16f
    move v14, v7

    move v0, v11

    iget-object v6, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget-object v1, v13, Lz5/gb;->B:[Ljava/nio/ByteBuffer;

    iget v8, v13, Lz5/gb;->E:I

    aget-object v7, v1, v8

    iget-object v1, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget v9, v1, Landroid/media/MediaCodec$BufferInfo;->flags:I

    iget-wide v10, v1, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-boolean v12, v13, Lz5/gb;->F:Z

    move-object/from16 v1, p0

    move-wide/from16 v2, p1

    move-wide/from16 v4, p3

    invoke-virtual/range {v1 .. v12}, Lz5/gb;->y(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;IIJZ)Z

    move-result v1

    :goto_18b
    if-eqz v1, :cond_197

    iget-object v0, v13, Lz5/gb;->n:Landroid/media/MediaCodec$BufferInfo;

    iget-wide v0, v0, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iput v14, v13, Lz5/gb;->E:I

    const/4 v12, 0x0

    const/4 v14, -0x5

    goto/16 :goto_48

    .line 1
    :cond_197
    :goto_197
    iget-object v1, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    if-eqz v1, :cond_3a5

    iget v2, v13, Lz5/gb;->I:I

    if-eq v2, v0, :cond_3a5

    iget-boolean v2, v13, Lz5/gb;->L:Z

    if-eqz v2, :cond_1a5

    goto/16 :goto_3a5

    :cond_1a5
    iget v2, v13, Lz5/gb;->D:I

    if-gez v2, :cond_1c4

    const-wide/16 v2, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/media/MediaCodec;->dequeueInputBuffer(J)I

    move-result v1

    iput v1, v13, Lz5/gb;->D:I

    if-gez v1, :cond_1b8

    :goto_1b3
    const/4 v4, 0x0

    const/4 v6, -0x3

    const/4 v12, 0x0

    goto/16 :goto_3aa

    :cond_1b8
    iget-object v4, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v5, v13, Lz5/gb;->A:[Ljava/nio/ByteBuffer;

    aget-object v1, v5, v1

    iput-object v1, v4, Lz5/q9;->c:Ljava/lang/Object;

    invoke-virtual {v4}, Lz5/q9;->a()V

    goto :goto_1c6

    :cond_1c4
    const-wide/16 v2, 0x0

    :goto_1c6
    iget v1, v13, Lz5/gb;->I:I

    if-ne v1, v15, :cond_1e1

    iget-boolean v1, v13, Lz5/gb;->u:Z

    if-nez v1, :cond_1de

    iput-boolean v15, v13, Lz5/gb;->K:Z

    iget-object v4, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget v5, v13, Lz5/gb;->D:I

    const/4 v6, 0x0

    const/4 v7, 0x0

    const-wide/16 v8, 0x0

    const/4 v10, 0x4

    invoke-virtual/range {v4 .. v10}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    iput v14, v13, Lz5/gb;->D:I

    :cond_1de
    iput v0, v13, Lz5/gb;->I:I

    goto :goto_1b3

    :cond_1e1
    iget-boolean v1, v13, Lz5/gb;->y:Z

    const/4 v4, 0x0

    if-eqz v1, :cond_209

    iput-boolean v4, v13, Lz5/gb;->y:Z

    iget-object v1, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v1, v1, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v1, Ljava/nio/ByteBuffer;

    sget-object v5, Lz5/gb;->P:[B

    invoke-virtual {v1, v5}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;

    iget-object v6, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget v7, v13, Lz5/gb;->D:I

    array-length v1, v5

    const/4 v8, 0x0

    const/16 v9, 0x26

    const-wide/16 v10, 0x0

    const/4 v12, 0x0

    invoke-virtual/range {v6 .. v12}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    iput v14, v13, Lz5/gb;->D:I

    iput-boolean v15, v13, Lz5/gb;->J:Z

    move v12, v15

    const/4 v6, -0x3

    goto/16 :goto_3aa

    :cond_209
    iget v1, v13, Lz5/gb;->H:I

    if-ne v1, v15, :cond_230

    move v12, v4

    :goto_20e
    iget-object v1, v13, Lz5/gb;->o:Lz5/j8;

    iget-object v1, v1, Lz5/j8;->y:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v12, v1, :cond_22e

    iget-object v1, v13, Lz5/gb;->o:Lz5/j8;

    iget-object v1, v1, Lz5/j8;->y:Ljava/util/List;

    invoke-interface {v1, v12}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [B

    iget-object v5, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v5, v5, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v5, Ljava/nio/ByteBuffer;

    invoke-virtual {v5, v1}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;

    add-int/lit8 v12, v12, 0x1

    goto :goto_20e

    :cond_22e
    iput v0, v13, Lz5/gb;->H:I

    :cond_230
    iget-object v1, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v1, v1, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v1, Ljava/nio/ByteBuffer;

    invoke-virtual {v1}, Ljava/nio/ByteBuffer;->position()I

    move-result v1

    iget-object v5, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v6, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v13, v5, v6, v4}, Lz5/w7;->j(Lz5/ex0;Lz5/q9;Z)I

    move-result v5

    const/4 v6, -0x3

    if-ne v5, v6, :cond_247

    goto/16 :goto_3a9

    :cond_247
    const/4 v7, -0x5

    if-ne v5, v7, :cond_261

    iget v1, v13, Lz5/gb;->H:I

    if-ne v1, v0, :cond_255

    iget-object v1, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v1}, Lz5/q9;->a()V

    iput v15, v13, Lz5/gb;->H:I

    :cond_255
    iget-object v1, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v1, v1, Lz5/ex0;->s:Ljava/lang/Object;

    check-cast v1, Lz5/j8;

    invoke-virtual {v13, v1}, Lz5/gb;->w(Lz5/j8;)V

    :cond_25e
    :goto_25e
    move v12, v15

    goto/16 :goto_3aa

    :cond_261
    iget-object v5, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v5}, Lz5/q9;->b()Z

    move-result v5

    if-eqz v5, :cond_2a3

    iget v1, v13, Lz5/gb;->H:I

    if-ne v1, v0, :cond_274

    iget-object v1, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v1}, Lz5/q9;->a()V

    iput v15, v13, Lz5/gb;->H:I

    :cond_274
    iput-boolean v15, v13, Lz5/gb;->L:Z

    iget-boolean v1, v13, Lz5/gb;->J:Z

    if-nez v1, :cond_27f

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    goto/16 :goto_3a9

    :cond_27f
    :try_start_27f
    iget-boolean v1, v13, Lz5/gb;->u:Z

    if-nez v1, :cond_3a9

    iput-boolean v15, v13, Lz5/gb;->K:Z

    iget-object v1, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget v5, v13, Lz5/gb;->D:I

    const/16 v23, 0x0

    const/16 v24, 0x0

    const-wide/16 v25, 0x0

    const/16 v27, 0x4

    move-object/from16 v21, v1

    move/from16 v22, v5

    invoke-virtual/range {v21 .. v27}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    iput v14, v13, Lz5/gb;->D:I
    :try_end_29a
    .catch Landroid/media/MediaCodec$CryptoException; {:try_start_27f .. :try_end_29a} :catch_29c

    goto/16 :goto_3a9

    :catch_29c
    move-exception v0

    .line 2
    new-instance v1, Lz5/y7;

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

    .line 3
    throw v1

    :cond_2a3
    iget-boolean v5, v13, Lz5/gb;->N:Z

    if-eqz v5, :cond_2bb

    iget-object v5, v13, Lz5/gb;->j:Lz5/q9;

    .line 4
    invoke-virtual {v5, v15}, Lz5/q9;->c(I)Z

    move-result v5

    if-nez v5, :cond_2bb

    .line 5
    iget-object v1, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v1}, Lz5/q9;->a()V

    iget v1, v13, Lz5/gb;->H:I

    if-ne v1, v0, :cond_25e

    iput v15, v13, Lz5/gb;->H:I

    goto :goto_25e

    :cond_2bb
    iput-boolean v4, v13, Lz5/gb;->N:Z

    iget-object v5, v13, Lz5/gb;->j:Lz5/q9;

    const/high16 v7, 0x40000000    # 2.0f

    .line 6
    invoke-virtual {v5, v7}, Lz5/q9;->c(I)Z

    move-result v5

    .line 7
    iget-boolean v7, v13, Lz5/gb;->r:Z

    if-eqz v7, :cond_321

    if-nez v5, :cond_321

    iget-object v7, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v7, v7, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v7, Ljava/nio/ByteBuffer;

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->position()I

    move-result v8

    move v9, v4

    move v12, v9

    :goto_2d7
    add-int/lit8 v10, v12, 0x1

    if-ge v10, v8, :cond_30e

    invoke-virtual {v7, v12}, Ljava/nio/ByteBuffer;->get(I)B

    move-result v11

    and-int/lit16 v11, v11, 0xff

    const/4 v0, 0x3

    if-ne v9, v0, :cond_304

    if-ne v11, v15, :cond_308

    invoke-virtual {v7, v10}, Ljava/nio/ByteBuffer;->get(I)B

    move-result v0

    and-int/lit8 v0, v0, 0x1f

    const/4 v11, 0x7

    if-ne v0, v11, :cond_302

    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->duplicate()Ljava/nio/ByteBuffer;

    move-result-object v0

    add-int/lit8 v12, v12, -0x3

    invoke-virtual {v0, v12}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    invoke-virtual {v0, v8}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    invoke-virtual {v7, v4}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    invoke-virtual {v7, v0}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;

    goto :goto_311

    :cond_302
    move v11, v15

    goto :goto_308

    :cond_304
    if-nez v11, :cond_308

    add-int/lit8 v9, v9, 0x1

    :cond_308
    :goto_308
    if-eqz v11, :cond_30b

    move v9, v4

    :cond_30b
    move v12, v10

    const/4 v0, 0x2

    goto :goto_2d7

    :cond_30e
    invoke-virtual {v7}, Ljava/nio/ByteBuffer;->clear()Ljava/nio/Buffer;

    :goto_311
    iget-object v0, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v0, v0, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v0, Ljava/nio/ByteBuffer;

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->position()I

    move-result v0

    if-nez v0, :cond_31f

    goto/16 :goto_25e

    :cond_31f
    iput-boolean v4, v13, Lz5/gb;->r:Z

    :cond_321
    :try_start_321
    iget-object v0, v13, Lz5/gb;->j:Lz5/q9;

    iget-wide v7, v0, Lz5/q9;->d:J

    const/high16 v9, -0x80000000

    .line 8
    invoke-virtual {v0, v9}, Lz5/q9;->c(I)Z

    move-result v0

    if-eqz v0, :cond_336

    .line 9
    iget-object v0, v13, Lz5/gb;->m:Ljava/util/List;

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

    move-result-object v9

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

    :cond_336
    iget-object v0, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v0, v0, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v0, Ljava/nio/ByteBuffer;

    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;

    iget-object v0, v13, Lz5/gb;->j:Lz5/q9;

    invoke-virtual {v13, v0}, Lz5/gb;->D(Lz5/q9;)V

    if-eqz v5, :cond_374

    iget-object v0, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v0, v0, Lz5/q9;->b:Ljava/lang/Object;

    check-cast v0, Lz5/o9;

    .line 10
    iget-object v0, v0, Lz5/o9;->d:Landroid/media/MediaCodec$CryptoInfo;

    if-nez v1, :cond_351

    goto :goto_360

    .line 11
    :cond_351
    iget-object v5, v0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    if-nez v5, :cond_359

    new-array v5, v15, [I

    iput-object v5, v0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    :cond_359
    iget-object v5, v0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    aget v9, v5, v4

    add-int/2addr v9, v1

    aput v9, v5, v4

    :goto_360
    iget-object v1, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget v5, v13, Lz5/gb;->D:I

    const/16 v23, 0x0

    const/16 v27, 0x0

    move-object/from16 v21, v1

    move/from16 v22, v5

    move-object/from16 v24, v0

    move-wide/from16 v25, v7

    invoke-virtual/range {v21 .. v27}, Landroid/media/MediaCodec;->queueSecureInputBuffer(IILandroid/media/MediaCodec$CryptoInfo;JI)V

    goto :goto_38f

    :cond_374
    iget-object v0, v13, Lz5/gb;->p:Landroid/media/MediaCodec;

    iget v1, v13, Lz5/gb;->D:I

    const/16 v23, 0x0

    iget-object v5, v13, Lz5/gb;->j:Lz5/q9;

    iget-object v5, v5, Lz5/q9;->c:Ljava/lang/Object;

    check-cast v5, Ljava/nio/ByteBuffer;

    invoke-virtual {v5}, Ljava/nio/ByteBuffer;->limit()I

    move-result v24

    const/16 v27, 0x0

    move-object/from16 v21, v0

    move/from16 v22, v1

    move-wide/from16 v25, v7

    invoke-virtual/range {v21 .. v27}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    :goto_38f
    iput v14, v13, Lz5/gb;->D:I

    iput-boolean v15, v13, Lz5/gb;->J:Z

    iput v4, v13, Lz5/gb;->H:I

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

    iget v1, v0, Lz5/p9;->c:I

    add-int/2addr v1, v15

    iput v1, v0, Lz5/p9;->c:I
    :try_end_39c
    .catch Landroid/media/MediaCodec$CryptoException; {:try_start_321 .. :try_end_39c} :catch_39e

    goto/16 :goto_25e

    :catch_39e
    move-exception v0

    .line 12
    new-instance v1, Lz5/y7;

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

    .line 13
    throw v1

    :cond_3a5
    :goto_3a5
    const-wide/16 v2, 0x0

    const/4 v4, 0x0

    const/4 v6, -0x3

    :cond_3a9
    :goto_3a9
    move v12, v4

    :goto_3aa
    if-nez v12, :cond_3b1

    .line 14
    invoke-static {}, Lcom/google/android/gms/internal/ads/h8;->k()V

    goto/16 :goto_438

    :cond_3b1
    const/4 v0, 0x2

    goto/16 :goto_197

    :cond_3b4
    move v4, v12

    .line 15
    iget-object v0, v13, Lz5/w7;->e:Lz5/cc;

    iget-wide v2, v13, Lz5/w7;->f:J

    sub-long v2, p1, v2

    .line 16
    iget-object v5, v0, Lz5/cc;->b:Lz5/dc;

    iget v0, v0, Lz5/cc;->a:I

    .line 17
    iget-object v6, v5, Lz5/dc;->E:Landroid/util/SparseArray;

    invoke-virtual {v6, v0}, Landroid/util/SparseArray;->valueAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lz5/qc;

    iget-boolean v5, v5, Lz5/dc;->V:Z

    if-eqz v5, :cond_40b

    invoke-virtual {v0}, Lz5/qc;->h()J

    move-result-wide v5

    cmp-long v5, v2, v5

    if-lez v5, :cond_40b

    .line 18
    iget-object v2, v0, Lz5/qc;->a:Lz5/oc;

    .line 19
    monitor-enter v2

    :try_start_3d6
    invoke-virtual {v2}, Lz5/oc;->a()Z

    move-result v3
    :try_end_3da
    .catchall {:try_start_3d6 .. :try_end_3da} :catchall_408

    const-wide/16 v5, -0x1

    if-nez v3, :cond_3e1

    monitor-exit v2

    move-wide v7, v5

    goto :goto_400

    :cond_3e1
    :try_start_3e1
    iget v3, v2, Lz5/oc;->k:I

    iget v7, v2, Lz5/oc;->i:I

    add-int/2addr v3, v7

    iget v8, v2, Lz5/oc;->a:I

    add-int/lit8 v9, v3, -0x1

    rem-int/2addr v9, v8

    rem-int/2addr v3, v8

    iput v3, v2, Lz5/oc;->k:I

    iget v3, v2, Lz5/oc;->j:I

    add-int/2addr v3, v7

    iput v3, v2, Lz5/oc;->j:I

    iput v4, v2, Lz5/oc;->i:I

    iget-object v3, v2, Lz5/oc;->c:[J

    aget-wide v7, v3, v9

    iget-object v3, v2, Lz5/oc;->d:[I

    aget v3, v3, v9
    :try_end_3fd
    .catchall {:try_start_3e1 .. :try_end_3fd} :catchall_408

    int-to-long v9, v3

    add-long/2addr v7, v9

    monitor-exit v2

    :goto_400
    cmp-long v2, v7, v5

    if-eqz v2, :cond_40e

    .line 20
    invoke-virtual {v0, v7, v8}, Lz5/qc;->k(J)V

    goto :goto_40e

    :catchall_408
    move-exception v0

    .line 21
    monitor-exit v2

    throw v0

    .line 22
    :cond_40b
    invoke-virtual {v0, v2, v3, v15}, Lz5/qc;->i(JZ)Z

    .line 23
    :cond_40e
    :goto_40e
    iget-object v0, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v0}, Lz5/q9;->a()V

    iget-object v0, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v2, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v13, v0, v2, v4}, Lz5/w7;->j(Lz5/ex0;Lz5/q9;Z)I

    move-result v0

    const/4 v2, -0x5

    if-ne v0, v2, :cond_428

    iget-object v0, v13, Lz5/gb;->l:Lz5/ex0;

    iget-object v0, v0, Lz5/ex0;->s:Ljava/lang/Object;

    check-cast v0, Lz5/j8;

    invoke-virtual {v13, v0}, Lz5/gb;->w(Lz5/j8;)V

    goto :goto_438

    :cond_428
    if-ne v0, v1, :cond_438

    iget-object v0, v13, Lz5/gb;->k:Lz5/q9;

    invoke-virtual {v0}, Lz5/q9;->b()Z

    move-result v0

    invoke-static {v0}, Lcom/google/android/gms/internal/ads/r;->q(Z)V

    iput-boolean v15, v13, Lz5/gb;->L:Z

    invoke-virtual/range {p0 .. p0}, Lz5/gb;->r()V

    :cond_438
    :goto_438
    iget-object v0, v13, Lz5/gb;->O:Lz5/p9;

    .line 24
    monitor-enter v0

    monitor-exit v0

    return-void
.end method

.method public n(JZ)V
    .registers 4

    const/4 p1, 0x0

    iput-boolean p1, p0, Lz5/gb;->L:Z

    iput-boolean p1, p0, Lz5/gb;->M:Z

    iget-object p2, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    if-eqz p2, :cond_4d

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

    iput-wide p2, p0, Lz5/gb;->C:J

    const/4 p2, -0x1

    iput p2, p0, Lz5/gb;->D:I

    iput p2, p0, Lz5/gb;->E:I

    const/4 p2, 0x1

    iput-boolean p2, p0, Lz5/gb;->N:Z

    iput-boolean p1, p0, Lz5/gb;->F:Z

    iget-object p3, p0, Lz5/gb;->m:Ljava/util/List;

    invoke-interface {p3}, Ljava/util/List;->clear()V

    iput-boolean p1, p0, Lz5/gb;->y:Z

    iput-boolean p1, p0, Lz5/gb;->z:Z

    iget-boolean p3, p0, Lz5/gb;->s:Z

    if-nez p3, :cond_3d

    iget-boolean p3, p0, Lz5/gb;->v:Z

    if-eqz p3, :cond_30

    iget-boolean p3, p0, Lz5/gb;->K:Z

    if-eqz p3, :cond_30

    goto :goto_3d

    :cond_30
    iget p3, p0, Lz5/gb;->I:I

    if-eqz p3, :cond_35

    goto :goto_3d

    :cond_35
    iget-object p3, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    invoke-virtual {p3}, Landroid/media/MediaCodec;->flush()V

    iput-boolean p1, p0, Lz5/gb;->J:Z

    goto :goto_43

    :cond_3d
    :goto_3d
    invoke-virtual {p0}, Lz5/gb;->C()V

    invoke-virtual {p0}, Lz5/gb;->A()V

    :goto_43
    iget-boolean p1, p0, Lz5/gb;->G:Z

    if-eqz p1, :cond_4d

    iget-object p1, p0, Lz5/gb;->o:Lz5/j8;

    if-eqz p1, :cond_4d

    iput p2, p0, Lz5/gb;->H:I

    :cond_4d
    return-void
.end method

.method public q()V
    .registers 2

    const/4 v0, 0x0

    iput-object v0, p0, Lz5/gb;->o:Lz5/j8;

    :try_start_3
    invoke-virtual {p0}, Lz5/gb;->C()V
    :try_end_6
    .catchall {:try_start_3 .. :try_end_6} :catchall_7

    return-void

    :catchall_7
    move-exception v0

    throw v0
.end method

.method public final r()V
    .registers 3

    iget v0, p0, Lz5/gb;->I:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_c

    invoke-virtual {p0}, Lz5/gb;->C()V

    invoke-virtual {p0}, Lz5/gb;->A()V

    return-void

    :cond_c
    const/4 v0, 0x1

    iput-boolean v0, p0, Lz5/gb;->M:Z

    invoke-virtual {p0}, Lz5/gb;->z()V

    return-void
.end method

.method public abstract s(Lz5/ib;Lz5/j8;)I
.end method

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

    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 abstract u(Lz5/eb;Landroid/media/MediaCodec;Lz5/j8;Landroid/media/MediaCrypto;)V
.end method

.method public abstract v(Ljava/lang/String;JJ)V
.end method

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

    iget-object v0, p0, Lz5/gb;->o:Lz5/j8;

    iput-object p1, p0, Lz5/gb;->o:Lz5/j8;

    iget-object p1, p1, Lz5/j8;->z:Lcom/google/android/gms/internal/ads/i;

    if-nez v0, :cond_a

    const/4 v1, 0x0

    goto :goto_c

    :cond_a
    iget-object v1, v0, Lz5/j8;->z:Lcom/google/android/gms/internal/ads/i;

    :goto_c
    invoke-static {p1, v1}, Lz5/be;->a(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_26

    iget-object p1, p0, Lz5/gb;->o:Lz5/j8;

    iget-object p1, p1, Lz5/j8;->z:Lcom/google/android/gms/internal/ads/i;

    if-nez p1, :cond_19

    goto :goto_26

    :cond_19
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string v0, "Media requires a DrmSessionManager"

    invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

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

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

    .line 2
    throw v0

    :cond_26
    :goto_26
    iget-object p1, p0, Lz5/gb;->p:Landroid/media/MediaCodec;

    const/4 v1, 0x1

    if-eqz p1, :cond_53

    iget-object v2, p0, Lz5/gb;->q:Lz5/eb;

    iget-boolean v2, v2, Lz5/eb;->b:Z

    iget-object v3, p0, Lz5/gb;->o:Lz5/j8;

    invoke-virtual {p0, p1, v2, v0, v3}, Lz5/gb;->E(Landroid/media/MediaCodec;ZLz5/j8;Lz5/j8;)Z

    move-result p1

    if-eqz p1, :cond_53

    iput-boolean v1, p0, Lz5/gb;->G:Z

    iput v1, p0, Lz5/gb;->H:I

    iget-boolean p1, p0, Lz5/gb;->t:Z

    const/4 v2, 0x0

    if-eqz p1, :cond_4f

    iget-object p1, p0, Lz5/gb;->o:Lz5/j8;

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

    iget v4, v0, Lz5/j8;->A:I

    if-ne v3, v4, :cond_4f

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

    iget v0, v0, Lz5/j8;->B:I

    if-ne p1, v0, :cond_4f

    goto :goto_50

    :cond_4f
    move v1, v2

    :goto_50
    iput-boolean v1, p0, Lz5/gb;->y:Z

    return-void

    :cond_53
    iget-boolean p1, p0, Lz5/gb;->J:Z

    if-eqz p1, :cond_5a

    iput v1, p0, Lz5/gb;->I:I

    return-void

    :cond_5a
    invoke-virtual {p0}, Lz5/gb;->C()V

    invoke-virtual {p0}, Lz5/gb;->A()V

    return-void
.end method

.method public abstract x(Landroid/media/MediaCodec;Landroid/media/MediaFormat;)V
.end method

.method public abstract y(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;IIJZ)Z
.end method

.method public z()V
    .registers 1

    return-void
.end method

.method public zzE()Z
    .registers 8

    iget-object v0, p0, Lz5/gb;->o:Lz5/j8;

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_4e

    .line 1
    iget-boolean v0, p0, Lz5/w7;->g:Z

    if-eqz v0, :cond_d

    iget-boolean v0, p0, Lz5/w7;->h:Z

    goto :goto_31

    :cond_d
    iget-object v0, p0, Lz5/w7;->e:Lz5/cc;

    .line 2
    iget-object v3, v0, Lz5/cc;->b:Lz5/dc;

    iget v0, v0, Lz5/cc;->a:I

    .line 3
    iget-boolean v4, v3, Lz5/dc;->V:Z

    if-nez v4, :cond_30

    invoke-virtual {v3}, Lz5/dc;->h()Z

    move-result v4

    if-nez v4, :cond_2e

    iget-object v3, v3, Lz5/dc;->E:Landroid/util/SparseArray;

    invoke-virtual {v3, v0}, Landroid/util/SparseArray;->valueAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lz5/qc;

    .line 4
    iget-object v0, v0, Lz5/qc;->a:Lz5/oc;

    invoke-virtual {v0}, Lz5/oc;->a()Z

    move-result v0

    if-eqz v0, :cond_2e

    goto :goto_30

    :cond_2e
    move v0, v2

    goto :goto_31

    :cond_30
    :goto_30
    move v0, v1

    :goto_31
    if-nez v0, :cond_4f

    .line 5
    iget v0, p0, Lz5/gb;->E:I

    if-gez v0, :cond_4f

    iget-wide v3, p0, Lz5/gb;->C:J

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

    cmp-long v0, v3, v5

    if-eqz v0, :cond_4e

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

    move-result-wide v3

    iget-wide v5, p0, Lz5/gb;->C:J

    cmp-long v0, v3, v5

    if-ltz v0, :cond_4d

    goto :goto_4e

    :cond_4d
    return v1

    :cond_4e
    :goto_4e
    move v1, v2

    :cond_4f
    return v1
.end method
