x$1.smali

.class final Lrx/internal/operators/x$1;
.super Lrx/o;
.source "OperatorTake.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrx/internal/operators/x;->b(Lrx/o;)Lrx/o;
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lrx/o",
        "<TT;>;"
    }
.end annotation


# instance fields
.field private synthetic cbk:Lrx/o;

.field completed:Z

.field private count:I


# direct methods
.method constructor <init>(Lrx/o;)V
    .registers 2

    .prologue
    .line 47
    iput-object p1, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    invoke-direct {p0}, Lrx/o;-><init>()V

    return-void
.end method


# virtual methods
.method public final SG()V
    .registers 2

    .prologue
    .line 54
    iget-boolean v0, p0, Lrx/internal/operators/x$1;->completed:Z

    if-nez v0, :cond_c

    .line 55
    const/4 v0, 0x1

    iput-boolean v0, p0, Lrx/internal/operators/x$1;->completed:Z

    .line 56
    iget-object v0, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    invoke-virtual {v0}, Lrx/o;->SG()V

    .line 58
    :cond_c
    return-void
.end method

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

    .prologue
    .line 93
    iget-object v0, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    new-instance v1, Lrx/internal/operators/x$1$1;

    invoke-direct {v1, p0, p1}, Lrx/internal/operators/x$1$1;-><init>(Lrx/internal/operators/x$1;Lrx/i;)V

    invoke-virtual {v0, v1}, Lrx/o;->a(Lrx/i;)V

    .line 116
    return-void
.end method

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

    .prologue
    .line 62
    iget-boolean v0, p0, Lrx/internal/operators/x$1;->completed:Z

    if-nez v0, :cond_f

    .line 63
    const/4 v0, 0x1

    iput-boolean v0, p0, Lrx/internal/operators/x$1;->completed:Z

    .line 65
    :try_start_7
    iget-object v0, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    invoke-virtual {v0, p1}, Lrx/o;->onError(Ljava/lang/Throwable;)V
    :try_end_c
    .catchall {:try_start_7 .. :try_end_c} :catchall_10

    .line 67
    invoke-virtual {p0}, Lrx/internal/operators/x$1;->unsubscribe()V

    .line 70
    :cond_f
    return-void

    .line 67
    :catchall_10
    move-exception v0

    invoke-virtual {p0}, Lrx/internal/operators/x$1;->unsubscribe()V

    throw v0
.end method

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

    .prologue
    const/4 v1, 0x1

    .line 74
    invoke-virtual {p0}, Lrx/internal/operators/x$1;->isUnsubscribed()Z

    move-result v0

    if-nez v0, :cond_29

    iget v0, p0, Lrx/internal/operators/x$1;->count:I

    add-int/lit8 v2, v0, 0x1

    iput v2, p0, Lrx/internal/operators/x$1;->count:I

    if-gtz v0, :cond_29

    .line 75
    iget v0, p0, Lrx/internal/operators/x$1;->count:I

    if-ne v0, v1, :cond_2a

    move v0, v1

    .line 76
    :goto_14
    iget-object v2, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    invoke-virtual {v2, p1}, Lrx/o;->onNext(Ljava/lang/Object;)V

    .line 77
    if-eqz v0, :cond_29

    iget-boolean v0, p0, Lrx/internal/operators/x$1;->completed:Z

    if-nez v0, :cond_29

    .line 78
    iput-boolean v1, p0, Lrx/internal/operators/x$1;->completed:Z

    .line 80
    :try_start_21
    iget-object v0, p0, Lrx/internal/operators/x$1;->cbk:Lrx/o;

    invoke-virtual {v0}, Lrx/o;->SG()V
    :try_end_26
    .catchall {:try_start_21 .. :try_end_26} :catchall_2c

    .line 82
    invoke-virtual {p0}, Lrx/internal/operators/x$1;->unsubscribe()V

    .line 86
    :cond_29
    return-void

    .line 75
    :cond_2a
    const/4 v0, 0x0

    goto :goto_14

    .line 82
    :catchall_2c
    move-exception v0

    invoke-virtual {p0}, Lrx/internal/operators/x$1;->unsubscribe()V

    throw v0
.end method