// File: /workspace/github_cpp_makefile_star2_O2/Heptagon196[P]Gos/Reflection/ReflMgr.cpp
// Function: ReflMgr::RawAddMethod(TypeID, std::basic_string_view<char, std::char_traits<char>>, TypeID, ArgsTypeList const&, std::function<SharedObject (ObjectPtr, std::vector<ObjectPtr, std::allocator<ObjectPtr>> const&)>)
void ReflMgr::RawAddMethod(TypeID cls, std::string_view name, TypeID returnType, const ArgsTypeList& argsList, std::function<SharedObject(ObjectPtr, 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, cls](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(ObjectPtr{cls, instance}, args);
    }));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %r8, %r15
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x198(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
leaq 0xc8(%rsp), %r12
leaq 0x40(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x209a4
andq $0x0, 0x40(%r12)
leaq 0x118(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
leaq 0x180(%rsp), %rdi
movups %xmm0, -0x70(%rdi)
movups %xmm0, -0x60(%rdi)
movups %xmm0, -0x50(%rdi)
movups %xmm0, -0x40(%rdi)
movups %xmm0, -0x30(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps 0x2c0(%rsp), %xmm0
movups %xmm0, -0x20(%rdi)
movups 0x2ca(%rsp), %xmm0
movups %xmm0, -0x16(%rdi)
movq %r14, %rsi
callq 0x7196e
leaq 0x2a0(%rsp), %r12
movups 0x140(%rsp), %xmm0
movups 0x150(%rsp), %xmm1
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x140(%rsp)
leaq 0xeb4(%rip), %rax       # 0x2038a
movq %rax, 0x150(%rsp)
movaps %xmm1, 0x10(%rdi)
leaq 0xe93(%rip), %rax       # 0x2037c
movq %rax, 0x158(%rsp)
callq 0x21f04
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movaps %xmm0, 0xa0(%rsp)
movaps %xmm1, 0xb0(%rsp)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x701fe
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2c4a2
movups (%r12), %xmm0
movups 0xa(%r12), %xmm1
movups %xmm1, 0x82(%rsp)
movups %xmm0, 0x78(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
pushq $0x58
popq %rdi
callq 0x11350
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x1f593
leaq 0x50(%rsp), %rcx
movups -0x10(%rcx), %xmm0
movups %xmm0, (%r14)
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %r14, %rdi
addq $0x20, %rdi
movq %r15, %rsi
callq 0x2c4a2
leaq 0x120(%rsp), %rdi
leaq 0x78(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x48(%r14)
movups %xmm0, 0x38(%r14)
leaq 0x20(%rsp), %rsi
movq %r14, (%rsi)
leaq 0xdd3(%rip), %rax       # 0x203a2
movq %rax, 0x18(%rsi)
leaq 0xee0(%rip), %rax       # 0x204ba
movq %rax, 0x10(%rsi)
callq 0x6ed66
leaq 0x1a8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x2bbac
movaps 0xa0(%rsp), %xmm0
movaps 0xb0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xc8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x1e212
leaq 0x1a8(%rsp), %rdi
callq 0x2bc6c
leaq 0x20(%rsp), %rdi
callq 0x21f04
leaq 0x40(%rsp), %rdi
callq 0x1f6d8
leaq 0xc8(%rsp), %rdi
callq 0x2bc6c
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x2bc6c
jmp 0x1f6ae
movq %rax, %rbx
movq %r14, %rdi
callq 0x21f04
pushq $0x58
popq %rsi
movq %r14, %rdi
callq 0x11360
jmp 0x1f6ae
jmp 0x1f6ab
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x21f04
jmp 0x1f6c2
jmp 0x1f6a6
movq %rax, %rbx
jmp 0x1f6c2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x21f04
leaq 0x40(%rsp), %rdi
callq 0x1f6d8
leaq 0xc8(%rsp), %rdi
callq 0x2bc6c
movq %rbx, %rdi
callq 0x11570
nop