894 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			894 lines
		
	
	
		
			25 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class final Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;
 | |
| .super Ljava/util/concurrent/atomic/AtomicInteger;
 | |
| .source "FlowableMergeWithSingle.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Lkh/o;
 | |
| .implements Lok/e;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x19
 | |
|     name = "MergeWithObserver"
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/MemberClasses;
 | |
|     value = {
 | |
|         Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/Signature;
 | |
|     value = {
 | |
|         "<T:",
 | |
|         "Ljava/lang/Object;",
 | |
|         ">",
 | |
|         "Ljava/util/concurrent/atomic/AtomicInteger;",
 | |
|         "Lkh/o<",
 | |
|         "TT;>;",
 | |
|         "Lok/e;"
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field public static final OTHER_STATE_CONSUMED_OR_EMPTY:I = 0x2
 | |
| 
 | |
| .field public static final OTHER_STATE_HAS_VALUE:I = 0x1
 | |
| 
 | |
| .field private static final serialVersionUID:J = -0x3fbd8a98db8e76f7L
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field public volatile cancelled:Z
 | |
| 
 | |
| .field public consumed:I
 | |
| 
 | |
| .field public final downstream:Lok/d;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lok/d<",
 | |
|             "-TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public emitted:J
 | |
| 
 | |
| .field public final error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
| .field public final limit:I
 | |
| 
 | |
| .field public volatile mainDone:Z
 | |
| 
 | |
| .field public final mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/concurrent/atomic/AtomicReference<",
 | |
|             "Lok/e;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final otherObserver:Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver<",
 | |
|             "TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public volatile otherState:I
 | |
| 
 | |
| .field public final prefetch:I
 | |
| 
 | |
| .field public volatile queue:Lrh/n;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Lrh/n<",
 | |
|             "TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
| .field public singleItem:Ljava/lang/Object;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "TT;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Lok/d;)V
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(",
 | |
|             "Lok/d<",
 | |
|             "-TT;>;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->downstream:Lok/d;
 | |
| 
 | |
|     .line 3
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     .line 4
 | |
|     new-instance p1, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;
 | |
| 
 | |
|     invoke-direct {p1, p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;-><init>(Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;)V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherObserver:Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;
 | |
| 
 | |
|     .line 5
 | |
|     new-instance p1, Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-direct {p1}, Lio/reactivex/internal/util/AtomicThrowable;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     .line 6
 | |
|     new-instance p1, Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
 | |
| 
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {}, Lkh/j;->U()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     iput p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->prefetch:I
 | |
| 
 | |
|     shr-int/lit8 v0, p1, 0x2
 | |
| 
 | |
|     sub-int/2addr p1, v0
 | |
| 
 | |
|     .line 8
 | |
|     iput p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->limit:I
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public cancel()V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->cancelled:Z
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherObserver:Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver$OtherObserver;
 | |
| 
 | |
|     invoke-static {v0}, Lio/reactivex/internal/disposables/DisposableHelper;->dispose(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 5
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     .line 6
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public drain()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drainLoop()V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public drainLoop()V
 | |
|     .locals 18
 | |
| 
 | |
|     move-object/from16 v0, p0
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v1, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->downstream:Lok/d;
 | |
| 
 | |
|     .line 2
 | |
|     iget-wide v2, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 3
 | |
|     iget v4, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->consumed:I
 | |
| 
 | |
|     .line 4
 | |
|     iget v5, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->limit:I
 | |
| 
 | |
|     const/4 v6, 0x1
 | |
| 
 | |
|     move v7, v6
 | |
| 
 | |
|     .line 5
 | |
|     :goto_0
 | |
|     iget-object v8, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-virtual {v8}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v8
 | |
| 
 | |
|     :goto_1
 | |
|     cmp-long v10, v2, v8
 | |
| 
 | |
|     const/4 v12, 0x2
 | |
| 
 | |
|     const/4 v13, 0x0
 | |
| 
 | |
|     if-eqz v10, :cond_8
 | |
| 
 | |
|     .line 6
 | |
|     iget-boolean v14, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->cancelled:Z
 | |
| 
 | |
|     if-eqz v14, :cond_0
 | |
| 
 | |
|     .line 7
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 8
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 9
 | |
|     :cond_0
 | |
|     iget-object v14, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v14}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v14
 | |
| 
 | |
|     if-eqz v14, :cond_1
 | |
| 
 | |
|     .line 10
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 11
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v2, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v2}, Lio/reactivex/internal/util/AtomicThrowable;->terminate()Ljava/lang/Throwable;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     invoke-interface {v1, v2}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 13
 | |
|     :cond_1
 | |
|     iget v14, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     const-wide/16 v15, 0x1
 | |
| 
 | |
|     if-ne v14, v6, :cond_2
 | |
| 
 | |
|     .line 14
 | |
|     iget-object v10, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 15
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 16
 | |
|     iput v12, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     .line 17
 | |
|     invoke-interface {v1, v10}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     add-long/2addr v2, v15
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 18
 | |
|     :cond_2
 | |
|     iget-boolean v6, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainDone:Z
 | |
| 
 | |
|     .line 19
 | |
|     iget-object v11, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     if-eqz v11, :cond_3
 | |
| 
 | |
|     .line 20
 | |
|     invoke-interface {v11}, Lrh/n;->poll()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v11
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     :cond_3
 | |
|     move-object v11, v13
 | |
| 
 | |
|     :goto_2
 | |
|     if-nez v11, :cond_4
 | |
| 
 | |
|     const/16 v17, 0x1
 | |
| 
 | |
|     goto :goto_3
 | |
| 
 | |
|     :cond_4
 | |
|     const/16 v17, 0x0
 | |
| 
 | |
|     :goto_3
 | |
|     if-eqz v6, :cond_5
 | |
| 
 | |
|     if-eqz v17, :cond_5
 | |
| 
 | |
|     if-ne v14, v12, :cond_5
 | |
| 
 | |
|     .line 21
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     .line 22
 | |
|     invoke-interface {v1}, Lok/d;->onComplete()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_5
 | |
|     if-eqz v17, :cond_6
 | |
| 
 | |
|     goto :goto_4
 | |
| 
 | |
|     .line 23
 | |
|     :cond_6
 | |
|     invoke-interface {v1, v11}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     add-long/2addr v2, v15
 | |
| 
 | |
|     add-int/lit8 v4, v4, 0x1
 | |
| 
 | |
|     if-ne v4, v5, :cond_7
 | |
| 
 | |
|     .line 24
 | |
|     iget-object v4, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v4}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v4
 | |
| 
 | |
|     check-cast v4, Lok/e;
 | |
| 
 | |
|     int-to-long v10, v5
 | |
| 
 | |
|     invoke-interface {v4, v10, v11}, Lok/e;->request(J)V
 | |
| 
 | |
|     const/4 v4, 0x0
 | |
| 
 | |
|     :cond_7
 | |
|     const/4 v6, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_8
 | |
|     :goto_4
 | |
|     if-nez v10, :cond_d
 | |
| 
 | |
|     .line 25
 | |
|     iget-boolean v6, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->cancelled:Z
 | |
| 
 | |
|     if-eqz v6, :cond_9
 | |
| 
 | |
|     .line 26
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 27
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 28
 | |
|     :cond_9
 | |
|     iget-object v6, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v6}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v6
 | |
| 
 | |
|     if-eqz v6, :cond_a
 | |
| 
 | |
|     .line 29
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 30
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     .line 31
 | |
|     iget-object v2, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v2}, Lio/reactivex/internal/util/AtomicThrowable;->terminate()Ljava/lang/Throwable;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     invoke-interface {v1, v2}, Lok/d;->onError(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 32
 | |
|     :cond_a
 | |
|     iget-boolean v6, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainDone:Z
 | |
| 
 | |
|     .line 33
 | |
|     iget-object v8, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     if-eqz v8, :cond_c
 | |
| 
 | |
|     .line 34
 | |
|     invoke-interface {v8}, Lrh/o;->isEmpty()Z
 | |
| 
 | |
|     move-result v8
 | |
| 
 | |
|     if-eqz v8, :cond_b
 | |
| 
 | |
|     goto :goto_5
 | |
| 
 | |
|     :cond_b
 | |
|     const/4 v11, 0x0
 | |
| 
 | |
|     goto :goto_6
 | |
| 
 | |
|     :cond_c
 | |
|     :goto_5
 | |
|     const/4 v11, 0x1
 | |
| 
 | |
|     :goto_6
 | |
|     if-eqz v6, :cond_d
 | |
| 
 | |
|     if-eqz v11, :cond_d
 | |
| 
 | |
|     .line 35
 | |
|     iget v6, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     if-ne v6, v12, :cond_d
 | |
| 
 | |
|     .line 36
 | |
|     iput-object v13, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     .line 37
 | |
|     invoke-interface {v1}, Lok/d;->onComplete()V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 38
 | |
|     :cond_d
 | |
|     iput-wide v2, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 39
 | |
|     iput v4, v0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->consumed:I
 | |
| 
 | |
|     neg-int v6, v7
 | |
| 
 | |
|     .line 40
 | |
|     invoke-virtual {v0, v6}, Ljava/util/concurrent/atomic/AtomicInteger;->addAndGet(I)I
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     if-nez v7, :cond_e
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :cond_e
 | |
|     const/4 v6, 0x1
 | |
| 
 | |
|     goto/16 :goto_0
 | |
| .end method
 | |
| 
 | |
| .method public getOrCreateQueue()Lrh/n;
 | |
|     .locals 2
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "()",
 | |
|             "Lrh/n<",
 | |
|             "TT;>;"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Lio/reactivex/internal/queue/SpscArrayQueue;
 | |
| 
 | |
|     invoke-static {}, Lkh/j;->U()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     invoke-direct {v0, v1}, Lio/reactivex/internal/queue/SpscArrayQueue;-><init>(I)V
 | |
| 
 | |
|     .line 3
 | |
|     iput-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     :cond_0
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public onComplete()V
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainDone:Z
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onError(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AtomicThrowable;->addThrowable(Ljava/lang/Throwable;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drain()V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onNext(Ljava/lang/Object;)V
 | |
|     .locals 6
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(TT;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     if-eqz v2, :cond_4
 | |
| 
 | |
|     .line 2
 | |
|     iget-wide v2, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v4, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-virtual {v4}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v4
 | |
| 
 | |
|     cmp-long v4, v4, v2
 | |
| 
 | |
|     if-eqz v4, :cond_3
 | |
| 
 | |
|     .line 4
 | |
|     iget-object v4, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->queue:Lrh/n;
 | |
| 
 | |
|     if-eqz v4, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     invoke-interface {v4}, Lrh/o;->isEmpty()Z
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     if-eqz v5, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_0
 | |
|     invoke-interface {v4, p1}, Lrh/o;->offer(Ljava/lang/Object;)Z
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     const-wide/16 v4, 0x1
 | |
| 
 | |
|     add-long/2addr v2, v4
 | |
| 
 | |
|     .line 7
 | |
|     iput-wide v2, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 8
 | |
|     iget-object v2, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v2, p1}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 9
 | |
|     iget p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->consumed:I
 | |
| 
 | |
|     add-int/2addr p1, v1
 | |
| 
 | |
|     .line 10
 | |
|     iget v1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->limit:I
 | |
| 
 | |
|     if-ne p1, v1, :cond_2
 | |
| 
 | |
|     .line 11
 | |
|     iput v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->consumed:I
 | |
| 
 | |
|     .line 12
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Lok/e;
 | |
| 
 | |
|     int-to-long v1, p1
 | |
| 
 | |
|     invoke-interface {v0, v1, v2}, Lok/e;->request(J)V
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 13
 | |
|     :cond_2
 | |
|     iput p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->consumed:I
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 14
 | |
|     :cond_3
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->getOrCreateQueue()Lrh/n;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 15
 | |
|     invoke-interface {v0, p1}, Lrh/o;->offer(Ljava/lang/Object;)Z
 | |
| 
 | |
|     .line 16
 | |
|     :goto_1
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-nez p1, :cond_5
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 17
 | |
|     :cond_4
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->getOrCreateQueue()Lrh/n;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 18
 | |
|     invoke-interface {v0, p1}, Lrh/o;->offer(Ljava/lang/Object;)Z
 | |
| 
 | |
|     .line 19
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_5
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 20
 | |
|     :cond_5
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drainLoop()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public onSubscribe(Lok/e;)V
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     iget v1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->prefetch:I
 | |
| 
 | |
|     int-to-long v1, v1
 | |
| 
 | |
|     invoke-static {v0, p1, v1, v2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lok/e;J)Z
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public otherError(Ljava/lang/Throwable;)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->error:Lio/reactivex/internal/util/AtomicThrowable;
 | |
| 
 | |
|     invoke-virtual {v0, p1}, Lio/reactivex/internal/util/AtomicThrowable;->addThrowable(Ljava/lang/Throwable;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->mainSubscription:Ljava/util/concurrent/atomic/AtomicReference;
 | |
| 
 | |
|     invoke-static {p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drain()V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public otherSuccess(Ljava/lang/Object;)V
 | |
|     .locals 6
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "(TT;)V"
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;->compareAndSet(II)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 2
 | |
|     iget-wide v2, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 3
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
 | |
| 
 | |
|     move-result-wide v4
 | |
| 
 | |
|     cmp-long v0, v4, v2
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const-wide/16 v0, 0x1
 | |
| 
 | |
|     add-long/2addr v2, v0
 | |
| 
 | |
|     .line 4
 | |
|     iput-wide v2, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->emitted:J
 | |
| 
 | |
|     .line 5
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->downstream:Lok/d;
 | |
| 
 | |
|     invoke-interface {v0, p1}, Lok/d;->onNext(Ljava/lang/Object;)V
 | |
| 
 | |
|     const/4 p1, 0x2
 | |
| 
 | |
|     .line 6
 | |
|     iput p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 7
 | |
|     :cond_0
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 8
 | |
|     iput v1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     .line 9
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-nez p1, :cond_2
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 10
 | |
|     :cond_1
 | |
|     iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->singleItem:Ljava/lang/Object;
 | |
| 
 | |
|     .line 11
 | |
|     iput v1, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->otherState:I
 | |
| 
 | |
|     .line 12
 | |
|     invoke-virtual {p0}, Ljava/util/concurrent/atomic/AtomicInteger;->getAndIncrement()I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_2
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 13
 | |
|     :cond_2
 | |
|     :goto_0
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drainLoop()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public request(J)V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->requested:Ljava/util/concurrent/atomic/AtomicLong;
 | |
| 
 | |
|     invoke-static {v0, p1, p2}, Lio/reactivex/internal/util/b;->a(Ljava/util/concurrent/atomic/AtomicLong;J)J
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableMergeWithSingle$MergeWithObserver;->drain()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 |