as$a.smali

.class final Lrx/c/a/as$a;
.super Ljava/util/concurrent/atomic/AtomicLong;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lrx/c/a/as;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x18
    name = "a"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lrx/c/a/as$a$a;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<R:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/util/concurrent/atomic/AtomicLong;"
    }
.end annotation


# static fields
.field static final c:I


# instance fields
.field final a:Lrx/d;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lrx/d<",
            "-TR;>;"
        }
    .end annotation
.end field

.field final b:Lrx/i/b;

.field d:I

.field volatile e:[Ljava/lang/Object;

.field f:Ljava/util/concurrent/atomic/AtomicLong;

.field private final g:Lrx/b/o;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lrx/b/o<",
            "+TR;>;"
        }
    .end annotation
.end field


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

    .line 176
    sget v0, Lrx/c/e/i;->b:I

    int-to-double v0, v0

    const-wide v2, 0x3fe6666666666666L    # 0.7

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v0, v0, v2

    double-to-int v0, v0

    sput v0, Lrx/c/a/as$a;->c:I

    return-void
.end method

.method public constructor <init>(Lrx/i;Lrx/b/o;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lrx/i<",
            "-TR;>;",
            "Lrx/b/o<",
            "+TR;>;)V"
        }
    .end annotation

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

    .line 174
    new-instance v0, Lrx/i/b;

    invoke-direct {v0}, Lrx/i/b;-><init>()V

    iput-object v0, p0, Lrx/c/a/as$a;->b:Lrx/i/b;

    .line 184
    iput-object p1, p0, Lrx/c/a/as$a;->a:Lrx/d;

    .line 185
    iput-object p2, p0, Lrx/c/a/as$a;->g:Lrx/b/o;

    .line 186
    invoke-virtual {p1, v0}, Lrx/i;->a(Lrx/j;)V

    return-void
.end method


# virtual methods
.method final a()V
    .registers 14

    .line 215
    iget-object v0, p0, Lrx/c/a/as$a;->e:[Ljava/lang/Object;

    if-nez v0, :cond_5

    return-void

    .line 220
    :cond_5
    invoke-virtual {p0}, Lrx/c/a/as$a;->getAndIncrement()J

    move-result-wide v1

    const-wide/16 v3, 0x0

    cmp-long v5, v1, v3

    if-nez v5, :cond_a8

    .line 221
    array-length v1, v0

    .line 222
    iget-object v2, p0, Lrx/c/a/as$a;->a:Lrx/d;

    .line 223
    iget-object v5, p0, Lrx/c/a/as$a;->f:Ljava/util/concurrent/atomic/AtomicLong;

    .line 227
    :cond_14
    :goto_14
    new-array v6, v1, [Ljava/lang/Object;

    const/4 v7, 0x0

    const/4 v8, 0x1

    const/4 v9, 0x0

    const/4 v10, 0x1

    :goto_1a
    if-ge v9, v1, :cond_42

    .line 230
    aget-object v11, v0, v9

    check-cast v11, Lrx/c/a/as$a$a;

    iget-object v11, v11, Lrx/c/a/as$a$a;->a:Lrx/c/e/i;

    .line 231
    invoke-virtual {v11}, Lrx/c/e/i;->f()Ljava/lang/Object;

    move-result-object v11

    if-nez v11, :cond_2a

    const/4 v10, 0x0

    goto :goto_3f

    .line 238
    :cond_2a
    invoke-static {v11}, Lrx/c/e/i;->b(Ljava/lang/Object;)Z

    move-result v12

    if-eqz v12, :cond_39

    .line 239
    invoke-interface {v2}, Lrx/d;->a()V

    .line 242
    iget-object v0, p0, Lrx/c/a/as$a;->b:Lrx/i/b;

    invoke-virtual {v0}, Lrx/i/b;->unsubscribe()V

    return-void

    .line 245
    :cond_39
    invoke-static {v11}, Lrx/c/e/i;->c(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v11

    aput-object v11, v6, v9

    :goto_3f
    add-int/lit8 v9, v9, 0x1

    goto :goto_1a

    .line 249
    :cond_42
    invoke-virtual {v5}, Ljava/util/concurrent/atomic/AtomicLong;->get()J

    move-result-wide v11

    cmp-long v9, v11, v3

    if-lez v9, :cond_a0

    if-eqz v10, :cond_a0

    .line 252
    :try_start_4c
    iget-object v9, p0, Lrx/c/a/as$a;->g:Lrx/b/o;

    invoke-interface {v9, v6}, Lrx/b/o;->a([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v9

    invoke-interface {v2, v9}, Lrx/d;->a(Ljava/lang/Object;)V

    .line 254
    invoke-virtual {v5}, Ljava/util/concurrent/atomic/AtomicLong;->decrementAndGet()J

    .line 255
    iget v9, p0, Lrx/c/a/as$a;->d:I

    add-int/2addr v9, v8

    iput v9, p0, Lrx/c/a/as$a;->d:I
    :try_end_5d
    .catchall {:try_start_4c .. :try_end_5d} :catchall_9b

    .line 261
    array-length v6, v0

    const/4 v8, 0x0

    :goto_5f
    if-ge v8, v6, :cond_80

    aget-object v9, v0, v8

    .line 262
    check-cast v9, Lrx/c/a/as$a$a;

    iget-object v9, v9, Lrx/c/a/as$a$a;->a:Lrx/c/e/i;

    .line 263
    invoke-virtual {v9}, Lrx/c/e/i;->e()Ljava/lang/Object;

    .line 265
    invoke-virtual {v9}, Lrx/c/e/i;->f()Ljava/lang/Object;

    move-result-object v9

    invoke-static {v9}, Lrx/c/e/i;->b(Ljava/lang/Object;)Z

    move-result v9

    if-eqz v9, :cond_7d

    .line 267
    invoke-interface {v2}, Lrx/d;->a()V

    .line 269
    iget-object v0, p0, Lrx/c/a/as$a;->b:Lrx/i/b;

    invoke-virtual {v0}, Lrx/i/b;->unsubscribe()V

    return-void

    :cond_7d
    add-int/lit8 v8, v8, 0x1

    goto :goto_5f

    .line 273
    :cond_80
    iget v6, p0, Lrx/c/a/as$a;->d:I

    sget v8, Lrx/c/a/as$a;->c:I

    if-le v6, v8, :cond_14

    .line 274
    array-length v6, v0

    const/4 v8, 0x0

    :goto_88
    if-ge v8, v6, :cond_97

    aget-object v9, v0, v8

    .line 275
    check-cast v9, Lrx/c/a/as$a$a;

    iget v10, p0, Lrx/c/a/as$a;->d:I

    int-to-long v10, v10

    .line 1301
    invoke-virtual {v9, v10, v11}, Lrx/c/a/as$a$a;->a(J)V

    add-int/lit8 v8, v8, 0x1

    goto :goto_88

    .line 277
    :cond_97
    iput v7, p0, Lrx/c/a/as$a;->d:I

    goto/16 :goto_14

    :catchall_9b
    move-exception v0

    .line 257
    invoke-static {v0, v2, v6}, Lrx/exceptions/a;->a(Ljava/lang/Throwable;Lrx/d;Ljava/lang/Object;)V

    return-void

    .line 283
    :cond_a0
    invoke-virtual {p0}, Lrx/c/a/as$a;->decrementAndGet()J

    move-result-wide v6

    cmp-long v8, v6, v3

    if-gtz v8, :cond_14

    :cond_a8
    return-void
.end method