e.smali

.class public final Lio/reactivex/internal/disposables/e;
.super Ljava/lang/Object;
.source "ListCompositeDisposable.java"

# interfaces
.implements Lio/reactivex/disposables/b;
.implements Lio/reactivex/internal/disposables/a;


# instance fields
.field private bOv:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lio/reactivex/disposables/b;",
            ">;"
        }
    .end annotation
.end field

.field private volatile disposed:Z


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 31
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 32
    return-void
.end method


# virtual methods
.method public final a(Lio/reactivex/disposables/b;)Z
    .registers 3

    .prologue
    .line 77
    const-string v0, "d is null"

    invoke-static {p1, v0}, Lio/reactivex/internal/functions/aj;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;

    .line 78
    iget-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-nez v0, :cond_20

    .line 79
    monitor-enter p0

    .line 80
    :try_start_a
    iget-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-nez v0, :cond_1f

    .line 81
    iget-object v0, p0, Lio/reactivex/internal/disposables/e;->bOv:Ljava/util/List;

    .line 82
    if-nez v0, :cond_19

    .line 83
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    .line 84
    iput-object v0, p0, Lio/reactivex/internal/disposables/e;->bOv:Ljava/util/List;

    .line 86
    :cond_19
    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 87
    const/4 v0, 0x1

    monitor-exit p0

    .line 92
    :goto_1e
    return v0

    .line 89
    :cond_1f
    monitor-exit p0
    :try_end_20
    .catchall {:try_start_a .. :try_end_20} :catchall_25

    .line 91
    :cond_20
    invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V

    .line 92
    const/4 v0, 0x0

    goto :goto_1e

    .line 89
    :catchall_25
    move-exception v0

    :try_start_26
    monitor-exit p0
    :try_end_27
    .catchall {:try_start_26 .. :try_end_27} :catchall_25

    throw v0
.end method

.method public final b(Lio/reactivex/disposables/b;)Z
    .registers 3

    .prologue
    .line 121
    invoke-virtual {p0, p1}, Lio/reactivex/internal/disposables/e;->c(Lio/reactivex/disposables/b;)Z

    move-result v0

    if-eqz v0, :cond_b

    .line 122
    invoke-interface {p1}, Lio/reactivex/disposables/b;->dispose()V

    .line 123
    const/4 v0, 0x1

    .line 125
    :goto_a
    return v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public final c(Lio/reactivex/disposables/b;)Z
    .registers 4

    .prologue
    const/4 v0, 0x0

    .line 130
    const-string v1, "Disposable item is null"

    invoke-static {p1, v1}, Lio/reactivex/internal/functions/aj;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;

    .line 131
    iget-boolean v1, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-eqz v1, :cond_b

    .line 144
    :goto_a
    return v0

    .line 134
    :cond_b
    monitor-enter p0

    .line 135
    :try_start_c
    iget-boolean v1, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-eqz v1, :cond_15

    .line 136
    monitor-exit p0

    goto :goto_a

    .line 143
    :catchall_12
    move-exception v0

    monitor-exit p0
    :try_end_14
    .catchall {:try_start_c .. :try_end_14} :catchall_12

    throw v0

    .line 139
    :cond_15
    :try_start_15
    iget-object v1, p0, Lio/reactivex/internal/disposables/e;->bOv:Ljava/util/List;

    .line 140
    if-eqz v1, :cond_1f

    invoke-interface {v1, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_21

    .line 141
    :cond_1f
    monitor-exit p0

    goto :goto_a

    .line 143
    :cond_21
    monitor-exit p0
    :try_end_22
    .catchall {:try_start_15 .. :try_end_22} :catchall_12

    .line 144
    const/4 v0, 0x1

    goto :goto_a
.end method

.method public final dispose()V
    .registers 6

    .prologue
    const/4 v1, 0x0

    const/4 v4, 0x1

    .line 54
    iget-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-eqz v0, :cond_7

    .line 68
    :cond_6
    :goto_6
    return-void

    .line 58
    :cond_7
    monitor-enter p0

    .line 59
    :try_start_8
    iget-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    if-eqz v0, :cond_11

    .line 60
    monitor-exit p0

    goto :goto_6

    .line 65
    :catchall_e
    move-exception v0

    monitor-exit p0
    :try_end_10
    .catchall {:try_start_8 .. :try_end_10} :catchall_e

    throw v0

    .line 62
    :cond_11
    const/4 v0, 0x1

    :try_start_12
    iput-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    .line 63
    iget-object v0, p0, Lio/reactivex/internal/disposables/e;->bOv:Ljava/util/List;

    .line 64
    const/4 v2, 0x0

    iput-object v2, p0, Lio/reactivex/internal/disposables/e;->bOv:Ljava/util/List;

    .line 65
    monitor-exit p0
    :try_end_1a
    .catchall {:try_start_12 .. :try_end_1a} :catchall_e

    .line 1165
    if-eqz v0, :cond_6

    .line 1169
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

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

    move-result v0

    if-eqz v0, :cond_40

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

    move-result-object v0

    check-cast v0, Lio/reactivex/disposables/b;

    .line 1171
    :try_start_2c
    invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V
    :try_end_2f
    .catch Ljava/lang/Throwable; {:try_start_2c .. :try_end_2f} :catch_30

    goto :goto_20

    .line 1172
    :catch_30
    move-exception v3

    .line 1173
    invoke-static {v3}, Lio/reactivex/exceptions/d;->throwIfFatal(Ljava/lang/Throwable;)V

    .line 1174
    if-nez v1, :cond_5a

    .line 1175
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 1177
    :goto_3b
    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    move-object v1, v0

    .line 1179
    goto :goto_20

    .line 1180
    :cond_40
    if-eqz v1, :cond_6

    .line 1181
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v0

    if-ne v0, v4, :cond_54

    .line 1182
    const/4 v0, 0x0

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Throwable;

    invoke-static {v0}, Lio/reactivex/internal/util/ExceptionHelper;->l(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;

    move-result-object v0

    throw v0

    .line 1184
    :cond_54
    new-instance v0, Lio/reactivex/exceptions/CompositeException;

    invoke-direct {v0, v1}, Lio/reactivex/exceptions/CompositeException;-><init>(Ljava/lang/Iterable;)V

    throw v0

    :cond_5a
    move-object v0, v1

    goto :goto_3b
.end method

.method public final isDisposed()Z
    .registers 2

    .prologue
    .line 72
    iget-boolean v0, p0, Lio/reactivex/internal/disposables/e;->disposed:Z

    return v0
.end method