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

import android.text.TextUtils;
import androidx.annotation.Nullable;
import java.util.regex.Pattern;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final Pattern f11114d = Pattern.compile("\\s+");

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final zzgup f11115e = zzgup.t(2, "auto", "none");

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final zzgup f11116f = zzgup.t(3, "dot", "sesame", "circle");

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final zzgup f11117g = zzgup.t(2, "filled", "open");

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final zzgup f11118h = zzgup.t(3, "after", "before", "outside");

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

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

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

    public f9(int i10, int i11, int i12) {
        this.f11119a = i10;
        this.f11120b = i11;
        this.f11121c = i12;
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x004e  */
    @Nullable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static f9 zza(@Nullable String str) {
        byte b10;
        if (str == null) {
            return null;
        }
        String strR = ih1.r(str.trim());
        if (strR.isEmpty()) {
            return null;
        }
        zzgup zzgupVarQ = zzgup.q(TextUtils.split(strR, f11114d));
        String str2 = (String) ih1.X(ih1.j(f11118h, zzgupVarQ), "outside");
        int iHashCode = str2.hashCode();
        int i10 = -1;
        int i11 = 0;
        if (iHashCode != -1106037339) {
            b10 = (iHashCode == 92734940 && str2.equals("after")) ? (byte) 0 : (byte) -1;
        } else if (str2.equals("outside")) {
            b10 = 1;
        }
        int i12 = b10 != 0 ? b10 != 1 ? 1 : -2 : 2;
        ws1 ws1VarJ = ih1.j(f11115e, zzgupVarQ);
        if (ws1VarJ.isEmpty()) {
            ws1 ws1VarJ2 = ih1.j(f11117g, zzgupVarQ);
            ws1 ws1VarJ3 = ih1.j(f11116f, zzgupVarQ);
            if (!ws1VarJ2.isEmpty() || !ws1VarJ3.isEmpty()) {
                String str3 = (String) ih1.X(ws1VarJ2, "filled");
                i11 = (str3.hashCode() == 3417674 && str3.equals("open")) ? 2 : 1;
                String str4 = (String) ih1.X(ws1VarJ3, "circle");
                str4.getClass();
                i10 = !str4.equals("dot") ? !str4.equals("sesame") ? 1 : 3 : 2;
            }
        } else {
            String str5 = (String) new vs1(ws1VarJ, ws1VarJ.f18209a, ws1VarJ.f18210b).next();
            if (str5.hashCode() == 3387192 && str5.equals("none")) {
                i10 = 0;
            }
        }
        return new f9(i10, i11, i12);
    }
}
