// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Type.cpp
// Function: TypeBase::matches(std::shared_ptr<TypeBase>)
bool TypeBase::matches(Type other)
{
	if (other==shared_from_this())
		return true;
	
	if (getType()==WHATEV || other->getType()==WHATEV)
		return true;
		
	if (getType()==TUPLE)
	{
		auto subTypes=getAllSubTypes();
		
		if (subTypes->size()==1)
		{
			if ((*subTypes)[0].type->matches(other))
				return true;
		}
	}
	
	if (other->getType()==TUPLE)
	{
		auto subTypes=other->getAllSubTypes();
		
		if (subTypes->size()==1)
		{
			if ((*subTypes)[0].type->matches(shared_from_this()))
				return true;
		}
	}
	
	if (other->getType()!=getType())
		return false;
	
	return matchesSameTypeType(other);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x585be
movq (%r14), %r13
movq (%r12), %rbp
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x55576
callq 0xdce4
movb $0x1, %r12b
cmpq %rbp, %r13
je 0x556e5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
cmpl $0x8, %eax
je 0x556e5
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x8, %eax
je 0x556e5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
cmpl $0x7, %eax
jne 0x55620
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x58(%rax)
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cmpq $0x30, %rax
jne 0x55620
movq 0x20(%rcx), %rdi
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x555fc
movq 0x449ba(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x555f8
incl 0x8(%rax)
jmp 0x555fc
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rsi
callq 0x55538
movl %eax, %ebp
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x55617
callq 0xdce4
testb %bpl, %bpl
jne 0x556e5
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
cmpl $0x7, %eax
jne 0x5567d
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cmpq $0x30, %rax
jne 0x5567d
movq 0x20(%rcx), %rbp
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x585be
movq %rbp, %rdi
movq %r13, %rsi
callq 0x55538
movl %eax, %r15d
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x55678
callq 0xdce4
testb %r15b, %r15b
jne 0x556e5
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movl %eax, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
cmpl %eax, %ebp
jne 0x556bc
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x556c5
movq 0x448f6(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x556c1
incl 0x8(%rax)
jmp 0x556c5
xorl %r12d, %r12d
jmp 0x556e5
lock
incl 0x8(%rax)
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x60(%rax)
movl %eax, %r12d
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x556e5
callq 0xdce4
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
jmp 0x55713
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0x55713
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5571d
callq 0xdce4
movq %rbx, %rdi
callq 0xa510
nop