a.smali

.class public final Lrx/c/b/a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lrx/e;


# static fields
.field static final g:Lrx/e;


# instance fields
.field a:J

.field b:Lrx/e;

.field c:Z

.field d:J

.field e:J

.field f:Lrx/e;


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

    .line 33
    new-instance v0, Lrx/c/b/a$1;

    invoke-direct {v0}, Lrx/c/b/a$1;-><init>()V

    sput-object v0, Lrx/c/b/a;->g:Lrx/e;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method private a()V
    .registers 14

    .line 145
    :cond_0
    :goto_0
    monitor-enter p0

    .line 146
    :try_start_1
    iget-wide v0, p0, Lrx/c/b/a;->d:J

    .line 147
    iget-wide v2, p0, Lrx/c/b/a;->e:J

    .line 148
    iget-object v4, p0, Lrx/c/b/a;->f:Lrx/e;

    const-wide/16 v5, 0x0

    cmp-long v7, v0, v5

    if-nez v7, :cond_18

    cmp-long v7, v2, v5

    if-nez v7, :cond_18

    if-nez v4, :cond_18

    const/4 v0, 0x0

    .line 152
    iput-boolean v0, p0, Lrx/c/b/a;->c:Z

    .line 153
    monitor-exit p0

    return-void

    .line 155
    :cond_18
    iput-wide v5, p0, Lrx/c/b/a;->d:J

    .line 156
    iput-wide v5, p0, Lrx/c/b/a;->e:J

    const/4 v7, 0x0

    .line 157
    iput-object v7, p0, Lrx/c/b/a;->f:Lrx/e;

    .line 158
    monitor-exit p0
    :try_end_20
    .catchall {:try_start_1 .. :try_end_20} :catchall_63

    .line 160
    iget-wide v8, p0, Lrx/c/b/a;->a:J

    const-wide v10, 0x7fffffffffffffffL

    cmp-long v12, v8, v10

    if-eqz v12, :cond_48

    add-long/2addr v8, v0

    cmp-long v12, v8, v5

    if-ltz v12, :cond_45

    cmp-long v12, v8, v10

    if-nez v12, :cond_35

    goto :goto_45

    :cond_35
    sub-long/2addr v8, v2

    cmp-long v2, v8, v5

    if-ltz v2, :cond_3d

    .line 173
    iput-wide v8, p0, Lrx/c/b/a;->a:J

    goto :goto_48

    .line 170
    :cond_3d
    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 166
    :cond_45
    :goto_45
    iput-wide v10, p0, Lrx/c/b/a;->a:J

    move-wide v8, v10

    :cond_48
    :goto_48
    if-eqz v4, :cond_57

    .line 177
    sget-object v0, Lrx/c/b/a;->g:Lrx/e;

    if-ne v4, v0, :cond_51

    .line 178
    iput-object v7, p0, Lrx/c/b/a;->b:Lrx/e;

    goto :goto_0

    .line 180
    :cond_51
    iput-object v4, p0, Lrx/c/b/a;->b:Lrx/e;

    .line 181
    invoke-interface {v4, v8, v9}, Lrx/e;->a(J)V

    goto :goto_0

    .line 184
    :cond_57
    iget-object v2, p0, Lrx/c/b/a;->b:Lrx/e;

    if-eqz v2, :cond_0

    cmp-long v3, v0, v5

    if-eqz v3, :cond_0

    .line 186
    invoke-interface {v2, v0, v1}, Lrx/e;->a(J)V

    goto :goto_0

    :catchall_63
    move-exception v0

    .line 158
    :try_start_64
    monitor-exit p0
    :try_end_65
    .catchall {:try_start_64 .. :try_end_65} :catchall_63

    goto :goto_67

    :goto_66
    throw v0

    :goto_67
    goto :goto_66
.end method


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

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-ltz v2, :cond_41

    cmp-long v2, p1, v0

    if-nez v2, :cond_b

    return-void

    .line 48
    :cond_b
    monitor-enter p0

    .line 49
    :try_start_c
    iget-boolean v2, p0, Lrx/c/b/a;->c:Z

    if-eqz v2, :cond_17

    .line 50
    iget-wide v0, p0, Lrx/c/b/a;->d:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Lrx/c/b/a;->d:J

    .line 51
    monitor-exit p0

    return-void

    :cond_17
    const/4 v2, 0x1

    .line 53
    iput-boolean v2, p0, Lrx/c/b/a;->c:Z

    .line 54
    monitor-exit p0
    :try_end_1b
    .catchall {:try_start_c .. :try_end_1b} :catchall_3e

    .line 57
    :try_start_1b
    iget-wide v2, p0, Lrx/c/b/a;->a:J

    add-long/2addr v2, p1

    cmp-long v4, v2, v0

    if-gez v4, :cond_27

    const-wide v2, 0x7fffffffffffffffL

    .line 62
    :cond_27
    iput-wide v2, p0, Lrx/c/b/a;->a:J

    .line 64
    iget-object v0, p0, Lrx/c/b/a;->b:Lrx/e;

    if-eqz v0, :cond_30

    .line 66
    invoke-interface {v0, p1, p2}, Lrx/e;->a(J)V

    .line 69
    :cond_30
    invoke-direct {p0}, Lrx/c/b/a;->a()V
    :try_end_33
    .catchall {:try_start_1b .. :try_end_33} :catchall_34

    return-void

    :catchall_34
    move-exception p1

    .line 73
    monitor-enter p0

    const/4 p2, 0x0

    .line 74
    :try_start_37
    iput-boolean p2, p0, Lrx/c/b/a;->c:Z

    .line 75
    monitor-exit p0
    :try_end_3a
    .catchall {:try_start_37 .. :try_end_3a} :catchall_3b

    throw p1

    :catchall_3b
    move-exception p1

    :try_start_3c
    monitor-exit p0
    :try_end_3d
    .catchall {:try_start_3c .. :try_end_3d} :catchall_3b

    throw p1

    :catchall_3e
    move-exception p1

    .line 54
    :try_start_3f
    monitor-exit p0
    :try_end_40
    .catchall {:try_start_3f .. :try_end_40} :catchall_3e

    throw p1

    .line 43
    :cond_41
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string p2, "n >= 0 required"

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

    throw p1
