// File: 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:
subq $0x468, %rsp            # imm = 0x468
movq %rsi, 0x30(%rsp)
movq %rdi, 0x460(%rsp)
movq %rsi, 0x458(%rsp)
movq %rdx, 0x450(%rsp)
movq 0x460(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x3e0(%rsp), %rdi
movl $0x2, %edx
movl %edx, 0x44(%rsp)
callq 0x1e6eb0
movl 0x44(%rsp), %edx
leaq 0x26f2f(%rip), %rsi     # 0x20cb61
leaq 0x3b8(%rsp), %rdi
callq 0x1e6fb0
jmp 0x1e5c41
leaq 0x408(%rsp), %rdi
leaq 0x3e0(%rsp), %rsi
leaq 0x3b8(%rsp), %rdx
callq 0x13180
jmp 0x1e5c60
leaq 0x430(%rsp), %rdi
leaq 0x408(%rsp), %rsi
callq 0x1e70b0
jmp 0x1e5c77
movq 0x30(%rsp), %rdi
leaq 0x430(%rsp), %rsi
callq 0x7b460
leaq 0x430(%rsp), %rdi
callq 0x52f50
leaq 0x408(%rsp), %rdi
callq 0x1e7130
leaq 0x3b8(%rsp), %rdi
callq 0x1e7130
leaq 0x3e0(%rsp), %rdi
callq 0x1e7130
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x38, %rdi
callq 0x1e7160
cmpq $0x0, %rax
jbe 0x1e5d47
jmp 0x1e620d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e5d35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e5d28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x1e7130
leaq 0x3b8(%rsp), %rdi
callq 0x1e7130
leaq 0x3e0(%rsp), %rdi
callq 0x1e7130
jmp 0x1e623c
movq 0x30(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movl $0x2, %edx
callq 0x1e6eb0
movq 0x28(%rsp), %rsi
leaq 0x220(%rsp), %rdi
callq 0x1eeaf0
jmp 0x1e5d77
leaq 0x1f8(%rsp), %rdi
callq 0x1e7130
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x38, %rdi
callq 0x1e71c0
movb %dl, 0x1f(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x1e5da2
movb 0x1f(%rsp), %al
movq 0x20(%rsp), %rcx
movq %rcx, 0x1e8(%rsp)
movb %al, 0x1f0(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x7ace0
movq 0x30(%rsp), %rsi
leaq 0x150(%rsp), %rdi
movl $0x2, %edx
callq 0x1e6eb0
jmp 0x1e5de0
leaq 0x26d7a(%rip), %rsi     # 0x20cb61
leaq 0x128(%rsp), %rdi
movl $0x2, %edx
callq 0x1e6fb0
jmp 0x1e5dfb
leaq 0x178(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x13180
jmp 0x1e5e1a
leaq 0x1a0(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x135a0
jmp 0x1e5e31
leaq 0x178(%rsp), %rdi
callq 0x1e7130
leaq 0x128(%rsp), %rdi
callq 0x1e7130
leaq 0x150(%rsp), %rdi
callq 0x1e7130
leaq 0x220(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x13330
movq %rax, 0x10(%rsp)
jmp 0x1e5e74
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x13210
movb %al, 0xf(%rsp)
jmp 0x1e5e8e
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1e5e9b
jmp 0x1e61d2
leaq 0x1c8(%rsp), %rdi
leaq 0x3c251(%rip), %rsi     # 0x2220fb
callq 0x1e7220
testb $0x1, %al
jne 0x1e5eb8
jmp 0x1e61cd
leaq 0x100(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x1e7280
jmp 0x1e5ecf
movl $0x8, 0xfc(%rsp)
leaq 0x1c8(%rsp), %rdi
movl $0xd, %esi
callq 0x1e72e0
testb $0x1, %al
jne 0x1e5ef5
jmp 0x1e5fe8
movl 0xfc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xfc(%rsp)
jmp 0x1e5fe8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x1e7130
jmp 0x1e623c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e622f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e6222
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e5fbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e5fb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x1e7130
leaq 0x128(%rsp), %rdi
callq 0x1e7130
leaq 0x150(%rsp), %rdi
callq 0x1e7130
jmp 0x1e6222
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e6215
leaq 0x1c8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x55b20
movq (%rsp), %rsi
movq %rax, %rcx
movslq 0xfc(%rsp), %rax
subq %rax, %rcx
leaq 0xd8(%rsp), %rdi
movl $0x8, %edx
callq 0x1b4b20
jmp 0x1e601f
leaq 0x100(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x1e7340
jmp 0x1e6036
leaq 0xd8(%rsp), %rdi
callq 0x52f50
leaq 0x26b17(%rip), %rsi     # 0x20cb61
leaq 0x68(%rsp), %rdi
movl $0x2, %edx
callq 0x1e6fb0
jmp 0x1e605b
leaq 0x90(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x13180
jmp 0x1e6077
leaq 0xb8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1e70b0
jmp 0x1e608e
leaq 0x90(%rsp), %rdi
callq 0x1e7130
leaq 0x68(%rsp), %rdi
callq 0x1e7130
leaq 0x48(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x6f070
jmp 0x1e60b9
movq 0x38(%rsp), %rdi
movq 0x450(%rsp), %rdx
leaq 0x48(%rsp), %rsi
callq 0x1e5be0
jmp 0x1e60d2
leaq 0x48(%rsp), %rdi
callq 0x52f50
leaq 0xb8(%rsp), %rdi
callq 0x52f50
leaq 0x100(%rsp), %rdi
callq 0x1e7130
jmp 0x1e61cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e61be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x52f50
jmp 0x1e61be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e6171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x1e7130
leaq 0x68(%rsp), %rdi
callq 0x1e7130
jmp 0x1e61be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
jmp 0x1e61b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b0(%rsp)
movl %eax, 0x3ac(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x52f50
leaq 0xb8(%rsp), %rdi
callq 0x52f50
leaq 0x100(%rsp), %rdi
callq 0x1e7130
jmp 0x1e6215
jmp 0x1e5e58
movq 0x30(%rsp), %rsi
movq 0x450(%rsp), %rdi
callq 0x1e73a0
jmp 0x1e61e6
leaq 0x1a0(%rsp), %rdi
callq 0x1e7130
leaq 0x1c8(%rsp), %rdi
callq 0x52f50
leaq 0x220(%rsp), %rdi
callq 0x13240
addq $0x468, %rsp            # imm = 0x468
retq
leaq 0x1a0(%rsp), %rdi
callq 0x1e7130
leaq 0x1c8(%rsp), %rdi
callq 0x52f50
leaq 0x220(%rsp), %rdi
callq 0x13240
movq 0x3b0(%rsp), %rdi
callq 0x133f0
nopl (%rax)