// File: Heptagon196[P]Gos/main.cpp
// Function: main
int main(int argc, char* argv[]) {
    reflIO();
    Gos::FileSystem::AddDirectory("Test");
    Gos::GosProject prj;
    // prj.AddScript(name);
    prj.ScanDirectory();
    ReflMgr::Instance().New("Lambda").Invoke("main")({ SharedObject::New<int>(2333) });
    /*
    const char* name;
    if (argc > 1) {
        name = argv[1];
    } else {
        name = "Lambda.gos";
    }
    std::ifstream fin;
    fin.open(name);
    Gos::GosScript script;
    script.Read(fin, name);
    fin.close();
    script.PrintIR(std::cout);
    script.Execute();
    auto f = script.CreateInstance().Invoke("main", {});
    f({ SharedObject::New<int>(1) });
    f({ SharedObject::New<int>(2) });
    f({ SharedObject::New<int>(3) });
    ReflMgr::Instance().InvokeStatic(TypeID::getRaw("Lambda"), "Greatings", {});
    */
    return 0;
}

// Assembly:
subq $0x2d8, %rsp            # imm = 0x2D8
movl $0x0, 0x2d4(%rsp)
movl %edi, 0x2d0(%rsp)
movq %rsi, 0x2c8(%rsp)
callq 0x1f4fd0
leaq 0x2c894(%rip), %rsi     # 0x222431
leaq 0x2a0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movl $0x2, %edx
callq 0x1f88e0
movq 0x38(%rsp), %rdi
callq 0x1ed4d0
jmp 0x1f5bc0
leaq 0x2a0(%rsp), %rdi
callq 0x1e7130
leaq 0x228(%rsp), %rdi
callq 0x1f89e0
leaq 0x207(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x13570
movq 0x30(%rsp), %rdx
leaq 0x16f69(%rip), %rsi     # 0x20cb61
leaq 0x208(%rsp), %rdi
callq 0x165520
jmp 0x1f5c07
leaq 0x1e0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x1df(%rsp), %rsi
callq 0x1f8a10
movq 0x28(%rsp), %rdx
leaq 0x228(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x1e65f0
jmp 0x1f5c3d
leaq 0x1e0(%rsp), %rdi
callq 0x1f8aa0
leaq 0x208(%rsp), %rdi
callq 0x52f50
leaq 0x207(%rsp), %rdi
callq 0x136a0
callq 0x4a240
movq %rax, 0x20(%rsp)
jmp 0x1f5c70
leaq 0x2c7bf(%rip), %rsi     # 0x222436
leaq 0x120(%rsp), %rdi
callq 0x53460
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
movq $0x0, 0x110(%rsp)
leaq 0x100(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x53b40
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %r8
movq 0x120(%rsp), %rdx
movq 0x128(%rsp), %rcx
leaq 0x130(%rsp), %rdi
callq 0x4b490
jmp 0x1f5cd6
leaq 0x2c760(%rip), %rsi     # 0x22243d
leaq 0xf0(%rsp), %rdi
callq 0x53460
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x53b40
movq 0x10(%rsp), %r8
movq 0xf0(%rsp), %rdx
movq 0xf8(%rsp), %rcx
leaq 0x168(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x1e930
jmp 0x1f5d3f
movl $0x91d, 0x44(%rsp)      # imm = 0x91D
leaq 0x48(%rsp), %rdi
leaq 0x44(%rsp), %rsi
callq 0x164900
jmp 0x1f5d58
leaq 0x80(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1e190
jmp 0x1f5d6c
leaq 0x80(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq $0x1, 0xb0(%rsp)
leaq 0x43(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x54290
movq 0x8(%rsp), %rcx
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0x542a0
jmp 0x1f5dbb
leaq 0x1a0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x20bd0
jmp 0x1f5dda
leaq 0x1a0(%rsp), %rdi
callq 0x23b00
leaq 0xb8(%rsp), %rdi
callq 0x53b50
leaq 0x43(%rsp), %rdi
callq 0x54330
leaq 0x48(%rsp), %rdi
callq 0x23b00
leaq 0x168(%rsp), %rdi
callq 0x23b00
leaq 0xd0(%rsp), %rdi
callq 0x53b50
leaq 0x130(%rsp), %rdi
callq 0x23b00
leaq 0x100(%rsp), %rdi
callq 0x53b50
movl $0x0, 0x2d4(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x1f8ab0
movl 0x2d4(%rsp), %eax
addq $0x2d8, %rsp            # imm = 0x2D8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x1e7130
jmp 0x1f5fe2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5ecd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x1f8aa0
leaq 0x208(%rsp), %rdi
callq 0x52f50
leaq 0x207(%rsp), %rdi
callq 0x136a0
jmp 0x1f5fd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5fd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5fc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5fae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5fa1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5f97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
jmp 0x1f5f8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x298(%rsp)
movl %eax, 0x294(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x53b50
leaq 0x43(%rsp), %rdi
callq 0x54330
leaq 0x48(%rsp), %rdi
callq 0x23b00
leaq 0x168(%rsp), %rdi
callq 0x23b00
leaq 0xd0(%rsp), %rdi
callq 0x53b50
leaq 0x130(%rsp), %rdi
callq 0x23b00
leaq 0x100(%rsp), %rdi
callq 0x53b50
leaq 0x228(%rsp), %rdi
callq 0x1f8ab0
movq 0x298(%rsp), %rdi
callq 0x133f0
nop