package defpackage;

import com.hierynomus.mssmb2.SMBApiException;
import com.hierynomus.smbj.paths.PathResolveException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.EnumSet;
import java.util.Set;
import java.util.concurrent.ExecutorService;

/* JADX INFO: renamed from: ᵴᵫᵿ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4675 extends AbstractC1250 {

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public static final C3814 f17760 = new C3814(19);

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public static final ˉᵠﹳᵘ f17761 = new ˉᵠﹳᵘ(19);

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public final ˈᵷᵵᵞ f17762;

    public C4675(C0974 c0974, C5227 c5227, ˈᵷᵵᵞ r3) {
        super(c0974, c5227);
        this.f17762 = r3;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public static /* synthetic */ void m9799(Throwable th, AbstractC1556 abstractC1556) {
        if (th != null) {
            try {
                AbstractC3589.m8109(abstractC1556);
                return;
            } catch (Throwable th2) {
                th.addSuppressed(th2);
                return;
            }
        }
        if (abstractC1556 instanceof AutoCloseable) {
            abstractC1556.close();
        } else if (abstractC1556 instanceof ExecutorService) {
            AbstractC2181.m5695((ExecutorService) abstractC1556);
        } else {
            ᵷᵝˎ.ᵷᵺʾᵖ();
        }
    }

    public final String toString() {
        return C4675.class.getSimpleName() + "[" + this.f5274 + "]";
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final AbstractC1556 m9800(String str, Set set, EnumSet enumSet, Set set2, int i, EnumSet enumSet2) {
        C0974 c0974 = new C0974(this.f5274, str);
        String str2 = c0974.f4268;
        try {
            this.f17762.getClass();
            boolean z = ᵱˉˈ.ᵱʡˏ(str2, str2);
            C5022 c5022M10366 = this.f5280;
            if (!z) {
                c5022M10366 = c5022M10366.m10366(c0974);
            }
            boolean z2 = ᵱˉˈ.ᵱʡˏ(str2, str2);
            String str3 = c0974.f4266;
            if (!z2 || !ᵱˉˈ.ᵱʡˏ(str3, str3)) {
                this = (C4675) c5022M10366.m10363(str3);
            }
            ᵯᵨᵲ r3 = this.m9804(c0974, set, enumSet, set2, i, enumSet2);
            C2725 c2725 = (C2725) r3.ᵜᵪʾ;
            C0974 c09742 = (C0974) r3.ᵨᵼⁱ;
            C4675 c4675 = (C4675) r3.ᵔᵖᵹᵫ;
            return c2725.f10463.contains(EnumC2833.f10859) ? new C2041(c2725.f10462, c4675, c09742.m3300()) : new C0609(c2725.f10462, c4675, c09742.m3300());
        } catch (PathResolveException e) {
            long j = EnumC0878.m3075(e.f1139).f3888;
            EnumC4635 enumC4635 = EnumC4635.f17623;
            throw new SMBApiException(j, "Cannot resolve path " + c0974, e);
        }
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final boolean m9801(String str) {
        try {
            m9799(null, m9800(str, EnumSet.of(EnumC3231.f12298), EnumSet.of(EnumC2833.f10860), EnumC0932.f4066, 2, EnumSet.of(EnumC3991.f15288)));
            return true;
        } catch (SMBApiException e) {
            if (f17760.mo8519(e.f1137)) {
                return false;
            }
            throw e;
        }
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final void m9802(String str) {
        try {
            AbstractC1556 abstractC1556M9800 = m9800(str, EnumSet.of(EnumC3231.f12301), EnumSet.of(EnumC2833.f10860), EnumSet.of(EnumC0932.f4065, EnumC0932.f4063, EnumC0932.f4064), 2, EnumSet.of(EnumC3991.f15288));
            try {
                abstractC1556M9800.m4404();
                m9799(null, abstractC1556M9800);
            } finally {
            }
        } catch (SMBApiException e) {
            if (!f17761.ᵻˈᵦʼ(e.f1137)) {
                throw e;
            }
        }
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final ArrayList m9803(String str) {
        EnumSet enumSetOf = EnumSet.of(EnumC3231.f12299, EnumC3231.f12298, EnumC3231.f12300);
        Set set = EnumC0932.f4066;
        EnumSet enumSetNoneOf = EnumSet.noneOf(EnumC3991.class);
        enumSetNoneOf.add(EnumC3991.f15289);
        enumSetNoneOf.remove(EnumC3991.f15288);
        EnumSet enumSetNoneOf2 = EnumSet.noneOf(EnumC2833.class);
        enumSetNoneOf2.add(EnumC2833.f10859);
        C2041 c2041 = (C2041) m9800(str, enumSetOf, enumSetNoneOf2, set, 2, enumSetNoneOf);
        C3714 c3714 = c2041.f6249;
        C4675 c4675 = c2041.f6250;
        String str2 = c2041.f6251;
        InterfaceC5025 interfaceC5025 = c2041.f6248;
        try {
            ArrayList arrayList = new ArrayList();
            C4876 c4876 = new C4876(c2041, "*");
            while (c4876.hasNext()) {
                arrayList.add(c4876.next());
            }
            try {
                c2041.close();
                return arrayList;
            } catch (Exception e) {
                interfaceC5025.mo9490(str2, c4675, c3714, e);
                return arrayList;
            }
        } finally {
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0046 A[Catch: PathResolveException -> 0x007f, TryCatch #0 {PathResolveException -> 0x007f, blocks: (B:3:0x002e, B:5:0x0034, B:11:0x0046, B:13:0x004c, B:15:0x0056, B:19:0x006a, B:21:0x0070, B:18:0x0062, B:8:0x0040), top: B:29:0x002e }] */
    /* JADX WARN: Removed duplicated region for block: B:18:0x0062 A[Catch: PathResolveException -> 0x007f, TryCatch #0 {PathResolveException -> 0x007f, blocks: (B:3:0x002e, B:5:0x0034, B:11:0x0046, B:13:0x004c, B:15:0x0056, B:19:0x006a, B:21:0x0070, B:18:0x0062, B:8:0x0040), top: B:29:0x002e }] */
    /* JADX WARN: Removed duplicated region for block: B:21:0x0070 A[Catch: PathResolveException -> 0x007f, TRY_LEAVE, TryCatch #0 {PathResolveException -> 0x007f, blocks: (B:3:0x002e, B:5:0x0034, B:11:0x0046, B:13:0x004c, B:15:0x0056, B:19:0x006a, B:21:0x0070, B:18:0x0062, B:8:0x0040), top: B:29:0x002e }] */
    /* JADX WARN: Removed duplicated region for block: B:25:0x0082  */
    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final ᵯᵨᵲ m9804(C0974 c0974, Set set, Set set2, Set set3, int i, Set set4) {
        boolean z;
        C5022 c5022M10366 = this.f5280;
        C0049 c0049 = new C0049(this.f5281, this.f5279, this.f5277, 0, set, set2, set3, i, set4, c0974);
        ˈᵷᵵᵞ r7 = this.f17762;
        C2725 c2725 = (C2725) m3747(c0049, "Create", c0974, (ˑᵤʽˏ) r7.ᵜᵪʾ, this.f5271);
        try {
            C0974 c09742 = r7.ᵛˑﹳ(c5022M10366, c2725, c0974);
            if (c09742 != null) {
                z = ᵱˉˈ.ᵱʡˏ(c0974.f4268, c09742.f4268);
                if (!z) {
                    c5022M10366 = c5022M10366.m10366(c09742);
                }
                return c0974.equals(c09742) ? ((c09742 == null && ᵱˉˈ.ᵱʡˏ(c0974.f4268, c09742.f4268) && ᵱˉˈ.ᵱʡˏ(c0974.f4266, c09742.f4266)) ? this : (C4675) c5022M10366.m10363(c09742.f4266)).m9804(c09742, set, set2, set3, i, set4) : new ᵯᵨᵲ(c2725, c0974, this);
            }
            c0974.getClass();
            if (!z) {
            }
            if (c0974.equals(c09742)) {
            }
        } catch (PathResolveException e) {
            EnumC4635 enumC4635 = EnumC4635.f17623;
            throw new SMBApiException(e.f1139, "Cannot resolve path " + c0974, e);
        }
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final C0609 m9805(String str, EnumSet enumSet, EnumSet enumSet2, Set set, int i, EnumSet enumSet3) {
        EnumSet enumSetCopyOf = enumSet3 != null ? EnumSet.copyOf((Collection) enumSet3) : EnumSet.noneOf(EnumC3991.class);
        enumSetCopyOf.add(EnumC3991.f15288);
        enumSetCopyOf.remove(EnumC3991.f15289);
        EnumSet enumSetCopyOf2 = enumSet2 != null ? EnumSet.copyOf((Collection) enumSet2) : EnumSet.noneOf(EnumC2833.class);
        enumSetCopyOf2.remove(EnumC2833.f10859);
        return (C0609) m9800(str, enumSet, enumSetCopyOf2, set, i, enumSetCopyOf);
    }
}
