// File: 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:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x148(%rsp)
movq %rsi, 0x140(%rsp)
movl %edx, 0x13c(%rsp)
movl 0x13c(%rsp), %eax
movl %eax, 0x18(%rsp)
testl %eax, %eax
je 0x42155
jmp 0x4213f
movl 0x18(%rsp), %eax
subl $0x1, %eax
je 0x42178
jmp 0x4214a
movl 0x18(%rsp), %eax
subl $0x2, %eax
je 0x421a2
jmp 0x421c5
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rsi
callq 0x2f5d0
andb $0x1, %al
movb %al, 0x157(%rsp)
jmp 0x42428
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rsi
callq 0x42000
cmpq $-0x1, %rax
setne %al
andb $0x1, %al
movb %al, 0x157(%rsp)
jmp 0x42428
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rsi
callq 0x30100
andb $0x1, %al
movb %al, 0x157(%rsp)
jmp 0x42428
callq 0xc8c0
cmpl $0x0, %eax
jne 0x4241e
leaq 0x97(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xcd00
movq 0x10(%rsp), %rdx
leaq 0x8b828(%rip), %rsi     # 0xcda19
leaq 0x98(%rsp), %rdi
callq 0x29fd0
jmp 0x42200
leaq 0x60(%rsp), %rdi
movl $0x3a4, %esi            # imm = 0x3A4
callq 0x2ded0
jmp 0x42211
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x2dde0
jmp 0x4222d
leaq 0x8996d(%rip), %rdx     # 0xcbba1
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x2a2f0
jmp 0x4224b
leaq 0x1f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xcd00
movq 0x8(%rsp), %rdx
leaq 0x8b989(%rip), %rsi     # 0xcdbef
leaq 0x20(%rsp), %rdi
callq 0x29fd0
jmp 0x42272
leaq 0x8b79d(%rip), %rdx     # 0xcda16
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2a2f0
jmp 0x4228a
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x2dde0
jmp 0x422a6
leaq 0x8b8ea(%rip), %rdx     # 0xcdb97
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x2a2f0
jmp 0x422c4
leaq 0x118(%rsp), %rdi
callq 0x3e9b0
jmp 0x422d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x4240f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x42402
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x423b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x118(%rsp), %rdi
callq 0xce98
leaq 0xf8(%rsp), %rdi
callq 0xce98
leaq 0x40(%rsp), %rdi
callq 0xce98
leaq 0x20(%rsp), %rdi
callq 0xce98
leaq 0x1f(%rsp), %rdi
callq 0xc7a0
leaq 0xd8(%rsp), %rdi
callq 0xce98
leaq 0xb8(%rsp), %rdi
callq 0xce98
leaq 0x60(%rsp), %rdi
callq 0xce98
leaq 0x98(%rsp), %rdi
callq 0xce98
leaq 0x97(%rsp), %rdi
callq 0xc7a0
jmp 0x42439
movl $0x1, %edi
callq 0xc8d0
movb 0x157(%rsp), %al
andb $0x1, %al
addq $0x158, %rsp            # imm = 0x158
retq
movq 0x88(%rsp), %rdi
callq 0xccf0
nopw %cs:(%rax,%rax)