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

import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable$Field;

/* JADX INFO: loaded from: classes2.dex */
public final class kq extends f8.a {
    public static final Parcelable.Creator<kq> CREATOR = new wk(2);

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

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final int f13373e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final boolean f13374f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final int f13375g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final int f13376h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final boolean f13377i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final int f13378j;

    @Nullable
    @SafeParcelable$Field(id = 6)
    public final n7.u3 zzf;

    public kq(int i10, boolean z10, int i11, boolean z11, int i12, n7.u3 u3Var, boolean z12, int i13, int i14, boolean z13, int i15) {
        this.f13369a = i10;
        this.f13370b = z10;
        this.f13371c = i11;
        this.f13372d = z11;
        this.f13373e = i12;
        this.zzf = u3Var;
        this.f13374f = z12;
        this.f13375g = i13;
        this.f13377i = z13;
        this.f13376h = i14;
        this.f13378j = i15;
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x002e  */
    @NonNull
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static com.google.android.gms.ads.nativead.d zza(@Nullable kq kqVar) {
        com.google.android.gms.ads.nativead.c cVar = new com.google.android.gms.ads.nativead.c();
        if (kqVar == null) {
            return new com.google.android.gms.ads.nativead.d(cVar);
        }
        int i10 = 2;
        int i11 = kqVar.f13369a;
        if (i11 == 2) {
            cVar.f7975e = kqVar.f13373e;
        } else {
            if (i11 != 3) {
                if (i11 == 4) {
                    cVar.f7976f = kqVar.f13374f;
                    cVar.f7972b = kqVar.f13375g;
                    cVar.f7977g = kqVar.f13377i;
                    cVar.f7978h = kqVar.f13376h;
                    int i12 = kqVar.f13378j;
                    if (i12 != 0) {
                        if (i12 == 2) {
                            i10 = 3;
                        } else if (i12 != 1) {
                            i10 = 1;
                        }
                        cVar.f7979i = i10;
                    }
                }
            }
            n7.u3 u3Var = kqVar.zzf;
            if (u3Var != null) {
                cVar.f7974d = new g7.y(u3Var);
            }
            cVar.f7975e = kqVar.f13373e;
        }
        cVar.f7971a = kqVar.f13370b;
        cVar.f7973c = kqVar.f13372d;
        return new com.google.android.gms.ads.nativead.d(cVar);
    }

    @Override // android.os.Parcelable
    public final void writeToParcel(Parcel parcel, int i10) {
        int I = com.bumptech.glide.g.I(20293, parcel);
        com.bumptech.glide.g.C(parcel, 1, 4);
        parcel.writeInt(this.f13369a);
        com.bumptech.glide.g.C(parcel, 2, 4);
        parcel.writeInt(this.f13370b ? 1 : 0);
        com.bumptech.glide.g.C(parcel, 3, 4);
        parcel.writeInt(this.f13371c);
        com.bumptech.glide.g.C(parcel, 4, 4);
        parcel.writeInt(this.f13372d ? 1 : 0);
        com.bumptech.glide.g.C(parcel, 5, 4);
        parcel.writeInt(this.f13373e);
        com.bumptech.glide.g.q(parcel, 6, this.zzf, i10);
        com.bumptech.glide.g.C(parcel, 7, 4);
        parcel.writeInt(this.f13374f ? 1 : 0);
        com.bumptech.glide.g.C(parcel, 8, 4);
        parcel.writeInt(this.f13375g);
        com.bumptech.glide.g.C(parcel, 9, 4);
        parcel.writeInt(this.f13376h);
        com.bumptech.glide.g.C(parcel, 10, 4);
        parcel.writeInt(this.f13377i ? 1 : 0);
        com.bumptech.glide.g.C(parcel, 11, 4);
        parcel.writeInt(this.f13378j);
        com.bumptech.glide.g.N(I, parcel);
    }

    public kq(j7.c cVar) {
        this(4, cVar.f28712a, cVar.f28713b, cVar.f28715d, cVar.f28716e, cVar.getVideoOptions() != null ? new n7.u3(cVar.getVideoOptions()) : null, cVar.f28718g, cVar.f28714c, 0, false, 0);
    }
}
