.class public final Lz5/z6;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;"
    }
.end annotation


# instance fields
.field public final a:Lz5/p6;

.field public final b:Lz5/v6;

.field public final c:Lz5/y6;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lz5/y6<",
            "TT;>;"
        }
    .end annotation
.end field

.field public final d:Ljava/util/concurrent/CopyOnWriteArraySet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/CopyOnWriteArraySet<",
            "Lcom/google/android/gms/internal/ads/e<",
            "TT;>;>;"
        }
    .end annotation
.end field

.field public final e:Ljava/util/ArrayDeque;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayDeque<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field public final f:Ljava/util/ArrayDeque;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayDeque<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field public g:Z


# direct methods
.method public constructor <init>(Ljava/util/concurrent/CopyOnWriteArraySet;Landroid/os/Looper;Lz5/p6;Lz5/y6;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/concurrent/CopyOnWriteArraySet<",
            "Lcom/google/android/gms/internal/ads/e<",
            "TT;>;>;",
            "Landroid/os/Looper;",
            "Lz5/p6;",
            "Lz5/y6<",
            "TT;>;)V"
        }
    .end annotation

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

    iput-object p3, p0, Lz5/z6;->a:Lz5/p6;

    iput-object p1, p0, Lz5/z6;->d:Ljava/util/concurrent/CopyOnWriteArraySet;

    iput-object p4, p0, Lz5/z6;->c:Lz5/y6;

    new-instance p1, Ljava/util/ArrayDeque;

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

    iput-object p1, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    new-instance p1, Ljava/util/ArrayDeque;

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

    iput-object p1, p0, Lz5/z6;->f:Ljava/util/ArrayDeque;

    new-instance p1, Ll5/j;

    invoke-direct {p1, p0}, Ll5/j;-><init>(Lz5/z6;)V

    check-cast p3, Lz5/l7;

    invoke-virtual {p3, p2, p1}, Lz5/l7;->a(Landroid/os/Looper;Landroid/os/Handler$Callback;)Lz5/v6;

    move-result-object p1

    iput-object p1, p0, Lz5/z6;->b:Lz5/v6;

    return-void
.end method


# virtual methods
.method public final a(Ljava/lang/Object;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    iget-boolean v0, p0, Lz5/z6;->g:Z

    if-nez v0, :cond_11

    invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lz5/z6;->d:Ljava/util/concurrent/CopyOnWriteArraySet;

    new-instance v1, Lcom/google/android/gms/internal/ads/e;

    invoke-direct {v1, p1}, Lcom/google/android/gms/internal/ads/e;-><init>(Ljava/lang/Object;)V

    invoke-virtual {v0, v1}, Ljava/util/concurrent/CopyOnWriteArraySet;->add(Ljava/lang/Object;)Z

    :cond_11
    return-void
.end method

.method public final b(ILz5/x6;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Lz5/x6<",
            "TT;>;)V"
        }
    .end annotation

    new-instance v0, Ljava/util/concurrent/CopyOnWriteArraySet;

    iget-object v1, p0, Lz5/z6;->d:Ljava/util/concurrent/CopyOnWriteArraySet;

    invoke-direct {v0, v1}, Ljava/util/concurrent/CopyOnWriteArraySet;-><init>(Ljava/util/Collection;)V

    iget-object v1, p0, Lz5/z6;->f:Ljava/util/ArrayDeque;

    new-instance v2, Lz5/w6;

    invoke-direct {v2, v0, p1, p2}, Lz5/w6;-><init>(Ljava/util/concurrent/CopyOnWriteArraySet;ILz5/x6;)V

    invoke-virtual {v1, v2}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method public final c()V
    .registers 4

    iget-object v0, p0, Lz5/z6;->f:Ljava/util/ArrayDeque;

    invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_9

    return-void

    :cond_9
    iget-object v0, p0, Lz5/z6;->b:Lz5/v6;

    check-cast v0, Lz5/n7;

    .line 1
    iget-object v0, v0, Lz5/n7;->a:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->hasMessages(I)Z

    move-result v0

    if-nez v0, :cond_2b

    .line 2
    iget-object v0, p0, Lz5/z6;->b:Lz5/v6;

    check-cast v0, Lz5/n7;

    invoke-virtual {v0, v1}, Lz5/n7;->a(I)Lz5/m7;

    move-result-object v1

    .line 3
    iget-object v0, v0, Lz5/n7;->a:Landroid/os/Handler;

    .line 4
    iget-object v2, v1, Lz5/m7;->a:Landroid/os/Message;

    invoke-static {v2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    invoke-virtual {v1}, Lz5/m7;->b()V

    .line 5
    :cond_2b
    iget-object v0, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z

    move-result v0

    iget-object v1, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    iget-object v2, p0, Lz5/z6;->f:Ljava/util/ArrayDeque;

    invoke-virtual {v1, v2}, Ljava/util/ArrayDeque;->addAll(Ljava/util/Collection;)Z

    iget-object v1, p0, Lz5/z6;->f:Ljava/util/ArrayDeque;

    invoke-virtual {v1}, Ljava/util/ArrayDeque;->clear()V

    xor-int/lit8 v0, v0, 0x1

    if-nez v0, :cond_5a

    :goto_41
    iget-object v0, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_5a

    iget-object v0, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    invoke-virtual {v0}, Ljava/util/ArrayDeque;->peekFirst()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Runnable;

    invoke-interface {v0}, Ljava/lang/Runnable;->run()V

    iget-object v0, p0, Lz5/z6;->e:Ljava/util/ArrayDeque;

    invoke-virtual {v0}, Ljava/util/ArrayDeque;->removeFirst()Ljava/lang/Object;

    goto :goto_41

    :cond_5a
    return-void
.end method

.method public final d()V
    .registers 5

    iget-object v0, p0, Lz5/z6;->d:Ljava/util/concurrent/CopyOnWriteArraySet;

    invoke-virtual {v0}, Ljava/util/concurrent/CopyOnWriteArraySet;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_6
    :goto_6
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_27

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

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/internal/ads/e;

    iget-object v3, p0, Lz5/z6;->c:Lz5/y6;

    .line 1
    iput-boolean v2, v1, Lcom/google/android/gms/internal/ads/e;->d:Z

    iget-boolean v2, v1, Lcom/google/android/gms/internal/ads/e;->c:Z

    if-eqz v2, :cond_6

    iget-object v2, v1, Lcom/google/android/gms/internal/ads/e;->a:Ljava/lang/Object;

    iget-object v1, v1, Lcom/google/android/gms/internal/ads/e;->b:Lz5/r6;

    invoke-virtual {v1}, Lz5/r6;->d()Lz5/u6;

    move-result-object v1

    invoke-interface {v3, v2, v1}, Lz5/y6;->e(Ljava/lang/Object;Lz5/u6;)V

    goto :goto_6

    .line 2
    :cond_27
    iget-object v0, p0, Lz5/z6;->d:Ljava/util/concurrent/CopyOnWriteArraySet;

    invoke-virtual {v0}, Ljava/util/concurrent/CopyOnWriteArraySet;->clear()V

    iput-boolean v2, p0, Lz5/z6;->g:Z

    return-void
.end method
