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

# interfaces
.implements Lz5/ou1;


# instance fields
.field public A:Lz5/g61;

.field public final a:Lz5/lq1;

.field public final b:Lz5/uq;

.field public final c:Lcom/google/android/gms/internal/ads/k;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/google/android/gms/internal/ads/k;"
        }
    .end annotation
.end field

.field public final d:Lz5/o51;

.field public e:Lz5/oq1;

.field public f:Lz5/x2;

.field public g:I

.field public h:[I

.field public i:[J

.field public j:[I

.field public k:[I

.field public l:[J

.field public m:[Lz5/nu1;

.field public n:I

.field public o:I

.field public p:I

.field public q:I

.field public r:J

.field public s:J

.field public t:J

.field public u:Z

.field public v:Z

.field public w:Z

.field public x:Lz5/x2;

.field public y:Z

.field public z:Z


# direct methods
.method public constructor <init>(Lt0/c;Landroid/os/Looper;Lz5/o51;Lz5/c31;)V
    .registers 5

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

    iput-object p3, p0, Lz5/pq1;->d:Lz5/o51;

    new-instance p2, Lz5/lq1;

    invoke-direct {p2, p1}, Lz5/lq1;-><init>(Lt0/c;)V

    iput-object p2, p0, Lz5/pq1;->a:Lz5/lq1;

    new-instance p1, Lz5/uq;

    const/4 p2, 0x2

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

    iput-object p1, p0, Lz5/pq1;->b:Lz5/uq;

    const/16 p1, 0x3e8

    iput p1, p0, Lz5/pq1;->g:I

    new-array p2, p1, [I

    iput-object p2, p0, Lz5/pq1;->h:[I

    new-array p2, p1, [J

    iput-object p2, p0, Lz5/pq1;->i:[J

    new-array p2, p1, [J

    iput-object p2, p0, Lz5/pq1;->l:[J

    new-array p2, p1, [I

    iput-object p2, p0, Lz5/pq1;->k:[I

    new-array p2, p1, [I

    iput-object p2, p0, Lz5/pq1;->j:[I

    new-array p1, p1, [Lz5/nu1;

    iput-object p1, p0, Lz5/pq1;->m:[Lz5/nu1;

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

    sget-object p2, Lz5/mq1;->a:Lz5/s6;

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

    iput-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    const-wide/high16 p1, -0x8000000000000000L

    iput-wide p1, p0, Lz5/pq1;->r:J

    iput-wide p1, p0, Lz5/pq1;->s:J

    iput-wide p1, p0, Lz5/pq1;->t:J

    const/4 p1, 0x1

    iput-boolean p1, p0, Lz5/pq1;->w:Z

    iput-boolean p1, p0, Lz5/pq1;->v:Z

    return-void
.end method


# virtual methods
.method public final a(Lz5/x2;)V
    .registers 5

    .line 1
    monitor-enter p0

    const/4 v0, 0x0

    :try_start_2
    iput-boolean v0, p0, Lz5/pq1;->w:Z

    iget-object v1, p0, Lz5/pq1;->x:Lz5/x2;

    invoke-static {p1, v1}, Lz5/r7;->l(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1
    :try_end_a
    .catchall {:try_start_2 .. :try_end_a} :catchall_5a

    if-eqz v1, :cond_e

    monitor-exit p0

    goto :goto_4a

    :cond_e
    :try_start_e
    iget-object v1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    .line 2
    iget-object v1, v1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v1, Landroid/util/SparseArray;

    invoke-virtual {v1}, Landroid/util/SparseArray;->size()I

    move-result v1

    const/4 v2, 0x1

    if-nez v1, :cond_1d

    move v1, v2

    goto :goto_1e

    :cond_1d
    move v1, v0

    :goto_1e
    if-nez v1, :cond_3a

    .line 3
    iget-object v1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/ads/k;->h()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lz5/nq1;

    iget-object v1, v1, Lz5/nq1;->a:Lz5/x2;

    invoke-virtual {v1, p1}, Lz5/x2;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_3a

    iget-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {p1}, Lcom/google/android/gms/internal/ads/k;->h()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lz5/nq1;

    iget-object p1, p1, Lz5/nq1;->a:Lz5/x2;

    :cond_3a
    iput-object p1, p0, Lz5/pq1;->x:Lz5/x2;

    iget-object v1, p1, Lz5/x2;->k:Ljava/lang/String;

    iget-object p1, p1, Lz5/x2;->h:Ljava/lang/String;

    invoke-static {v1, p1}, Lz5/d7;->c(Ljava/lang/String;Ljava/lang/String;)Z

    move-result p1

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

    iput-boolean v0, p0, Lz5/pq1;->z:Z
    :try_end_48
    .catchall {:try_start_e .. :try_end_48} :catchall_5a

    monitor-exit p0

    move v0, v2

    .line 4
    :goto_4a
    iget-object p1, p0, Lz5/pq1;->e:Lz5/oq1;

    if-eqz p1, :cond_59

    if-eqz v0, :cond_59

    check-cast p1, Lcom/google/android/gms/internal/ads/d9;

    .line 5
    iget-object v0, p1, Lcom/google/android/gms/internal/ads/d9;->D:Landroid/os/Handler;

    iget-object p1, p1, Lcom/google/android/gms/internal/ads/d9;->B:Ljava/lang/Runnable;

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

    :cond_59
    return-void

    :catchall_5a
    move-exception p1

    .line 6
    monitor-exit p0

    throw p1
.end method

.method public final b(Lz5/q3;IZI)I
    .registers 9

    iget-object p4, p0, Lz5/pq1;->a:Lz5/lq1;

    .line 1
    invoke-virtual {p4, p2}, Lz5/lq1;->b(I)I

    move-result p2

    iget-object v0, p4, Lz5/lq1;->d:Lz5/k7;

    iget-object v1, v0, Lz5/k7;->r:Ljava/lang/Object;

    check-cast v1, Lz5/or1;

    iget-object v1, v1, Lz5/or1;->a:[B

    iget-wide v2, p4, Lz5/lq1;->e:J

    invoke-virtual {v0, v2, v3}, Lz5/k7;->a(J)I

    move-result v0

    invoke-interface {p1, v1, v0, p2}, Lz5/q3;->a([BII)I

    move-result p1

    const/4 p2, -0x1

    if-ne p1, p2, :cond_25

    if-eqz p3, :cond_1f

    move p1, p2

    goto :goto_28

    :cond_1f
    new-instance p1, Ljava/io/EOFException;

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

    throw p1

    :cond_25
    invoke-virtual {p4, p1}, Lz5/lq1;->c(I)V

    :goto_28
    return p1
.end method

.method public final c(Lz5/q3;IZ)I
    .registers 5

    const/4 p3, 0x1

    const/4 v0, 0x0

    .line 1
    invoke-virtual {p0, p1, p2, p3, v0}, Lz5/pq1;->b(Lz5/q3;IZI)I

    move-result p1

    return p1
.end method

.method public final d(JIIILz5/nu1;)V
    .registers 16

    and-int/lit8 v0, p3, 0x1

    iget-boolean v1, p0, Lz5/pq1;->v:Z

    const/4 v2, 0x0

    if-eqz v1, :cond_c

    if-nez v0, :cond_a

    return-void

    :cond_a
    iput-boolean v2, p0, Lz5/pq1;->v:Z

    :cond_c
    iget-boolean v1, p0, Lz5/pq1;->y:Z

    const/4 v3, 0x1

    if-eqz v1, :cond_33

    iget-wide v4, p0, Lz5/pq1;->r:J

    cmp-long v1, p1, v4

    if-gez v1, :cond_18

    return-void

    :cond_18
    if-nez v0, :cond_33

    iget-boolean v0, p0, Lz5/pq1;->z:Z

    if-nez v0, :cond_31

    iget-object v0, p0, Lz5/pq1;->x:Lz5/x2;

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

    move-result-object v0

    const-string v1, "SampleQueue"

    const-string v4, "Overriding unexpected non-sync sample for format: "

    invoke-virtual {v4, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

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

    iput-boolean v3, p0, Lz5/pq1;->z:Z

    :cond_31
    or-int/lit8 p3, p3, 0x1

    :cond_33
    iget-object v0, p0, Lz5/pq1;->a:Lz5/lq1;

    .line 1
    iget-wide v0, v0, Lz5/lq1;->e:J

    int-to-long v4, p4

    sub-long/2addr v0, v4

    int-to-long v4, p5

    sub-long/2addr v0, v4

    .line 2
    monitor-enter p0

    :try_start_3c
    iget p5, p0, Lz5/pq1;->n:I

    if-lez p5, :cond_5a

    add-int/lit8 p5, p5, -0x1

    invoke-virtual {p0, p5}, Lz5/pq1;->l(I)I

    move-result p5

    iget-object v4, p0, Lz5/pq1;->i:[J

    aget-wide v5, v4, p5

    iget-object v4, p0, Lz5/pq1;->j:[I

    aget p5, v4, p5

    int-to-long v7, p5

    add-long/2addr v5, v7

    cmp-long p5, v5, v0

    if-gtz p5, :cond_56

    move p5, v3

    goto :goto_57

    :cond_56
    move p5, v2

    :goto_57
    invoke-static {p5}, Lcom/google/android/gms/internal/ads/d;->e(Z)V

    :cond_5a
    const/high16 p5, 0x20000000

    and-int/2addr p5, p3

    if-eqz p5, :cond_61

    move p5, v3

    goto :goto_62

    :cond_61
    move p5, v2

    :goto_62
    iput-boolean p5, p0, Lz5/pq1;->u:Z

    iget-wide v4, p0, Lz5/pq1;->t:J

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

    move-result-wide v4

    iput-wide v4, p0, Lz5/pq1;->t:J

    iget p5, p0, Lz5/pq1;->n:I

    invoke-virtual {p0, p5}, Lz5/pq1;->l(I)I

    move-result p5

    iget-object v4, p0, Lz5/pq1;->l:[J

    aput-wide p1, v4, p5

    iget-object p1, p0, Lz5/pq1;->i:[J

    aput-wide v0, p1, p5

    iget-object p1, p0, Lz5/pq1;->j:[I

    aput p4, p1, p5

    iget-object p1, p0, Lz5/pq1;->k:[I

    aput p3, p1, p5

    iget-object p1, p0, Lz5/pq1;->m:[Lz5/nu1;

    aput-object p6, p1, p5

    iget-object p1, p0, Lz5/pq1;->h:[I

    aput v2, p1, p5

    iget-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    .line 3
    iget-object p1, p1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast p1, Landroid/util/SparseArray;

    invoke-virtual {p1}, Landroid/util/SparseArray;->size()I

    move-result p1

    if-nez p1, :cond_98

    move p1, v3

    goto :goto_99

    :cond_98
    move p1, v2

    :goto_99
    if-nez p1, :cond_ad

    .line 4
    iget-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {p1}, Lcom/google/android/gms/internal/ads/k;->h()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lz5/nq1;

    iget-object p1, p1, Lz5/nq1;->a:Lz5/x2;

    iget-object p2, p0, Lz5/pq1;->x:Lz5/x2;

    invoke-virtual {p1, p2}, Lz5/x2;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_c5

    :cond_ad
    sget p1, Lz5/e51;->a:I

    sget-object p1, Lz5/p41;->b:Lz5/e51;

    iget-object p2, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    iget p3, p0, Lz5/pq1;->o:I

    iget p4, p0, Lz5/pq1;->n:I

    add-int/2addr p3, p4

    new-instance p4, Lz5/nq1;

    iget-object p5, p0, Lz5/pq1;->x:Lz5/x2;
    :try_end_bc
    .catchall {:try_start_3c .. :try_end_bc} :catchall_139

    invoke-static {p5}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    :try_start_bf
    invoke-direct {p4, p5, p1}, Lz5/nq1;-><init>(Lz5/x2;Lz5/e51;)V

    invoke-virtual {p2, p3, p4}, Lcom/google/android/gms/internal/ads/k;->f(ILjava/lang/Object;)V

    :cond_c5
    iget p1, p0, Lz5/pq1;->n:I

    add-int/2addr p1, v3

    iput p1, p0, Lz5/pq1;->n:I

    iget p2, p0, Lz5/pq1;->g:I

    if-ne p1, p2, :cond_137

    add-int/lit16 p1, p2, 0x3e8

    new-array p3, p1, [I

    new-array p4, p1, [J

    new-array p5, p1, [J

    new-array p6, p1, [I

    new-array v0, p1, [I

    new-array v1, p1, [Lz5/nu1;

    iget v3, p0, Lz5/pq1;->p:I

    sub-int/2addr p2, v3

    iget-object v4, p0, Lz5/pq1;->i:[J

    invoke-static {v4, v3, p4, v2, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v3, p0, Lz5/pq1;->l:[J

    iget v4, p0, Lz5/pq1;->p:I

    invoke-static {v3, v4, p5, v2, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v3, p0, Lz5/pq1;->k:[I

    iget v4, p0, Lz5/pq1;->p:I

    invoke-static {v3, v4, p6, v2, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v3, p0, Lz5/pq1;->j:[I

    iget v4, p0, Lz5/pq1;->p:I

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

    iget-object v3, p0, Lz5/pq1;->m:[Lz5/nu1;

    iget v4, p0, Lz5/pq1;->p:I

    invoke-static {v3, v4, v1, v2, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v3, p0, Lz5/pq1;->h:[I

    iget v4, p0, Lz5/pq1;->p:I

    invoke-static {v3, v4, p3, v2, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget v3, p0, Lz5/pq1;->p:I

    iget-object v4, p0, Lz5/pq1;->i:[J

    invoke-static {v4, v2, p4, p2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v4, p0, Lz5/pq1;->l:[J

    invoke-static {v4, v2, p5, p2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v4, p0, Lz5/pq1;->k:[I

    invoke-static {v4, v2, p6, p2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v4, p0, Lz5/pq1;->j:[I

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

    iget-object v4, p0, Lz5/pq1;->m:[Lz5/nu1;

    invoke-static {v4, v2, v1, p2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iget-object v4, p0, Lz5/pq1;->h:[I

    invoke-static {v4, v2, p3, p2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    iput-object p4, p0, Lz5/pq1;->i:[J

    iput-object p5, p0, Lz5/pq1;->l:[J

    iput-object p6, p0, Lz5/pq1;->k:[I

    iput-object v0, p0, Lz5/pq1;->j:[I

    iput-object v1, p0, Lz5/pq1;->m:[Lz5/nu1;

    iput-object p3, p0, Lz5/pq1;->h:[I

    iput v2, p0, Lz5/pq1;->p:I

    iput p1, p0, Lz5/pq1;->g:I
    :try_end_137
    .catchall {:try_start_bf .. :try_end_137} :catchall_139

    :cond_137
    monitor-exit p0

    return-void

    :catchall_139
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public final e(Lz5/j7;II)V
    .registers 9

    iget-object p3, p0, Lz5/pq1;->a:Lz5/lq1;

    invoke-static {p3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    :goto_5
    if-lez p2, :cond_21

    .line 1
    invoke-virtual {p3, p2}, Lz5/lq1;->b(I)I

    move-result v0

    iget-object v1, p3, Lz5/lq1;->d:Lz5/k7;

    iget-object v2, v1, Lz5/k7;->r:Ljava/lang/Object;

    check-cast v2, Lz5/or1;

    iget-object v2, v2, Lz5/or1;->a:[B

    iget-wide v3, p3, Lz5/lq1;->e:J

    invoke-virtual {v1, v3, v4}, Lz5/k7;->a(J)I

    move-result v1

    invoke-virtual {p1, v2, v1, v0}, Lz5/j7;->z([BII)V

    sub-int/2addr p2, v0

    invoke-virtual {p3, v0}, Lz5/lq1;->c(I)V

    goto :goto_5

    :cond_21
    return-void
.end method

.method public final f(Lz5/j7;I)V
    .registers 4

    const/4 v0, 0x0

    .line 1
    invoke-virtual {p0, p1, p2, v0}, Lz5/pq1;->e(Lz5/j7;II)V

    return-void
.end method

.method public final g()Z
    .registers 3

    iget v0, p0, Lz5/pq1;->q:I

    iget v1, p0, Lz5/pq1;->n:I

    if-eq v0, v1, :cond_8

    const/4 v0, 0x1

    return v0

    :cond_8
    const/4 v0, 0x0

    return v0
.end method

.method public final h(Lz5/x2;Landroidx/appcompat/widget/n;)V
    .registers 9

    iget-object v0, p0, Lz5/pq1;->f:Lz5/x2;

    const/4 v1, 0x0

    if-nez v0, :cond_7

    move-object v2, v1

    goto :goto_9

    :cond_7
    iget-object v2, v0, Lz5/x2;->n:Lcom/google/android/gms/internal/ads/f9;

    :goto_9
    iput-object p1, p0, Lz5/pq1;->f:Lz5/x2;

    iget-object v3, p1, Lz5/x2;->n:Lcom/google/android/gms/internal/ads/f9;

    iget-object v4, p0, Lz5/pq1;->d:Lz5/o51;

    check-cast v4, Lc3/f;

    invoke-static {v4}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 1
    iget-object v4, p1, Lz5/x2;->n:Lcom/google/android/gms/internal/ads/f9;

    if-eqz v4, :cond_1a

    const/4 v4, 0x1

    goto :goto_1b

    :cond_1a
    const/4 v4, 0x0

    .line 2
    :goto_1b
    new-instance v5, Lz5/w2;

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

    .line 3
    iput v4, v5, Lz5/w2;->C:I

    .line 4
    new-instance v4, Lz5/x2;

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

    .line 5
    iput-object v4, p2, Landroidx/appcompat/widget/n;->s:Ljava/lang/Object;

    iget-object v4, p0, Lz5/pq1;->A:Lz5/g61;

    iput-object v4, p2, Landroidx/appcompat/widget/n;->t:Ljava/lang/Object;

    if-eqz v0, :cond_37

    invoke-static {v2, v3}, Lz5/r7;->l(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_36

    goto :goto_37

    :cond_36
    return-void

    :cond_37
    :goto_37
    iget-object p1, p1, Lz5/x2;->n:Lcom/google/android/gms/internal/ads/f9;

    if-nez p1, :cond_3c

    goto :goto_4b

    :cond_3c
    new-instance v1, Lz5/g61;

    new-instance p1, Lz5/t21;

    new-instance v0, Lz5/l71;

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

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

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

    :goto_4b
    iput-object v1, p0, Lz5/pq1;->A:Lz5/g61;

    iput-object v1, p2, Landroidx/appcompat/widget/n;->t:Ljava/lang/Object;

    return-void
.end method

.method public final i(I)Z
    .registers 4

    iget-object v0, p0, Lz5/pq1;->A:Lz5/g61;

    const/4 v1, 0x0

    if-eqz v0, :cond_10

    iget-object v0, p0, Lz5/pq1;->k:[I

    aget p1, v0, p1

    const/high16 v0, 0x40000000    # 2.0f

    and-int/2addr p1, v0

    if-eqz p1, :cond_f

    goto :goto_11

    :cond_f
    return v1

    :cond_10
    const/4 v1, 0x1

    :goto_11
    return v1
.end method

.method public final j(IIJZ)I
    .registers 12

    const/4 v0, 0x0

    const/4 v1, -0x1

    move v2, v0

    :goto_3
    if-ge v2, p2, :cond_25

    iget-object v3, p0, Lz5/pq1;->l:[J

    aget-wide v4, v3, p1

    cmp-long v3, v4, p3

    if-gtz v3, :cond_25

    if-eqz p5, :cond_17

    iget-object v4, p0, Lz5/pq1;->k:[I

    aget v4, v4, p1

    and-int/lit8 v4, v4, 0x1

    if-eqz v4, :cond_1b

    :cond_17
    move v1, v2

    if-nez v3, :cond_1b

    goto :goto_25

    :cond_1b
    add-int/lit8 p1, p1, 0x1

    iget v3, p0, Lz5/pq1;->g:I

    if-ne p1, v3, :cond_22

    move p1, v0

    :cond_22
    add-int/lit8 v2, v2, 0x1

    goto :goto_3

    :cond_25
    :goto_25
    return v1
.end method

.method public final k(I)J
    .registers 13

    iget-wide v0, p0, Lz5/pq1;->s:J

    const-wide/high16 v2, -0x8000000000000000L

    const/4 v4, 0x0

    const/4 v5, -0x1

    if-nez p1, :cond_9

    goto :goto_2d

    :cond_9
    add-int/lit8 v6, p1, -0x1

    invoke-virtual {p0, v6}, Lz5/pq1;->l(I)I

    move-result v6

    move v7, v4

    :goto_10
    if-ge v7, p1, :cond_2d

    iget-object v8, p0, Lz5/pq1;->l:[J

    aget-wide v9, v8, v6

    invoke-static {v2, v3, v9, v10}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v2

    iget-object v8, p0, Lz5/pq1;->k:[I

    aget v8, v8, v6

    and-int/lit8 v8, v8, 0x1

    if-eqz v8, :cond_23

    goto :goto_2d

    :cond_23
    add-int/lit8 v6, v6, -0x1

    if-ne v6, v5, :cond_2a

    iget v6, p0, Lz5/pq1;->g:I

    add-int/2addr v6, v5

    :cond_2a
    add-int/lit8 v7, v7, 0x1

    goto :goto_10

    :cond_2d
    :goto_2d
    invoke-static {v0, v1, v2, v3}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v0

    iput-wide v0, p0, Lz5/pq1;->s:J

    iget v0, p0, Lz5/pq1;->n:I

    sub-int/2addr v0, p1

    iput v0, p0, Lz5/pq1;->n:I

    iget v0, p0, Lz5/pq1;->o:I

    add-int/2addr v0, p1

    iput v0, p0, Lz5/pq1;->o:I

    iget v1, p0, Lz5/pq1;->p:I

    add-int/2addr v1, p1

    iput v1, p0, Lz5/pq1;->p:I

    iget v2, p0, Lz5/pq1;->g:I

    if-lt v1, v2, :cond_49

    sub-int/2addr v1, v2

    iput v1, p0, Lz5/pq1;->p:I

    :cond_49
    iget v1, p0, Lz5/pq1;->q:I

    sub-int/2addr v1, p1

    iput v1, p0, Lz5/pq1;->q:I

    if-gez v1, :cond_52

    iput v4, p0, Lz5/pq1;->q:I

    :cond_52
    iget-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    .line 1
    :goto_54
    iget-object v1, p1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v1, Landroid/util/SparseArray;

    invoke-virtual {v1}, Landroid/util/SparseArray;->size()I

    move-result v1

    add-int/2addr v1, v5

    if-ge v4, v1, :cond_88

    add-int/lit8 v1, v4, 0x1

    iget-object v2, p1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v2, Landroid/util/SparseArray;

    invoke-virtual {v2, v1}, Landroid/util/SparseArray;->keyAt(I)I

    move-result v2

    if-lt v0, v2, :cond_88

    iget-object v2, p1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v2, Landroid/util/SparseArray;

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

    move-result-object v2

    check-cast v2, Lz5/nq1;

    .line 2
    iget-object v2, v2, Lz5/nq1;->b:Lz5/e51;

    .line 3
    iget-object v2, p1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v2, Landroid/util/SparseArray;

    invoke-virtual {v2, v4}, Landroid/util/SparseArray;->removeAt(I)V

    iget v2, p1, Lcom/google/android/gms/internal/ads/k;->t:I

    if-lez v2, :cond_86

    add-int/lit8 v2, v2, -0x1

    iput v2, p1, Lcom/google/android/gms/internal/ads/k;->t:I

    :cond_86
    move v4, v1

    goto :goto_54

    .line 4
    :cond_88
    iget p1, p0, Lz5/pq1;->n:I

    if-nez p1, :cond_9e

    iget p1, p0, Lz5/pq1;->p:I

    if-nez p1, :cond_92

    iget p1, p0, Lz5/pq1;->g:I

    :cond_92
    add-int/2addr p1, v5

    iget-object v0, p0, Lz5/pq1;->i:[J

    aget-wide v1, v0, p1

    iget-object v0, p0, Lz5/pq1;->j:[I

    aget p1, v0, p1

    int-to-long v3, p1

    add-long/2addr v1, v3

    return-wide v1

    :cond_9e
    iget-object p1, p0, Lz5/pq1;->i:[J

    iget v0, p0, Lz5/pq1;->p:I

    aget-wide v0, p1, v0

    return-wide v0
.end method

.method public final l(I)I
    .registers 3

    iget v0, p0, Lz5/pq1;->p:I

    add-int/2addr v0, p1

    iget p1, p0, Lz5/pq1;->g:I

    if-ge v0, p1, :cond_8

    return v0

    :cond_8
    sub-int/2addr v0, p1

    return v0
.end method

.method public final m(Z)V
    .registers 12

    iget-object v0, p0, Lz5/pq1;->a:Lz5/lq1;

    .line 1
    iget-object v1, v0, Lz5/lq1;->b:Lz5/k7;

    iget-boolean v2, v1, Lz5/k7;->s:Z

    const/4 v3, 0x0

    const/4 v4, 0x0

    if-nez v2, :cond_b

    goto :goto_35

    :cond_b
    iget-object v2, v0, Lz5/lq1;->d:Lz5/k7;

    iget-boolean v5, v2, Lz5/k7;->s:Z

    iget-wide v6, v2, Lz5/k7;->t:J

    iget-wide v8, v1, Lz5/k7;->t:J

    sub-long/2addr v6, v8

    long-to-int v2, v6

    const/high16 v6, 0x10000

    div-int/2addr v2, v6

    add-int/2addr v2, v5

    new-array v5, v2, [Lz5/or1;

    move v6, v4

    :goto_1c
    if-ge v6, v2, :cond_30

    iget-object v7, v1, Lz5/k7;->r:Ljava/lang/Object;

    check-cast v7, Lz5/or1;

    aput-object v7, v5, v6

    .line 2
    iput-object v3, v1, Lz5/k7;->r:Ljava/lang/Object;

    iget-object v7, v1, Lz5/k7;->v:Ljava/lang/Object;

    check-cast v7, Lz5/k7;

    iput-object v3, v1, Lz5/k7;->v:Ljava/lang/Object;

    add-int/lit8 v6, v6, 0x1

    move-object v1, v7

    goto :goto_1c

    .line 3
    :cond_30
    iget-object v1, v0, Lz5/lq1;->f:Lt0/c;

    invoke-virtual {v1, v5}, Lt0/c;->h([Lz5/or1;)V

    :goto_35
    new-instance v1, Lz5/k7;

    const/4 v2, 0x2

    const-wide/16 v5, 0x0

    invoke-direct {v1, v5, v6, v2}, Lz5/k7;-><init>(JI)V

    iput-object v1, v0, Lz5/lq1;->b:Lz5/k7;

    iput-object v1, v0, Lz5/lq1;->c:Lz5/k7;

    iput-object v1, v0, Lz5/lq1;->d:Lz5/k7;

    iput-wide v5, v0, Lz5/lq1;->e:J

    iget-object v0, v0, Lz5/lq1;->f:Lt0/c;

    invoke-virtual {v0}, Lt0/c;->i()V

    .line 4
    iput v4, p0, Lz5/pq1;->n:I

    iput v4, p0, Lz5/pq1;->o:I

    iput v4, p0, Lz5/pq1;->p:I

    iput v4, p0, Lz5/pq1;->q:I

    const/4 v0, 0x1

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

    const-wide/high16 v1, -0x8000000000000000L

    iput-wide v1, p0, Lz5/pq1;->r:J

    iput-wide v1, p0, Lz5/pq1;->s:J

    iput-wide v1, p0, Lz5/pq1;->t:J

    iput-boolean v4, p0, Lz5/pq1;->u:Z

    iget-object v1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    .line 5
    :goto_61
    iget-object v2, v1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v2, Landroid/util/SparseArray;

    invoke-virtual {v2}, Landroid/util/SparseArray;->size()I

    move-result v2

    if-ge v4, v2, :cond_7a

    iget-object v2, v1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v2, Landroid/util/SparseArray;

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

    move-result-object v2

    check-cast v2, Lz5/nq1;

    .line 6
    iget-object v2, v2, Lz5/nq1;->b:Lz5/e51;

    add-int/lit8 v4, v4, 0x1

    goto :goto_61

    :cond_7a
    const/4 v2, -0x1

    .line 7
    iput v2, v1, Lcom/google/android/gms/internal/ads/k;->t:I

    iget-object v1, v1, Lcom/google/android/gms/internal/ads/k;->s:Ljava/lang/Object;

    check-cast v1, Landroid/util/SparseArray;

    invoke-virtual {v1}, Landroid/util/SparseArray;->clear()V

    if-eqz p1, :cond_8a

    .line 8
    iput-object v3, p0, Lz5/pq1;->x:Lz5/x2;

    iput-boolean v0, p0, Lz5/pq1;->w:Z

    :cond_8a
    return-void
.end method

.method public final declared-synchronized n()Lz5/x2;
    .registers 2

    monitor-enter p0

    :try_start_1
    iget-boolean v0, p0, Lz5/pq1;->w:Z
    :try_end_3
    .catchall {:try_start_1 .. :try_end_3} :catchall_c

    if-eqz v0, :cond_8

    const/4 v0, 0x0

    monitor-exit p0

    return-object v0

    :cond_8
    :try_start_8
    iget-object v0, p0, Lz5/pq1;->x:Lz5/x2;
    :try_end_a
    .catchall {:try_start_8 .. :try_end_a} :catchall_c

    monitor-exit p0

    return-object v0

    :catchall_c
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final declared-synchronized o(Z)Z
    .registers 5

    monitor-enter p0

    :try_start_1
    invoke-virtual {p0}, Lz5/pq1;->g()Z

    move-result v0

    const/4 v1, 0x1

    if-nez v0, :cond_1d

    const/4 v0, 0x0

    if-nez p1, :cond_1b

    iget-boolean p1, p0, Lz5/pq1;->u:Z

    if-nez p1, :cond_1b

    iget-object p1, p0, Lz5/pq1;->x:Lz5/x2;

    if-eqz p1, :cond_1a

    iget-object v2, p0, Lz5/pq1;->f:Lz5/x2;
    :try_end_15
    .catchall {:try_start_1 .. :try_end_15} :catchall_3e

    if-eq p1, v2, :cond_18

    goto :goto_1b

    :cond_18
    monitor-exit p0

    return v0

    :cond_1a
    move v1, v0

    :cond_1b
    :goto_1b
    monitor-exit p0

    return v1

    :cond_1d
    :try_start_1d
    iget-object p1, p0, Lz5/pq1;->c:Lcom/google/android/gms/internal/ads/k;

    iget v0, p0, Lz5/pq1;->o:I

    iget v2, p0, Lz5/pq1;->q:I

    add-int/2addr v0, v2

    invoke-virtual {p1, v0}, Lcom/google/android/gms/internal/ads/k;->d(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lz5/nq1;

    iget-object p1, p1, Lz5/nq1;->a:Lz5/x2;

    iget-object v0, p0, Lz5/pq1;->f:Lz5/x2;
    :try_end_2e
    .catchall {:try_start_1d .. :try_end_2e} :catchall_3e

    if-eq p1, v0, :cond_32

    monitor-exit p0

    return v1

    :cond_32
    :try_start_32
    iget p1, p0, Lz5/pq1;->q:I

    invoke-virtual {p0, p1}, Lz5/pq1;->l(I)I

    move-result p1

    invoke-virtual {p0, p1}, Lz5/pq1;->i(I)Z

    move-result p1
    :try_end_3c
    .catchall {:try_start_32 .. :try_end_3c} :catchall_3e

    monitor-exit p0

    return p1

    :catchall_3e
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public final declared-synchronized p(JZ)Z
    .registers 13

    monitor-enter p0

    .line 1
    :try_start_1
    monitor-enter p0
    :try_end_2
    .catchall {:try_start_1 .. :try_end_2} :catchall_44

    const/4 v0, 0x0

    :try_start_3
    iput v0, p0, Lz5/pq1;->q:I

    iget-object v1, p0, Lz5/pq1;->a:Lz5/lq1;

    .line 2
    iget-object v2, v1, Lz5/lq1;->b:Lz5/k7;

    iput-object v2, v1, Lz5/lq1;->c:Lz5/k7;
    :try_end_b
    .catchall {:try_start_3 .. :try_end_b} :catchall_46

    .line 3
    :try_start_b
    monitor-exit p0

    .line 4
    invoke-virtual {p0, v0}, Lz5/pq1;->l(I)I

    move-result v4

    invoke-virtual {p0}, Lz5/pq1;->g()Z

    move-result v1

    if-eqz v1, :cond_42

    iget-object v1, p0, Lz5/pq1;->l:[J

    aget-wide v2, v1, v4

    cmp-long v1, p1, v2

    if-ltz v1, :cond_42

    iget-wide v1, p0, Lz5/pq1;->t:J

    cmp-long v1, p1, v1

    if-lez v1, :cond_26

    if-eqz p3, :cond_42

    :cond_26
    iget p3, p0, Lz5/pq1;->n:I

    iget v1, p0, Lz5/pq1;->q:I

    sub-int v5, p3, v1

    const/4 v8, 0x1

    move-object v3, p0

    move-wide v6, p1

    invoke-virtual/range {v3 .. v8}, Lz5/pq1;->j(IIJZ)I

    move-result p3
    :try_end_33
    .catchall {:try_start_b .. :try_end_33} :catchall_44

    const/4 v1, -0x1

    if-ne p3, v1, :cond_38

    monitor-exit p0

    return v0

    :cond_38
    :try_start_38
    iput-wide p1, p0, Lz5/pq1;->r:J

    iget p1, p0, Lz5/pq1;->q:I

    add-int/2addr p1, p3

    iput p1, p0, Lz5/pq1;->q:I
    :try_end_3f
    .catchall {:try_start_38 .. :try_end_3f} :catchall_44

    const/4 p1, 0x1

    monitor-exit p0

    return p1

    :cond_42
    monitor-exit p0

    return v0

    :catchall_44
    move-exception p1

    goto :goto_49

    :catchall_46
    move-exception p1

    .line 5
    :try_start_47
    monitor-exit p0

    throw p1
    :try_end_49
    .catchall {:try_start_47 .. :try_end_49} :catchall_44

    :goto_49
    monitor-exit p0

    throw p1
.end method

.method public final q()V
    .registers 4

    iget-object v0, p0, Lz5/pq1;->a:Lz5/lq1;

    .line 1
    monitor-enter p0

    :try_start_3
    iget v1, p0, Lz5/pq1;->n:I
    :try_end_5
    .catchall {:try_start_3 .. :try_end_5} :catchall_14

    if-nez v1, :cond_b

    const-wide/16 v1, -0x1

    :goto_9
    monitor-exit p0

    goto :goto_10

    :cond_b
    :try_start_b
    invoke-virtual {p0, v1}, Lz5/pq1;->k(I)J

    move-result-wide v1
    :try_end_f
    .catchall {:try_start_b .. :try_end_f} :catchall_14

    goto :goto_9

    .line 2
    :goto_10
    invoke-virtual {v0, v1, v2}, Lz5/lq1;->a(J)V

    return-void

    :catchall_14
    move-exception v0

    .line 3
    monitor-exit p0

    throw v0
.end method
