// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a81a
testb %al, %al
je 0x3feeb
movq (%r15), %rdi
callq 0x40c94
movq %rax, %r14
movl 0x8(%r15), %eax
cmpq $0x8, %rax
ja 0x3ff2d
movq %r14, %rsi
addq $0x10, %rsi
leaq 0x32cdd(%rip), %rcx     # 0x72ba4
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 0x27ae0
cmpq $-0x1, %rax
jmp 0x3ff96
movq 0x500ee(%rip), %rbx     # 0x8ffe0
leaq 0x33719(%rip), %rsi     # 0x73612
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x276c0
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 0x3ff2f
movq 0x8(%rbx), %rdx
cmpq 0x18(%r14), %rdx
jne 0x3ff2d
testq %rdx, %rdx
je 0x3fff9
movq (%rsi), %rsi
movq (%rbx), %rdi
callq 0x275f0
testl %eax, %eax
jmp 0x3fff1
movq %rbx, %rdi
callq 0x27050
testl %eax, %eax
setg %al
jmp 0x3ff2f
movq 0x8(%rbx), %rdx
movb $0x1, %al
cmpq 0x18(%r14), %rdx
jne 0x3ff2f
testq %rdx, %rdx
je 0x3ff2d
movq (%rsi), %rsi
movq (%rbx), %rdi
callq 0x275f0
testl %eax, %eax
setne %al
jmp 0x3ff2f
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x27ae0
movq 0x8(%rbx), %rcx
subq 0x18(%r14), %rcx
cmpq %rcx, %rax
jmp 0x3fff1
movq %rbx, %rdi
callq 0x27050
shrl $0x1f, %eax
jmp 0x3ff2f
movq %rbx, %rdi
callq 0x27050
testl %eax, %eax
setle %al
jmp 0x3ff2f
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x27ae0
testq %rax, %rax
sete %al
jmp 0x3ff2f
movb $0x1, %al
jmp 0x3ff2f