// File: /workspace/github_cpp_makefile_star2_O1/Heptagon196[P]Gos/GosFileSystem.cpp
// Function: Gos::FileSystem::Iterate(std::filesystem::__cxx11::path, std::function<void (std::filesystem::__cxx11::path)>)
void Gos::FileSystem::Iterate(Path dir, std::function<void(Path)> action) {
    dir = dir.lexically_relative(".");
    std::queue<std::pair<Path, int>> dirs;
    dirs.push({dir, FileSystem::GetFile(dir, false)});
    while (!dirs.empty()) {
        int cur = dirs.front().second;
        for (auto& file: instance.structure[cur]) {
            if (file.first == ".") {
                continue;
            }
            Path curPath = dirs.front().first;
            curPath.append(file.first);
            if (instance.files[file.second].directory) {
                dirs.push({curPath, file.second});
            } else {
                action(curPath.lexically_relative("."));
            }
        }
        dirs.pop();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xba5d(%rip), %rsi      # 0xbe1a9
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x2, %edx
callq 0xb0100
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11170
cmpq %r14, %r15
je 0xb2783
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x121b1
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xb0188
leaq 0x10(%rsp), %rdi
callq 0xb0188
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
callq 0xb38fe
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0xb01c0
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0xb191c
movl %eax, %ebp
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xb01c0
leaq 0x10(%rsp), %rsi
movl %ebp, 0x28(%rsi)
leaq 0x40(%rsp), %rdi
callq 0xb3a9c
leaq 0x10(%rsp), %rdi
callq 0xb0188
leaq 0x90(%rsp), %rdi
callq 0xb0188
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
je 0xb2940
leaq 0xb97a(%rip), %r13      # 0xbe1a9
leaq 0xe0(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0xb8(%rsp), %r15
movl 0x28(%rax), %eax
movl %eax, 0xc(%rsp)
leaq 0x6cbd6(%rip), %rdi     # 0x11f428
leaq 0xc(%rsp), %rsi
callq 0xb3698
movq 0x10(%rax), %r12
testq %r12, %r12
je 0xb2926
leaq 0x8(%r12), %rdi
movq %r13, %rsi
callq 0x282a0
testl %eax, %eax
je 0xb291d
movq 0x50(%rsp), %rsi
movq %rbp, %rdi
callq 0xb01c0
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0x110c0
movslq 0x28(%r12), %rax
movq 0x6cb67(%rip), %rcx     # 0x11f410
shlq $0x4, %rax
cmpb $0x1, 0xc(%rcx,%rax)
jne 0xb28d7
movq %r14, %rdi
movq %rbp, %rsi
callq 0xb01c0
movl 0x28(%r12), %eax
movl %eax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0xb3a9c
jmp 0xb290d
movq %r14, %rdi
movq %r13, %rsi
movl $0x2, %edx
callq 0xb0100
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x11170
cmpq $0x0, 0x10(%rbx)
je 0xb295c
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rbx)
movq %r15, %rdi
callq 0xb0188
movq %r14, %rdi
callq 0xb0188
movq %rbp, %rdi
callq 0xb0188
movq (%r12), %r12
jmp 0xb2860
leaq 0x40(%rsp), %rdi
callq 0xb3d32
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
jne 0xb2844
leaq 0x40(%rsp), %rdi
callq 0xb30f4
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11150
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb0188
jmp 0xb2984
jmp 0xb29cb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb0188
jmp 0xb29d8
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0xb29c4
jmp 0xb29cb
jmp 0xb29a8
jmp 0xb29b9
jmp 0xb2996
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xb0188
jmp 0xb29ab
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb0188
jmp 0xb29bc
jmp 0xb29b9
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xb0188
jmp 0xb29ce
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xb30f4
movq %rbx, %rdi
callq 0x11580