.class public abstract Lz5/vk;
.super Ljava/lang/Object;
.source ""


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


# static fields
.field public static final a:Lz5/zl;


# direct methods
.method public static constructor <clinit>()V
    .registers 4

    const/4 v0, 0x0

    :try_start_1
    const-class v1, Lz5/uk;

    invoke-virtual {v1}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v1

    const-string v2, "com.google.android.gms.ads.internal.ClientApi"

    invoke-virtual {v1, v2}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    const/4 v2, 0x0

    new-array v3, v2, [Ljava/lang/Class;

    invoke-virtual {v1, v3}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;

    move-result-object v1

    new-array v2, v2, [Ljava/lang/Object;

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    instance-of v2, v1, Landroid/os/IBinder;

    if-nez v2, :cond_24

    const-string v1, "ClientApi class is not an instance of IBinder."

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

    goto :goto_42

    :cond_24
    check-cast v1, Landroid/os/IBinder;

    if-nez v1, :cond_29

    goto :goto_42

    :cond_29
    const-string v2, "com.google.android.gms.ads.internal.client.IClientApi"

    invoke-interface {v1, v2}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;

    move-result-object v2

    instance-of v3, v2, Lz5/zl;

    if-eqz v3, :cond_37

    check-cast v2, Lz5/zl;

    :goto_35
    move-object v0, v2

    goto :goto_42

    :cond_37
    new-instance v2, Lz5/xl;

    invoke-direct {v2, v1}, Lz5/xl;-><init>(Landroid/os/IBinder;)V
    :try_end_3c
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_3c} :catch_3d

    goto :goto_35

    :catch_3d
    const-string v1, "Failed to instantiate ClientApi class."

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

    :goto_42
    sput-object v0, Lz5/vk;->a:Lz5/zl;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method


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

.method public abstract b()Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TT;"
        }
    .end annotation
.end method

.method public abstract c(Lz5/zl;)Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lz5/zl;",
            ")TT;"
        }
    .end annotation
.end method

.method public final d(Landroid/content/Context;Z)Ljava/lang/Object;
    .registers 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Z)TT;"
        }
    .end annotation

    const/4 v0, 0x1

    if-nez p2, :cond_16

    .line 1
    sget-object v1, Lz5/wk;->f:Lz5/wk;

    iget-object v1, v1, Lz5/wk;->a:Lz5/z40;

    const v1, 0xbdfcb8

    .line 2
    invoke-static {p1, v1}, Lz5/z40;->h(Landroid/content/Context;I)Z

    move-result v1

    if-nez v1, :cond_16

    const-string p2, "Google Play Services is not available."

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

    move p2, v0

    :cond_16
    const-string v1, "com.google.android.gms.ads.dynamite"

    invoke-static {p1, v1}, Lcom/google/android/gms/dynamite/DynamiteModule;->a(Landroid/content/Context;Ljava/lang/String;)I

    move-result v2

    invoke-static {p1, v1}, Lcom/google/android/gms/dynamite/DynamiteModule;->b(Landroid/content/Context;Ljava/lang/String;)I

    move-result v1

    const/4 v3, 0x0

    if-le v2, v1, :cond_25

    move v1, v3

    goto :goto_26

    :cond_25
    move v1, v0

    :goto_26
    xor-int/2addr v1, v0

    or-int/2addr p2, v1

    invoke-static {p1}, Lz5/so;->a(Landroid/content/Context;)V

    sget-object v1, Lz5/op;->a:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/ads/k;->l()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_3b

    move p2, v3

    goto :goto_4f

    :cond_3b
    sget-object v1, Lz5/op;->b:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {v1}, Lcom/google/android/gms/internal/ads/k;->l()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_4c

    move p2, v0

    move v3, p2

    goto :goto_4f

    :cond_4c
    move v5, v3

    move v3, p2

    move p2, v5

    :goto_4f
    const/4 v1, 0x0

    const-string v2, "Cannot invoke remote loader."

    if-eqz v3, :cond_66

    invoke-virtual {p0}, Lz5/vk;->e()Ljava/lang/Object;

    move-result-object p1

    if-nez p1, :cond_b4

    if-nez p2, :cond_b4

    .line 3
    :try_start_5c
    invoke-virtual {p0}, Lz5/vk;->b()Ljava/lang/Object;

    move-result-object v1
    :try_end_60
    .catch Landroid/os/RemoteException; {:try_start_5c .. :try_end_60} :catch_61

    goto :goto_b3

    :catch_61
    move-exception p1

    invoke-static {v2, p1}, Lz5/d50;->zzj(Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_b3

    :cond_66
    :try_start_66
    invoke-virtual {p0}, Lz5/vk;->b()Ljava/lang/Object;

    move-result-object v1
    :try_end_6a
    .catch Landroid/os/RemoteException; {:try_start_66 .. :try_end_6a} :catch_6b

    goto :goto_6f

    :catch_6b
    move-exception p2

    invoke-static {v2, p2}, Lz5/d50;->zzj(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_6f
    if-nez v1, :cond_ac

    .line 4
    sget-object p2, Lz5/aq;->a:Lcom/google/android/gms/internal/ads/k;

    invoke-virtual {p2}, Lcom/google/android/gms/internal/ads/k;->l()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Ljava/lang/Long;

    invoke-virtual {p2}, Ljava/lang/Long;->intValue()I

    move-result p2

    .line 5
    sget-object v2, Lz5/wk;->f:Lz5/wk;

    iget-object v3, v2, Lz5/wk;->e:Ljava/util/Random;

    .line 6
    invoke-virtual {v3, p2}, Ljava/util/Random;->nextInt(I)I

    move-result p2

    if-nez p2, :cond_ac

    new-instance p2, Landroid/os/Bundle;

    invoke-direct {p2}, Landroid/os/Bundle;-><init>()V

    const-string v3, "action"

    const-string v4, "dynamite_load"

    invoke-virtual {p2, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string v3, "is_missing"

    invoke-virtual {p2, v3, v0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 7
    iget-object v0, v2, Lz5/wk;->a:Lz5/z40;

    .line 8
    iget-object v2, v2, Lz5/wk;->d:Lz5/g50;

    .line 9
    iget-object v2, v2, Lz5/g50;->r:Ljava/lang/String;

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

    .line 10
    new-instance v0, Lz5/y90;

    const/4 v3, 0x2

    invoke-direct {v0, v3}, Lz5/y90;-><init>(I)V

    const-string v3, "gmob-apps"

    invoke-static {p1, v2, v3, p2, v0}, Lz5/z40;->l(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;Lz5/y40;)V

    :cond_ac
    if-nez v1, :cond_b3

    .line 11
    invoke-virtual {p0}, Lz5/vk;->e()Ljava/lang/Object;

    move-result-object p1

    goto :goto_b4

    :cond_b3
    :goto_b3
    move-object p1, v1

    :cond_b4
    :goto_b4
    if-nez p1, :cond_ba

    invoke-virtual {p0}, Lz5/vk;->a()Ljava/lang/Object;

    move-result-object p1

    :cond_ba
    return-object p1
.end method

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

    sget-object v0, Lz5/vk;->a:Lz5/zl;

    const/4 v1, 0x0

    if-nez v0, :cond_b

    const-string v0, "ClientApi class cannot be loaded."

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

    return-object v1

    :cond_b
    :try_start_b
    invoke-virtual {p0, v0}, Lz5/vk;->c(Lz5/zl;)Ljava/lang/Object;

    move-result-object v0
    :try_end_f
    .catch Landroid/os/RemoteException; {:try_start_b .. :try_end_f} :catch_10

    return-object v0

    :catch_10
    move-exception v0

    const-string v2, "Cannot invoke local loader using ClientApi class."

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

    return-object v1
.end method
