// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/Gos.cpp
// Function: Gos::GosProject::PreprocessFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void Gos::GosProject::PreprocessFile(std::string scriptPath, std::queue<std::string>& imports) {
    scriptPath = Path(scriptPath).lexically_relative(".").string();
    if (vis.count(scriptPath) > 0) {
        return;
    }
    auto fin = FileSystem::Read(scriptPath);
    vis.insert(scriptPath);
    std::string line;
    Path dir = Path(scriptPath).lexically_relative(".").parent_path();
    while (std::getline(fin, line)) {
        if (line.starts_with("#import ")) {
            Path cur = dir;
            int endLen = 8;
            if (line.ends_with('\r')) {
                endLen++;
            }
            cur.append(line.substr(8, line.length() - endLen));
            std::string nxtPath = cur.lexically_relative(".").string();
            PreprocessFile(nxtPath, imports);
        }
    }
    imports.push(scriptPath);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %r12
leaq 0x68(%rsp), %rdi
pushq $0x2
popq %rbx
movl %ebx, %edx
callq 0x8b53c
leaq 0xc5e2(%rip), %rsi      # 0x97201
leaq 0x18(%rsp), %rdi
movl %ebx, %edx
callq 0x8b5a4
leaq 0x140(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x11170
leaq 0x40(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x8b610
leaq 0x40(%rsp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2dc3c
movq %rbx, %rdi
callq 0x209be
leaq 0x140(%rsp), %rdi
callq 0x8b62c
leaq 0x18(%rsp), %rdi
callq 0x8b62c
leaq 0x68(%rsp), %rdi
callq 0x8b62c
leaq 0x38(%r12), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8b642
testq %rax, %rax
jne 0x8aec3
leaq 0xd8(%rsp), %r14
pushq $0x2
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8b53c
leaq 0x140(%rsp), %rdi
movq %r14, %rsi
callq 0x8dc1e
leaq 0xd8(%rsp), %rdi
callq 0x8b62c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8bcb6
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %rdi
pushq $0x2
popq %rdx
movq %r15, %rsi
callq 0x8b53c
leaq 0xc4f2(%rip), %rsi      # 0x97201
leaq 0xb0(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x8b5a4
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x11170
movq %r12, 0x10(%rsp)
movq %r15, 0x8(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x115a0
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x8b62c
leaq 0xb0(%rsp), %r13
movq %r13, %rdi
callq 0x8b62c
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
callq 0x8b62c
leaq 0x90(%rsp), %r14
leaq 0x120(%rsp), %r15
leaq 0x100(%rsp), %rbx
leaq 0x140(%rsp), %rdi
movq %r14, %rsi
callq 0x11080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8ae91
movq %r14, %rdi
leaq 0x1fe3e(%rip), %rsi     # 0xaabfb
callq 0x8b65c
testb %al, %al
je 0x8ad91
movq %r12, %rdi
leaq 0x68(%rsp), %rsi
callq 0x8b67e
movq 0x98(%rsp), %rax
pushq $-0x8
popq %rcx
testq %rax, %rax
je 0x8adf9
movq 0x90(%rsp), %rdx
xorl %ecx, %ecx
cmpb $0xd, -0x1(%rdx,%rax)
setne %cl
addq $-0x9, %rcx
addq %rax, %rcx
movq %rbp, %rdi
movq %r14, %rsi
pushq $0x8
popq %rdx
callq 0x79922
movq %r12, %rdi
movq %rbp, %rsi
callq 0x8b6b8
movq %rbp, %rdi
callq 0x209be
movq %r13, %rdi
leaq 0xc3da(%rip), %rsi      # 0x97201
pushq $0x2
popq %rdx
callq 0x8b5a4
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x11170
movq %r15, %rdi
movq %rbp, %rsi
callq 0x8b610
movq %rbp, %rdi
callq 0x8b62c
movq %r13, %rdi
callq 0x8b62c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2b71e
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq (%rsp), %rdx
callq 0x8abee
movq %rbx, %rdi
callq 0x209be
movq %r15, %rdi
callq 0x209be
movq %r12, %rdi
callq 0x8b62c
jmp 0x8ad91
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8befa
leaq 0x68(%rsp), %rdi
callq 0x8b62c
leaq 0x90(%rsp), %rdi
callq 0x209be
leaq 0x140(%rsp), %rdi
callq 0x112c0
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8afba
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8b62c
jmp 0x8aeec
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8b62c
jmp 0x8aefe
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x8afc2
movq %rax, %rbx
jmp 0x8afc7
movq %rax, %rbx
jmp 0x8afd4
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x8af4e
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x8b62c
jmp 0x8af3a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8b62c
jmp 0x8af49
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x8b62c
jmp 0x8afe1
jmp 0x8afab
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x8af81
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x209be
jmp 0x8af79
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x209be
jmp 0x8afae
jmp 0x8afba
movq %rax, %rbx
jmp 0x8af9c
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8b62c
leaq 0xb0(%rsp), %rdi
callq 0x8b62c
jmp 0x8afae
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8b62c
jmp 0x8afbd
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x8b62c
leaq 0x90(%rsp), %rdi
callq 0x209be
leaq 0x140(%rsp), %rdi
callq 0x112c0
movq %rbx, %rdi
callq 0x11570
nop