// File: /workspace/github_cpp_makefile_star2_O1/Heptagon196[P]Gos/Reflection/ReflMgr.cpp
// Function: void ReflMgr::CheckParams<MethodInfo>(MethodInfo&, ArgsTypeList const&, MethodInfo**, bool)
void ReflMgr::CheckParams(MethodInfoType& info, const ArgsTypeList& lst, MethodInfoType** rec, bool showError) {
    if (info.argsList.size() != lst.size()) {
        return;
    }
    bool same = true;
    bool generics = false;
    for (int i = 0; i < info.argsList.size(); i++) {
        if (lst[i].getHash() != info.argsList[i].getHash()) {
            same = false;
        }
        bool canUseGenerics = info.argsList[i].getHash() == TypeID::get<ReflMgr::Any>().getHash();
        if (canUseGenerics) {
            generics = true;
        }
        if (!lst[i].canBeAppliedTo(info.argsList[i]) && !canUseGenerics) {
            if (showError) {
                ERROR << "Candidate: ";
                ERROR << info.name << "(";
                if (info.argsList.size() > 0) {
                    ERROR << info.argsList[0].getName();
                }
                for (int i = 1; i < info.argsList.size(); i++) {
                    ERROR << ", " << info.argsList[i].getName();
                }
                ERROR << "): " << std::endl;
                ERROR << lst[i].getName() << " cannot apply to " << info.argsList[i].getName() << std::endl;
            }
            return;
        }
    }
    if (same && !generics) {
        rec[0] = &info;
    } else if (!generics) {
        rec[1] = &info;
    } else {
        rec[2] = &info;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq 0xc0(%rsi), %rax
subq 0xb8(%rsi), %rax
movq 0x8(%rdx), %rsi
movq %rdx, 0x18(%rsp)
subq (%rdx), %rsi
cmpq %rsi, %rax
jne 0x8c9b3
movq %rcx, 0x20(%rsp)
movq 0xc0(%r14), %rax
cmpq 0xb8(%r14), %rax
setne %al
je 0x8c75a
movl %r8d, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movb $0x1, %r13b
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movl %r12d, 0xc(%rsp)
movb %al, 0x3(%rsp)
movq 0x18(%rsp), %r12
movq (%r12), %rdi
addq %r15, %rdi
callq 0x1ff7a
movq %rax, %rbp
movq 0xb8(%r14), %rdi
addq %r15, %rdi
callq 0x1ff7a
cmpq %rax, %rbp
movzbl %r13b, %r13d
movl $0x0, %eax
cmovnel %eax, %r13d
movl %r13d, 0x4(%rsp)
movq 0xb8(%r14), %rdi
addq %r15, %rdi
callq 0x1ff7a
movq %rax, %rbp
movabsq $-0x23244b0fbd3d03de, %rax # imm = 0xDCDBB4F042C2FC22
movq %rax, 0x28(%rsp)
movq $0xc, 0x30(%rsp)
leaq 0x308a5(%rip), %rax     # 0xbcf86
movq %rax, 0x38(%rsp)
movw $0x0, 0x40(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1ff7a
movq %rax, %r13
movq (%r12), %rdi
movl 0xc(%rsp), %r12d
addq %r15, %rdi
movq 0xb8(%r14), %rsi
addq %r15, %rsi
callq 0x1ff88
movzbl %r12b, %r12d
cmpq %r13, %rbp
movl $0x1, %ecx
cmovel %ecx, %r12d
je 0x8c72b
testb %al, %al
je 0x8c765
incq %rbx
movq 0xc0(%r14), %rax
subq 0xb8(%r14), %rax
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rbx, %rax
seta %al
movl 0x4(%rsp), %r13d
ja 0x8c66f
jmp 0x8c98b
movb $0x1, %r13b
xorl %r12d, %r12d
jmp 0x8c98b
cmpb $0x0, 0x8(%rsp)
je 0x8c982
movq 0x10(%rsp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x9186d(%rip), %r13     # 0x11dff0
movq %r13, %rdi
callq 0x113c0
leaq 0x31b18(%rip), %rsi     # 0xbe2aa
movl $0xb, %edx
movq %rax, %rdi
callq 0x113c0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r13, %rdi
callq 0x113c0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x113c0
leaq 0x31af2(%rip), %rsi     # 0xbe2b6
movl $0x1, %edx
movq %rax, %rdi
callq 0x113c0
movq 0xc0(%r14), %rax
cmpq 0xb8(%r14), %rax
je 0x8c811
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x91801(%rip), %rdi     # 0x11dff0
callq 0x113c0
movq %rax, %r13
movq 0xb8(%r14), %rdi
callq 0x1ff7e
movq %r13, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq 0xc0(%r14), %rax
subq 0xb8(%r14), %rax
cmpq $0x21, %rax
movq %rbx, %rax
jb 0x8c89c
movl $0x1, %ebx
movl $0x20, %ebp
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x917b0(%rip), %rdi     # 0x11dff0
callq 0x113c0
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x31161(%rip), %rsi     # 0xbd9b8
callq 0x113c0
movq 0xb8(%r14), %rdi
addq %rbp, %rdi
callq 0x1ff7e
movq %r13, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq 0xc0(%r14), %rax
subq 0xb8(%r14), %rax
incq %rbx
sarq $0x5, %rax
addq $0x20, %rbp
cmpq %rbx, %rax
movq 0x10(%rsp), %rax
ja 0x8c832
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x91746(%rip), %rbp     # 0x11dff0
movq %rbp, %rdi
movq %rax, %rbx
callq 0x113c0
movq %rax, %r13
leaq 0x319f9(%rip), %rsi     # 0xbe2b8
movl $0x3, %edx
movq %rax, %rdi
callq 0x113c0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x11340
movsbl %al, %esi
movq %r13, %rdi
callq 0x11040
movq %rax, %rdi
callq 0x11260
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rbp, %rdi
callq 0x113c0
movq %rax, %r13
movq 0x18(%rsp), %rax
movq (%rax), %rdi
addq %r15, %rdi
callq 0x1ff7e
movq %r13, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq %rax, %r13
leaq 0x3198e(%rip), %rsi     # 0xbe2bc
movl $0x11, %edx
movq %rax, %rdi
callq 0x113c0
addq 0xb8(%r14), %r15
movq %r15, %rdi
callq 0x1ff7e
movq %r13, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x11340
movsbl %al, %esi
movq %r15, %rdi
callq 0x11040
movq %rax, %rdi
callq 0x11260
movl 0x4(%rsp), %r13d
movb 0x3(%rsp), %al
testb $0x1, %al
movq 0x20(%rsp), %rax
jne 0x8c9b3
testb $0x1, %r13b
je 0x8c9a0
testb $0x1, %r12b
je 0x8c9b0
testb $0x1, %r12b
je 0x8c9ac
addq $0x10, %rax
jmp 0x8c9b0
addq $0x8, %rax
movq %r14, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq