package com.google.android.gms.internal.ads;

import android.content.Context;
import java.util.concurrent.Executor;

/* JADX INFO: loaded from: classes2.dex */
public final class yy0 implements ax0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f19010a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Context f19011b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Executor f19012c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final wp0 f19013d;

    public /* synthetic */ yy0(Context context, Executor executor, wp0 wp0Var, int i10) {
        this.f19010a = i10;
        this.f19011b = context;
        this.f19012c = executor;
        this.f19013d = wp0Var;
    }

    public static final void c(eb1 eb1Var, wa1 wa1Var, yw0 yw0Var) {
        zzfjr zzfjrVar;
        try {
            qb1 qb1Var = (qb1) yw0Var.f18990b;
            n7.a4 a4Var = ((ib1) eb1Var.f10745a.f10402b).f12452a;
            String string = wa1Var.f18009t.toString();
            qb1Var.getClass();
            try {
                qb1Var.f15686a.a1(string, a4Var);
            } finally {
            }
        } catch (Exception unused) {
            "Fail to load ad from adapter ".concat(String.valueOf(yw0Var.f18989a));
        }
    }

    @Override // com.google.android.gms.internal.ads.ax0
    public final void a(eb1 eb1Var, wa1 wa1Var, yw0 yw0Var) throws zzfjr {
        zzfjr zzfjrVar;
        switch (this.f19010a) {
            case 0:
                try {
                    ib1 ib1Var = (ib1) eb1Var.f10745a.f10402b;
                    int i10 = ib1Var.f12462k.f30185b;
                    Context context = this.f19011b;
                    n7.a4 a4Var = ib1Var.f12452a;
                    if (i10 == 3) {
                        qb1 qb1Var = (qb1) yw0Var.f18990b;
                        String string = wa1Var.f18009t.toString();
                        cw cwVar = (cw) yw0Var.f18991c;
                        qb1Var.getClass();
                        try {
                            qb1Var.f15686a.b2(new k8.b(context), a4Var, string, cwVar);
                            return;
                        } finally {
                        }
                    }
                    qb1 qb1Var2 = (qb1) yw0Var.f18990b;
                    String string2 = wa1Var.f18009t.toString();
                    cw cwVar2 = (cw) yw0Var.f18991c;
                    qb1Var2.getClass();
                    try {
                        qb1Var2.f15686a.P0(new k8.b(context), a4Var, string2, cwVar2);
                        return;
                    } finally {
                    }
                } catch (Exception unused) {
                    "Fail to load ad from adapter ".concat(String.valueOf(yw0Var.f18989a));
                    return;
                }
                "Fail to load ad from adapter ".concat(String.valueOf(yw0Var.f18989a));
                return;
            default:
                qb1 qb1Var3 = (qb1) yw0Var.f18990b;
                if (qb1Var3.b()) {
                    c(eb1Var, wa1Var, yw0Var);
                    return;
                }
                gz0 gz0Var = new gz0(this, eb1Var, wa1Var, yw0Var);
                tf0 tf0Var = yw0Var.f18991c;
                tx0 tx0Var = (tx0) tf0Var;
                synchronized (tx0Var) {
                    tx0Var.f17019c = gz0Var;
                }
                Context context2 = this.f19011b;
                ib1 ib1Var2 = (ib1) eb1Var.f10745a.f10402b;
                String string3 = wa1Var.f18009t.toString();
                qb1Var3.zzk(context2, ib1Var2.f12452a, null, (m00) tf0Var, string3);
                return;
        }
    }

    @Override // com.google.android.gms.internal.ads.ax0
    public final Object b(eb1 eb1Var, wa1 wa1Var, yw0 yw0Var) {
        switch (this.f19010a) {
            case 0:
                vc0 vc0Var = new vc0(eb1Var, wa1Var, yw0Var.f18989a);
                tp0 tp0Var = new tp0(new xy0(this, yw0Var, wa1Var), null);
                t80 t80Var = (t80) this.f19013d;
                r80 r80Var = new r80(t80Var.f16767c, t80Var.f16770d, vc0Var, tp0Var);
                ((kf0) r80Var.f16041f.zzb()).G0(new v90((qb1) yw0Var.f18990b), this.f19012c);
                ((sx0) yw0Var.f18991c).S2((cz0) r80Var.f16039d0.zzb());
                return r80Var.z();
            default:
                vc0 vc0Var2 = new vc0(eb1Var, wa1Var, yw0Var.f18989a);
                tp0 tp0Var2 = new tp0(new hz0(this, yw0Var, wa1Var), null);
                t80 t80Var2 = (t80) this.f19013d;
                r80 r80Var2 = new r80(t80Var2.f16767c, t80Var2.f16770d, vc0Var2, tp0Var2);
                ((kf0) r80Var2.f16041f.zzb()).G0(new v90((qb1) yw0Var.f18990b), this.f19012c);
                rf0 rf0Var = (rf0) r80Var2.f16048m.zzb();
                te0 te0Var = (te0) r80Var2.Q.zzb();
                pg0 pg0Var = (pg0) r80Var2.V.zzb();
                lk0 lk0Var = (lk0) r80Var2.f16035b0.zzb();
                tx0 tx0Var = (tx0) yw0Var.f18991c;
                iz0 iz0Var = new iz0(this, pg0Var, te0Var, rf0Var, lk0Var);
                synchronized (tx0Var) {
                    tx0Var.f17017a = iz0Var;
                }
                return r80Var2.z();
        }
    }
}
