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

# interfaces
.implements Lz5/cu;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lz5/cu<",
        "Lcom/google/android/gms/internal/ads/g2;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic r:I


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

    iput p1, p0, Lz5/au;->r:I

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

    return-void
.end method

.method public static final b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;",
            "Ljava/lang/String;",
            ")",
            "Ljava/lang/Integer;"
        }
    .end annotation

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

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_8

    return-object v1

    :cond_8
    :try_start_8
    invoke-interface {p0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p0
    :try_end_16
    .catch Ljava/lang/NumberFormatException; {:try_start_8 .. :try_end_16} :catch_17

    return-object p0

    :catch_17
    invoke-interface {p0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Ljava/lang/String;

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

    move-result-object v0

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

    move-result v0

    new-instance v2, Ljava/lang/StringBuilder;

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

    move-result v3

    add-int/lit8 v3, v3, 0x27

    add-int/2addr v3, v0

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

    const-string v0, "Precache invalid numeric parameter \'"

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

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

    const-string p1, "\': "

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

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

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

    move-result-object p0

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

    return-object v1
.end method


# virtual methods
.method public final a(Ljava/lang/Object;Ljava/util/Map;)V
    .registers 19

    move-object/from16 v0, p0

    move-object/from16 v1, p2

    iget v2, v0, Lz5/au;->r:I

    const/4 v3, 0x1

    const/4 v4, 0x0

    packed-switch v2, :pswitch_data_1bc

    goto :goto_2f

    .line 1
    :pswitch_c
    move-object/from16 v2, p1

    check-cast v2, Lcom/google/android/gms/internal/ads/g2;

    invoke-interface/range {p2 .. p2}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v5

    const-string v6, "start"

    invoke-interface {v5, v6}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1f

    invoke-interface {v2, v3}, Lcom/google/android/gms/internal/ads/g2;->d0(Z)V

    :cond_1f
    invoke-interface/range {p2 .. p2}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v1

    const-string v3, "stop"

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

    move-result v1

    if-eqz v1, :cond_2e

    invoke-interface {v2, v4}, Lcom/google/android/gms/internal/ads/g2;->d0(Z)V

    :cond_2e
    return-void

    .line 2
    :goto_2f
    move-object/from16 v2, p1

    check-cast v2, Lz5/h60;

    const/4 v5, 0x3

    invoke-static {v5}, Lz5/d50;->zzm(I)Z

    move-result v5

    if-eqz v5, :cond_51

    new-instance v5, Lorg/json/JSONObject;

    invoke-direct {v5, v1}, Lorg/json/JSONObject;-><init>(Ljava/util/Map;)V

    const-string v6, "google.afma.Notify_dt"

    invoke-virtual {v5, v6}, Lorg/json/JSONObject;->remove(Ljava/lang/String;)Ljava/lang/Object;

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

    move-result-object v5

    const-string v6, "Precache GMSG: "

    invoke-virtual {v6, v5}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    :cond_51
    invoke-static {}, Lcom/google/android/gms/ads/internal/zzt;->zzy()Lz5/b70;

    move-result-object v5

    const-string v6, "abort"

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

    move-result v6

    if-eqz v6, :cond_67

    invoke-virtual {v5, v2}, Lz5/b70;->a(Lz5/h60;)Z

    move-result v1

    if-nez v1, :cond_1bb

    const-string v1, "Precache abort but no precache task running."

    goto/16 :goto_1b8

    :cond_67
    const-string v6, "src"

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

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    const-string v7, "periodicReportIntervalMs"

    invoke-static {v1, v7}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v7

    const-string v8, "exoPlayerRenderingIntervalMs"

    invoke-static {v1, v8}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v8

    const-string v9, "exoPlayerIdleIntervalMs"

    invoke-static {v1, v9}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v9

    new-instance v10, Lz5/g60;

    const-string v11, "flags"

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

    move-result-object v11

    check-cast v11, Ljava/lang/String;

    invoke-direct {v10, v11}, Lz5/g60;-><init>(Ljava/lang/String;)V

    iget-boolean v11, v10, Lz5/g60;->m:Z

    if-eqz v6, :cond_171

    new-array v12, v3, [Ljava/lang/String;

    aput-object v6, v12, v4

    const-string v13, "demuxed"

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

    move-result-object v13

    check-cast v13, Ljava/lang/String;

    if-eqz v13, :cond_d4

    :try_start_a0
    new-instance v12, Lorg/json/JSONArray;

    invoke-direct {v12, v13}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12}, Lorg/json/JSONArray;->length()I

    move-result v15

    new-array v15, v15, [Ljava/lang/String;

    move v14, v4

    :goto_ac
    invoke-virtual {v12}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v14, v4, :cond_bb

    invoke-virtual {v12, v14}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v15, v14
    :try_end_b8
    .catch Lorg/json/JSONException; {:try_start_a0 .. :try_end_b8} :catch_bd

    add-int/lit8 v14, v14, 0x1

    goto :goto_ac

    :cond_bb
    move-object v12, v15

    goto :goto_d4

    :catch_bd
    const-string v4, "Malformed demuxed URL list for precache: "

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

    move-result v12

    if-eqz v12, :cond_ca

    invoke-virtual {v4, v13}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    goto :goto_d0

    :cond_ca
    new-instance v12, Ljava/lang/String;

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

    move-object v4, v12

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

    const/4 v12, 0x0

    :cond_d4
    :goto_d4
    if-nez v12, :cond_db

    new-array v12, v3, [Ljava/lang/String;

    const/4 v3, 0x0

    aput-object v6, v12, v3

    :cond_db
    if-eqz v11, :cond_fd

    invoke-virtual {v5}, Lz5/b70;->iterator()Ljava/util/Iterator;

    move-result-object v3

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

    move-result v4

    if-eqz v4, :cond_fb

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

    move-result-object v4

    check-cast v4, Lz5/a70;

    iget-object v5, v4, Lz5/a70;->a:Lz5/h60;

    if-ne v5, v2, :cond_e1

    .line 3
    iget-object v5, v4, Lz5/a70;->c:Ljava/lang/String;

    .line 4
    invoke-virtual {v6, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_e1

    move-object v14, v4

    goto :goto_101

    :cond_fb
    const/4 v14, 0x0

    goto :goto_101

    :cond_fd
    invoke-virtual {v5, v2}, Lz5/b70;->c(Lz5/h60;)Lz5/a70;

    move-result-object v14

    :goto_101
    if-eqz v14, :cond_107

    const-string v1, "Precache task is already running."

    goto/16 :goto_1b8

    :cond_107
    invoke-interface {v2}, Lz5/h60;->zzk()Lcom/google/android/gms/ads/internal/zza;

    move-result-object v3

    if-nez v3, :cond_111

    const-string v1, "Precache requires a dependency provider."

    goto/16 :goto_1b8

    :cond_111
    const-string v3, "player"

    invoke-static {v1, v3}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v3

    if-nez v3, :cond_11e

    const/4 v4, 0x0

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    :cond_11e
    if-eqz v7, :cond_127

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

    move-result v4

    invoke-interface {v2, v4}, Lz5/h60;->A(I)V

    :cond_127
    if-eqz v8, :cond_130

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

    move-result v4

    invoke-interface {v2, v4}, Lz5/h60;->a(I)V

    :cond_130
    if-eqz v9, :cond_139

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

    move-result v4

    invoke-interface {v2, v4}, Lz5/h60;->g(I)V

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

    move-result v3

    invoke-interface {v2}, Lz5/h60;->zzk()Lcom/google/android/gms/ads/internal/zza;

    move-result-object v4

    iget-object v4, v4, Lcom/google/android/gms/ads/internal/zza;->zzc:Lz5/x60;

    if-lez v3, :cond_163

    invoke-static {}, Lz5/a60;->I()I

    move-result v3

    iget v4, v10, Lz5/g60;->g:I

    if-ge v3, v4, :cond_153

    new-instance v3, Lz5/m70;

    invoke-direct {v3, v2, v10}, Lz5/m70;-><init>(Lz5/h60;Lz5/g60;)V

    goto :goto_168

    :cond_153
    iget v4, v10, Lz5/g60;->b:I

    if-ge v3, v4, :cond_15d

    new-instance v3, Lz5/l70;

    invoke-direct {v3, v2, v10}, Lz5/l70;-><init>(Lz5/h60;Lz5/g60;)V

    goto :goto_168

    :cond_15d
    new-instance v3, Lz5/j70;

    invoke-direct {v3, v2}, Lz5/j70;-><init>(Lz5/h60;)V

    goto :goto_168

    :cond_163
    new-instance v3, Lz5/i70;

    invoke-direct {v3, v2}, Lz5/i70;-><init>(Lz5/h60;)V

    :goto_168
    new-instance v4, Lz5/a70;

    invoke-direct {v4, v2, v3, v6, v12}, Lz5/a70;-><init>(Lz5/h60;Lcom/google/android/gms/internal/ads/e2;Ljava/lang/String;[Ljava/lang/String;)V

    invoke-virtual {v4}, Lz5/a70;->zzc()Lz5/fc1;

    goto :goto_179

    :cond_171
    invoke-virtual {v5, v2}, Lz5/b70;->c(Lz5/h60;)Lz5/a70;

    move-result-object v2

    if-eqz v2, :cond_1b6

    iget-object v3, v2, Lz5/a70;->b:Lcom/google/android/gms/internal/ads/e2;

    :goto_179
    const-string v2, "minBufferMs"

    invoke-static {v1, v2}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v2

    if-eqz v2, :cond_188

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

    move-result v2

    invoke-virtual {v3, v2}, Lcom/google/android/gms/internal/ads/e2;->j(I)V

    :cond_188
    const-string v2, "maxBufferMs"

    invoke-static {v1, v2}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v2

    if-eqz v2, :cond_197

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

    move-result v2

    invoke-virtual {v3, v2}, Lcom/google/android/gms/internal/ads/e2;->i(I)V

    :cond_197
    const-string v2, "bufferForPlaybackMs"

    invoke-static {v1, v2}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v2

    if-eqz v2, :cond_1a6

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

    move-result v2

    invoke-virtual {v3, v2}, Lcom/google/android/gms/internal/ads/e2;->k(I)V

    :cond_1a6
    const-string v2, "bufferForPlaybackAfterRebufferMs"

    invoke-static {v1, v2}, Lz5/au;->b(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v1

    if-eqz v1, :cond_1bb

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

    move-result v1

    invoke-virtual {v3, v1}, Lcom/google/android/gms/internal/ads/e2;->l(I)V

    goto :goto_1bb

    :cond_1b6
    const-string v1, "Precache must specify a source."

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

    :cond_1bb
    :goto_1bb
    return-void

    :pswitch_data_1bc
    .packed-switch 0x0
        :pswitch_c
    .end packed-switch
.end method
