c.smali

.class public final Lio/reactivex/internal/subscribers/c;
.super Ljava/util/concurrent/atomic/AtomicReference;
.source "SourceFile"

# interfaces
.implements Lio/reactivex/g;
.implements Lorg/reactivestreams/c;
.implements Lio/reactivex/disposables/b;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/util/concurrent/atomic/AtomicReference<",
        "Lorg/reactivestreams/c;",
        ">;",
        "Lio/reactivex/g<",
        "TT;>;",
        "Lorg/reactivestreams/c;",
        "Lio/reactivex/disposables/b;"
    }
.end annotation


# static fields
.field private static final serialVersionUID:J = -0x64a12a8486b15cccL


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

.field public final b:Lio/reactivex/functions/f;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/functions/f<",
            "-",
            "Ljava/lang/Throwable;",
            ">;"
        }
    .end annotation
.end field

.field public final c:Lio/reactivex/functions/a;

.field public final d:Lio/reactivex/functions/f;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/functions/f<",
            "-",
            "Lorg/reactivestreams/c;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lio/reactivex/functions/f;Lio/reactivex/functions/f;Lio/reactivex/functions/f;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lio/reactivex/functions/f<",
            "-TT;>;",
            "Lio/reactivex/functions/f<",
            "-",
            "Ljava/lang/Throwable;",
            ">;",
            "Lio/reactivex/functions/a;",
            "Lio/reactivex/functions/f<",
            "-",
            "Lorg/reactivestreams/c;",
            ">;)V"
        }
    .end annotation

    sget-object v0, Lio/reactivex/internal/functions/a;->c:Lio/reactivex/internal/functions/a$n;

    .line 1
    invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V

    .line 2
    iput-object p1, p0, Lio/reactivex/internal/subscribers/c;->a:Lio/reactivex/functions/f;

    .line 3
    iput-object p2, p0, Lio/reactivex/internal/subscribers/c;->b:Lio/reactivex/functions/f;

    .line 4
    iput-object v0, p0, Lio/reactivex/internal/subscribers/c;->c:Lio/reactivex/functions/a;

    .line 5
    iput-object p3, p0, Lio/reactivex/internal/subscribers/c;->d:Lio/reactivex/functions/f;

    return-void
.end method


# virtual methods
.method public final cancel()V
    .registers 1

    invoke-static {p0}, Lio/reactivex/internal/subscriptions/f;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z

    return-void
.end method

.method public final dispose()V
    .registers 1

    invoke-static {p0}, Lio/reactivex/internal/subscriptions/f;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z

    return-void
.end method

.method public final isDisposed()Z
    .registers 3

    invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;

    move-result-object v0

    sget-object v1, Lio/reactivex/internal/subscriptions/f;->CANCELLED:Lio/reactivex/internal/subscriptions/f;

    if-ne v0, v1, :cond_a

    const/4 v0, 0x1

    goto :goto_b

    :cond_a
    const/4 v0, 0x0

    :goto_b
    return v0
.end method

.method public final onComplete()V
    .registers 3

    .line 1
    invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;

    move-result-object v0

    sget-object v1, Lio/reactivex/internal/subscriptions/f;->CANCELLED:Lio/reactivex/internal/subscriptions/f;

    if-eq v0, v1, :cond_18

    .line 2
    invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V

    .line 3
    :try_start_b
    iget-object v0, p0, Lio/reactivex/internal/subscribers/c;->c:Lio/reactivex/functions/a;

    invoke-interface {v0}, Lio/reactivex/functions/a;->run()V
    :try_end_10
    .catchall {:try_start_b .. :try_end_10} :catchall_11

    goto :goto_18

    :catchall_11
    move-exception v0

    .line 4
    invoke-static {v0}, Lcom/shopee/app/dre/codepush/task/a;->m(Ljava/lang/Throwable;)V

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

    :cond_18
    :goto_18
    return-void
.end method

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

    .line 1
    invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;

    move-result-object v0

    sget-object v1, Lio/reactivex/internal/subscriptions/f;->CANCELLED:Lio/reactivex/internal/subscriptions/f;

    if-eq v0, v1, :cond_27

    .line 2
    invoke-virtual {p0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->lazySet(Ljava/lang/Object;)V

    .line 3
    :try_start_b
    iget-object v0, p0, Lio/reactivex/internal/subscribers/c;->b:Lio/reactivex/functions/f;

    invoke-interface {v0, p1}, Lio/reactivex/functions/f;->accept(Ljava/lang/Object;)V
    :try_end_10
    .catchall {:try_start_b .. :try_end_10} :catchall_11

    goto :goto_2a

    :catchall_11
    move-exception v0

    .line 4
    invoke-static {v0}, Lcom/shopee/app/dre/codepush/task/a;->m(Ljava/lang/Throwable;)V

    .line 5
    new-instance v1, Lio/reactivex/exceptions/a;

    const/4 v2, 0x2

    new-array v2, v2, [Ljava/lang/Throwable;

    const/4 v3, 0x0

    aput-object p1, v2, v3

    const/4 p1, 0x1

    aput-object v0, v2, p1

    invoke-direct {v1, v2}, Lio/reactivex/exceptions/a;-><init>([Ljava/lang/Throwable;)V

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

    goto :goto_2a

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

    :goto_2a
    return-void
.end method

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

    .line 1
    invoke-virtual {p0}, Lio/reactivex/internal/subscribers/c;->isDisposed()Z

    move-result v0

    if-nez v0, :cond_1c

    .line 2
    :try_start_6
    iget-object v0, p0, Lio/reactivex/internal/subscribers/c;->a:Lio/reactivex/functions/f;

    invoke-interface {v0, p1}, Lio/reactivex/functions/f;->accept(Ljava/lang/Object;)V
    :try_end_b
    .catchall {:try_start_6 .. :try_end_b} :catchall_c

    goto :goto_1c

    :catchall_c
    move-exception p1

    .line 3
    invoke-static {p1}, Lcom/shopee/app/dre/codepush/task/a;->m(Ljava/lang/Throwable;)V

    .line 4
    invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/reactivestreams/c;

    invoke-interface {v0}, Lorg/reactivestreams/c;->cancel()V

    .line 5
    invoke-virtual {p0, p1}, Lio/reactivex/internal/subscribers/c;->onError(Ljava/lang/Throwable;)V

    :cond_1c
    :goto_1c
    return-void
.end method

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

    .line 1
    invoke-static {p0, p1}, Lio/reactivex/internal/subscriptions/f;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lorg/reactivestreams/c;)Z

    move-result v0

    if-eqz v0, :cond_16

    .line 2
    :try_start_6
    iget-object v0, p0, Lio/reactivex/internal/subscribers/c;->d:Lio/reactivex/functions/f;

    invoke-interface {v0, p0}, Lio/reactivex/functions/f;->accept(Ljava/lang/Object;)V
    :try_end_b
    .catchall {:try_start_6 .. :try_end_b} :catchall_c

    goto :goto_16

    :catchall_c
    move-exception v0

    .line 3
    invoke-static {v0}, Lcom/shopee/app/dre/codepush/task/a;->m(Ljava/lang/Throwable;)V

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

    .line 5
    invoke-virtual {p0, v0}, Lio/reactivex/internal/subscribers/c;->onError(Ljava/lang/Throwable;)V

    :cond_16
    :goto_16
    return-void
.end method

.method public final request(J)V
    .registers 4

    invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/reactivestreams/c;

    invoke-interface {v0, p1, p2}, Lorg/reactivestreams/c;->request(J)V

    return-void
.end method