// File: /workspace/github_cpp_makefile_star2_O3/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 $0x68, %rsp
movq %rsi, %r15
movq 0xb8(%rsi), %rax
movq 0xc0(%rsi), %r9
movq %r9, %r10
subq %rax, %r10
movq 0x8(%rdx), %rsi
movq %rdx, 0x28(%rsp)
subq (%rdx), %rsi
cmpq %rsi, %r10
jne 0x8be7f
cmpq %rax, %r9
je 0x8bc2a
movl %r8d, 0x14(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
movb $0x1, %cl
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %r15, 0x20(%rsp)
movq 0x28(%rsp), %rbx
movb %cl, 0x7(%rsp)
movq %r12, 0x8(%rsp)
movq (%rbx), %rdi
addq %r12, %rdi
callq 0x1f5de
movq %rax, 0x40(%rsp)
movq 0xb8(%r15), %rdi
addq %r12, %rdi
callq 0x1f5de
movq %r15, %r12
movq %rax, 0x38(%rsp)
movq 0xb8(%r15), %rdi
addq 0x8(%rsp), %rdi
callq 0x1f5de
movq %rax, %rbp
movabsq $-0x23244b0fbd3d03de, %rax # imm = 0xDCDBB4F042C2FC22
movq %rax, 0x48(%rsp)
movq $0xc, 0x50(%rsp)
leaq 0x303cc(%rip), %rax     # 0xbbf56
movq %rax, 0x58(%rsp)
movw $0x0, 0x60(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1f5de
movq %rax, %r15
movq (%rbx), %rdi
addq 0x8(%rsp), %rdi
movq 0xb8(%r12), %rsi
movq 0x8(%rsp), %r12
addq %r12, %rsi
callq 0x1f5ec
cmpq %r15, %rbp
je 0x8bbc9
testb %al, %al
je 0x8bc32
movq 0x38(%rsp), %rax
cmpq %rax, 0x40(%rsp)
sete %al
movb 0x7(%rsp), %cl
andb %al, %cl
cmpq %r15, %rbp
movzbl %r13b, %r13d
movl $0x1, %eax
cmovel %eax, %r13d
movq 0x20(%rsp), %r15
movq 0xc0(%r15), %rax
subq 0xb8(%r15), %rax
incq %r14
sarq $0x5, %rax
addq $0x20, %r12
cmpq %r14, %rax
ja 0x8bb27
testb %cl, %cl
je 0x8be6a
testb $0x1, %r13b
movq 0x18(%rsp), %rcx
jne 0x8be75
movq %r15, (%rcx)
jmp 0x8be7f
cmpb $0x0, 0x14(%rsp)
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %r13
je 0x8be7f
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x9139a(%rip), %r15     # 0x11cff0
movq %r15, %rdi
callq 0x113c0
leaq 0x31615(%rip), %rsi     # 0xbd27a
movl $0xb, %edx
movq %rax, %rdi
callq 0x113c0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x113c0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rax, %rdi
callq 0x113c0
leaq 0x315ec(%rip), %rsi     # 0xbd286
movl $0x1, %edx
movq %rax, %rdi
callq 0x113c0
movq 0xc0(%r12), %rax
movq %rax, %rcx
cmpq 0xb8(%r12), %rax
je 0x8bcfe
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x91325(%rip), %rdi     # 0x11cff0
callq 0x113c0
movq %rax, %r15
movq 0xb8(%r12), %rdi
callq 0x1f5e2
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq 0xb8(%r12), %rax
movq 0xc0(%r12), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x8bd7e
movl $0x1, %ebx
movl $0x20, %r14d
leaq 0x30c6f(%rip), %rbp     # 0xbc988
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x912c8(%rip), %rdi     # 0x11cff0
callq 0x113c0
movq %rax, %r15
movl $0x2, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x113c0
movq 0xb8(%r12), %rdi
addq %r14, %rdi
callq 0x1f5e2
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq 0xc0(%r12), %rax
subq 0xb8(%r12), %rax
incq %rbx
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rbx, %rax
ja 0x8bd19
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x91263(%rip), %rbx     # 0x11cff0
movq %rbx, %rdi
callq 0x113c0
movq %rax, %r15
leaq 0x314e9(%rip), %rsi     # 0xbd288
movl $0x3, %edx
movq %rax, %rdi
callq 0x113c0
movq (%r15), %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
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x113c0
movq %rax, %r15
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rbx
addq %rbx, %rdi
callq 0x1f5e2
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq %rax, %r15
leaq 0x31479(%rip), %rsi     # 0xbd28c
movl $0x11, %edx
movq %rax, %rdi
callq 0x113c0
addq 0xb8(%r12), %rbx
movq %rbx, %rdi
callq 0x1f5e2
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x113c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x11340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x11040
movq %rax, %rdi
callq 0x11260
jmp 0x8be7f
testb $0x1, %r13b
movq 0x18(%rsp), %rcx
je 0x8be7b
movq %r15, 0x10(%rcx)
jmp 0x8be7f
movq %r15, 0x8(%rcx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq