// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movq %rsi, %rbx
movq 0xc0(%rsi), %rax
subq 0xb8(%rsi), %rax
movq 0x8(%rdx), %rsi
movq %rdx, 0x28(%rsp)
subq (%rdx), %rsi
cmpq %rsi, %rax
jne 0x6f384
movl %r8d, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movb $0x1, 0xf(%rsp)
pushq $-0x1
popq %r13
xorl %r12d, %r12d
xorl %edx, %edx
movq 0x28(%rsp), %r14
movq 0xc0(%rbx), %rax
subq 0xb8(%rbx), %rax
sarq $0x5, %rax
incq %r13
cmpq %r13, %rax
jbe 0x6f2bf
leaq 0x20(%r12), %rax
movq %rax, 0x30(%rsp)
movq (%r14), %rdi
addq %r12, %rdi
movl %edx, 0x1c(%rsp)
callq 0x1b9ca
movq %rax, %rbp
movq 0xb8(%rbx), %rdi
addq %r12, %rdi
callq 0x1b9ca
cmpq %rax, %rbp
sete %al
andb %al, 0xf(%rsp)
movq 0xb8(%rbx), %rdi
addq %r12, %rdi
callq 0x1b9ca
movq %rax, %rbp
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x21ea6
movq %r15, %rdi
callq 0x1b9ca
movq %rax, %r15
movq (%r14), %rdi
addq %r12, %rdi
addq 0xb8(%rbx), %r12
movq %r12, %rsi
callq 0x1b9d8
movl 0x1c(%rsp), %edx
movq 0x30(%rsp), %rcx
movzbl %dl, %edx
movq %rcx, %r12
cmpq %r15, %rbp
pushq $0x1
popq %rsi
cmovel %esi, %edx
je 0x6f104
movq %rcx, %r12
testb %al, %al
jne 0x6f104
cmpb $0x0, 0x18(%rsp)
movq 0x10(%rsp), %r14
je 0x6f384
movq 0x96e1a(%rip), %r15     # 0x105ff0
movq %r15, %rdi
movq %r14, %rsi
callq 0x11320
leaq 0x282a0(%rip), %rsi     # 0x97488
movq %rax, %rdi
callq 0x11340
movq %r15, %rdi
movq %r14, %rsi
callq 0x11320
movq %rax, %rdi
movq %rbx, %rsi
callq 0x11320
leaq 0x28287(%rip), %rsi     # 0x97494
movq %rax, %rdi
callq 0x11340
movq 0xc0(%rbx), %rax
cmpq 0xb8(%rbx), %rax
je 0x6f251
movq 0x96dc4(%rip), %rdi     # 0x105ff0
movq %r14, %rsi
callq 0x11320
movq %rax, %r15
movq 0xb8(%rbx), %rdi
callq 0x1b9ce
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113b0
pushq $0x1
popq %r14
pushq $0x20
popq %r13
movq 0x96d90(%rip), %r12     # 0x105ff0
leaq 0x27748(%rip), %rbp     # 0x969af
movq 0xc0(%rbx), %r15
subq 0xb8(%rbx), %r15
sarq $0x5, %r15
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x11320
cmpq %r14, %r15
jbe 0x6f2ef
movq %rax, %rdi
movq %rbp, %rsi
callq 0x11340
movq %rax, %r15
movq 0xb8(%rbx), %rdi
addq %r13, %rdi
callq 0x1b9ce
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113b0
incq %r14
addq $0x20, %r13
jmp 0x6f267
testb $0x1, 0xf(%rsp)
je 0x6f2d8
testb $0x1, %dl
movq 0x20(%rsp), %rax
jne 0x6f2e6
movq %rbx, (%rax)
jmp 0x6f384
testb $0x1, %dl
movq 0x20(%rsp), %rax
je 0x6f380
movq %rbx, 0x10(%rax)
jmp 0x6f384
leaq 0x281a0(%rip), %rsi     # 0x97496
movq %rax, %rdi
callq 0x11340
movq %rax, %rdi
callq 0x111b0
movq 0x96ce3(%rip), %rdi     # 0x105ff0
movq 0x10(%rsp), %rsi
callq 0x11320
movq %rax, %r15
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rsp), %r12
leaq (%rax,%r12), %rdi
addq $-0x20, %rdi
callq 0x1b9ce
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113b0
leaq 0x28151(%rip), %rsi     # 0x9749a
movq %rax, %rdi
callq 0x11340
movq %rax, %r14
movq 0xb8(%rbx), %rax
leaq (%rax,%r12), %rdi
addq $-0x20, %rdi
callq 0x1b9ce
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113b0
movq %rax, %rdi
callq 0x111b0
jmp 0x6f384
movq %rbx, 0x8(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop