b.smali

.class public final Lio/reactivex/processors/b;
.super Lio/reactivex/processors/a;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Lio/reactivex/processors/a<",
        "TT;>;"
    }
.end annotation


# instance fields
.field public final b:Lio/reactivex/processors/a;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/processors/a<",
            "TT;>;"
        }
    .end annotation
.end field

.field public c:Z

.field public d:Lio/reactivex/internal/util/a;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/internal/util/a<",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field public volatile e:Z


# direct methods
.method public constructor <init>(Lio/reactivex/processors/a;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lio/reactivex/processors/a<",
            "TT;>;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Lio/reactivex/processors/a;-><init>()V

    .line 2
    iput-object p1, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    return-void
.end method


# virtual methods
.method public final k(Lorg/reactivestreams/b;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/reactivestreams/b<",
            "-TT;>;)V"
        }
    .end annotation

    iget-object v0, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-virtual {v0, p1}, Lio/reactivex/f;->a(Lorg/reactivestreams/b;)V

    return-void
.end method

.method public final m()V
    .registers 3

    .line 1
    :goto_0
    monitor-enter p0

    .line 2
    :try_start_1
    iget-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_a

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    .line 4
    monitor-exit p0

    return-void

    :cond_a
    const/4 v1, 0x0

    .line 5
    iput-object v1, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    .line 6
    monitor-exit p0
    :try_end_e
    .catchall {:try_start_1 .. :try_end_e} :catchall_14

    .line 7
    iget-object v1, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-virtual {v0, v1}, Lio/reactivex/internal/util/a;->a(Lorg/reactivestreams/b;)Z

    goto :goto_0

    :catchall_14
    move-exception v0

    .line 8
    :try_start_15
    monitor-exit p0
    :try_end_16
    .catchall {:try_start_15 .. :try_end_16} :catchall_14

    throw v0
.end method

.method public final onComplete()V
    .registers 3

    .line 1
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_5

    return-void

    .line 2
    :cond_5
    monitor-enter p0

    .line 3
    :try_start_6
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_c

    .line 4
    monitor-exit p0

    return-void

    :cond_c
    const/4 v0, 0x1

    .line 5
    iput-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    .line 6
    iget-boolean v1, p0, Lio/reactivex/processors/b;->c:Z

    if-eqz v1, :cond_27

    .line 7
    iget-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_1e

    .line 8
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 9
    iput-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    .line 10
    :cond_1e
    invoke-static {}, Lio/reactivex/internal/util/j;->complete()Ljava/lang/Object;

    move-result-object v1

    invoke-virtual {v0, v1}, Lio/reactivex/internal/util/a;->b(Ljava/lang/Object;)V

    .line 11
    monitor-exit p0

    return-void

    .line 12
    :cond_27
    iput-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    .line 13
    monitor-exit p0
    :try_end_2a
    .catchall {:try_start_6 .. :try_end_2a} :catchall_30

    .line 14
    iget-object v0, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-interface {v0}, Lorg/reactivestreams/b;->onComplete()V

    return-void

    :catchall_30
    move-exception v0

    .line 15
    :try_start_31
    monitor-exit p0
    :try_end_32
    .catchall {:try_start_31 .. :try_end_32} :catchall_30

    throw v0
.end method

.method public final onError(Ljava/lang/Throwable;)V
    .registers 4

    .line 1
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_8

    .line 2
    invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V

    return-void

    .line 3
    :cond_8
    monitor-enter p0

    .line 4
    :try_start_9
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    const/4 v1, 0x1

    if-eqz v0, :cond_f

    goto :goto_2c

    .line 5
    :cond_f
    iput-boolean v1, p0, Lio/reactivex/processors/b;->e:Z

    .line 6
    iget-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    if-eqz v0, :cond_29

    .line 7
    iget-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_20

    .line 8
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 9
    iput-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    .line 10
    :cond_20
    invoke-static {p1}, Lio/reactivex/internal/util/j;->error(Ljava/lang/Throwable;)Ljava/lang/Object;

    move-result-object p1

    invoke-virtual {v0, p1}, Lio/reactivex/internal/util/a;->d(Ljava/lang/Object;)V

    .line 11
    monitor-exit p0

    return-void

    .line 12
    :cond_29
    iput-boolean v1, p0, Lio/reactivex/processors/b;->c:Z

    const/4 v1, 0x0

    .line 13
    :goto_2c
    monitor-exit p0
    :try_end_2d
    .catchall {:try_start_9 .. :try_end_2d} :catchall_39

    if-eqz v1, :cond_33

    .line 14
    invoke-static {p1}, Lio/reactivex/plugins/a;->b(Ljava/lang/Throwable;)V

    return-void

    .line 15
    :cond_33
    iget-object v0, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-interface {v0, p1}, Lorg/reactivestreams/b;->onError(Ljava/lang/Throwable;)V

    return-void

    :catchall_39
    move-exception p1

    .line 16
    :try_start_3a
    monitor-exit p0
    :try_end_3b
    .catchall {:try_start_3a .. :try_end_3b} :catchall_39

    throw p1
.end method

.method public final onNext(Ljava/lang/Object;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    .line 1
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_5

    return-void

    .line 2
    :cond_5
    monitor-enter p0

    .line 3
    :try_start_6
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_c

    .line 4
    monitor-exit p0

    return-void

    .line 5
    :cond_c
    iget-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    if-eqz v0, :cond_24

    .line 6
    iget-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_1b

    .line 7
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 8
    iput-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    .line 9
    :cond_1b
    invoke-static {p1}, Lio/reactivex/internal/util/j;->next(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    invoke-virtual {v0, p1}, Lio/reactivex/internal/util/a;->b(Ljava/lang/Object;)V

    .line 10
    monitor-exit p0

    return-void

    :cond_24
    const/4 v0, 0x1

    .line 11
    iput-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    .line 12
    monitor-exit p0
    :try_end_28
    .catchall {:try_start_6 .. :try_end_28} :catchall_31

    .line 13
    iget-object v0, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-interface {v0, p1}, Lorg/reactivestreams/b;->onNext(Ljava/lang/Object;)V

    .line 14
    invoke-virtual {p0}, Lio/reactivex/processors/b;->m()V

    return-void

    :catchall_31
    move-exception p1

    .line 15
    :try_start_32
    monitor-exit p0
    :try_end_33
    .catchall {:try_start_32 .. :try_end_33} :catchall_31

    throw p1
.end method

.method public final onSubscribe(Lorg/reactivestreams/c;)V
    .registers 4

    .line 1
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    const/4 v1, 0x1

    if-nez v0, :cond_2c

    .line 2
    monitor-enter p0

    .line 3
    :try_start_6
    iget-boolean v0, p0, Lio/reactivex/processors/b;->e:Z

    if-eqz v0, :cond_b

    goto :goto_27

    .line 4
    :cond_b
    iget-boolean v0, p0, Lio/reactivex/processors/b;->c:Z

    if-eqz v0, :cond_23

    .line 5
    iget-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    if-nez v0, :cond_1a

    .line 6
    new-instance v0, Lio/reactivex/internal/util/a;

    invoke-direct {v0}, Lio/reactivex/internal/util/a;-><init>()V

    .line 7
    iput-object v0, p0, Lio/reactivex/processors/b;->d:Lio/reactivex/internal/util/a;

    .line 8
    :cond_1a
    invoke-static {p1}, Lio/reactivex/internal/util/j;->subscription(Lorg/reactivestreams/c;)Ljava/lang/Object;

    move-result-object p1

    invoke-virtual {v0, p1}, Lio/reactivex/internal/util/a;->b(Ljava/lang/Object;)V

    .line 9
    monitor-exit p0

    return-void

    .line 10
    :cond_23
    iput-boolean v1, p0, Lio/reactivex/processors/b;->c:Z

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 11
    :goto_27
    monitor-exit p0

    goto :goto_2c

    :catchall_29
    move-exception p1

    monitor-exit p0
    :try_end_2b
    .catchall {:try_start_6 .. :try_end_2b} :catchall_29

    throw p1

    :cond_2c
    :goto_2c
    if-eqz v1, :cond_32

    .line 12
    invoke-interface {p1}, Lorg/reactivestreams/c;->cancel()V

    goto :goto_3a

    .line 13
    :cond_32
    iget-object v0, p0, Lio/reactivex/processors/b;->b:Lio/reactivex/processors/a;

    invoke-interface {v0, p1}, Lio/reactivex/g;->onSubscribe(Lorg/reactivestreams/c;)V

    .line 14
    invoke-virtual {p0}, Lio/reactivex/processors/b;->m()V

    :goto_3a
    return-void
.end method