.class final Lrx/subjects/a$d; .super Ljava/lang/Object; .source "ReplaySubject.java" # interfaces .implements Lrx/subjects/a$a; # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lrx/subjects/a; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x18 name = "d" .end annotation .annotation system Ldalvik/annotation/Signature; value = { "", "Ljava/lang/Object;", "Lrx/subjects/a$a<", "TT;>;" } .end annotation # instance fields .field final bIc:[Ljava/lang/Object; .field bId:[Ljava/lang/Object; .field final capacity:I .field volatile done:Z .field error:Ljava/lang/Throwable; .field volatile size:I .field tailIndex:I # direct methods .method public constructor (I)V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()V const/16 p1, 0xfa iput p1, p0, Lrx/subjects/a$d;->capacity:I const/16 p1, 0xfb new-array p1, p1, [Ljava/lang/Object; iput-object p1, p0, Lrx/subjects/a$d;->bIc:[Ljava/lang/Object; iput-object p1, p0, Lrx/subjects/a$d;->bId:[Ljava/lang/Object; return-void .end method # virtual methods .method public final I(Ljava/lang/Throwable;)V .locals 1 iget-boolean v0, p0, Lrx/subjects/a$d;->done:Z if-eqz v0, :cond_0 invoke-static {p1}, Lrx/c/c;->onError(Ljava/lang/Throwable;)V return-void :cond_0 iput-object p1, p0, Lrx/subjects/a$d;->error:Ljava/lang/Throwable; const/4 p1, 0x1 iput-boolean p1, p0, Lrx/subjects/a$d;->done:Z return-void .end method .method public final a(Lrx/subjects/a$b;)V .locals 18 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lrx/subjects/a$b<", "TT;>;)V" } .end annotation move-object/from16 v0, p0 move-object/from16 v1, p1 invoke-virtual/range {p1 .. p1}, Lrx/subjects/a$b;->getAndIncrement()I move-result v2 if-eqz v2, :cond_0 return-void :cond_0 iget-object v2, v1, Lrx/subjects/a$b;->actual:Lrx/Subscriber; iget v3, v0, Lrx/subjects/a$d;->capacity:I const/4 v4, 0x1 const/4 v5, 0x1 :cond_1 iget-object v6, v1, Lrx/subjects/a$b;->requested:Ljava/util/concurrent/atomic/AtomicLong; invoke-virtual {v6}, Ljava/util/concurrent/atomic/AtomicLong;->get()J move-result-wide v6 iget-object v8, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; check-cast v8, [Ljava/lang/Object; if-nez v8, :cond_2 iget-object v8, v0, Lrx/subjects/a$d;->bIc:[Ljava/lang/Object; :cond_2 iget v9, v1, Lrx/subjects/a$b;->tailIndex:I iget v10, v1, Lrx/subjects/a$b;->index:I move-object v14, v8 move v13, v9 const-wide/16 v8, 0x0 :goto_0 const/4 v15, 0x0 cmp-long v17, v8, v6 if-eqz v17, :cond_8 invoke-virtual {v2}, Lrx/Subscriber;->isUnsubscribed()Z move-result v17 if-eqz v17, :cond_3 iput-object v15, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; return-void :cond_3 iget-boolean v11, v0, Lrx/subjects/a$d;->done:Z iget v12, v0, Lrx/subjects/a$d;->size:I if-ne v10, v12, :cond_4 const/4 v12, 0x1 goto :goto_1 :cond_4 const/4 v12, 0x0 :goto_1 if-eqz v11, :cond_6 if-eqz v12, :cond_6 iput-object v15, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; iget-object v1, v0, Lrx/subjects/a$d;->error:Ljava/lang/Throwable; if-eqz v1, :cond_5 invoke-virtual {v2, v1}, Lrx/Subscriber;->onError(Ljava/lang/Throwable;)V return-void :cond_5 invoke-virtual {v2}, Lrx/Subscriber;->onCompleted()V return-void :cond_6 if-nez v12, :cond_8 if-ne v13, v3, :cond_7 aget-object v11, v14, v13 check-cast v11, [Ljava/lang/Object; move-object v14, v11 const/16 v16, 0x0 goto :goto_2 :cond_7 move/from16 v16, v13 :goto_2 aget-object v11, v14, v16 invoke-virtual {v2, v11}, Lrx/Subscriber;->onNext(Ljava/lang/Object;)V const-wide/16 v11, 0x1 add-long/2addr v8, v11 add-int/lit8 v13, v16, 0x1 add-int/lit8 v10, v10, 0x1 goto :goto_0 :cond_8 cmp-long v11, v8, v6 if-nez v11, :cond_d invoke-virtual {v2}, Lrx/Subscriber;->isUnsubscribed()Z move-result v11 if-eqz v11, :cond_9 iput-object v15, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; return-void :cond_9 iget-boolean v11, v0, Lrx/subjects/a$d;->done:Z iget v12, v0, Lrx/subjects/a$d;->size:I if-ne v10, v12, :cond_a const/16 v16, 0x1 goto :goto_3 :cond_a const/16 v16, 0x0 :goto_3 if-eqz v11, :cond_c if-eqz v16, :cond_c iput-object v15, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; iget-object v1, v0, Lrx/subjects/a$d;->error:Ljava/lang/Throwable; if-eqz v1, :cond_b invoke-virtual {v2, v1}, Lrx/Subscriber;->onError(Ljava/lang/Throwable;)V return-void :cond_b invoke-virtual {v2}, Lrx/Subscriber;->onCompleted()V return-void :cond_c const-wide/16 v11, 0x0 goto :goto_4 :cond_d const-wide/16 v11, 0x0 :goto_4 cmp-long v15, v8, v11 if-eqz v15, :cond_e const-wide v11, 0x7fffffffffffffffL cmp-long v15, v6, v11 if-eqz v15, :cond_e iget-object v6, v1, Lrx/subjects/a$b;->requested:Ljava/util/concurrent/atomic/AtomicLong; invoke-static {v6, v8, v9}, Lrx/internal/a/a;->b(Ljava/util/concurrent/atomic/AtomicLong;J)J :cond_e iput v10, v1, Lrx/subjects/a$b;->index:I iput v13, v1, Lrx/subjects/a$b;->tailIndex:I iput-object v14, v1, Lrx/subjects/a$b;->node:Ljava/lang/Object; neg-int v5, v5 invoke-virtual {v1, v5}, Lrx/subjects/a$b;->addAndGet(I)I move-result v5 if-nez v5, :cond_1 return-void .end method .method public final bG(Ljava/lang/Object;)V .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(TT;)V" } .end annotation iget-boolean v0, p0, Lrx/subjects/a$d;->done:Z if-eqz v0, :cond_0 return-void :cond_0 iget v0, p0, Lrx/subjects/a$d;->tailIndex:I iget-object v1, p0, Lrx/subjects/a$d;->bId:[Ljava/lang/Object; array-length v2, v1 const/4 v3, 0x1 sub-int/2addr v2, v3 if-ne v0, v2, :cond_1 array-length v2, v1 new-array v2, v2, [Ljava/lang/Object; const/4 v4, 0x0 aput-object p1, v2, v4 iput v3, p0, Lrx/subjects/a$d;->tailIndex:I aput-object v2, v1, v0 iput-object v2, p0, Lrx/subjects/a$d;->bId:[Ljava/lang/Object; goto :goto_0 :cond_1 aput-object p1, v1, v0 add-int/2addr v0, v3 iput v0, p0, Lrx/subjects/a$d;->tailIndex:I :goto_0 iget p1, p0, Lrx/subjects/a$d;->size:I add-int/2addr p1, v3 iput p1, p0, Lrx/subjects/a$d;->size:I return-void .end method .method public final complete()V .locals 1 const/4 v0, 0x1 iput-boolean v0, p0, Lrx/subjects/a$d;->done:Z return-void .end method