package o;

import java.io.Closeable;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Wx, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0594Wx extends AbstractC3081zG {
    public final SV l;
    public final AbstractC1628jy m;
    public final String n;

    /* renamed from: o, reason: collision with root package name */
    public final Closeable f404o;
    public boolean p;
    public C1822m00 q;

    public C0594Wx(SV sv, AbstractC1628jy abstractC1628jy, String str, Closeable closeable) {
        this.l = sv;
        this.m = abstractC1628jy;
        this.n = str;
        this.f404o = closeable;
    }

    @Override // o.AbstractC3081zG, java.io.Closeable, java.lang.AutoCloseable
    public final synchronized void close() {
        try {
            this.p = true;
            C1822m00 c1822m00 = this.q;
            if (c1822m00 != null) {
                AbstractC1345h.a(c1822m00);
            }
            Closeable closeable = this.f404o;
            if (closeable != null) {
                AbstractC1345h.a(closeable);
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    @Override // o.AbstractC3081zG
    public final C80 d() {
        return null;
    }

    @Override // o.AbstractC3081zG
    public final synchronized InterfaceC1687kf f() {
        if (this.p) {
            throw new IllegalStateException("closed");
        }
        C1822m00 c1822m00 = this.q;
        if (c1822m00 != null) {
            return c1822m00;
        }
        C1822m00 c1822m002 = new C1822m00(this.m.k(this.l));
        this.q = c1822m002;
        return c1822m002;
    }
}
