// File: /workspace/github_cpp_makefile_star2_O3/ncbi[P]amr/common.cpp
// Function: Common_sp::matches(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Common_sp::StringMatch::Type)
bool matches (const string &hay,
              const string &needle,
              StringMatch::Type type)
{ 
	switch (type)
	{ 
		case StringMatch::part:  return contains (hay, needle);   
		case StringMatch::word:  return containsWord (hay, needle) != string::npos;
		case StringMatch::whole: return hay == needle;
	}
	NEVER_CALL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
cmpl $0x2, %edx
je 0x38705
cmpl $0x1, %edx
je 0x386e7
testl %edx, %edx
jne 0x3872e
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rax, %rsi
xorl %edx, %edx
callq 0xa9e0
jmp 0x386ec
callq 0x385aa
cmpq $-0x1, %rax
setne %al
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rdi), %rdx
cmpq 0x8(%rsi), %rdx
jne 0x38726
testq %rdx, %rdx
je 0x3872a
movq (%rsi), %rsi
movq (%rdi), %rdi
callq 0xa5c0
testl %eax, %eax
sete %al
jmp 0x386f3
xorl %eax, %eax
jmp 0x386f3
movb $0x1, %al
jmp 0x386f3
callq 0xa6b0
testl %eax, %eax
jne 0x387c6
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x541e8(%rip), %rsi     # 0x8c936
leaq 0x541f4(%rip), %rdx     # 0x8c949
leaq 0x88(%rsp), %rdi
callq 0x2fa1a
leaq 0xa8(%rsp), %rdi
movl $0x3a4, %esi            # imm = 0x3A4
callq 0x2d1fa
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2d152
leaq 0x5244d(%rip), %rsi     # 0x8abe5
leaq 0xc8(%rsp), %rdi
callq 0xaac0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x387d0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x387dd
movl $0x1, %edi
callq 0xa6c0
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x54306(%rip), %rsi     # 0x8cb0c
leaq 0x54349(%rip), %rdx     # 0x8cb56
leaq 0x68(%rsp), %rdi
callq 0x2fa1a
leaq 0x54115(%rip), %rsi     # 0x8c933
leaq 0x68(%rsp), %rdi
callq 0xaac0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3884a
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x38857
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rsi
leaq 0x28(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2d152
leaq 0x54228(%rip), %rsi     # 0x8cab4
leaq 0xe8(%rsp), %rdi
callq 0xaac0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x388ba
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x388c7
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x34fa2
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x38907
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x38907
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3892d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3892d
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x38949
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x38949
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x38965
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x38965
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x38981
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x38981
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x389a7
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x389a7
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x389cd
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x389cd
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x389ea
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10