package o;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.zip.Inflater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.an0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0749an0 extends AbstractC1628jy {
    public static final SV e;
    public final SV b;
    public final AbstractC1628jy c;
    public final LinkedHashMap d;

    static {
        String str = SV.m;
        e = BP.n("/");
    }

    public C0749an0(SV sv, C2704vJ c2704vJ, LinkedHashMap linkedHashMap) {
        this.b = sv;
        this.c = c2704vJ;
        this.d = linkedHashMap;
    }

    @Override // o.AbstractC1628jy
    public final R80 a(SV sv) throws IOException {
        throw new IOException("zip file systems are read-only");
    }

    @Override // o.AbstractC1628jy
    public final void b(SV sv, SV sv2) throws IOException {
        throw new IOException("zip file systems are read-only");
    }

    @Override // o.AbstractC1628jy
    public final void c(SV sv) throws IOException {
        throw new IOException("zip file systems are read-only");
    }

    @Override // o.AbstractC1628jy
    public final void d(SV sv) throws IOException {
        throw new IOException("zip file systems are read-only");
    }

    @Override // o.AbstractC1628jy
    public final List f(SV sv) throws IOException {
        SV sv2 = e;
        sv2.getClass();
        Zm0 zm0 = (Zm0) this.d.get(AbstractC1153f.b(sv2, sv, true));
        if (zm0 != null) {
            return AbstractC3117zi.t0(zm0.h);
        }
        throw new IOException("not a directory: " + sv);
    }

    @Override // o.AbstractC1628jy
    public final C3135zr h(SV sv) throws Throwable {
        C3135zr c3135zrP;
        Throwable th;
        SV sv2 = e;
        sv2.getClass();
        Zm0 zm0 = (Zm0) this.d.get(AbstractC1153f.b(sv2, sv, true));
        Throwable th2 = null;
        if (zm0 == null) {
            return null;
        }
        long j = zm0.g;
        boolean z = zm0.b;
        C3135zr c3135zr = new C3135zr(!z, z, null, z ? null : Long.valueOf(zm0.d), null, zm0.f, null);
        if (j == -1) {
            return c3135zr;
        }
        C2609uJ c2609uJI = this.c.i(this.b);
        try {
            C1822m00 c1822m00 = new C1822m00(c2609uJI.b(j));
            try {
                c3135zrP = C80.P(c1822m00, c3135zr);
                try {
                    c1822m00.close();
                    th = null;
                } catch (Throwable th3) {
                    th = th3;
                }
            } catch (Throwable th4) {
                try {
                    c1822m00.close();
                } catch (Throwable th5) {
                    C80.i(th4, th5);
                }
                th = th4;
                c3135zrP = null;
            }
        } catch (Throwable th6) {
            if (c2609uJI != null) {
                try {
                    c2609uJI.close();
                } catch (Throwable th7) {
                    C80.i(th6, th7);
                }
            }
            c3135zrP = null;
            th2 = th6;
        }
        if (th != null) {
            throw th;
        }
        try {
            c2609uJI.close();
        } catch (Throwable th8) {
            th2 = th8;
        }
        if (th2 == null) {
            return c3135zrP;
        }
        throw th2;
    }

    @Override // o.AbstractC1628jy
    public final C2609uJ i(SV sv) {
        throw new UnsupportedOperationException("not implemented yet!");
    }

    @Override // o.AbstractC1628jy
    public final R80 j(SV sv) throws IOException {
        throw new IOException("zip file systems are read-only");
    }

    @Override // o.AbstractC1628jy
    public final T90 k(SV sv) throws Throwable {
        C1822m00 c1822m00;
        Throwable th;
        SV sv2 = e;
        sv2.getClass();
        Zm0 zm0 = (Zm0) this.d.get(AbstractC1153f.b(sv2, sv, true));
        if (zm0 == null) {
            throw new FileNotFoundException("no such file: " + sv);
        }
        long j = zm0.d;
        C2609uJ c2609uJI = this.c.i(this.b);
        try {
            c1822m00 = new C1822m00(c2609uJI.b(zm0.g));
            try {
                c2609uJI.close();
                th = null;
            } catch (Throwable th2) {
                th = th2;
            }
        } catch (Throwable th3) {
            if (c2609uJI != null) {
                try {
                    c2609uJI.close();
                } catch (Throwable th4) {
                    C80.i(th3, th4);
                }
            }
            c1822m00 = null;
            th = th3;
        }
        if (th != null) {
            throw th;
        }
        C80.P(c1822m00, null);
        if (zm0.e == 0) {
            return new C0770az(c1822m00, j, true);
        }
        return new C0770az(new C1658kH(new C1822m00(new C0770az(c1822m00, zm0.c, true)), new Inflater(true)), j, false);
    }
}
