// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_properties.h
// Function: BamTools::PropertyFilterValue::check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
inline
bool PropertyFilterValue::check(const std::string& query) const {
  
    // ensure filter value & query are same type
    if ( !Value.is_type<std::string>() ) {
        std::cerr << "Cannot compare different types!" << std::endl;
        return false;
    }
  
    // localize string version of our filter value
    const std::string& valueString = Value.get<std::string>();
    
    // string matching based on our filter type
    switch ( Type ) {
        case ( PropertyFilterValue::CONTAINS)           : return ( query.find(valueString) != std::string::npos );
        case ( PropertyFilterValue::ENDS_WITH)          : return ( query.find(valueString) == (query.length() - valueString.length()) ); 
        case ( PropertyFilterValue::EXACT)              : return ( query == valueString );
        case ( PropertyFilterValue::GREATER_THAN)       : return ( query >  valueString ); 
        case ( PropertyFilterValue::GREATER_THAN_EQUAL) : return ( query >= valueString ); 
        case ( PropertyFilterValue::LESS_THAN)          : return ( query <  valueString );
        case ( PropertyFilterValue::LESS_THAN_EQUAL)    : return ( query <= valueString );
        case ( PropertyFilterValue::NOT)                : return ( query != valueString );
        case ( PropertyFilterValue::STARTS_WITH)        : return ( query.find(valueString) == 0 );
        default : BAMTOOLS_ASSERT_UNREACHABLE;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x3a7b4
testb %al, %al
je 0x3fe13
movq (%r15), %rdi
callq 0x40bbe
movq %rax, %r14
movl 0x8(%r15), %eax
cmpq $0x8, %rax
ja 0x3fe55
movq %r14, %rsi
addq $0x10, %rsi
leaq 0x31db5(%rip), %rcx     # 0x71ba4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x27ad0
cmpq $-0x1, %rax
jmp 0x3febe
movq 0x4f1c6(%rip), %rbx     # 0x8efe0
leaq 0x327f1(%rip), %rsi     # 0x72612
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x276b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq %rbx, %rdi
callq 0x27040
movq %rax, %rdi
callq 0x27410
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x27050
testl %eax, %eax
setns %al
jmp 0x3fe57
movq 0x8(%rbx), %rdx
cmpq 0x18(%r14), %rdx
jne 0x3fe55
testq %rdx, %rdx
je 0x3ff21
movq (%rsi), %rsi
movq (%rbx), %rdi
callq 0x275f0
testl %eax, %eax
jmp 0x3ff19
movq %rbx, %rdi
callq 0x27050
testl %eax, %eax
setg %al
jmp 0x3fe57
movq 0x8(%rbx), %rdx
movb $0x1, %al
cmpq 0x18(%r14), %rdx
jne 0x3fe57
testq %rdx, %rdx
je 0x3fe55
movq (%rsi), %rsi
movq (%rbx), %rdi
callq 0x275f0
testl %eax, %eax
setne %al
jmp 0x3fe57
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x27ad0
movq 0x8(%rbx), %rcx
subq 0x18(%r14), %rcx
cmpq %rcx, %rax
jmp 0x3ff19
movq %rbx, %rdi
callq 0x27050
shrl $0x1f, %eax
jmp 0x3fe57
movq %rbx, %rdi
callq 0x27050
testl %eax, %eax
setle %al
jmp 0x3fe57
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x27ad0
testq %rax, %rax
sete %al
jmp 0x3fe57
movb $0x1, %al
jmp 0x3fe57