// File: /workspace/github_cpp_makefile_star2_O2/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 $0xe8, %rsp
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r13
movq %rdi, %rbx
callq 0x4473c
movq %rax, %r14
leaq 0x8(%rbx), %rax
cmpq %rax, %r14
je 0x431d2
movq %r15, 0x10(%rsp)
leaq 0x40(%r14), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x447b2
addq $0x48, %r14
cmpq %r14, %rax
je 0x430f5
movq %rax, %r15
leaq 0x98(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x35810
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3b144
leaq 0x40(%r15), %rdi
leaq 0x18(%rsp), %rsi
callq 0x3b1b6
leaq 0x18(%rsp), %rdi
callq 0x3b1ea
leaq 0x98(%rsp), %rdi
callq 0x35730
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x48(%r15)
jmp 0x431b6
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x35810
leaq 0x58(%rsp), %rdi
movq %rbp, %rsi
callq 0x35810
leaq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3b144
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x43131
incq 0x8(%rax)
leaq 0x48(%rsp), %rdx
movq %rax, (%rdx)
movl (%rcx), %eax
movl %eax, 0x8(%rdx)
leaq 0xb8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x44a68
leaq 0x18(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x44694
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0x44828
movl %edx, %ebp
leaq 0x18(%rsp), %rdi
callq 0x44622
leaq 0xb8(%rsp), %rdi
callq 0x446d6
leaq 0x48(%rsp), %rdi
callq 0x3b1ea
leaq 0x8(%rsp), %rdi
callq 0x3b1ea
leaq 0x58(%rsp), %rdi
callq 0x35730
leaq 0x78(%rsp), %rdi
callq 0x35730
testb $0x1, %bpl
je 0x431d2
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq %r13, %rdx
callq 0x44aa6
cmpq 0x38(%rbx), %rax
je 0x431d6
movb $0x1, 0x20(%rax)
jmp 0x43211
xorl %eax, %eax
jmp 0x43213
leaq 0x30(%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x35810
movb $0x1, 0x20(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x44710
leaq 0x18(%rsp), %rdi
callq 0x35730
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
callq 0x44e39
movb $0x1, %al
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x35730
jmp 0x432b0
movq %rax, %rbx
jmp 0x43280
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x44622
jmp 0x43269
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3b1ea
jmp 0x432a3
movq %rax, %rbx
jmp 0x43294
movq %rax, %rbx
jmp 0x4328a
movq %rax, %rbx
jmp 0x43276
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x446d6
leaq 0x48(%rsp), %rdi
callq 0x3b1ea
leaq 0x8(%rsp), %rdi
callq 0x3b1ea
leaq 0x58(%rsp), %rdi
callq 0x35730
leaq 0x78(%rsp), %rdi
callq 0x35730
jmp 0x432b0
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x35730
movq %rbx, %rdi
callq 0x35b50
movq %rax, %rdi
callq 0x3a198