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

# interfaces
.implements Lz5/dg0;
.implements Lz5/yh0;
.implements Lz5/gh0;


# instance fields
.field public final r:Lz5/pr0;

.field public final s:Ljava/lang/String;

.field public t:I

.field public u:Lcom/google/android/gms/internal/ads/l3;

.field public v:Lz5/wf0;

.field public w:Lz5/sj;


# direct methods
.method public constructor <init>(Lz5/pr0;Lz5/m31;)V
    .registers 3

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

    iput-object p1, p0, Lz5/lr0;->r:Lz5/pr0;

    iget-object p1, p2, Lz5/m31;->f:Ljava/lang/String;

    iput-object p1, p0, Lz5/lr0;->s:Ljava/lang/String;

    const/4 p1, 0x0

    iput p1, p0, Lz5/lr0;->t:I

    sget-object p1, Lcom/google/android/gms/internal/ads/l3;->r:Lcom/google/android/gms/internal/ads/l3;

    iput-object p1, p0, Lz5/lr0;->u:Lcom/google/android/gms/internal/ads/l3;

    return-void
.end method

.method public static b(Lz5/wf0;)Lorg/json/JSONObject;
    .registers 8

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 1
    iget-object v1, p0, Lz5/wf0;->r:Ljava/lang/String;

    const-string v2, "winningAdapterClassName"

    .line 2
    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 3
    iget-wide v1, p0, Lz5/wf0;->u:J

    const-string v3, "responseSecsSinceEpoch"

    .line 4
    invoke-virtual {v0, v3, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    .line 5
    iget-object v1, p0, Lz5/wf0;->s:Ljava/lang/String;

    const-string v2, "responseId"

    .line 6
    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    sget-object v1, Lz5/so;->c6:Lz5/no;

    .line 7
    sget-object v2, Lz5/xk;->d:Lz5/xk;

    iget-object v2, v2, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 8
    invoke-virtual {v2, v1}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Boolean;

    invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v1

    if-eqz v1, :cond_57

    .line 9
    iget-object v1, p0, Lz5/wf0;->v:Ljava/lang/String;

    .line 10
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_57

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "Bidding data: "

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v4

    if-eqz v4, :cond_45

    invoke-virtual {v3, v2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    goto :goto_4a

    :cond_45
    new-instance v2, Ljava/lang/String;

    invoke-direct {v2, v3}, Ljava/lang/String;-><init>(Ljava/lang/String;)V

    :goto_4a
    invoke-static {v2}, Lz5/d50;->zzd(Ljava/lang/String;)V

    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, v1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v1, "biddingData"

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    :cond_57
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    invoke-virtual {p0}, Lz5/wf0;->zzg()Ljava/util/List;

    move-result-object p0

    if-eqz p0, :cond_98

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

    move-result-object p0

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

    move-result v2

    if-eqz v2, :cond_98

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

    move-result-object v2

    check-cast v2, Lz5/gk;

    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    iget-object v4, v2, Lz5/gk;->r:Ljava/lang/String;

    const-string v5, "adapterClassName"

    invoke-virtual {v3, v5, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget-wide v4, v2, Lz5/gk;->s:J

    const-string v6, "latencyMillis"

    invoke-virtual {v3, v6, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    iget-object v2, v2, Lz5/gk;->t:Lz5/sj;

    if-nez v2, :cond_8b

    const/4 v2, 0x0

    goto :goto_8f

    :cond_8b
    invoke-static {v2}, Lz5/lr0;->c(Lz5/sj;)Lorg/json/JSONObject;

    move-result-object v2

    :goto_8f
    const-string v4, "error"

    invoke-virtual {v3, v4, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    goto :goto_66

    :cond_98
    const-string p0, "adNetworks"

    invoke-virtual {v0, p0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    return-object v0
.end method

.method public static c(Lz5/sj;)Lorg/json/JSONObject;
    .registers 4

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    iget-object v1, p0, Lz5/sj;->t:Ljava/lang/String;

    const-string v2, "errorDomain"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget v1, p0, Lz5/sj;->r:I

    const-string v2, "errorCode"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    iget-object v1, p0, Lz5/sj;->s:Ljava/lang/String;

    const-string v2, "errorDescription"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget-object p0, p0, Lz5/sj;->u:Lz5/sj;

    if-nez p0, :cond_20

    const/4 p0, 0x0

    goto :goto_24

    :cond_20
    invoke-static {p0}, Lz5/lr0;->c(Lz5/sj;)Lorg/json/JSONObject;

    move-result-object p0

    :goto_24
    const-string v1, "underlyingError"

    invoke-virtual {v0, v1, p0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    return-object v0
.end method


# virtual methods
.method public final V(Lcom/google/android/gms/internal/ads/k1;)V
    .registers 6

    iget-object p1, p0, Lz5/lr0;->r:Lz5/pr0;

    iget-object v0, p0, Lz5/lr0;->s:Ljava/lang/String;

    .line 1
    monitor-enter p1

    :try_start_5
    sget-object v1, Lz5/so;->L5:Lz5/no;

    .line 2
    sget-object v2, Lz5/xk;->d:Lz5/xk;

    iget-object v3, v2, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 3
    invoke-virtual {v3, v1}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Boolean;

    invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v1

    if-eqz v1, :cond_59

    invoke-virtual {p1}, Lz5/pr0;->d()Z

    move-result v1

    if-nez v1, :cond_1e

    goto :goto_59

    :cond_1e
    iget v1, p1, Lz5/pr0;->m:I

    sget-object v3, Lz5/so;->N5:Lz5/no;

    .line 4
    iget-object v2, v2, Lz5/xk;->c:Lcom/google/android/gms/internal/ads/g0;

    .line 5
    invoke-virtual {v2, v3}, Lcom/google/android/gms/internal/ads/g0;->a(Lz5/no;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Integer;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    if-lt v1, v2, :cond_36

    const-string v0, "Maximum number of ad requests stored reached. Dropping the current request."

    invoke-static {v0}, Lz5/d50;->zzi(Ljava/lang/String;)V

    goto :goto_59

    :cond_36
    iget-object v1, p1, Lz5/pr0;->g:Ljava/util/Map;

    invoke-interface {v1, v0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_48

    iget-object v1, p1, Lz5/pr0;->g:Ljava/util/Map;

    new-instance v2, Ljava/util/ArrayList;

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

    invoke-interface {v1, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_48
    iget v1, p1, Lz5/pr0;->m:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p1, Lz5/pr0;->m:I

    iget-object v1, p1, Lz5/pr0;->g:Ljava/util/Map;

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

    move-result-object v0

    check-cast v0, Ljava/util/List;

    invoke-interface {v0, p0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_59
    .catchall {:try_start_5 .. :try_end_59} :catchall_5b

    :cond_59
    :goto_59
    monitor-exit p1

    return-void

    :catchall_5b
    move-exception v0

    monitor-exit p1

    throw v0
.end method

.method public final a()Lorg/json/JSONObject;
    .registers 5

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    iget-object v1, p0, Lz5/lr0;->u:Lcom/google/android/gms/internal/ads/l3;

    const-string v2, "state"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget v1, p0, Lz5/lr0;->t:I

    invoke-static {v1}, Lz5/b31;->a(I)Ljava/lang/String;

    move-result-object v1

    const-string v2, "format"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    iget-object v1, p0, Lz5/lr0;->v:Lz5/wf0;

    const/4 v2, 0x0

    if-eqz v1, :cond_21

    invoke-static {v1}, Lz5/lr0;->b(Lz5/wf0;)Lorg/json/JSONObject;

    move-result-object v2

    goto :goto_4e

    :cond_21
    iget-object v1, p0, Lz5/lr0;->w:Lz5/sj;

    if-eqz v1, :cond_4e

    iget-object v1, v1, Lz5/sj;->v:Landroid/os/IBinder;

    if-eqz v1, :cond_4e

    check-cast v1, Lz5/wf0;

    invoke-static {v1}, Lz5/lr0;->b(Lz5/wf0;)Lorg/json/JSONObject;

    move-result-object v2

    invoke-virtual {v1}, Lz5/wf0;->zzg()Ljava/util/List;

    move-result-object v1

    if-eqz v1, :cond_4e

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_4e

    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    iget-object v3, p0, Lz5/lr0;->w:Lz5/sj;

    invoke-static {v3}, Lz5/lr0;->c(Lz5/sj;)Lorg/json/JSONObject;

    move-result-object v3

    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    const-string v3, "errors"

    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    :cond_4e
    :goto_4e
    const-string v1, "responseInfo"

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    return-object v0
.end method

.method public final e(Lz5/i31;)V
    .registers 3

    iget-object v0, p1, Lz5/i31;->b:Lcom/google/android/gms/internal/ads/d1;

    iget-object v0, v0, Lcom/google/android/gms/internal/ads/d1;->s:Ljava/lang/Object;

    check-cast v0, Ljava/util/List;

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

    move-result v0

    if-nez v0, :cond_1d

    iget-object p1, p1, Lz5/i31;->b:Lcom/google/android/gms/internal/ads/d1;

    iget-object p1, p1, Lcom/google/android/gms/internal/ads/d1;->s:Ljava/lang/Object;

    check-cast p1, Ljava/util/List;

    const/4 v0, 0x0

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

    move-result-object p1

    check-cast p1, Lz5/b31;

    iget p1, p1, Lz5/b31;->b:I

    iput p1, p0, Lz5/lr0;->t:I

    :cond_1d
    return-void
.end method

.method public final g(Lz5/ke0;)V
    .registers 2

    .line 1
    iget-object p1, p1, Lz5/ke0;->f:Lz5/wf0;

    .line 2
    iput-object p1, p0, Lz5/lr0;->v:Lz5/wf0;

    sget-object p1, Lcom/google/android/gms/internal/ads/l3;->s:Lcom/google/android/gms/internal/ads/l3;

    iput-object p1, p0, Lz5/lr0;->u:Lcom/google/android/gms/internal/ads/l3;

    return-void
.end method

.method public final z(Lz5/sj;)V
    .registers 3

    sget-object v0, Lcom/google/android/gms/internal/ads/l3;->t:Lcom/google/android/gms/internal/ads/l3;

    iput-object v0, p0, Lz5/lr0;->u:Lcom/google/android/gms/internal/ads/l3;

    iput-object p1, p0, Lz5/lr0;->w:Lz5/sj;

    return-void
.end method
