.class public final Lz9/i;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:J

.field public final b:Ly9/c;

.field public final c:Lz9/i$a;

.field public final d:Ljava/util/concurrent/ConcurrentLinkedQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/ConcurrentLinkedQueue<",
            "Lz9/h;",
            ">;"
        }
    .end annotation
.end field

.field public final e:I


# direct methods
.method public constructor <init>(Ly9/d;IJLjava/util/concurrent/TimeUnit;)V
    .registers 8

    const-string v0, "taskRunner"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

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

    iput p2, p0, Lz9/i;->e:I

    invoke-virtual {p5, p3, p4}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J

    move-result-wide v0

    iput-wide v0, p0, Lz9/i;->a:J

    invoke-virtual {p1}, Ly9/d;->f()Ly9/c;

    move-result-object p1

    iput-object p1, p0, Lz9/i;->b:Ly9/c;

    new-instance p1, Lz9/i$a;

    new-instance p2, Ljava/lang/StringBuilder;

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

    sget-object p5, Lw9/c;->g:Ljava/lang/String;

    const-string v0, " ConnectionPool"

    invoke-static {p2, p5, v0}, Landroidx/activity/b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p0, p2}, Lz9/i$a;-><init>(Lz9/i;Ljava/lang/String;)V

    iput-object p1, p0, Lz9/i;->c:Lz9/i$a;

    new-instance p1, Ljava/util/concurrent/ConcurrentLinkedQueue;

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

    iput-object p1, p0, Lz9/i;->d:Ljava/util/concurrent/ConcurrentLinkedQueue;

    const-wide/16 p1, 0x0

    cmp-long p1, p3, p1

    if-lez p1, :cond_39

    const/4 p1, 0x1

    goto :goto_3a

    :cond_39
    const/4 p1, 0x0

    :goto_3a
    if-eqz p1, :cond_3d

    return-void

    :cond_3d
    const-string p1, "keepAliveDuration <= 0: "

    invoke-static {p1, p3, p4}, Lv0/a;->a(Ljava/lang/String;J)Ljava/lang/String;

    move-result-object p1

    new-instance p2, Ljava/lang/IllegalArgumentException;

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p2
.end method


# virtual methods
.method public final a(Lv9/a;Lz9/d;Ljava/util/List;Z)Z
    .registers 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lv9/a;",
            "Lz9/d;",
            "Ljava/util/List<",
            "Lv9/j0;",
            ">;Z)Z"
        }
    .end annotation

    const-string v0, "address"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "call"

    invoke-static {p2, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    iget-object v0, p0, Lz9/i;->d:Ljava/util/concurrent/ConcurrentLinkedQueue;

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

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_3c

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

    move-result-object v1

    check-cast v1, Lz9/h;

    const-string v2, "connection"

    invoke-static {v1, v2}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    monitor-enter v1

    if-eqz p4, :cond_2b

    :try_start_24
    invoke-virtual {v1}, Lz9/h;->j()Z

    move-result v2

    if-nez v2, :cond_2b

    goto :goto_31

    :cond_2b
    invoke-virtual {v1, p1, p3}, Lz9/h;->h(Lv9/a;Ljava/util/List;)Z

    move-result v2
    :try_end_2f
    .catchall {:try_start_24 .. :try_end_2f} :catchall_39

    if-nez v2, :cond_33

    :goto_31
    monitor-exit v1

    goto :goto_10

    :cond_33
    :try_start_33
    invoke-virtual {p2, v1}, Lz9/d;->b(Lz9/h;)V
    :try_end_36
    .catchall {:try_start_33 .. :try_end_36} :catchall_39

    const/4 p1, 0x1

    monitor-exit v1

    return p1

    :catchall_39
    move-exception p1

    monitor-exit v1

    throw p1

    :cond_3c
    const/4 p1, 0x0

    return p1
.end method

.method public final b(Lz9/h;J)I
    .registers 10

    sget-object v0, Lw9/c;->a:[B

    .line 1
    iget-object v0, p1, Lz9/h;->o:Ljava/util/List;

    const/4 v1, 0x0

    move v2, v1

    .line 2
    :cond_6
    :goto_6
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    if-ge v2, v3, :cond_55

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

    move-result-object v3

    check-cast v3, Ljava/lang/ref/Reference;

    invoke-virtual {v3}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v4

    if-eqz v4, :cond_1b

    add-int/lit8 v2, v2, 0x1

    goto :goto_6

    :cond_1b
    check-cast v3, Lz9/d$b;

    const-string v4, "A connection to "

    invoke-static {v4}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 3
    iget-object v5, p1, Lz9/h;->q:Lv9/j0;

    .line 4
    iget-object v5, v5, Lv9/j0;->a:Lv9/a;

    .line 5
    iget-object v5, v5, Lv9/a;->a:Lv9/w;

    .line 6
    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v5, " was leaked. "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v5, "Did you forget to close a response body?"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    sget-object v5, Lda/e;->c:Lda/e$a;

    .line 7
    sget-object v5, Lda/e;->a:Lda/e;

    .line 8
    iget-object v3, v3, Lz9/d$b;->a:Ljava/lang/Object;

    .line 9
    invoke-virtual {v5, v4, v3}, Lda/e;->k(Ljava/lang/String;Ljava/lang/Object;)V

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

    const/4 v3, 0x1

    .line 10
    iput-boolean v3, p1, Lz9/h;->i:Z

    .line 11
    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v3

    if-eqz v3, :cond_6

    iget-wide v2, p0, Lz9/i;->a:J

    sub-long/2addr p2, v2

    .line 12
    iput-wide p2, p1, Lz9/h;->p:J

    return v1

    .line 13
    :cond_55
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result p1

    return p1
.end method
