package o;

import java.io.File;
import java.io.IOException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.zQ, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C3091zQ implements InterfaceC1754lI {
    public final InterfaceC2747vn a;
    public final File b;
    public final C0927ch c;
    public final String d;
    public final String e;
    public final String f;
    public final C2427sR g;
    public final C1014dc0 h;
    public final C1014dc0 i;

    public C3091zQ(InterfaceC2747vn interfaceC2747vn, File file) {
        this.a = interfaceC2747vn;
        this.b = file;
        Object obj = CQ.b;
        this.c = new C0927ch(new C2484t(file, (InterfaceC0220Im) null, 14), C0281Kv.l, -2, 1);
        this.d = ".lock";
        this.e = ".version";
        this.f = "fcntl failed: EAGAIN";
        this.g = C1884mi0.d();
        this.h = new C1014dc0(new C2806wQ(this, 1));
        this.i = new C1014dc0(new C2806wQ(this, 0));
    }

    public static final void f(C3091zQ c3091zQ, File file) {
        File parentFile = file.getCanonicalFile().getParentFile();
        if (parentFile != null) {
            parentFile.mkdirs();
            if (!parentFile.isDirectory()) {
                throw new IOException("Unable to create parent directories of " + file);
            }
        }
        if (file.exists()) {
            return;
        }
        file.createNewFile();
    }

    /* JADX WARN: Finally extract failed */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:40:0x00b4  */
    /* JADX WARN: Removed duplicated region for block: B:42:0x00ba A[Catch: all -> 0x00be, TRY_ENTER, TRY_LEAVE, TryCatch #7 {all -> 0x00be, blocks: (B:42:0x00ba, B:56:0x00d9, B:57:0x00dc), top: B:78:0x0022, outer: #1 }] */
    /* JADX WARN: Removed duplicated region for block: B:56:0x00d9 A[Catch: all -> 0x00be, TRY_ENTER, TryCatch #7 {all -> 0x00be, blocks: (B:42:0x00ba, B:56:0x00d9, B:57:0x00dc), top: B:78:0x0022, outer: #1 }] */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX WARN: Type inference failed for: r1v0, types: [int, java.io.Closeable] */
    /* JADX WARN: Type inference failed for: r1v10, types: [java.io.Closeable] */
    /* JADX WARN: Type inference failed for: r1v8, types: [java.io.Closeable] */
    @Override // o.InterfaceC1754lI
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object a(o.OC r9, o.AbstractC0298Lm r10) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 234
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C3091zQ.a(o.OC, o.Lm):java.lang.Object");
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:31:0x006f  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x00de A[Catch: all -> 0x00e2, TRY_ENTER, TRY_LEAVE, TryCatch #1 {all -> 0x00e2, blocks: (B:60:0x00de, B:72:0x00f9, B:73:0x00fc), top: B:85:0x0025 }] */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00ec  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x00f9 A[Catch: all -> 0x00e2, TRY_ENTER, TryCatch #1 {all -> 0x00e2, blocks: (B:60:0x00de, B:72:0x00f9, B:73:0x00fc), top: B:85:0x0025 }] */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0019  */
    /* JADX WARN: Removed duplicated region for block: B:81:0x0108  */
    /* JADX WARN: Type inference failed for: r2v0, types: [o.SC] */
    /* JADX WARN: Type inference failed for: r2v2 */
    /* JADX WARN: Type inference failed for: r2v3 */
    /* JADX WARN: Type inference failed for: r2v4 */
    /* JADX WARN: Type inference failed for: r3v17 */
    /* JADX WARN: Type inference failed for: r3v18 */
    /* JADX WARN: Type inference failed for: r3v2, types: [java.lang.Object, o.yQ] */
    /* JADX WARN: Type inference failed for: r3v4 */
    /* JADX WARN: Type inference failed for: r3v5, types: [o.sR] */
    /* JADX WARN: Type inference failed for: r3v6 */
    @Override // o.InterfaceC1754lI
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object b(o.SC r19, o.AbstractC0298Lm r20) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 268
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C3091zQ.b(o.SC, o.Lm):java.lang.Object");
    }

    @Override // o.InterfaceC1754lI
    public final InterfaceC2104oz c() {
        return this.c;
    }

    @Override // o.InterfaceC1754lI
    public final Object d(AbstractC0298Lm abstractC0298Lm) {
        C1014dc0 c1014dc0 = this.i;
        if (c1014dc0.a()) {
            return new Integer(C0980d80.b.nativeGetCounterValue(((C0980d80) c1014dc0.getValue()).a));
        }
        return AbstractC1692kh0.T(this.a, new C2711vQ(this, null, 0), abstractC0298Lm);
    }

    @Override // o.InterfaceC1754lI
    public final Object e(C0015Ap c0015Ap) {
        C1014dc0 c1014dc0 = this.i;
        if (c1014dc0.a()) {
            return new Integer(C0980d80.b.nativeIncrementAndGetCounterValue(((C0980d80) c1014dc0.getValue()).a));
        }
        return AbstractC1692kh0.T(this.a, new C2711vQ(this, null, 1), c0015Ap);
    }
}
