LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_filter.cpp
// Function: BamTools::FilterTool::~FilterTool()
FilterTool::~FilterTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x57ae4(%rip), %rax     # 0x8e7d0
movq %rax, (%rdi)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x36d00
movq %rbx, %rdi
callq 0x3a330
movq %rbx, %rdi
callq 0x27560
movq $0x0, 0x8(%r14)
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0x36d21
movq %rbx, %rdi
callq 0x31816
movq %rbx, %rdi
callq 0x27560
movq $0x0, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x36d3b
movq %rax, %r14
movq %rbx, %rdi
callq 0x27560
movq %r14, %rdi
callq 0x27b10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_filter.cpp
// Function: BamTools::FilterTool::Run(int, char**)
int FilterTool::Run(int argc, char* argv[]) {

    // parse command line arguments
    Options::Parse(argc, argv, 1);

    // initialize FilterTool with settings
    m_impl = new FilterToolPrivate(m_settings);

    // run FilterTool, return success/fail
    if ( m_impl->Run() )
        return 0;
    else
        return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %edi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x63ac2
movl $0x148, %edi            # imm = 0x148
callq 0x275c0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x317d0
movq %r14, 0x10(%rbx)
movq %r14, %rdi
callq 0x3450e
xorb $0x1, %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_engine.h
// Function: BamTools::FilterEngine<BamTools::BamAlignmentChecker>::addProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline bool FilterEngine<FilterChecker>::addProperty(const std::string& propertyName) {
    const std::vector<std::string> propertyNames = allPropertyNames();
    bool found = std::binary_search( propertyNames.begin(), propertyNames.end(), propertyName );
    if ( found ) return false;
    m_properties.push_back( Property(propertyName) );
    std::sort( m_properties.begin(), m_properties.end() );
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
movq %rsi, %r14
sarq $0x3, %rax
movabsq $-0x3333333333333333, %r13 # imm = 0xCCCCCCCCCCCCCCCD
imulq %r13, %rax
movq %rax, %rsi
callq 0x42520
movq 0x30(%rbx), %r15
movq 0x38(%rbx), %rbp
cmpq %rbp, %r15
je 0x3991f
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2e190
addq $0x28, %r15
cmpq %rbp, %r15
jne 0x3990b
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x424ef
movl %eax, %ebp
testb %al, %al
jne 0x399b2
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2f10a
leaq 0x30(%rbx), %rdi
leaq 0x20(%rsp), %rsi
movb $0x0, 0x20(%rsi)
callq 0x3b016
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x39974
callq 0x27560
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %rbx
cmpq %rbx, %r14
je 0x399b2
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
imulq %r13, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b760
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b83d
xorb $0x1, %bpl
movq %rsp, %rdi
callq 0x2f0c0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x399ea
callq 0x27560
jmp 0x399ea
jmp 0x399e7
jmp 0x399f6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2f0c0
jmp 0x39a01
jmp 0x39a09
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2f0c0
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_engine.h
// Function: BamTools::FilterEngine<BamTools::BamAlignmentChecker>::buildDefaultRuleString()
inline void FilterEngine<FilterChecker>::buildDefaultRuleString(void) {
  
    // set up temp string stream 
    std::stringstream ruleStream("");
  
    // get first filterName
    FilterMap::const_iterator mapIter = m_filters.begin();
    ruleStream << (*mapIter).first;
    
    // if there are more filters present
    // iterate over remaining filters, appending compare operator and filter name
    if ( m_filters.size() > 1 ) {        
        for ( ++mapIter ; mapIter != m_filters.end(); ++mapIter )
            ruleStream << ( (m_defaultCompareType == FilterCompareType::AND) ? " & " : " | " ) 
                       << (*mapIter).first;
    }

    // set m_ruleString from temp stream
    m_ruleString = ruleStream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x39d7d(%rip), %rdx     # 0x76817
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x2f1a0
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movl $0x18, %edx
callq 0x279b0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cac5
callq 0x27560
movq 0x18(%rbx), %r15
leaq 0x30(%rsp), %r14
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %r14, %rdi
callq 0x276b0
cmpq $0x2, 0x28(%rbx)
jb 0x3cb42
movq %r15, %rdi
callq 0x276c0
leaq 0x8(%rbx), %r13
cmpq %r13, %rax
je 0x3cb42
movq %rax, %r15
leaq 0x35a9b(%rip), %rbp     # 0x7259b
leaq 0x35a98(%rip), %r12     # 0x7259f
cmpl $0x0, 0xbc(%rbx)
movq %r12, %rsi
cmoveq %rbp, %rsi
movl $0x3, %edx
movq %r14, %rdi
callq 0x276b0
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %r14, %rdi
callq 0x276b0
movq %r15, %rdi
callq 0x276c0
movq %rax, %r15
cmpq %r13, %rax
jne 0x3cb07
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0x27990
addq $0x48, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
leaq 0x10(%rsp), %r14
callq 0x27350
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cb71
callq 0x27560
leaq 0x20(%rsp), %rdi
callq 0x27490
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cbbf
callq 0x27560
jmp 0x3cbbf
jmp 0x3cbbc
jmp 0x3cbbc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cbc9
callq 0x27560
jmp 0x3cbc9
movq %rax, %rbx
jmp 0x3cbc9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x27490
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_ruleparser.h
// Function: BamTools::RuleParser::RuleParser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
RuleParser(const std::string& ruleString)
            : m_ruleString(ruleString)
        { 
            // initialize char markers
            m_begin = (char*)m_ruleString.c_str();
            m_end   = m_begin + m_ruleString.length();
            ignoreQuotes();
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x2f10a
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x3a8b0
leaq 0x38(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3aa1a
movq %rsp, %rdi
callq 0x3a806
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x3d004
leaq 0x88(%rbx), %rdi
movq %rsp, %rsi
callq 0x3d192
movq %rsp, %rdi
callq 0x3cfa4
movq (%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq 0x8(%rbx), %rax
addq %rcx, %rax
movq %rax, 0x30(%rbx)
cmpb $0x22, (%rcx)
jne 0x3cc8d
incq %rcx
movq %rcx, 0x20(%rbx)
cmpb $0x22, (%rax)
jne 0x3cc99
decq %rax
movq %rax, 0x30(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movq %rsp, %rdi
callq 0x3cfa4
jmp 0x3ccc2
movq %rax, %r15
movq %rsp, %rdi
callq 0x3a806
jmp 0x3cccf
movq %rax, %r15
movq %r14, %rdi
callq 0x3a806
jmp 0x3cccf
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x3ccdc
callq 0x27560
movq %r15, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_filter_properties.h
// Function: bool BamTools::PropertyFilterValue::check<float>(float const&) const
bool PropertyFilterValue::check(const T& query) const {
  
    // ensure filter value & query are same type
    if ( !Value.is_type<T>() ) { 
        std::cerr << "Cannot compare different types!" << std::endl;
        return false;
    }
    
    // string matching
    if ( Value.is_type<std::string>() ) {
        std::cerr << "Cannot compare different types - query is a string!" << std::endl;
        return false;
    } 
    
    // numeric matching based on our filter type
    switch ( Type ) {
        case ( PropertyFilterValue::EXACT)              : return ( query == Value.get<T>() );
        case ( PropertyFilterValue::GREATER_THAN)       : return ( query >  Value.get<T>() ); 
        case ( PropertyFilterValue::GREATER_THAN_EQUAL) : return ( query >= Value.get<T>() ); 
        case ( PropertyFilterValue::LESS_THAN)          : return ( query <  Value.get<T>() );
        case ( PropertyFilterValue::LESS_THAN_EQUAL)    : return ( query <= Value.get<T>() );
        case ( PropertyFilterValue::NOT)                : return ( query != Value.get<T>() );
        default : BAMTOOLS_ASSERT_UNREACHABLE;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4212e
testb %al, %al
je 0x41e30
movq %rbx, %rdi
callq 0x3a7b4
testb %al, %al
je 0x41e7c
movq 0x4d1be(%rip), %rbx     # 0x8efe0
leaq 0x30809(%rip), %rsi     # 0x72632
movl $0x33, %edx
jmp 0x41e43
movq 0x4d1a9(%rip), %rbx     # 0x8efe0
leaq 0x307d4(%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
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl $0x5, %eax
ja 0x41e72
leaq 0x2fde2(%rip), %rcx     # 0x71c70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x4(%rsp), %xmm0
cmpeqss 0x10(%rax), %xmm0
jmp 0x41f62
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x10(%rax), %xmm0
ucomiss 0x4(%rsp), %xmm0
jmp 0x41ef7
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x4(%rsp), %xmm0
ucomiss 0x10(%rax), %xmm0
setae %al
jmp 0x41e74
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x10(%rax), %xmm0
ucomiss 0x4(%rsp), %xmm0
jmp 0x41f3b
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x4(%rsp), %xmm0
ucomiss 0x10(%rax), %xmm0
seta %al
jmp 0x41e74
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x42174
movss 0x4(%rsp), %xmm0
cmpneqss 0x10(%rax), %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x41e74
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/utils/bamtools_variant.h
// Function: BamTools::Variant::Impl<unsigned int>* BamTools::Variant::CastFromBase<unsigned int>(BamTools::Variant::ImplBase*)
static Impl<T>* CastFromBase(ImplBase* v) {
            // This upcast will fail if T is other than the T used
            // with the constructor of variant_t.
            Impl<T>* p = dynamic_cast< Impl<T>* > (v);
            if ( p == NULL ) 
                throw std::invalid_argument( typeid(T).name() + std::string(" is not a valid type") );
            return p;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x40a68
leaq 0x4dc46(%rip), %rsi     # 0x8e690
leaq 0x4de0f(%rip), %rdx     # 0x8e860
xorl %ecx, %ecx
callq 0x27690
testq %rax, %rax
je 0x40a68
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x27320
movq %rax, %rbx
movq 0x4e52c(%rip), %rax     # 0x8efa8
movq 0x8(%rax), %r14
movb (%r14), %bpl
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x31bd3(%rip), %rsi     # 0x72666
leaq 0x31be0(%rip), %rdx     # 0x7267a
leaq 0x8(%rsp), %rdi
callq 0x2f1a0
xorl %eax, %eax
cmpb $0x2a, %bpl
sete %al
addq %rax, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x40b3d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x27ac0
xorl %ebp, %ebp
movq 0x4e4ed(%rip), %rsi     # 0x8efc8
movq 0x4e4d6(%rip), %rdx     # 0x8efb8
movq %rbx, %rdi
callq 0x27aa0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40b00
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x40b0f
callq 0x27560
testb %bpl, %bpl
jne 0x40b2d
jmp 0x40b35
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x40b2d
callq 0x27560
jmp 0x40b2d
movq %rax, %r14
movq %rbx, %rdi
callq 0x27470
movq %r14, %rdi
callq 0x27b10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_header.cpp
// Function: BamTools::HeaderTool::~HeaderTool()
HeaderTool::~HeaderTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4b57a(%rip), %rax     # 0x8e968
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x43415
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x4340c
callq 0x27560
leaq 0x8(%r14), %rdi
callq 0x2f0c0
movq %r14, %rdi
callq 0x27560
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x27560
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_header.cpp
// Function: BamTools::HeaderTool::Run(int, char**)
int HeaderTool::Run(int argc, char* argv[]) {
  
    // parse command line arguments
    Options::Parse(argc, argv, 1);
  
    // initialize HeaderTool with settings
    m_impl = new HeaderToolPrivate(m_settings);

    // run HeaderTool, return success/fail
    if ( m_impl->Run() )
        return 0;
    else
        return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x63ac2
movl $0x8, %edi
callq 0x275c0
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x42d6c
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_index.cpp
// Function: BamTools::IndexTool::IndexToolPrivate::Run()
bool IndexTool::IndexToolPrivate::Run(void) {

    // open our BAM reader
    BamReader reader;
    if ( !reader.Open(m_settings->InputBamFilename) ) {
        cerr << "bamtools index ERROR: could not open BAM file: "
             << m_settings->InputBamFilename << endl;
        return false;
    }

    // create index for BAM file
    const BamIndex::IndexType type = ( m_settings->IsUsingBamtoolsIndex ? BamIndex::BAMTOOLS
                                                                        : BamIndex::STANDARD );
    reader.CreateIndex(type);

    // clean & exit
    reader.Close();
    return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x273f0
movq (%r14), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x27790
movl %eax, %ebx
testb %al, %al
je 0x4350f
movq (%r14), %rax
movzbl 0x1(%rax), %eax
xorl $0x1, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x27b20
leaq 0x8(%rsp), %rdi
callq 0x270b0
jmp 0x43568
movq 0x4baca(%rip), %rdi     # 0x8efe0
leaq 0x2f407(%rip), %rsi     # 0x72924
movl $0x2f, %edx
callq 0x276b0
movq (%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq 0x4baa7(%rip), %rdi     # 0x8efe0
callq 0x276b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq %r14, %rdi
callq 0x27040
movq %rax, %rdi
callq 0x27410
leaq 0x8(%rsp), %rdi
callq 0x27620
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
jmp 0x4357e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x27620
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_index.cpp
// Function: BamTools::IndexTool::~IndexTool()
IndexTool::~IndexTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4b07a(%rip), %rax     # 0x8e9b0
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x43954
movq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
cmpq %rax, %rdi
je 0x43954
callq 0x27560
movq %r14, %rdi
callq 0x27560
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x27560
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_index.cpp
// Function: BamTools::IndexTool::Run(int, char**)
int IndexTool::Run(int argc, char* argv[]) {
  
    // parse command line arguments
    Options::Parse(argc, argv, 1);
    
    // initialize IndexTool with settings
    m_impl = new IndexToolPrivate(m_settings);

    // run IndexTool, return success/fail
    if ( m_impl->Run() )
        return 0;
    else
        return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x63ac2
movl $0x8, %edi
callq 0x275c0
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x434bc
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_merge.cpp
// Function: BamTools::MergeTool::~MergeTool()
MergeTool::~MergeTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4a4b6(%rip), %rax     # 0x8e9f8
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4458d
movq 0x60(%r14), %rdi
leaq 0x70(%r14), %rax
cmpq %rax, %rdi
je 0x44560
callq 0x27560
movq 0x40(%r14), %rdi
leaq 0x50(%r14), %rax
cmpq %rax, %rdi
je 0x44572
callq 0x27560
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x44584
callq 0x27560
leaq 0x8(%r14), %rdi
callq 0x2f0c0
movq %r14, %rdi
callq 0x27560
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x27560
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_random.cpp
// Function: BamTools::RandomTool::~RandomTool()
RandomTool::~RandomTool(void) { 

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x48efe(%rip), %rax     # 0x8ea40
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x45b90
movq 0x70(%r14), %rdi
leaq 0x80(%r14), %rax
cmpq %rax, %rdi
je 0x45b63
callq 0x27560
movq 0x48(%r14), %rdi
leaq 0x58(%r14), %rax
cmpq %rax, %rdi
je 0x45b75
callq 0x27560
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x45b87
callq 0x27560
leaq 0x10(%r14), %rdi
callq 0x2f0c0
movq %r14, %rdi
callq 0x27560
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x27560
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: CalculateModelType(BamTools::BamAlignment const&)
uint16_t CalculateModelType(const BamAlignment& al) {

    // localize alignment's mate positions & orientations for convenience
    const int32_t m1_begin = ( al.IsFirstMate() ? al.Position : al.MatePosition );
    const int32_t m2_begin = ( al.IsFirstMate() ? al.MatePosition : al.Position );
    const bool m1_isReverseStrand = ( al.IsFirstMate() ? al.IsReverseStrand() : al.IsMateReverseStrand() );
    const bool m2_isReverseStrand = ( al.IsFirstMate() ? al.IsMateReverseStrand() : al.IsReverseStrand() );

    // determine 'model type'
    if ( m1_begin < m2_begin ) {
        if ( !m1_isReverseStrand && !m2_isReverseStrand ) return 0; // ID: 1
        if ( !m1_isReverseStrand &&  m2_isReverseStrand ) return 1; // ID: 2
        if (  m1_isReverseStrand && !m2_isReverseStrand ) return 2; // ID: 3
        if (  m1_isReverseStrand &&  m2_isReverseStrand ) return 3; // ID: 4
    } else {
        if ( !m2_isReverseStrand && !m1_isReverseStrand ) return 4; // ID: 5
        if ( !m2_isReverseStrand &&  m1_isReverseStrand ) return 5; // ID: 6
        if (  m2_isReverseStrand && !m1_isReverseStrand ) return 6; // ID: 7
        if (  m2_isReverseStrand &&  m1_isReverseStrand ) return 7; // ID: 8
    }

    // unknown model
    return ModelType::DUMMY_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x272e0
leaq 0xac(%r14), %rbx
leaq 0xd4(%r14), %r15
testb %al, %al
movq %r15, %rax
cmovneq %rbx, %rax
movl (%rax), %ebp
movq %r14, %rdi
callq 0x272e0
testb %al, %al
cmovneq %r15, %rbx
movl (%rbx), %r15d
movq %r14, %rdi
callq 0x272e0
movq %r14, %rdi
testb %al, %al
je 0x4629e
callq 0x277f0
jmp 0x462a3
callq 0x27850
movl %eax, %ebx
movq %r14, %rdi
callq 0x272e0
movq %r14, %rdi
testb %al, %al
je 0x462bb
callq 0x27850
jmp 0x462c0
callq 0x277f0
movl %ebx, %edx
orb %al, %dl
cmpl %r15d, %ebp
jge 0x462f8
testb %dl, %dl
je 0x46332
movl %eax, %edx
xorb $0x1, %dl
movl %ebx, %esi
orb %dl, %sil
movw $0x1, %cx
cmpb $0x1, %sil
jne 0x46334
xorb $0x1, %bl
orb %bl, %al
movw $0x2, %cx
cmpb $0x1, %al
jne 0x46334
orb %dl, %bl
movw $0x3, %cx
jne 0x4632c
jmp 0x46334
movw $0x4, %cx
testb %dl, %dl
je 0x46334
movl %ebx, %edx
xorb $0x1, %dl
movl %eax, %esi
orb %dl, %sil
movw $0x5, %cx
cmpb $0x1, %sil
jne 0x46334
xorb $0x1, %al
orb %al, %bl
movw $0x6, %cx
cmpb $0x1, %bl
jne 0x46334
orb %al, %dl
movw $0x7, %cx
cmpb $0x1, %dl
jne 0x46334
movw $0x64, %cx
jmp 0x46334
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: ReadGroupResolver::ReadGroupResolver()
ReadGroupResolver::ReadGroupResolver(void)
    : MinFragmentLength(0)
    , MedianFragmentLength(0)
    , MaxFragmentLength(0)
    , TopModelId(ModelType::DUMMY_ID)
    , NextTopModelId(ModelType::DUMMY_ID)
    , IsAmbiguous(false)
    , HasData(false)
{
    // pre-allocate space for 8 models
    Models.reserve(NUM_MODELS);
    for ( uint16_t i = 0; i < NUM_MODELS; ++i )
        Models.push_back( ModelType(i+1) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
xorl %eax, %eax
movq %rax, (%rdi)
movabsq $0x64006400000000, %rcx # imm = 0x64006400000000
movq %rcx, 0x8(%rdi)
movw $0x0, 0x10(%rdi)
leaq 0x18(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
leaq 0x38(%rdi), %rcx
movl $0x0, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
movq %rcx, 0x50(%rdi)
movq %rax, 0x58(%rdi)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x4a84e
movw $0x1, %bp
leaq 0x8(%rsp), %r15
movzwl %bp, %esi
movq %r15, %rdi
callq 0x4a93c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a902
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x463cd
callq 0x27560
incl %ebp
cmpw $0x9, %bp
jne 0x463a8
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x463e2
movq %rax, %r15
jmp 0x463f9
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x463f9
callq 0x27560
movq 0x40(%r14), %rsi
addq $0x30, %r14
movq %r14, %rdi
callq 0x4b57c
movq %rbx, %rdi
callq 0x4a984
movq %r15, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ReadNamesFileReader::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool ResolveTool::ReadNamesFileReader::Open(const string& filename) {

    // make sure stream is fresh
    Close();

    // attempt to open filename, return status
    m_stream.open(filename.c_str(), ifstream::in);
    return m_stream.good();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x78, %rdi
callq 0x27130
testb %al, %al
je 0x46957
movq %rbx, %rdi
callq 0x27120
movq (%r14), %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x273b0
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ReadNamesFileWriter::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool ResolveTool::ReadNamesFileWriter::Open(const string& filename) {

    // make sure stream is fresh
    Close();

    // attempt to open filename, return status
    m_stream.open(filename.c_str(), ofstream::out);
    return m_stream.good();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x70, %rdi
callq 0x27130
testb %al, %al
je 0x46c4b
movq %rbx, %rdi
callq 0x27840
movq (%r14), %rsi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x27080
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::StatsFileReader::SkipCommentsAndWhitespace[abi:cxx11]()
string ResolveTool::StatsFileReader::SkipCommentsAndWhitespace(void) {
    string line;
    do {
        if ( m_stream.eof() )
            return string();
        getline(m_stream, line);
    } while ( IsWhitespace(line) || IsComment(line) );
    return line;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rsi), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%rsi,%rdi)
jne 0x47721
movq %rsi, %r14
addq %rsi, %rdi
leaq 0x8(%rsp), %r15
movl $0xa, %esi
callq 0x27590
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x27ba0
movq 0x10(%rsp), %r12
testq %r12, %r12
je 0x4770e
movq 0x8(%rsp), %r13
movsbl (%r13), %edi
cmpl $0x23, %edi
setne %bpl
callq 0x270a0
testl %eax, %eax
sete %al
testb %bpl, %al
jne 0x4775a
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
testb $0x2, 0x20(%r14,%rax)
je 0x476cc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x47748
callq 0x27560
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
addq %r13, %r12
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2f10a
jmp 0x47734
jmp 0x47776
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4778d
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::StatsFileWriter::Write(BamTools::ResolveTool::ResolveSettings*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ReadGroupResolver, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ReadGroupResolver>>> const&)
bool ResolveTool::StatsFileWriter::Write(ResolveTool::ResolveSettings* settings,
                                         const map<string, ReadGroupResolver>& readGroups)
{
    // return failure if file not open
    if ( !m_stream.is_open() )
        return false;

    // write stats file elements
    WriteHeader();
    WriteInput(settings);
    WriteOptions(settings);
    WriteReadGroups(readGroups);

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x70, %rdi
callq 0x27130
movl %eax, %ebp
testb %al, %al
je 0x47840
movq %r14, %rdi
callq 0x4784e
movq %r14, %rdi
movq %r15, %rsi
callq 0x47a88
movq %r14, %rdi
movq %r15, %rsi
callq 0x47b38
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47d52
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::StatsFileWriter::WriteInput(BamTools::ResolveTool::ResolveSettings*)
void ResolveTool::StatsFileWriter::WriteInput(ResolveTool::ResolveSettings* settings) {

    // [Input]
    // filename
    // \n

    m_stream << INPUT_TOKEN << endl
             << settings->InputBamFilename << endl
             << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x4809a(%rip), %rsi     # 0x8fb30
movq 0x4809b(%rip), %rdx     # 0x8fb38
callq 0x276b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq %r14, %rdi
callq 0x27040
movq %rax, %rdi
callq 0x27410
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %rax, %rdi
callq 0x276b0
movq %rax, %rbx
movq (%rax), %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
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
movsbl %al, %esi
movq %rbx, %rdi
callq 0x27040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x27410
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ResolveToolPrivate::ParseHeader(BamTools::SamHeader const&)
void ResolveTool::ResolveToolPrivate::ParseHeader(const SamHeader& header) {

    // iterate over header read groups, creating a 'resolver' for each
    SamReadGroupConstIterator rgIter = header.ReadGroups.ConstBegin();
    SamReadGroupConstIterator rgEnd  = header.ReadGroups.ConstEnd();
    for ( ; rgIter != rgEnd; ++rgIter ) {
        const SamReadGroup& rg = (*rgIter);
        m_readGroups.insert( make_pair<string, ReadGroupResolver>(rg.ID, ReadGroupResolver()) );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, (%rsp)
leaq 0xc0(%rsi), %rbx
movq %rbx, %rdi
callq 0x27a50
movq %rax, %r14
movq %rbx, %rdi
callq 0x27b70
cmpq %rax, %r14
je 0x48bb4
movq %rax, %r15
addq $0x8, (%rsp)
leaq 0x8(%rsp), %r12
leaq 0x128(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0xa8(%rsp), %rbx
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2f10a
movq %r13, %rdi
callq 0x46342
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4cdfa
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4ac0a
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x4ce8c
movq 0x108(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x4b57c
leaq 0xe0(%rsp), %rdi
callq 0x4a984
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x48b3e
callq 0x27560
movq 0x88(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x4b57c
leaq 0x60(%rsp), %rdi
callq 0x4a984
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48b6e
callq 0x27560
movq 0x168(%rsp), %rsi
leaq 0x158(%rsp), %rdi
callq 0x4b57c
leaq 0x140(%rsp), %rdi
callq 0x4a984
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x48ba4
callq 0x27560
addq $0x198, %r14            # imm = 0x198
cmpq %r15, %r14
jne 0x48ab8
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x48c4a
movq %rax, %rbx
jmp 0x48c16
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x4ac9a
jmp 0x48c16
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x4a984
jmp 0x48bfc
jmp 0x48c8c
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x48c16
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x4ad06
jmp 0x48c4a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4a984
jmp 0x48c36
jmp 0x48c8c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48c4a
callq 0x27560
leaq 0x128(%rsp), %rdi
callq 0x4ad72
jmp 0x48c70
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x4a984
jmp 0x48c70
jmp 0x48c8c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x48c84
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ResolveToolPrivate::ReadStatsFile()
bool ResolveTool::ResolveToolPrivate::ReadStatsFile(void) {

    // skip if no filename provided
    if ( m_settings->StatsFilename.empty() )
        return false;

    // attempt to open stats file
    ResolveTool::StatsFileReader statsReader;
    if ( !statsReader.Open(m_settings->StatsFilename) ) {
        cerr << "bamtools resolve ERROR - could not open stats file: "
             << m_settings->StatsFilename << " for reading" << endl;
        return false;
    }

    // attempt to read stats data
    if ( !statsReader.Read(m_settings, m_readGroups) ) {
        cerr << "bamtools resolve ERROR - could not parse stats file: "
             << m_settings->StatsFilename << " for data" << endl;
        return false;
    }

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq (%rdi), %rax
cmpq $0x0, 0x58(%rax)
je 0x48d48
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x276a0
movq (%rbx), %rsi
addq $0x50, %rsi
movq %r14, %rdi
callq 0x46d3e
testb %al, %al
je 0x48d4c
movq (%rbx), %rsi
leaq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x474d8
movb $0x1, %bpl
testb %al, %al
jne 0x48dbb
movq 0x462ed(%rip), %rdi     # 0x8efe0
leaq 0x2ace3(%rip), %rsi     # 0x739dd
movl $0x35, %edx
callq 0x276b0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x462ca(%rip), %rdi     # 0x8efe0
callq 0x276b0
movq %rax, %rbx
leaq 0x2acee(%rip), %rsi     # 0x73a13
movl $0x9, %edx
movq %rax, %rdi
callq 0x276b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
jmp 0x48da6
xorl %ebp, %ebp
jmp 0x48dc5
movq 0x4628d(%rip), %rdi     # 0x8efe0
leaq 0x2ac4e(%rip), %rsi     # 0x739a8
movl $0x34, %edx
callq 0x276b0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x4626a(%rip), %rdi     # 0x8efe0
callq 0x276b0
movq %rax, %rbx
leaq 0x2cf7b(%rip), %rsi     # 0x75d00
movl $0xc, %edx
movq %rax, %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 %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4ae44
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4ae44
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::ResolveToolPrivate::WriteStatsFile()
bool ResolveTool::ResolveToolPrivate::WriteStatsFile(void) {

    // skip if no filename provided
    if ( m_settings->StatsFilename.empty() )
        return false;

    // attempt to open stats file
    ResolveTool::StatsFileWriter statsWriter;
    if ( !statsWriter.Open(m_settings->StatsFilename) ) {
        cerr << "bamtools resolve ERROR - could not open stats file: "
             << m_settings->StatsFilename << " for writing" << endl;
        return false;
    }

    // attempt to write stats data
    if ( !statsWriter.Write(m_settings, m_readGroups) ) {
        cerr << "bamtools resolve ERROR - could not write stats file: "
             << m_settings->StatsFilename << " for data" << endl;
        return false;
    }

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq (%rdi), %rax
cmpq $0x0, 0x58(%rax)
je 0x49992
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x27a90
movq (%rbx), %rsi
addq $0x50, %rsi
movq %r14, %rdi
callq 0x477b2
testb %al, %al
je 0x49996
movq (%rbx), %rsi
leaq 0x8(%rbx), %rdx
movq %rsp, %rdi
callq 0x477f8
movb $0x1, %bpl
testb %al, %al
jne 0x49a05
movq 0x456a3(%rip), %rdi     # 0x8efe0
leaq 0x2a26a(%rip), %rsi     # 0x73bae
movl $0x35, %edx
callq 0x276b0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x45680(%rip), %rdi     # 0x8efe0
callq 0x276b0
movq %rax, %rbx
leaq 0x2a0a4(%rip), %rsi     # 0x73a13
movl $0x9, %edx
movq %rax, %rdi
callq 0x276b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
jmp 0x499f0
xorl %ebp, %ebp
jmp 0x49a0d
movq 0x45643(%rip), %rdi     # 0x8efe0
leaq 0x2a004(%rip), %rsi     # 0x739a8
movl $0x34, %edx
callq 0x276b0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x45620(%rip), %rdi     # 0x8efe0
callq 0x276b0
movq %rax, %rbx
leaq 0x2a2b3(%rip), %rsi     # 0x73c82
movl $0xc, %edx
movq %rax, %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 %ebp, %ebp
movq %rsp, %rdi
callq 0x4af24
movl %ebp, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4af24
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::~ResolveTool()
ResolveTool::~ResolveTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4436e(%rip), %rax     # 0x8ea88
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4a771
movq 0x70(%r14), %rdi
leaq 0x80(%r14), %rax
cmpq %rax, %rdi
je 0x4a73b
callq 0x27560
movq 0x50(%r14), %rdi
leaq 0x60(%r14), %rax
cmpq %rax, %rdi
je 0x4a74d
callq 0x27560
movq 0x30(%r14), %rdi
leaq 0x40(%r14), %rax
cmpq %rax, %rdi
je 0x4a75f
callq 0x27560
movq 0x10(%r14), %rdi
leaq 0x20(%r14), %rax
cmpq %rax, %rdi
je 0x4a771
callq 0x27560
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x4a797
leaq 0x8(%r14), %rdi
movq 0x18(%r14), %rsi
callq 0x4bae8
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_resolve.cpp
// Function: BamTools::ResolveTool::Run(int, char**)
int ResolveTool::Run(int argc, char* argv[]) {

    // parse command line arguments
    Options::Parse(argc, argv, 1);

    // initialize ResolveTool
    m_impl = new ResolveToolPrivate(m_settings);

    // run ResolveTool, return success/failure
    if ( m_impl->Run() )
        return 0;
    else
        return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x63ac2
movl $0x38, %edi
callq 0x275c0
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
movl $0x0, 0x10(%rax)
xorl %edx, %edx
movq %rdx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x28(%rax)
movq %rdx, 0x30(%rax)
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x49430
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_revert.cpp
// Function: BamTools::RevertTool::RevertToolPrivate::RevertAlignment(BamTools::BamAlignment&)
void RevertTool::RevertToolPrivate::RevertAlignment(BamAlignment& al) {

    // replace Qualities with OQ contents, if requested
    if ( !m_settings->IsKeepQualities ) {
        string originalQualities;
        if ( al.GetTag(OQ_TAG, originalQualities) ) {
            al.Qualities = originalQualities;
            al.RemoveTag(OQ_TAG);
        }
    }

    // clear duplicate flag, if requested
    if ( !m_settings->IsKeepDuplicateFlag )
        al.SetIsDuplicate(false);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq (%rdi), %rax
cmpb $0x0, 0x4(%rax)
jne 0x4d2a9
movq %rdi, %r14
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
cmpb $0x0, 0x130(%rbx)
jne 0x4d297
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x4d297
movq 0x88(%rbx), %rcx
movq %rsp, %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
leaq 0x42a66(%rip), %rsi     # 0x8fc98
movq %rbx, %rdi
callq 0x27700
testb %al, %al
je 0x4d297
movq (%rsp), %rdi
callq 0x272f0
leaq 0x10(%rsp), %rdi
movq $0x0, 0x8(%rdi)
movq (%rdi), %rcx
movb $0x0, (%rcx)
movl %eax, %r15d
movq %r15, %rsi
xorl %edx, %edx
callq 0x271f0
leaq 0x10(%rsp), %r12
movq (%r12), %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x274c0
leaq 0x68(%rbx), %rdi
movq %r12, %rsi
callq 0x27350
leaq 0x42a09(%rip), %rsi     # 0x8fc98
movq %rbx, %rdi
callq 0x27650
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d2a6
callq 0x27560
movq (%r14), %rax
cmpb $0x0, 0x3(%rax)
jne 0x4d2b9
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27c20
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d2d9
callq 0x27560
movq %rbx, %rdi
callq 0x27b10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_revert.cpp
// Function: BamTools::RevertTool::~RevertTool()
RevertTool::~RevertTool(void) {

    delete m_settings;
    m_settings = 0;
    
    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40f42(%rip), %rax     # 0x8eb08
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4dbf6
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x4dbe4
callq 0x27560
movq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
cmpq %rax, %rdi
je 0x4dbf6
callq 0x27560
movq %r14, %rdi
callq 0x27560
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x27560
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::SortToolPrivate::SortToolPrivate(BamTools::SortTool::SortSettings*)
SortTool::SortToolPrivate::SortToolPrivate(SortTool::SortSettings* settings) 
    : m_settings(settings)
    , m_numberOfRuns(0) 
{ 
    // set filename stub depending on inputfile path
    // that way multiple sort runs don't trip on each other's temp files
    if ( m_settings) {
        size_t extensionFound = m_settings->InputBamFilename.find(".bam");
        if ( extensionFound != string::npos )
            m_tempFilenameStub = m_settings->InputBamFilename.substr(0,extensionFound);
        m_tempFilenameStub.append(".sort.temp.");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, (%rdi)
leaq 0x18(%rdi), %r12
movq %r12, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
movl $0x0, 0x28(%rdi)
leaq 0x40(%rdi), %r13
movq %r13, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movb %al, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
testq %rsi, %rsi
je 0x4dd9a
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
addq $0x8, %rsi
leaq 0x26dcd(%rip), %rax     # 0x74b0e
movl $0x4, %ecx
movq %rsi, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x27ad0
cmpq $-0x1, %rax
je 0x4dd8b
movq (%rbx), %rsi
addq $0x8, %rsi
movq %rsp, %rdi
xorl %edx, %edx
movq %rax, %rcx
callq 0x27600
movq %rsp, %rsi
movq %r14, %rdi
callq 0x27350
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4dd8b
callq 0x27560
leaq 0x26d81(%rip), %rsi     # 0x74b13
movq %r14, %rdi
callq 0x27c00
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ddc5
callq 0x27560
jmp 0x4ddc5
jmp 0x4ddc2
movq %rax, %r15
leaq 0x68(%rbx), %rdi
callq 0x2f0c0
leaq 0x50(%rbx), %rdi
callq 0x2e37a
movq 0x30(%rbx), %rdi
cmpq %r13, %rdi
je 0x4dde5
callq 0x27560
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x4ddf2
callq 0x27560
movq %r15, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::SortToolPrivate::CreateSortedTempFile(std::vector<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment>>&)
bool SortTool::SortToolPrivate::CreateSortedTempFile(vector<BamAlignment>& buffer) {
 
    // do sorting
    SortBuffer(buffer);
  
    // write sorted contents to temp file, store success/fail
    stringstream tempStr;
    tempStr << m_tempFilenameStub << m_numberOfRuns;
    bool success = WriteTempFile( buffer, tempStr.str() );
    
    // save temp filename for merging later
    m_tempFilenames.push_back(tempStr.str());
    
    // clear buffer contents & update run counter
    buffer.clear();
    ++m_numberOfRuns;
    
    // return success/fail of writing to temp file
    // TODO: a failure returned here is not actually caught and handled anywhere
    return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4e278
leaq 0x20(%rsp), %rdi
callq 0x27440
leaq 0x30(%rsp), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
callq 0x276b0
movl 0x28(%rbx), %esi
movq %rax, %rdi
callq 0x27ab0
leaq 0x38(%rsp), %r15
movq %rsp, %rdi
movq %r15, %rsi
callq 0x27990
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e3ae
movl %eax, %ebp
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x4e1c1
callq 0x27560
movq %rsp, %rdi
movq %r15, %rsi
callq 0x27990
leaq 0x68(%rbx), %rdi
movq %rsp, %rsi
callq 0x2e190
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4e1e6
callq 0x27560
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r12, %r13
je 0x4e20d
movq %r12, %r15
movq %r15, %rdi
callq 0x27920
addq $0x158, %r15            # imm = 0x158
cmpq %r13, %r15
jne 0x4e1f5
movq %r12, 0x8(%r14)
incl 0x28(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x27490
movl %ebp, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x4e24f
jmp 0x4e25d
jmp 0x4e25a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e25d
callq 0x27560
jmp 0x4e25d
jmp 0x4e25a
jmp 0x4e25a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x27490
movq %rbx, %rdi
callq 0x27b10
movq %rax, %rdi
callq 0x2e1cd
nop