s4.smali

.class public final Lio/reactivex/internal/operators/observable/s4;
.super Lio/reactivex/l;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lio/reactivex/internal/operators/observable/s4$b;,
        Lio/reactivex/internal/operators/observable/s4$a;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        "R:",
        "Ljava/lang/Object;",
        ">",
        "Lio/reactivex/l<",
        "TR;>;"
    }
.end annotation


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

.field public final b:Ljava/lang/Iterable;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Iterable<",
            "+",
            "Lio/reactivex/q<",
            "+TT;>;>;"
        }
    .end annotation
.end field

.field public final c:Lio/reactivex/functions/n;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lio/reactivex/functions/n<",
            "-[",
            "Ljava/lang/Object;",
            "+TR;>;"
        }
    .end annotation
.end field

.field public final d:I

.field public final e:Z


# direct methods
.method public constructor <init>([Lio/reactivex/q;Ljava/lang/Iterable;Lio/reactivex/functions/n;IZ)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Lio/reactivex/q<",
            "+TT;>;",
            "Ljava/lang/Iterable<",
            "+",
            "Lio/reactivex/q<",
            "+TT;>;>;",
            "Lio/reactivex/functions/n<",
            "-[",
            "Ljava/lang/Object;",
            "+TR;>;IZ)V"
        }
    .end annotation

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

    .line 2
    iput-object p1, p0, Lio/reactivex/internal/operators/observable/s4;->a:[Lio/reactivex/q;

    .line 3
    iput-object p2, p0, Lio/reactivex/internal/operators/observable/s4;->b:Ljava/lang/Iterable;

    .line 4
    iput-object p3, p0, Lio/reactivex/internal/operators/observable/s4;->c:Lio/reactivex/functions/n;

    .line 5
    iput p4, p0, Lio/reactivex/internal/operators/observable/s4;->d:I

    .line 6
    iput-boolean p5, p0, Lio/reactivex/internal/operators/observable/s4;->e:Z

    return-void
.end method


# virtual methods
.method public final subscribeActual(Lio/reactivex/s;)V
    .registers 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lio/reactivex/s<",
            "-TR;>;)V"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lio/reactivex/internal/operators/observable/s4;->a:[Lio/reactivex/q;

    const/4 v1, 0x0

    if-nez v0, :cond_2e

    const/16 v0, 0x8

    new-array v0, v0, [Lio/reactivex/l;

    .line 2
    iget-object v2, p0, Lio/reactivex/internal/operators/observable/s4;->b:Ljava/lang/Iterable;

    invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v2

    const/4 v3, 0x0

    :goto_10
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_2f

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lio/reactivex/q;

    .line 3
    array-length v5, v0

    if-ne v3, v5, :cond_28

    shr-int/lit8 v5, v3, 0x2

    add-int/2addr v5, v3

    .line 4
    new-array v5, v5, [Lio/reactivex/q;

    .line 5
    invoke-static {v0, v1, v5, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    move-object v0, v5

    :cond_28
    add-int/lit8 v5, v3, 0x1

    .line 6
    aput-object v4, v0, v3

    move v3, v5

    goto :goto_10

    .line 7
    :cond_2e
    array-length v3, v0

    :cond_2f
    if-nez v3, :cond_35

    .line 8
    invoke-static {p1}, Lio/reactivex/internal/disposables/d;->complete(Lio/reactivex/s;)V

    return-void

    .line 9
    :cond_35
    new-instance v2, Lio/reactivex/internal/operators/observable/s4$a;

    iget-object v4, p0, Lio/reactivex/internal/operators/observable/s4;->c:Lio/reactivex/functions/n;

    iget-boolean v5, p0, Lio/reactivex/internal/operators/observable/s4;->e:Z

    invoke-direct {v2, p1, v4, v3, v5}, Lio/reactivex/internal/operators/observable/s4$a;-><init>(Lio/reactivex/s;Lio/reactivex/functions/n;IZ)V

    .line 10
    iget p1, p0, Lio/reactivex/internal/operators/observable/s4;->d:I

    .line 11
    iget-object v3, v2, Lio/reactivex/internal/operators/observable/s4$a;->c:[Lio/reactivex/internal/operators/observable/s4$b;

    .line 12
    array-length v4, v3

    const/4 v5, 0x0

    :goto_44
    if-ge v5, v4, :cond_50

    .line 13
    new-instance v6, Lio/reactivex/internal/operators/observable/s4$b;

    invoke-direct {v6, v2, p1}, Lio/reactivex/internal/operators/observable/s4$b;-><init>(Lio/reactivex/internal/operators/observable/s4$a;I)V

    aput-object v6, v3, v5

    add-int/lit8 v5, v5, 0x1

    goto :goto_44

    .line 14
    :cond_50
    invoke-virtual {v2, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->lazySet(I)V

    .line 15
    iget-object p1, v2, Lio/reactivex/internal/operators/observable/s4$a;->a:Lio/reactivex/s;

    invoke-interface {p1, v2}, Lio/reactivex/s;->onSubscribe(Lio/reactivex/disposables/b;)V

    :goto_58
    if-ge v1, v4, :cond_69

    .line 16
    iget-boolean p1, v2, Lio/reactivex/internal/operators/observable/s4$a;->f:Z

    if-eqz p1, :cond_5f

    goto :goto_69

    .line 17
    :cond_5f
    aget-object p1, v0, v1

    aget-object v5, v3, v1

    invoke-interface {p1, v5}, Lio/reactivex/q;->subscribe(Lio/reactivex/s;)V

    add-int/lit8 v1, v1, 0x1

    goto :goto_58

    :cond_69
    :goto_69
    return-void
.end method