// File: /workspace/github_cpp_makefile_star2_O3/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 0x3b06a
movq %rax, %r14
leaq 0x8(%rbx), %rax
cmpq %rax, %r14
je 0x39707
movq %r12, 0x8(%rsp)
leaq 0x40(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x3b0ce
addq $0x48, %r14
cmpq %r14, %rax
je 0x39549
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 0x2f10a
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2f6a2
leaq 0x40(%r12), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2f75a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x39526
decq 0x8(%rdi)
jne 0x39526
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x39538
callq 0x27560
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x48(%r12)
jmp 0x396e9
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2f10a
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x2f10a
movq %r15, 0x40(%rsp)
movq %rsp, %rdi
leaq 0x98(%rsp), %rsi
callq 0x2f6a2
movq (%rsp), %r15
testq %r15, %r15
je 0x395ac
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 0x2f10a
testq %r15, %r15
je 0x395dd
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 0x2f10a
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x3961d
incq 0x8(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, 0x20(%rsi)
movl 0x90(%rsp), %eax
movl %eax, 0x28(%rsi)
movq %r13, %rdi
callq 0x3b132
movl %edx, %ebp
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x39650
decq 0x8(%rdi)
jne 0x39650
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3965f
callq 0x27560
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x39678
decq 0x8(%rdi)
jne 0x39678
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x39687
callq 0x27560
testq %r15, %r15
leaq 0xa8(%rsp), %r14
je 0x396a3
decq 0x8(%r15)
jne 0x396a3
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x396b8
decq 0x8(%rdi)
jne 0x396b8
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
movq 0x40(%rsp), %r13
je 0x396cf
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x396e3
callq 0x27560
testb $0x1, %bpl
je 0x39707
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq %r13, %rdx
callq 0x3b301
cmpq 0x38(%rbx), %rax
je 0x3971d
movb $0x1, 0x20(%rax)
movb $0x1, %bl
jmp 0x39709
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
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 0x2f10a
movb $0x1, 0x20(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b016
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x39762
callq 0x27560
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %r15
movb $0x1, %bl
cmpq %r15, %r14
je 0x39709
movq %r15, %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 %r15, %rsi
callq 0x3b760
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b83d
jmp 0x39709
movq %rax, %rbx
jmp 0x39829
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x39815
callq 0x27560
jmp 0x39815
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x39806
callq 0x27560
jmp 0x39806
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0x39871
jmp 0x39876
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3af68
jmp 0x39806
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3afc2
jmp 0x39815
movq %rax, %rbx
testq %r15, %r15
je 0x39829
decq 0x8(%r15)
jne 0x39829
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x39848
decq 0x8(%rdi)
jne 0x39848
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x39848
movq %rax, %rbx
jmp 0x39862
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x39862
callq 0x27560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x39876
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3989c
decq 0x8(%rdi)
jne 0x3989c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3989c
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x39871
jmp 0x39876
movq %rax, %rdi
callq 0x2e1cd
nop