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

import android.text.TextUtils;
import androidx.annotation.Nullable;
import java.util.Collections;
import java.util.Set;

/* JADX INFO: loaded from: classes2.dex */
public final class q9 {

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

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

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public float f15635m;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public String f15623a = "";

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public String f15624b = "";

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Set f15625c = Collections.emptySet();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public String f15626d = "";

    @Nullable
    private String zze = null;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f15628f = false;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public boolean f15630h = false;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public int f15631i = -1;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public int f15632j = -1;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public int f15633k = -1;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public int f15634l = -1;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public int f15636n = -1;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public boolean f15637o = false;

    private static int zzA(int i10, String str, @Nullable String str2, int i11) {
        if (str.isEmpty() || i10 == -1) {
            return i10;
        }
        if (str.equals(str2)) {
            return i10 + i11;
        }
        return -1;
    }

    public final int zze(@Nullable String str, @Nullable String str2, Set set, @Nullable String str3) {
        if (this.f15623a.isEmpty() && this.f15624b.isEmpty() && this.f15625c.isEmpty() && this.f15626d.isEmpty()) {
            return TextUtils.isEmpty(str2) ? 1 : 0;
        }
        int iZzA = zzA(zzA(zzA(0, this.f15623a, str, 1073741824), this.f15624b, str2, 2), this.f15626d, str3, 4);
        if (iZzA == -1 || !set.containsAll(this.f15625c)) {
            return 0;
        }
        return (this.f15625c.size() * 4) + iZzA;
    }

    @Nullable
    public final String zzk() {
        return this.zze;
    }

    public final q9 zzl(@Nullable String str) {
        this.zze = ih1.r(str);
        return this;
    }
}
