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

import androidx.annotation.Nullable;
import java.io.IOException;
import java.util.Objects;

/* JADX INFO: loaded from: classes2.dex */
public final class lo2 implements ip2, bn2 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Object f13819a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public hp2 f13820b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public an2 f13821c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ no2 f13822d;

    public lo2(no2 no2Var, Integer num) {
        this.f13822d = no2Var;
        this.f13820b = no2Var.zzf(null);
        this.f13821c = no2Var.zzh(null);
        this.f13819a = num;
    }

    private final boolean zzf(int i10, @Nullable cp2 cp2Var) {
        cp2 cp2VarZzx;
        Object obj = this.f13819a;
        no2 no2Var = this.f13822d;
        if (cp2Var != null) {
            cp2VarZzx = no2Var.zzx(obj, cp2Var);
            if (cp2VarZzx == null) {
                return false;
            }
        } else {
            cp2VarZzx = null;
        }
        no2Var.q(obj);
        hp2 hp2Var = this.f13820b;
        hp2Var.getClass();
        if (!Objects.equals(hp2Var.zzb, cp2VarZzx)) {
            this.f13820b = no2Var.zzg(0, cp2VarZzx);
        }
        an2 an2Var = this.f13821c;
        an2Var.getClass();
        if (Objects.equals(an2Var.zzb, cp2VarZzx)) {
            return true;
        }
        this.f13821c = no2Var.zzi(0, cp2VarZzx);
        return true;
    }

    private final yo2 zzg(yo2 yo2Var, @Nullable cp2 cp2Var) {
        long j10 = yo2Var.f18921b;
        no2 no2Var = this.f13822d;
        Object obj = this.f13819a;
        no2Var.zzy(obj, j10, cp2Var);
        no2Var.zzy(obj, yo2Var.f18922c, cp2Var);
        return yo2Var;
    }

    @Override // com.google.android.gms.internal.ads.ip2
    public final void zzai(int i10, @Nullable cp2 cp2Var, to2 to2Var, yo2 yo2Var, int i11) {
        if (zzf(0, cp2Var)) {
            hp2 hp2Var = this.f13820b;
            zzg(yo2Var, cp2Var);
            hp2Var.getClass();
            hp2Var.a(new androidx.browser.trusted.k(hp2Var, to2Var, yo2Var, i11));
        }
    }

    @Override // com.google.android.gms.internal.ads.ip2
    public final void zzaj(int i10, @Nullable cp2 cp2Var, to2 to2Var, yo2 yo2Var) {
        if (zzf(0, cp2Var)) {
            hp2 hp2Var = this.f13820b;
            zzg(yo2Var, cp2Var);
            hp2Var.getClass();
            hp2Var.a(new gp2(hp2Var, to2Var, yo2Var, 0));
        }
    }

    @Override // com.google.android.gms.internal.ads.ip2
    public final void zzak(int i10, @Nullable cp2 cp2Var, to2 to2Var, yo2 yo2Var) {
        if (zzf(0, cp2Var)) {
            hp2 hp2Var = this.f13820b;
            zzg(yo2Var, cp2Var);
            hp2Var.getClass();
            hp2Var.a(new gp2(hp2Var, to2Var, yo2Var, 1));
        }
    }

    @Override // com.google.android.gms.internal.ads.ip2
    public final void zzal(int i10, @Nullable cp2 cp2Var, to2 to2Var, yo2 yo2Var, IOException iOException, boolean z10) {
        if (zzf(0, cp2Var)) {
            hp2 hp2Var = this.f13820b;
            zzg(yo2Var, cp2Var);
            hp2Var.getClass();
            hp2Var.a(new n5.r(hp2Var, to2Var, yo2Var, iOException, z10, 5));
        }
    }

    @Override // com.google.android.gms.internal.ads.ip2
    public final void zzam(int i10, @Nullable cp2 cp2Var, yo2 yo2Var) {
        if (zzf(0, cp2Var)) {
            hp2 hp2Var = this.f13820b;
            zzg(yo2Var, cp2Var);
            hp2Var.getClass();
            hp2Var.a(new uz0(hp2Var, yo2Var, 25));
        }
    }
}