.end method

.method public final a(Lrx/e;)V
    .registers 4

    .line 115
    monitor-enter p0

    .line 116
    :try_start_1
    iget-boolean v0, p0, Lrx/c/b/a;->c:Z

    if-eqz v0, :cond_d

    if-nez p1, :cond_9

    .line 117
    sget-object p1, Lrx/c/b/a;->g:Lrx/e;

    :cond_9
    iput-object p1, p0, Lrx/c/b/a;->f:Lrx/e;

    .line 118
    monitor-exit p0

    return-void

    :cond_d
    const/4 v0, 0x1

    .line 120
    iput-boolean v0, p0, Lrx/c/b/a;->c:Z

    .line 121
    monitor-exit p0
    :try_end_11
    .catchall {:try_start_1 .. :try_end_11} :catchall_28

    .line 124
    :try_start_11
    iput-object p1, p0, Lrx/c/b/a;->b:Lrx/e;

    if-eqz p1, :cond_1a

    .line 126
    iget-wide v0, p0, Lrx/c/b/a;->a:J

    invoke-interface {p1, v0, v1}, Lrx/e;->a(J)V

    .line 129
    :cond_1a
    invoke-direct {p0}, Lrx/c/b/a;->a()V
    :try_end_1d
    .catchall {:try_start_11 .. :try_end_1d} :catchall_1e

    return-void

    :catchall_1e
    move-exception p1

    .line 133
    monitor-enter p0

    const/4 v0, 0x0

    .line 134
    :try_start_21
    iput-boolean v0, p0, Lrx/c/b/a;->c:Z

    .line 135
    monitor-exit p0
    :try_end_24
    .catchall {:try_start_21 .. :try_end_24} :catchall_25

    throw p1

    :catchall_25
    move-exception p1

    :try_start_26
    monitor-exit p0
    :try_end_27
    .catchall {:try_start_26 .. :try_end_27} :catchall_25

    throw p1

    :catchall_28
    move-exception p1

    .line 121
    :try_start_29
    monitor-exit p0
    :try_end_2a
    .catchall {:try_start_29 .. :try_end_2a} :catchall_28

    throw p1
.end method

.method public final b(J)V
    .registers 10

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-lez v2, :cond_42

    .line 84
    monitor-enter p0

    .line 85
    :try_start_7
    iget-boolean v2, p0, Lrx/c/b/a;->c:Z

    if-eqz v2, :cond_12

    .line 86
    iget-wide v0, p0, Lrx/c/b/a;->e:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Lrx/c/b/a;->e:J

    .line 87
    monitor-exit p0

    return-void

    :cond_12
    const/4 v2, 0x1

    .line 89
    iput-boolean v2, p0, Lrx/c/b/a;->c:Z

    .line 90
    monitor-exit p0
    :try_end_16
    .catchall {:try_start_7 .. :try_end_16} :catchall_3f

    .line 94
    :try_start_16
    iget-wide v2, p0, Lrx/c/b/a;->a:J

    const-wide v4, 0x7fffffffffffffffL

    cmp-long v6, v2, v4

    if-eqz v6, :cond_31

    sub-long/2addr v2, p1

    cmp-long p1, v2, v0

    if-ltz p1, :cond_29

    .line 100
    iput-wide v2, p0, Lrx/c/b/a;->a:J

    goto :goto_31

    .line 98
    :cond_29
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "more items arrived than were requested"

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

    throw p1

    .line 103
    :cond_31
    :goto_31
    invoke-direct {p0}, Lrx/c/b/a;->a()V
    :try_end_34
    .catchall {:try_start_16 .. :try_end_34} :catchall_35

    return-void

    :catchall_35
    move-exception p1

    .line 107
    monitor-enter p0

    const/4 p2, 0x0

    .line 108
    :try_start_38
    iput-boolean p2, p0, Lrx/c/b/a;->c:Z

    .line 109
    monitor-exit p0
    :try_end_3b
    .catchall {:try_start_38 .. :try_end_3b} :catchall_3c

    throw p1

    :catchall_3c
    move-exception p1

    :try_start_3d
    monitor-exit p0
    :try_end_3e
    .catchall {:try_start_3d .. :try_end_3e} :catchall_3c

    throw p1

    :catchall_3f
    move-exception p1

    .line 90
    :try_start_40
    monitor-exit p0
    :try_end_41
    .catchall {:try_start_40 .. :try_end_41} :catchall_3f

    throw p1

    .line 82
    :cond_42
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string p2, "n > 0 required"

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

    throw p1
.end method