// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_engine.h
// Function: bool BamTools::FilterEngine<BamTools::BamAlignmentChecker>::setProperty<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BamTools::PropertyFilterValue::ValueCompareType const&)
bool FilterEngine<FilterChecker>::setProperty(const std::string& filterName, 
                                              const std::string& propertyName, 
                                              const T& value,
                                              const PropertyFilterValue::ValueCompareType& type)
{
    // lookup filter by name, return false if not found
    FilterMap::iterator filterIter = m_filters.find(filterName);
    if ( filterIter == m_filters.end() ) return false;
      
    // lookup property for filter, add new PropertyFilterValue if not found, modify if already exists
    PropertyFilter& filter = (*filterIter).second;
    PropertyMap::iterator propertyIter = filter.Properties.find(propertyName);
    
    bool success;
    
    // property not found for this filter, create new entry
    if ( propertyIter == filter.Properties.end() )
        success = (filter.Properties.insert(std::make_pair(propertyName, PropertyFilterValue(value, type)))).second;
    
    // property already exists, modify
    else {
        PropertyFilterValue& filterValue = (*propertyIter).second;
        filterValue.Value = value;
        filterValue.Type  = type;
        success = true;
    }
    
    // if error so far, return false
    if ( !success ) return false;
    
    // --------------------------------------------
    // otherwise, set Property.IsEnabled to true
    
    // lookup property
    std::vector<Property>::iterator knownPropertyIter = std::find( m_properties.begin(), m_properties.end(), propertyName);
    
    // if not found, create a new (enabled) entry (& re-sort list)
    if ( knownPropertyIter == m_properties.end() ) {
        m_properties.push_back( Property(propertyName, true) );
        std::sort( m_properties.begin(), m_properties.end() );
    } 
    
    // property already known, set as enabled
    else (*knownPropertyIter).IsEnabled = true;

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %r12
movq %rcx, %rbp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x3b0c0
movq %rax, %r14
leaq 0x8(%rbx), %rax
cmpq %rax, %r14
je 0x395b4
movq %r12, 0x8(%rsp)
leaq 0x40(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x3b128
addq $0x48, %r14
cmpq %r14, %rax
je 0x395bb
movq %rax, %r12
movq %r15, %r13
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
callq 0x2f122
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2f6ae
leaq 0x40(%r12), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2f766
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3958e
decq 0x8(%rdi)
jne 0x3958e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x395a0
callq 0x27560
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x48(%r12)
movb $0x1, %bpl
jmp 0x39755
xorl %ebp, %ebp
jmp 0x3980b
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2f122
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x2f122
movq %r15, 0x40(%rsp)
movq %rsp, %rdi
leaq 0x98(%rsp), %rsi
callq 0x2f6ae
movq (%rsp), %r15
testq %r15, %r15
je 0x3961e
incq 0x8(%r15)
movq 0x8(%rsp), %rax
movl (%rax), %ebp
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x2f122
testq %r15, %r15
je 0x3964f
incq 0x8(%r15)
movq %r15, 0x88(%rsp)
movl %ebp, 0x90(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2f122
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x3968f
incq 0x8(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, 0x20(%rsi)
movl 0x90(%rsp), %eax
movl %eax, 0x28(%rsi)
movq %r13, %rdi
callq 0x3b190
movl %edx, %ebp
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x396c2
decq 0x8(%rdi)
jne 0x396c2
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x396d1
callq 0x27560
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x396ea
decq 0x8(%rdi)
jne 0x396ea
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x396f9
callq 0x27560
testq %r15, %r15
leaq 0xa8(%rsp), %r14
je 0x39715
decq 0x8(%r15)
jne 0x39715
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3972a
decq 0x8(%rdi)
jne 0x3972a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
movq 0x40(%rsp), %r13
je 0x39741
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x39755
callq 0x27560
testb $0x1, %bpl
je 0x3980b
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq %r13, %rdx
callq 0x3b363
cmpq 0x38(%rbx), %rax
je 0x3977e
movb $0x1, 0x20(%rax)
jmp 0x3980b
leaq 0x30(%rbx), %r14
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2f122
movb $0x1, 0x20(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b06c
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x397c3
callq 0x27560
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %rbx
cmpq %rbx, %r14
je 0x3980b
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
bsrq %rcx, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b7b2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b88f
andb $0x1, %bpl
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3989b
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x39887
callq 0x27560
jmp 0x39887
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x39878
callq 0x27560
jmp 0x39878
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0x398e3
jmp 0x398e8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3afbe
jmp 0x39878
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3b018
jmp 0x39887
movq %rax, %rbx
testq %r15, %r15
je 0x3989b
decq 0x8(%r15)
jne 0x3989b
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x398ba
decq 0x8(%rdi)
jne 0x398ba
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x398ba
movq %rax, %rbx
jmp 0x398d4
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x398d4
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x398e8
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3990e
decq 0x8(%rdi)
jne 0x3990e
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3990e
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x398e3
jmp 0x398e8
movq %rax, %rdi
callq 0x2e1ed
nop