package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.f, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1153f {
    public static final C0135Ff a;
    public static final C0135Ff b;
    public static final C0135Ff c;
    public static final C0135Ff d;
    public static final C0135Ff e;

    static {
        C0135Ff c0135Ff = new C0135Ff("/".getBytes(AbstractC2355rh.a));
        c0135Ff.n = "/";
        a = c0135Ff;
        C0135Ff c0135Ff2 = new C0135Ff("\\".getBytes(AbstractC2355rh.a));
        c0135Ff2.n = "\\";
        b = c0135Ff2;
        C0135Ff c0135Ff3 = new C0135Ff("/\\".getBytes(AbstractC2355rh.a));
        c0135Ff3.n = "/\\";
        c = c0135Ff3;
        C0135Ff c0135Ff4 = new C0135Ff(".".getBytes(AbstractC2355rh.a));
        c0135Ff4.n = ".";
        d = c0135Ff4;
        C0135Ff c0135Ff5 = new C0135Ff("..".getBytes(AbstractC2355rh.a));
        c0135Ff5.n = "..";
        e = c0135Ff5;
    }

    public static final int a(SV sv) {
        C0135Ff c0135Ff = sv.l;
        if (c0135Ff.b() != 0) {
            if (c0135Ff.g(0) != 47) {
                if (c0135Ff.g(0) == 92) {
                    if (c0135Ff.b() > 2 && c0135Ff.g(1) == 92) {
                        int iD = c0135Ff.d(2, b.f());
                        return iD == -1 ? c0135Ff.b() : iD;
                    }
                } else if (c0135Ff.b() > 2 && c0135Ff.g(1) == 58 && c0135Ff.g(2) == 92) {
                    char cG = (char) c0135Ff.g(0);
                    if ('a' <= cG && cG < '{') {
                        return 3;
                    }
                    if ('A' <= cG && cG < '[') {
                        return 3;
                    }
                }
            }
            return 1;
        }
        return -1;
    }

    public static final SV b(SV sv, SV sv2, boolean z) {
        if (a(sv2) != -1 || sv2.e() != null) {
            return sv2;
        }
        C0135Ff c0135FfC = c(sv);
        if (c0135FfC == null && (c0135FfC = c(sv2)) == null) {
            c0135FfC = f(SV.m);
        }
        C0732af c0732af = new C0732af();
        c0732af.D(sv.l);
        if (c0732af.m > 0) {
            c0732af.D(c0135FfC);
        }
        c0732af.D(sv2.l);
        return d(c0732af, z);
    }

    public static final C0135Ff c(SV sv) {
        C0135Ff c0135Ff = sv.l;
        C0135Ff c0135Ff2 = a;
        if (C0135Ff.e(c0135Ff, c0135Ff2) != -1) {
            return c0135Ff2;
        }
        C0135Ff c0135Ff3 = sv.l;
        C0135Ff c0135Ff4 = b;
        if (C0135Ff.e(c0135Ff3, c0135Ff4) != -1) {
            return c0135Ff4;
        }
        return null;
    }

    /* JADX WARN: Removed duplicated region for block: B:101:0x0119 A[EDGE_INSN: B:101:0x0119->B:84:0x0119 BREAK  A[LOOP:1: B:53:0x00a9->B:116:0x00a9], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:50:0x00a1  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00a3  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x00b1  */
    /* JADX WARN: Removed duplicated region for block: B:86:0x0120  */
    /* JADX WARN: Removed duplicated region for block: B:91:0x0137  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final o.SV d(o.C0732af r17, boolean r18) throws java.io.EOFException {
        /*
            Method dump skipped, instructions count: 340
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.AbstractC1153f.d(o.af, boolean):o.SV");
    }

    public static final C0135Ff e(byte b2) {
        if (b2 == 47) {
            return a;
        }
        if (b2 == 92) {
            return b;
        }
        throw new IllegalArgumentException(AbstractC0126Ew.j(b2, "not a directory separator: "));
    }

    public static final C0135Ff f(String str) {
        if (F3.c(str, "/")) {
            return a;
        }
        if (F3.c(str, "\\")) {
            return b;
        }
        throw new IllegalArgumentException(AbstractC2462sn.u("not a directory separator: ", str));
    }
}
