// File: Heptagon196[P]Gos/Reflection/ReflMgr.cpp
// Function: ReflMgr::RawAddStaticMethod(TypeID, std::basic_string_view<char, std::char_traits<char>>, TypeID, ArgsTypeList const&, std::function<SharedObject (std::vector<ObjectPtr, std::allocator<ObjectPtr>> const&)>)
void ReflMgr::RawAddStaticMethod(TypeID cls, std::string_view name, TypeID returnType, const ArgsTypeList& argsList, std::function<SharedObject(const std::vector<ObjectPtr>&)> func) {
    MethodInfo info{ std::string{name} };
    info.returnType = returnType;
    info.argsList = argsList;
    info.newRet = []() { return SharedObject(); };
    AddMethodInfo(cls, info.name, info.withRegister([func, argsList](void* instance, const std::vector<void*>& params, SharedObject& ret) {
        std::vector<ObjectPtr> args;
        for (int i = 0; i < params.size(); i++) {
            args.push_back(ObjectPtr{argsList[i], params[i]});
        }
        ret = func(args);
    }));
}

// Assembly:
subq $0x2e8, %rsp            # imm = 0x2E8
movq %r8, 0x58(%rsp)
leaq 0x310(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x2f0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %rsi, 0x2d8(%rsp)
movq %rdx, 0x2e0(%rsp)
movq %rdi, 0x2d0(%rsp)
movq %rcx, 0x2c8(%rsp)
movq %r8, 0x2c0(%rsp)
movq 0x2d0(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x13570
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rdx
leaq 0x2d8(%rsp), %rsi
callq 0x52e80
jmp 0x4d629
leaq 0x210(%rsp), %rdi
movq %rdi, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x230(%rsp)
movups %xmm0, 0x220(%rsp)
movups %xmm0, 0x210(%rsp)
movq $0x0, 0x240(%rsp)
callq 0x69ec0
leaq 0x248(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x6ff70
leaq 0x268(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x6ffb0
leaq 0x288(%rsp), %rdi
callq 0x6c730
jmp 0x4d695
leaq 0x2a8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2a8(%rsp)
movq $0x0, 0x2b8(%rsp)
callq 0x56250
leaq 0x1ef(%rsp), %rdi
callq 0x136a0
movq 0x60(%rsp), %rax
movq 0x38(%rsp), %rdi
movups (%rax), %xmm0
movups 0xa(%rax), %xmm1
movups %xmm1, 0x292(%rsp)
movups %xmm0, 0x288(%rsp)
movq 0x2c8(%rsp), %rsi
callq 0x192c20
jmp 0x4d6fb
leaq 0x268(%rsp), %rdi
leaq 0x1db(%rsp), %rsi
callq 0x4d950
movq 0x58(%rsp), %rsi
movq 0x68(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x1c0(%rsp)
movaps %xmm0, 0x1b0(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x88(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x192e10
jmp 0x4d752
leaq 0xa8(%rsp), %rdi
movq 0x2c8(%rsp), %rsi
callq 0x725b0
jmp 0x4d769
leaq 0xc0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x4d9a0
jmp 0x4d780
leaq 0x1f0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x4a210
movq %rax, 0x20(%rsp)
jmp 0x4d79c
movq 0x20(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x703f0
jmp 0x4d7b0
movq 0x28(%rsp), %rsi
movq 0x70(%rsp), %rdi
movaps 0x1b0(%rsp), %xmm0
movaps 0x1c0(%rsp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0xe0(%rsp), %rdx
movl $0x1, %ecx
callq 0x4a7f0
jmp 0x4d7e8
leaq 0xe0(%rsp), %rdi
callq 0x70530
leaq 0xc0(%rsp), %rdi
callq 0x70000
leaq 0x88(%rsp), %rdi
callq 0x4da50
leaq 0x1f0(%rsp), %rdi
callq 0x70530
addq $0x2e8, %rsp            # imm = 0x2E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x4d876
movq 0x50(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
callq 0x6fff0
movq 0x48(%rsp), %rdi
callq 0x70000
movq 0x40(%rsp), %rdi
callq 0x69ed0
movq 0x78(%rsp), %rdi
callq 0x52f50
leaq 0x1ef(%rsp), %rdi
callq 0x136a0
jmp 0x4d935
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x4d928
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
callq 0x6d0c0
jmp 0x4d928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x4d91b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
jmp 0x4d90e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e0(%rsp)
movl %eax, 0x1dc(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x70530
leaq 0xc0(%rsp), %rdi
callq 0x70000
leaq 0x88(%rsp), %rdi
callq 0x4da50
leaq 0x1f0(%rsp), %rdi
callq 0x70530
movq 0x1e0(%rsp), %rdi
callq 0x133f0
nopw %cs:(%rax,%rax)