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


# instance fields
.field public final a:Landroid/net/Uri;

.field public final b:Lz5/kd;

.field public final c:Lz5/g90;

.field public final d:Lz5/xd;

.field public final e:Lz5/p8;

.field public volatile f:Z

.field public g:Z

.field public h:J

.field public i:J

.field public final synthetic j:Lz5/dc;


# direct methods
.method public constructor <init>(Lz5/dc;Landroid/net/Uri;Lz5/kd;Lz5/g90;Lz5/xd;)V
    .registers 6

    iput-object p1, p0, Lz5/bc;->j:Lz5/dc;

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

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

    iput-object p2, p0, Lz5/bc;->a:Landroid/net/Uri;

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

    iput-object p3, p0, Lz5/bc;->b:Lz5/kd;

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

    iput-object p4, p0, Lz5/bc;->c:Lz5/g90;

    iput-object p5, p0, Lz5/bc;->d:Lz5/xd;

    new-instance p1, Lz5/p8;

    const/4 p2, 0x1

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

    iput-object p1, p0, Lz5/bc;->e:Lz5/p8;

    iput-boolean p2, p0, Lz5/bc;->g:Z

    const-wide/16 p1, -0x1

    iput-wide p1, p0, Lz5/bc;->i:J

    return-void
.end method


