// File: /workspace/github_cpp_makefile_star2_O3/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 0xb957(%rip), %rsi      # 0xbd179
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x2, %edx
callq 0xaf246
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11170
cmpq %r14, %r15
je 0xb1859
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x121bb
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xaf2ce
leaq 0x10(%rsp), %rdi
callq 0xaf2ce
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 0xb29c2
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0xaf306
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0xb0a48
movl %eax, %ebp
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xaf306
leaq 0x10(%rsp), %rsi
movl %ebp, 0x28(%rsi)
leaq 0x40(%rsp), %rdi
callq 0xb2b60
leaq 0x10(%rsp), %rdi
callq 0xaf2ce
leaq 0x90(%rsp), %rdi
callq 0xaf2ce
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
je 0xb1a16
leaq 0xb874(%rip), %r13      # 0xbd179
leaq 0xe0(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0xb8(%rsp), %r15
movl 0x28(%rax), %eax
movl %eax, 0xc(%rsp)
leaq 0x6cb00(%rip), %rdi     # 0x11e428
leaq 0xc(%rsp), %rsi
callq 0xb274c
movq 0x10(%rax), %r12
testq %r12, %r12
je 0xb19fc
leaq 0x8(%r12), %rdi
movq %r13, %rsi
callq 0x27854
testl %eax, %eax
je 0xb19f3
movq 0x50(%rsp), %rsi
movq %rbp, %rdi
callq 0xaf306
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0x110c0
movslq 0x28(%r12), %rax
movq 0x6ca91(%rip), %rcx     # 0x11e410
shlq $0x4, %rax
cmpb $0x1, 0xc(%rcx,%rax)
jne 0xb19ad
movq %r14, %rdi
movq %rbp, %rsi
callq 0xaf306
movl 0x28(%r12), %eax
movl %eax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0xb2b60
jmp 0xb19e3
movq %r14, %rdi
movq %r13, %rsi
movl $0x2, %edx
callq 0xaf246
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x11170
cmpq $0x0, 0x10(%rbx)
je 0xb1a32
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rbx)
movq %r15, %rdi
callq 0xaf2ce
movq %r14, %rdi
callq 0xaf2ce
movq %rbp, %rdi
callq 0xaf2ce
movq (%r12), %r12
jmp 0xb1936
leaq 0x40(%rsp), %rdi
callq 0xb2dfe
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
jne 0xb191a
leaq 0x40(%rsp), %rdi
callq 0xb21d0
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 0xaf2ce
jmp 0xb1a5a
jmp 0xb1aa1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xaf2ce
jmp 0xb1aae
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0xb1a9a
jmp 0xb1aa1
jmp 0xb1a7e
jmp 0xb1a8f
jmp 0xb1a6c
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xaf2ce
jmp 0xb1a81
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xaf2ce
jmp 0xb1a92
jmp 0xb1a8f
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xaf2ce
jmp 0xb1aa4
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xb21d0
movq %rbx, %rdi
callq 0x11580