package okio.internal;

/* JADX INFO: renamed from: okio.internal.-FileSystem, reason: invalid class name */
/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@kotlin.Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\u001a\u001b\u0010\u0004\u001a\u00020\u0003*\u00020\u00002\u0006\u0010\u0002\u001a\u00020\u0001H\u0000¢\u0006\u0004\b\u0004\u0010\u0005\u001a\u001b\u0010\u0007\u001a\u00020\u0006*\u00020\u00002\u0006\u0010\u0002\u001a\u00020\u0001H\u0000¢\u0006\u0004\b\u0007\u0010\b\u001a#\u0010\f\u001a\u00020\u000b*\u00020\u00002\u0006\u0010\t\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\u0006H\u0000¢\u0006\u0004\b\f\u0010\r\u001aH\u0010\u0014\u001a\u00020\u000b*\b\u0012\u0004\u0012\u00020\u00010\u000e2\u0006\u0010\u000f\u001a\u00020\u00002\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00010\u00102\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0012\u001a\u00020\u00062\u0006\u0010\u0013\u001a\u00020\u0006H\u0080@¢\u0006\u0004\b\u0014\u0010\u0015\u001a\u001d\u0010\u0016\u001a\u0004\u0018\u00010\u0001*\u00020\u00002\u0006\u0010\u0002\u001a\u00020\u0001H\u0000¢\u0006\u0004\b\u0016\u0010\u0017¨\u0006\u0018"}, d2 = {"Lokio/FileSystem;", "Lokio/Path;", "path", "Lokio/FileMetadata;", "d", "(Lokio/FileSystem;Lokio/Path;)Lokio/FileMetadata;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "c", "(Lokio/FileSystem;Lokio/Path;)Z", "dir", "mustCreate", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "b", "(Lokio/FileSystem;Lokio/Path;Z)V", "Lkotlin/sequences/SequenceScope;", "fileSystem", "Lkotlin/collections/ArrayDeque;", "stack", "followSymlinks", "postorder", "a", "(Lkotlin/sequences/SequenceScope;Lokio/FileSystem;Lkotlin/collections/ArrayDeque;Lokio/Path;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "e", "(Lokio/FileSystem;Lokio/Path;)Lokio/Path;", "okio"}, k = 2, mv = {1, 9, 0}, xi = 48)
@kotlin.jvm.JvmName
@kotlin.jvm.internal.SourceDebugExtension
public final class FileSystem {
    /* JADX WARN: Code duplicated, block: B:50:0x00f8 A[Catch: all -> 0x0135, TRY_LEAVE, TryCatch #2 {all -> 0x0135, blocks: (B:48:0x00f2, B:50:0x00f8, B:47:0x00ea), top: B:77:0x00ea }] */
    /* JADX WARN: Code duplicated, block: B:56:0x012d  */
    /* JADX WARN: Code duplicated, block: B:7:0x0019  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:56:0x012d -> B:19:0x005d). Please report as a decompilation issue!!! */
    /*  JADX ERROR: JadxOverflowException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxOverflowException: Regions stack size limit reached
        	at jadx.core.utils.ErrorsCounter.addError(ErrorsCounter.java:59)
        	at jadx.core.utils.ErrorsCounter.error(ErrorsCounter.java:31)
        	at jadx.core.dex.attributes.nodes.NotificationAttrNode.addError(NotificationAttrNode.java:19)
        */
    public static final java.lang.Object a(kotlin.sequences.SequenceScope r15, okio.FileSystem r16, kotlin.collections.ArrayDeque r17, okio.Path r18, boolean r19, boolean r20, kotlin.coroutines.Continuation r21) {
        /*
            Method dump skipped, instruction units count: 358
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: okio.internal.FileSystem.a(kotlin.sequences.SequenceScope, okio.FileSystem, kotlin.collections.ArrayDeque, okio.Path, boolean, boolean, kotlin.coroutines.Continuation):java.lang.Object");
    }

    public static final void b(okio.FileSystem fileSystem, okio.Path path, boolean z) {
        kotlin.jvm.internal.Intrinsics.l(fileSystem, "<this>");
        kotlin.jvm.internal.Intrinsics.l(path, "dir");
        kotlin.collections.ArrayDeque arrayDeque = new kotlin.collections.ArrayDeque();
        for (okio.Path pathH = path; pathH != null && !fileSystem.j(pathH); pathH = pathH.h()) {
            arrayDeque.addFirst(pathH);
        }
        if (z && arrayDeque.isEmpty()) {
            throw new java.io.IOException(path + " already exists.");
        }
        java.util.Iterator it = arrayDeque.iterator();
        while (it.hasNext()) {
            fileSystem.f((okio.Path) it.next());
        }
    }

    public static final boolean c(okio.FileSystem fileSystem, okio.Path path) {
        kotlin.jvm.internal.Intrinsics.l(fileSystem, "<this>");
        kotlin.jvm.internal.Intrinsics.l(path, "path");
        return fileSystem.n(path) != null;
    }

    public static final okio.FileMetadata d(okio.FileSystem fileSystem, okio.Path path) throws java.io.FileNotFoundException {
        kotlin.jvm.internal.Intrinsics.l(fileSystem, "<this>");
        kotlin.jvm.internal.Intrinsics.l(path, "path");
        okio.FileMetadata fileMetadataN = fileSystem.n(path);
        if (fileMetadataN != null) {
            return fileMetadataN;
        }
        throw new java.io.FileNotFoundException("no such file: " + path);
    }

    public static final okio.Path e(okio.FileSystem fileSystem, okio.Path path) {
        kotlin.jvm.internal.Intrinsics.l(fileSystem, "<this>");
        kotlin.jvm.internal.Intrinsics.l(path, "path");
        okio.Path symlinkTarget = fileSystem.m(path).getSymlinkTarget();
        if (symlinkTarget == null) {
            return null;
        }
        okio.Path pathH = path.h();
        kotlin.jvm.internal.Intrinsics.i(pathH);
        return pathH.k(symlinkTarget);
    }
}