# virtual methods
.method public final a()V
    .registers 17

    move-object/from16 v1, p0

    :cond_2
    iget-boolean v0, v1, Lz5/bc;->f:Z

    if-nez v0, :cond_ba

    const/4 v2, 0x1

    const/4 v3, 0x0

    :try_start_8
    iget-object v0, v1, Lz5/bc;->e:Lz5/p8;

    iget-wide v13, v0, Lz5/p8;->a:J

    iget-object v0, v1, Lz5/bc;->b:Lz5/kd;

    new-instance v15, Lz5/nd;

    iget-object v5, v1, Lz5/bc;->a:Landroid/net/Uri;

    const/4 v6, 0x0

    const-wide/16 v11, -0x1

    move-object v4, v15

    move-wide v7, v13

    move-wide v9, v13

    invoke-direct/range {v4 .. v12}, Lz5/nd;-><init>(Landroid/net/Uri;[BJJJ)V

    invoke-interface {v0, v15}, Lz5/kd;->e(Lz5/nd;)J

    move-result-wide v4

    iput-wide v4, v1, Lz5/bc;->i:J

    const-wide/16 v6, -0x1

    cmp-long v0, v4, v6

    if-eqz v0, :cond_2a

    add-long/2addr v4, v13

    iput-wide v4, v1, Lz5/bc;->i:J

    :cond_2a
    move-wide v8, v4

    new-instance v10, Lz5/w9;

    iget-object v0, v1, Lz5/bc;->b:Lz5/kd;

    move-object v4, v10

    move-object v5, v0

    move-wide v6, v13

    invoke-direct/range {v4 .. v9}, Lz5/w9;-><init>(Lz5/kd;JJ)V
    :try_end_35
    .catchall {:try_start_8 .. :try_end_35} :catchall_a3

    :try_start_35
    iget-object v4, v1, Lz5/bc;->c:Lz5/g90;

    invoke-interface {v0}, Lz5/kd;->zzc()Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v4, v10, v0}, Lz5/g90;->b(Lz5/w9;Landroid/net/Uri;)Lz5/x9;

    move-result-object v0

    iget-boolean v4, v1, Lz5/bc;->g:Z

    if-eqz v4, :cond_4a

    iget-wide v4, v1, Lz5/bc;->h:J

    invoke-interface {v0, v13, v14, v4, v5}, Lz5/x9;->a(JJ)V

    iput-boolean v3, v1, Lz5/bc;->g:Z
    :try_end_4a
    .catchall {:try_start_35 .. :try_end_4a} :catchall_a1

    :cond_4a
    move v4, v3

    :cond_4b
    :goto_4b
    if-nez v4, :cond_8b

    :try_start_4d
    iget-boolean v5, v1, Lz5/bc;->f:Z

    if-nez v5, :cond_86

    iget-object v5, v1, Lz5/bc;->d:Lz5/xd;

    .line 1
    monitor-enter v5
    :try_end_54
    .catchall {:try_start_4d .. :try_end_54} :catchall_88

    :goto_54
    :try_start_54
    iget-boolean v6, v5, Lz5/xd;->s:Z

    if-nez v6, :cond_5c

    invoke-virtual {v5}, Ljava/lang/Object;->wait()V
    :try_end_5b
    .catchall {:try_start_54 .. :try_end_5b} :catchall_83

    goto :goto_54

    :cond_5c
    :try_start_5c
    monitor-exit v5

    .line 2
    iget-object v5, v1, Lz5/bc;->e:Lz5/p8;

    invoke-interface {v0, v10, v5}, Lz5/x9;->e(Lz5/w9;Lz5/p8;)I

    move-result v4

    .line 3
    iget-wide v5, v10, Lz5/w9;->c:J

    .line 4
    iget-object v7, v1, Lz5/bc;->j:Lz5/dc;

    .line 5
    iget-wide v7, v7, Lz5/dc;->x:J

    add-long/2addr v7, v13

    cmp-long v7, v5, v7

    if-lez v7, :cond_4b

    .line 6
    iget-object v7, v1, Lz5/bc;->d:Lz5/xd;

    .line 7
    monitor-enter v7
    :try_end_71
    .catchall {:try_start_5c .. :try_end_71} :catchall_88

    :try_start_71
    iput-boolean v3, v7, Lz5/xd;->s:Z
    :try_end_73
    .catchall {:try_start_71 .. :try_end_73} :catchall_7f

    :try_start_73
    monitor-exit v7

    .line 8
    iget-object v7, v1, Lz5/bc;->j:Lz5/dc;

    .line 9
    iget-object v8, v7, Lz5/dc;->D:Landroid/os/Handler;

    .line 10
    iget-object v7, v7, Lz5/dc;->C:Ljava/lang/Runnable;

    .line 11
    invoke-virtual {v8, v7}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    move-wide v13, v5

    goto :goto_4b

    :catchall_7f
    move-exception v0

    move-object v3, v0

    .line 12
    monitor-exit v7

    throw v3

    :catchall_83
    move-exception v0

    .line 13
    monitor-exit v5

    throw v0
    :try_end_86
    .catchall {:try_start_73 .. :try_end_86} :catchall_88

    :cond_86
    move v4, v3

    goto :goto_8b

    :catchall_88
    move-exception v0

    move v3, v4

    goto :goto_a5

    :cond_8b
    :goto_8b
    if-ne v4, v2, :cond_8e

    goto :goto_95

    .line 14
    :cond_8e
    iget-object v0, v1, Lz5/bc;->e:Lz5/p8;

    .line 15
    iget-wide v2, v10, Lz5/w9;->c:J

    .line 16
    iput-wide v2, v0, Lz5/p8;->a:J

    move v3, v4

    :goto_95
    iget-object v0, v1, Lz5/bc;->b:Lz5/kd;

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

    if-eqz v0, :cond_9e

    .line 17
    :try_start_9b
    invoke-interface {v0}, Lz5/kd;->zzd()V
    :try_end_9e
    .catch Ljava/io/IOException; {:try_start_9b .. :try_end_9e} :catch_9e

    :catch_9e
    :cond_9e
    if-eqz v3, :cond_2

    goto :goto_ba

    :catchall_a1
    move-exception v0

    goto :goto_a5

    :catchall_a3
    move-exception v0

    const/4 v10, 0x0

    :goto_a5
    if-ne v3, v2, :cond_a8

    goto :goto_b0

    :cond_a8
    if-eqz v10, :cond_b0

    .line 18
    iget-object v2, v1, Lz5/bc;->e:Lz5/p8;

    .line 19
    iget-wide v3, v10, Lz5/w9;->c:J

    .line 20
    iput-wide v3, v2, Lz5/p8;->a:J

    :cond_b0
    :goto_b0
    iget-object v2, v1, Lz5/bc;->b:Lz5/kd;

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

    if-eqz v2, :cond_b9

    .line 21
    :try_start_b6
    invoke-interface {v2}, Lz5/kd;->zzd()V
    :try_end_b9
    .catch Ljava/io/IOException; {:try_start_b6 .. :try_end_b9} :catch_b9

    .line 22
    :catch_b9
    :cond_b9
    throw v0

    :cond_ba
    :goto_ba
    return-void
.end method
