// File: /workspace/github_cpp_makefile_star2_O1/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 0x27dc8
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x40(%rbx)
xorl %eax, %eax
movq %rax, 0x50(%rbx)
leaq 0x118(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
leaq 0x180(%rsp), %rdi
movq %rax, -0x10(%rdi)
movups %xmm0, -0x20(%rdi)
movups %xmm0, -0x60(%rdi)
movups %xmm0, -0x50(%rdi)
movups %xmm0, -0x40(%rdi)
movups %xmm0, -0x30(%rdi)
movups %xmm0, -0x70(%rdi)
movups %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups 0x2ca(%rsp), %xmm0
movups %xmm0, -0x16(%rdi)
movaps 0x2c0(%rsp), %xmm0
movups %xmm0, -0x20(%rdi)
movq %r14, %rsi
callq 0x90012
leaq 0x140(%rsp), %rbx
xorps %xmm1, %xmm1
movaps %xmm1, 0x40(%rsp)
leaq 0x15a6(%rip), %rcx      # 0x262ea
movq %rcx, 0x58(%rsp)
leaq 0x15a8(%rip), %rdx      # 0x262f8
movq %rdx, 0x50(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x40(%rsp)
movups %xmm1, (%rbx)
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rsi
movq %rax, 0x50(%rsp)
movq %rdx, 0x10(%rbx)
movq %rsi, 0x58(%rsp)
movq %rcx, 0x18(%rbx)
testq %rax, %rax
je 0x24d8e
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 0x8dd74
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x38402
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 0x24e35
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 0x38402
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 0x149d(%rip), %rax      # 0x26310
movq %rax, 0x18(%rsi)
leaq 0x1606(%rip), %rax      # 0x26484
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0x8c242
leaq 0x198(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x37ae8
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 0x2343c
movq 0x250(%rsp), %rdi
testq %rdi, %rdi
je 0x24ef2
movq 0x260(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x220(%rsp), %rax
testq %rax, %rax
je 0x24f11
leaq 0x210(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x200(%rsp), %rax
testq %rax, %rax
je 0x24f30
leaq 0x1f0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x1b8(%rsp), %r15
movq %r15, %rdi
callq 0x376f2
movq -0x20(%r15), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x24f61
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x24f7a
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x24f91
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x24faa
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x24fc7
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x11360
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x24fe1
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq 0x130(%rsp), %rax
testq %rax, %rax
je 0x24ffb
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x376f2
movq -0x20(%rbx), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x2502c
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 0x25123
jmp 0x25123
jmp 0x25123
jmp 0x25123
jmp 0x25123
jmp 0x25123
jmp 0x25123
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x37c26
jmp 0x250eb
movq %rax, %rbx
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x2508d
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
movl $0x58, %esi
movq %r12, %rdi
callq 0x11360
jmp 0x250a4
jmp 0x25123
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x25104
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x25104
jmp 0x25123
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x2510e
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2510e
jmp 0x25123
jmp 0x250e3
movq %rax, %rbx
jmp 0x2510e
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x25104
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x40(%rsp), %rdi
callq 0x2512c
leaq 0xc8(%rsp), %rdi
callq 0x37c26
movq %rbx, %rdi
callq 0x11580
movq %rax, %rdi
callq 0x2789a
nop