a.smali
.class public final Lrx/internal/producers/a;
.super Ljava/lang/Object;
.source "ProducerArbiter.java"
# interfaces
.implements Lrx/i;
# static fields
.field private static cby:Lrx/i;
# instance fields
.field public bTk:Z
.field public cah:J
.field private cbu:Lrx/i;
.field private cbv:J
.field public cbw:J
.field private cbx:Lrx/i;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 33
new-instance v0, Lrx/internal/producers/a$1;
invoke-direct {v0}, Lrx/internal/producers/a$1;-><init>()V
sput-object v0, Lrx/internal/producers/a;->cby:Lrx/i;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final Qd()V
.registers 14
.prologue
const/4 v12, 0x0
const-wide v2, 0x7fffffffffffffffL
const-wide/16 v10, 0x0
.line 145
:cond_8
:goto_8
monitor-enter p0
.line 146
:try_start_9
iget-wide v4, p0, Lrx/internal/producers/a;->cbv:J
.line 147
iget-wide v6, p0, Lrx/internal/producers/a;->cbw:J
.line 148
iget-object v8, p0, Lrx/internal/producers/a;->cbx:Lrx/i;
.line 149
cmp-long v0, v4, v10
if-nez v0, :cond_1e
cmp-long v0, v6, v10
if-nez v0, :cond_1e
if-nez v8, :cond_1e
.line 152
const/4 v0, 0x0
iput-boolean v0, p0, Lrx/internal/producers/a;->bTk:Z
.line 153
monitor-exit p0
return-void
.line 155
:cond_1e
const-wide/16 v0, 0x0
iput-wide v0, p0, Lrx/internal/producers/a;->cbv:J
.line 156
const-wide/16 v0, 0x0
iput-wide v0, p0, Lrx/internal/producers/a;->cbw:J
.line 157
const/4 v0, 0x0
iput-object v0, p0, Lrx/internal/producers/a;->cbx:Lrx/i;
.line 158
monitor-exit p0
:try_end_2a
.catchall {:try_start_9 .. :try_end_2a} :catchall_45
.line 160
iget-wide v0, p0, Lrx/internal/producers/a;->cah:J
.line 162
cmp-long v9, v0, v2
if-eqz v9, :cond_3c
.line 163
add-long/2addr v0, v4
.line 164
cmp-long v9, v0, v10
if-ltz v9, :cond_39
cmp-long v9, v0, v2
if-nez v9, :cond_48
.line 166
:cond_39
iput-wide v2, p0, Lrx/internal/producers/a;->cah:J
move-wide v0, v2
.line 176
:cond_3c
:goto_3c
if-eqz v8, :cond_5e
.line 177
sget-object v4, Lrx/internal/producers/a;->cby:Lrx/i;
if-ne v8, v4, :cond_58
.line 178
iput-object v12, p0, Lrx/internal/producers/a;->cbu:Lrx/i;
goto :goto_8
.line 158
:catchall_45
move-exception v0
:try_start_46
monitor-exit p0
:try_end_47
.catchall {:try_start_46 .. :try_end_47} :catchall_45
throw v0
.line 168
:cond_48
sub-long/2addr v0, v6
.line 169
cmp-long v6, v0, v10
if-gez v6, :cond_55
.line 170
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "more produced than requested"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 173
:cond_55
iput-wide v0, p0, Lrx/internal/producers/a;->cah:J
goto :goto_3c
.line 180
:cond_58
iput-object v8, p0, Lrx/internal/producers/a;->cbu:Lrx/i;
.line 181
invoke-interface {v8, v0, v1}, Lrx/i;->request(J)V
goto :goto_8
.line 184
:cond_5e
iget-object v0, p0, Lrx/internal/producers/a;->cbu:Lrx/i;
.line 185
if-eqz v0, :cond_8
cmp-long v1, v4, v10
if-eqz v1, :cond_8
.line 186
invoke-interface {v0, v4, v5}, Lrx/i;->request(J)V
goto :goto_8
.end method
.method public final a(Lrx/i;)V
.registers 4
.prologue
.line 115
monitor-enter p0
.line 116
:try_start_1
iget-boolean v0, p0, Lrx/internal/producers/a;->bTk:Z
if-eqz v0, :cond_d
.line 117
if-nez p1, :cond_9
sget-object p1, Lrx/internal/producers/a;->cby:Lrx/i;
:cond_9
iput-object p1, p0, Lrx/internal/producers/a;->cbx:Lrx/i;
.line 118
monitor-exit p0
.line 132
:goto_c
return-void
.line 120
:cond_d
const/4 v0, 0x1
iput-boolean v0, p0, Lrx/internal/producers/a;->bTk:Z
.line 121
monitor-exit p0
:try_end_11
.catchall {:try_start_1 .. :try_end_11} :catchall_25
.line 124
:try_start_11
iput-object p1, p0, Lrx/internal/producers/a;->cbu:Lrx/i;
.line 125
if-eqz p1, :cond_1a
.line 126
iget-wide v0, p0, Lrx/internal/producers/a;->cah:J
invoke-interface {p1, v0, v1}, Lrx/i;->request(J)V
.line 129
:cond_1a
invoke-virtual {p0}, Lrx/internal/producers/a;->Qd()V
:try_end_1d
.catchall {:try_start_11 .. :try_end_1d} :catchall_1e
goto :goto_c
.line 132
:catchall_1e
move-exception v0
.line 133
monitor-enter p0
.line 134
const/4 v1, 0x0
:try_start_21
iput-boolean v1, p0, Lrx/internal/producers/a;->bTk:Z
.line 135
monitor-exit p0
:try_end_24
.catchall {:try_start_21 .. :try_end_24} :catchall_28
throw v0
.line 121
:catchall_25
move-exception v0
:try_start_26
monitor-exit p0
:try_end_27
.catchall {:try_start_26 .. :try_end_27} :catchall_25
throw v0
.line 135
:catchall_28
move-exception v0
:try_start_29
monitor-exit p0
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_28
throw v0
.end method
.method public final request(J)V
.registers 8
.prologue
const-wide/16 v2, 0x0
.line 42
cmp-long v0, p1, v2
if-gez v0, :cond_e
.line 43
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "n >= 0 required"
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 45
:cond_e
cmp-long v0, p1, v2
if-nez v0, :cond_13
.line 72
:goto_12
return-void
.line 48
:cond_13
monitor-enter p0
.line 49
:try_start_14
iget-boolean v0, p0, Lrx/internal/producers/a;->bTk:Z
if-eqz v0, :cond_22
.line 50
iget-wide v0, p0, Lrx/internal/producers/a;->cbv:J
add-long/2addr v0, p1
iput-wide v0, p0, Lrx/internal/producers/a;->cbv:J
.line 51
monitor-exit p0
goto :goto_12
.line 54
:catchall_1f
move-exception v0
monitor-exit p0
:try_end_21
.catchall {:try_start_14 .. :try_end_21} :catchall_1f
throw v0
.line 53
:cond_22
const/4 v0, 0x1
:try_start_23
iput-boolean v0, p0, Lrx/internal/producers/a;->bTk:Z
.line 54
monitor-exit p0
:try_end_26
.catchall {:try_start_23 .. :try_end_26} :catchall_1f
.line 57
:try_start_26
iget-wide v0, p0, Lrx/internal/producers/a;->cah:J
.line 58
add-long/2addr v0, p1
.line 59
cmp-long v2, v0, v2
if-gez v2, :cond_32
.line 60
const-wide v0, 0x7fffffffffffffffL
.line 62
:cond_32
iput-wide v0, p0, Lrx/internal/producers/a;->cah:J
.line 64
iget-object v0, p0, Lrx/internal/producers/a;->cbu:Lrx/i;
.line 65
if-eqz v0, :cond_3b
.line 66
invoke-interface {v0, p1, p2}, Lrx/i;->request(J)V
.line 69
:cond_3b
invoke-virtual {p0}, Lrx/internal/producers/a;->Qd()V
:try_end_3e
.catchall {:try_start_26 .. :try_end_3e} :catchall_3f
goto :goto_12
.line 72
:catchall_3f
move-exception v0
.line 73
monitor-enter p0
.line 74
const/4 v1, 0x0
:try_start_42
iput-boolean v1, p0, Lrx/internal/producers/a;->bTk:Z
.line 75
monitor-exit p0
:try_end_45
.catchall {:try_start_42 .. :try_end_45} :catchall_46
throw v0
:catchall_46
move-exception v0
:try_start_47
monitor-exit p0
:try_end_48
.catchall {:try_start_47 .. :try_end_48} :catchall_46
throw v0
.end method