// File: /workspace/github_cpp_makefile_star2_O2/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, 0x8(%rsp)
movq %rdi, %r14
leaq 0x9aab(%rip), %rsi      # 0x97201
leaq 0x10(%rsp), %rbx
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x8b5a4
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11170
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8defa
movq %rbx, %rdi
callq 0x8b62c
leaq 0x10(%rsp), %rdi
callq 0x8b62c
leaq 0x40(%rsp), %rdi
callq 0x8df32
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x8b67e
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0x8cde6
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8b67e
leaq 0x10(%rsp), %rsi
movl %ebx, 0x28(%rsi)
leaq 0x40(%rsp), %rdi
callq 0x8ebaa
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x8b62c
leaq 0x90(%rsp), %rdi
callq 0x8b62c
leaq 0x99fe(%rip), %rbp      # 0x97201
leaq 0xe0(%rsp), %r15
leaq 0xb8(%rsp), %r12
movq 0x50(%rsp), %rax
cmpq %rax, 0x70(%rsp)
je 0x8d903
movl 0x28(%rax), %eax
movl %eax, 0x4(%rsp)
leaq 0x79be7(%rip), %rdi     # 0x107418
leaq 0x4(%rsp), %rsi
callq 0x8e7c8
movq %rax, %r13
addq $0x10, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x8d8f4
leaq 0x8(%r13), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x21c5b
testb %al, %al
jne 0x8d842
movq 0x50(%rsp), %rsi
movq %r15, %rdi
callq 0x8b67e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8b6b8
movslq 0x28(%r13), %rax
movq 0x79b7b(%rip), %rcx     # 0x107400
shlq $0x4, %rax
cmpb $0x1, 0xc(%rcx,%rax)
jne 0x8d8ae
leaq 0x28(%r13), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8dffc
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x8ebaa
jmp 0x8d8df
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x2
popq %rdx
callq 0x8b5a4
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11170
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x8e01a
movq %r12, %rdi
callq 0x8b62c
movq %r14, %rdi
callq 0x8b62c
movq %r15, %rdi
callq 0x8b62c
jmp 0x8d842
leaq 0x40(%rsp), %rdi
callq 0x8ee32
jmp 0x8d813
leaq 0x40(%rsp), %rdi
callq 0x8e150
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8b62c
jmp 0x8d942
jmp 0x8d987
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8b62c
jmp 0x8d994
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x8d980
jmp 0x8d987
jmp 0x8d975
jmp 0x8d966
jmp 0x8d975
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x8b62c
jmp 0x8d969
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8b62c
jmp 0x8d978
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x8b62c
jmp 0x8d98a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8e150
movq %rbx, %rdi
callq 0x11570