package t2;

import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.n1;
import com.google.common.collect.z0;
import java.util.regex.Pattern;

/* JADX INFO: loaded from: classes.dex */
public final class b {

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

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

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

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

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

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

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

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

    public b(int i10, int i11, int i12) {
        this.f32802a = i10;
        this.f32803b = i11;
        this.f32804c = i12;
    }

    /* JADX WARN: Removed duplicated region for block: B:24:0x005f  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x00fd  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x011b  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x0123  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x0126  */
    @Nullable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static b parse(@Nullable String str) {
        byte b10;
        int i10;
        int iHashCode;
        if (str == null) {
            return null;
        }
        String strQ = com.google.common.base.h.q(str.trim());
        if (strQ.isEmpty()) {
            return null;
        }
        ImmutableSet immutableSetP = ImmutableSet.p(TextUtils.split(strQ, f32797d));
        String str2 = (String) z0.m(z0.r(f32801h, immutableSetP), "outside");
        int iHashCode2 = str2.hashCode();
        byte b11 = 0;
        int i11 = -1;
        if (iHashCode2 != -1392885889) {
            if (iHashCode2 != -1106037339) {
                b10 = (iHashCode2 == 92734940 && str2.equals("after")) ? (byte) 0 : (byte) -1;
            } else if (str2.equals("outside")) {
                b10 = 1;
            }
        } else if (str2.equals("before")) {
            b10 = 2;
        }
        int i12 = b10 != 0 ? b10 != 1 ? 1 : -2 : 2;
        n1 n1VarR = z0.r(f32798e, immutableSetP);
        if (!n1VarR.isEmpty()) {
            String str3 = (String) ((com.google.common.collect.b) n1VarR.iterator()).next();
            int iHashCode3 = str3.hashCode();
            if (iHashCode3 == 3005871) {
                str3.equals("auto");
            } else if (iHashCode3 == 3387192 && str3.equals("none")) {
                i11 = 0;
            }
            return new b(i11, 0, i12);
        }
        n1 n1VarR2 = z0.r(f32800g, immutableSetP);
        n1 n1VarR3 = z0.r(f32799f, immutableSetP);
        if (n1VarR2.isEmpty() && n1VarR3.isEmpty()) {
            return new b(-1, 0, i12);
        }
        String str4 = (String) z0.m(n1VarR2, "filled");
        int iHashCode4 = str4.hashCode();
        if (iHashCode4 != -1274499742) {
            if (iHashCode4 == 3417674 && str4.equals("open")) {
                i10 = 2;
            }
            String str5 = (String) z0.m(n1VarR3, "circle");
            iHashCode = str5.hashCode();
            if (iHashCode == -1360216880) {
                if (iHashCode != -905816648) {
                    if (iHashCode != 99657 || !str5.equals("dot")) {
                        b11 = -1;
                    }
                } else if (str5.equals("sesame")) {
                    b11 = 1;
                }
            } else if (str5.equals("circle")) {
                b11 = 2;
            }
            return new b(b11 != 0 ? b11 != 1 ? 1 : 3 : 2, i10, i12);
        }
        str4.equals("filled");
        i10 = 1;
        String str52 = (String) z0.m(n1VarR3, "circle");
        iHashCode = str52.hashCode();
        if (iHashCode == -1360216880) {
        }
        return new b(b11 != 0 ? b11 != 1 ? 1 : 3 : 2, i10, i12);
    }
}
