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


# instance fields
.field public final a:Ljava/util/concurrent/atomic/AtomicInteger;

.field public final b:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set<",
            "Lz5/sy1<",
            "*>;>;"
        }
    .end annotation
.end field

.field public final c:Ljava/util/concurrent/PriorityBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/PriorityBlockingQueue<",
            "Lz5/sy1<",
            "*>;>;"
        }
    .end annotation
.end field

.field public final d:Ljava/util/concurrent/PriorityBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/PriorityBlockingQueue<",
            "Lz5/sy1<",
            "*>;>;"
        }
    .end annotation
.end field

.field public final e:Lz5/fy1;

.field public final f:Lz5/ly1;

.field public final g:[Lz5/my1;

.field public h:Lz5/gy1;

.field public final i:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lz5/uy1;",
            ">;"
        }
    .end annotation
.end field

.field public final j:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lz5/ty1;",
            ">;"
        }
    .end annotation
.end field

.field public final k:Lz5/ex0;


# direct methods
.method public constructor <init>(Lz5/fy1;Lz5/ly1;I)V
    .registers 6

    new-instance p3, Lz5/ex0;

    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    invoke-direct {p3, v0}, Lz5/ex0;-><init>(Landroid/os/Handler;)V

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

    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

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

    iput-object v0, p0, Lz5/vy1;->a:Ljava/util/concurrent/atomic/AtomicInteger;

    new-instance v0, Ljava/util/HashSet;

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

    iput-object v0, p0, Lz5/vy1;->b:Ljava/util/Set;

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

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

    iput-object v0, p0, Lz5/vy1;->c:Ljava/util/concurrent/PriorityBlockingQueue;

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

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

    iput-object v0, p0, Lz5/vy1;->d:Ljava/util/concurrent/PriorityBlockingQueue;

    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lz5/vy1;->i:Ljava/util/List;

    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lz5/vy1;->j:Ljava/util/List;

    iput-object p1, p0, Lz5/vy1;->e:Lz5/fy1;

    iput-object p2, p0, Lz5/vy1;->f:Lz5/ly1;

    const/4 p1, 0x4

    new-array p1, p1, [Lz5/my1;

    iput-object p1, p0, Lz5/vy1;->g:[Lz5/my1;

    iput-object p3, p0, Lz5/vy1;->k:Lz5/ex0;

    return-void
.end method


# virtual methods
.method public final a()V
    .registers 8

    iget-object v0, p0, Lz5/vy1;->h:Lz5/gy1;

    const/4 v1, 0x1

    if-eqz v0, :cond_a

    .line 1
    iput-boolean v1, v0, Lz5/gy1;->u:Z

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    .line 2
    :cond_a
    iget-object v0, p0, Lz5/vy1;->g:[Lz5/my1;

    const/4 v2, 0x0

    move v3, v2

    :goto_e
    const/4 v4, 0x4

    if-ge v3, v4, :cond_1d

    aget-object v4, v0, v3

    if-eqz v4, :cond_1a

    .line 3
    iput-boolean v1, v4, Lz5/my1;->u:Z

    invoke-virtual {v4}, Ljava/lang/Thread;->interrupt()V

    :cond_1a
    add-int/lit8 v3, v3, 0x1

    goto :goto_e

    .line 4
    :cond_1d
    new-instance v0, Lz5/gy1;

    iget-object v1, p0, Lz5/vy1;->c:Ljava/util/concurrent/PriorityBlockingQueue;

    iget-object v3, p0, Lz5/vy1;->d:Ljava/util/concurrent/PriorityBlockingQueue;

    iget-object v5, p0, Lz5/vy1;->e:Lz5/fy1;

    iget-object v6, p0, Lz5/vy1;->k:Lz5/ex0;

    invoke-direct {v0, v1, v3, v5, v6}, Lz5/gy1;-><init>(Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/BlockingQueue;Lz5/fy1;Lz5/ex0;)V

    iput-object v0, p0, Lz5/vy1;->h:Lz5/gy1;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    :goto_2f
    if-ge v2, v4, :cond_48

    new-instance v0, Lz5/my1;

    iget-object v1, p0, Lz5/vy1;->d:Ljava/util/concurrent/PriorityBlockingQueue;

    iget-object v3, p0, Lz5/vy1;->f:Lz5/ly1;

    iget-object v5, p0, Lz5/vy1;->e:Lz5/fy1;

    iget-object v6, p0, Lz5/vy1;->k:Lz5/ex0;

    invoke-direct {v0, v1, v3, v5, v6}, Lz5/my1;-><init>(Ljava/util/concurrent/BlockingQueue;Lz5/ly1;Lz5/fy1;Lz5/ex0;)V

    iget-object v1, p0, Lz5/vy1;->g:[Lz5/my1;

    aput-object v0, v1, v2

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    add-int/lit8 v2, v2, 0x1

    goto :goto_2f

    :cond_48
    return-void
.end method

.method public final b(Lz5/sy1;)Lz5/sy1;
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lz5/sy1<",
            "TT;>;)",
            "Lz5/sy1<",
            "TT;>;"
        }
    .end annotation

    invoke-virtual {p1, p0}, Lz5/sy1;->zzg(Lz5/vy1;)Lz5/sy1;

    iget-object v0, p0, Lz5/vy1;->b:Ljava/util/Set;

    monitor-enter v0

    :try_start_6
    iget-object v1, p0, Lz5/vy1;->b:Ljava/util/Set;

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

    monitor-exit v0
    :try_end_c
    .catchall {:try_start_6 .. :try_end_c} :catchall_24

    iget-object v0, p0, Lz5/vy1;->a:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    move-result v0

    invoke-virtual {p1, v0}, Lz5/sy1;->zzh(I)Lz5/sy1;

    const-string v0, "add-to-queue"

    invoke-virtual {p1, v0}, Lz5/sy1;->zzd(Ljava/lang/String;)V

    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lz5/vy1;->c(Lz5/sy1;I)V

    iget-object v0, p0, Lz5/vy1;->c:Ljava/util/concurrent/PriorityBlockingQueue;

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

    return-object p1

    :catchall_24
    move-exception p1

    :try_start_25
    monitor-exit v0
    :try_end_26
    .catchall {:try_start_25 .. :try_end_26} :catchall_24

    throw p1
.end method

.method public final c(Lz5/sy1;I)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lz5/sy1<",
            "*>;I)V"
        }
    .end annotation

    iget-object p1, p0, Lz5/vy1;->j:Ljava/util/List;

    monitor-enter p1

    :try_start_3
    iget-object p2, p0, Lz5/vy1;->j:Ljava/util/List;

    invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p2

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

    move-result v0

    if-eqz v0, :cond_19

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

    move-result-object v0

    check-cast v0, Lz5/ty1;

    invoke-interface {v0}, Lz5/ty1;->zza()V

    goto :goto_9

    :cond_19
    monitor-exit p1

    return-void

    :catchall_1b
    move-exception p2

    monitor-exit p1
    :try_end_1d
    .catchall {:try_start_3 .. :try_end_1d} :catchall_1b

    throw p2
.end method
