// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %r8, %r12
movq %rcx, %r14
movq %rdi, %r15
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq (%rsi,%rdx), %rax
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x27370
xorl %eax, %eax
movq %rax, 0x40(%rbx)
leaq 0x118(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # 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)
movq %rax, 0x10(%rdi)
movaps 0x2c0(%rsp), %xmm0
movups %xmm0, -0x20(%rdi)
movups 0x2ca(%rsp), %xmm0
movups %xmm0, -0x16(%rdi)
movq %r14, %rsi
callq 0x8f49c
leaq 0x140(%rsp), %rbx
movups (%rbx), %xmm0
movaps %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rax, 0x50(%rsp)
leaq 0x156d(%rip), %rdx      # 0x258ba
movq %rdx, 0x10(%rbx)
movq %rcx, 0x58(%rsp)
leaq 0x154f(%rip), %rcx      # 0x258ac
movq %rcx, 0x18(%rbx)
testq %rax, %rax
je 0x24375
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x2a0(%rsp), %rbp
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movaps %xmm0, 0xa0(%rsp)
movaps %xmm1, 0xb0(%rsp)
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x8d256
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x377be
movups (%rbp), %xmm0
movups 0xa(%rbp), %xmm1
movups %xmm1, 0x82(%rsp)
movups %xmm0, 0x78(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movl $0x58, %edi
callq 0x11350
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%r12)
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x2441c
leaq 0x50(%rsp), %rcx
movups -0x10(%rcx), %xmm0
movups %xmm0, (%r12)
movq %rax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %r12, %rdi
addq $0x20, %rdi
movq %r13, %rsi
callq 0x377be
leaq 0x120(%rsp), %r14
leaq 0x78(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x48(%r12)
movups %xmm0, 0x38(%r12)
leaq 0x20(%rsp), %rsi
movq %r12, (%rsi)
leaq 0x1478(%rip), %rax      # 0x258d2
movq %rax, 0x18(%rsi)
leaq 0x15e1(%rip), %rax      # 0x25a46
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0x8b704
leaq 0x198(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x36ef4
movaps 0xa0(%rsp), %xmm0
movaps 0xb0(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xc8(%rsp), %rsi
leaq 0x198(%rsp), %rdx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x22a82
movq 0x250(%rsp), %rdi
testq %rdi, %rdi
je 0x244d9
movq 0x260(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x220(%rsp), %rax
testq %rax, %rax
je 0x244f8
leaq 0x210(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x200(%rsp), %rax
testq %rax, %rax
je 0x24517
leaq 0x1f0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x1b8(%rsp), %r15
movq %r15, %rdi
callq 0x36ac6
movq -0x20(%r15), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x24548
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x24561
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x24578
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x24591
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x245ae
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x245c8
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq 0x130(%rsp), %rax
testq %rax, %rax
je 0x245e2
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x36ac6
movq -0x20(%rbx), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x24613
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x11360
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24707
jmp 0x24707
jmp 0x24707
jmp 0x24707
jmp 0x24707
jmp 0x24707
jmp 0x24707
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x37032
jmp 0x246cf
movq %rax, %rbx
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x24674
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movl $0x58, %esi
movq %r12, %rdi
callq 0x11360
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x246e8
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x246e8
jmp 0x24707
jmp 0x24707
movq %rax, %rbx
jmp 0x246e8
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x246f2
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x246f2
jmp 0x24707
jmp 0x246c7
movq %rax, %rbx
jmp 0x246f2
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x246e8
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x40(%rsp), %rdi
callq 0x24710
leaq 0xc8(%rsp), %rdi
callq 0x37032
movq %rbx, %rdi
callq 0x11580
movq %rax, %rdi
callq 0x26e38
nop