LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2f122
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 0x3a910
leaq 0x38(%rbx), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3aa7a
movq %rsp, %rdi
callq 0x3a86c
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 0x3d096
leaq 0x88(%rbx), %rdi
movq %rsp, %rsi
callq 0x3d224
movq %rsp, %rdi
callq 0x3d036
movq (%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq 0x8(%rbx), %rax
addq %rcx, %rax
movq %rax, 0x30(%rbx)
cmpb $0x22, (%rcx)
jne 0x3ccff
incq %rcx
movq %rcx, 0x20(%rbx)
cmpb $0x22, (%rax)
jne 0x3cd0b
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 0x3d036
jmp 0x3cd34
movq %rax, %r15
movq %rsp, %rdi
callq 0x3a86c
jmp 0x3cd41
movq %rax, %r15
movq %r14, %rdi
callq 0x3a86c
jmp 0x3cd41
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x3cd4e
callq 0x27560
movq %r15, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/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 0x421f4
testb %al, %al
je 0x41efe
movq %rbx, %rdi
callq 0x3a81a
testb %al, %al
je 0x41f4a
movq 0x4e0f0(%rip), %rbx     # 0x8ffe0
leaq 0x3173b(%rip), %rsi     # 0x73632
movl $0x33, %edx
jmp 0x41f11
movq 0x4e0db(%rip), %rbx     # 0x8ffe0
leaq 0x31706(%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
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl $0x5, %eax
ja 0x41f40
leaq 0x30d14(%rip), %rcx     # 0x72c70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x4(%rsp), %xmm0
cmpeqss 0x10(%rax), %xmm0
jmp 0x42030
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x10(%rax), %xmm0
ucomiss 0x4(%rsp), %xmm0
jmp 0x41fc5
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x4(%rsp), %xmm0
ucomiss 0x10(%rax), %xmm0
setae %al
jmp 0x41f42
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x10(%rax), %xmm0
ucomiss 0x4(%rsp), %xmm0
jmp 0x42009
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x4(%rsp), %xmm0
ucomiss 0x10(%rax), %xmm0
seta %al
jmp 0x41f42
movss (%r14), %xmm0
movss %xmm0, 0x4(%rsp)
movq (%rbx), %rdi
callq 0x4223a
movss 0x4(%rsp), %xmm0
cmpneqss 0x10(%rax), %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x41f42
// File: /workspace/github_cpp_makefile_star2_O1/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 0x40b34
leaq 0x4eb4c(%rip), %rsi     # 0x8f670
leaq 0x4ed35(%rip), %rdx     # 0x8f860
xorl %ecx, %ecx
callq 0x276a0
jmp 0x40b36
xorl %eax, %eax
testq %rax, %rax
je 0x40b46
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x27320
movq %rax, %rbx
movq 0x4f44e(%rip), %rax     # 0x8ffa8
movq 0x8(%rax), %r14
movb (%r14), %bpl
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x32af5(%rip), %rsi     # 0x73666
leaq 0x32b02(%rip), %rdx     # 0x7367a
leaq 0x8(%rsp), %rdi
callq 0x2f1b2
xorl %eax, %eax
cmpb $0x2a, %bpl
sete %al
addq %rax, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x40c12
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x27ad0
xorl %ebp, %ebp
movq 0x4f40f(%rip), %rsi     # 0x8ffc8
movq 0x4f3f8(%rip), %rdx     # 0x8ffb8
movq %rbx, %rdi
callq 0x27ab0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40be6
callq 0x27560
jmp 0x40be6
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x40bfd
callq 0x27560
jmp 0x40bfd
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x40c0a
movq %rbx, %rdi
callq 0x27470
movq %r14, %rdi
callq 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4c4b0(%rip), %rax     # 0x8f968
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x434e7
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x434d6
callq 0x27560
leaq 0x8(%r14), %rdi
callq 0x2f0de
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x434fd
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 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/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 0x64002
movl $0x8, %edi
callq 0x275c0
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x42e28
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x277a0
movl %eax, %ebx
testb %al, %al
je 0x435e3
movq (%r14), %rax
movzbl 0x1(%rax), %eax
xorl $0x1, %eax
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x27b30
leaq 0x8(%rsp), %rdi
callq 0x270b0
jmp 0x4363c
movq 0x4c9f6(%rip), %rdi     # 0x8ffe0
leaq 0x3031c(%rip), %rsi     # 0x7390d
movl $0x2f, %edx
callq 0x276c0
movq (%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq 0x4c9d3(%rip), %rdi     # 0x8ffe0
callq 0x276c0
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 0x43652
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x27620
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4bfa6(%rip), %rax     # 0x8f9b0
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x43a30
movq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
cmpq %rax, %rdi
je 0x43a28
callq 0x27560
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x43a46
callq 0x27560
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x64002
movl $0x8, %edi
callq 0x275c0
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x43590
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4b3d4(%rip), %rax     # 0x8f9f8
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x44677
movq 0x60(%r14), %rdi
leaq 0x70(%r14), %rax
cmpq %rax, %rdi
je 0x44642
callq 0x27560
movq 0x40(%r14), %rdi
leaq 0x50(%r14), %rax
cmpq %rax, %rdi
je 0x44654
callq 0x27560
movq 0x20(%r14), %rdi
leaq 0x30(%r14), %rax
cmpq %rax, %rdi
je 0x44666
callq 0x27560
leaq 0x8(%r14), %rdi
callq 0x2f0de
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4468d
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 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/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 0x49e0e(%rip), %rax     # 0x8fa40
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x45c88
movq 0x70(%r14), %rdi
leaq 0x80(%r14), %rax
cmpq %rax, %rdi
je 0x45c53
callq 0x27560
movq 0x48(%r14), %rdi
leaq 0x58(%r14), %rax
cmpq %rax, %rdi
je 0x45c65
callq 0x27560
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x45c77
callq 0x27560
leaq 0x10(%r14), %rdi
callq 0x2f0de
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x45c9e
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 0x27b20
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x463b6
callq 0x27800
jmp 0x463bb
callq 0x27860
movl %eax, %ebx
movq %r14, %rdi
callq 0x272e0
movq %r14, %rdi
testb %al, %al
je 0x463d3
callq 0x27860
jmp 0x463d8
callq 0x27800
movl %ebx, %edx
orb %al, %dl
cmpl %r15d, %ebp
jge 0x46410
testb %dl, %dl
je 0x4644a
movl %eax, %edx
xorb $0x1, %dl
movl %ebx, %esi
orb %dl, %sil
movw $0x1, %cx
cmpb $0x1, %sil
jne 0x4644c
xorb $0x1, %bl
orb %bl, %al
movw $0x2, %cx
cmpb $0x1, %al
jne 0x4644c
orb %dl, %bl
movw $0x3, %cx
jne 0x46444
jmp 0x4644c
movw $0x4, %cx
testb %dl, %dl
je 0x4644c
movl %ebx, %edx
xorb $0x1, %dl
movl %eax, %esi
orb %dl, %sil
movw $0x5, %cx
cmpb $0x1, %sil
jne 0x4644c
xorb $0x1, %al
orb %al, %bl
movw $0x6, %cx
cmpb $0x1, %bl
jne 0x4644c
orb %al, %dl
movw $0x7, %cx
cmpb $0x1, %dl
jne 0x4644c
movw $0x64, %cx
jmp 0x4644c
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_O1/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 0x4a950
movw $0x1, %bp
leaq 0x8(%rsp), %r15
movzwl %bp, %esi
movq %r15, %rdi
callq 0x4aa38
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a9fe
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x464e5
callq 0x27560
incl %ebp
cmpw $0x9, %bp
jne 0x464c0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x464fa
movq %rax, %r15
jmp 0x46511
movq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x46511
callq 0x27560
movq 0x40(%r14), %rsi
addq $0x30, %r14
movq %r14, %rdi
callq 0x4b66a
movq %rbx, %rdi
callq 0x4aa80
movq %r15, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x46a5d
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_O1/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 0x46d51
movq %rbx, %rdi
callq 0x27850
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_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq (%rsi), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%rsi,%rdi)
jne 0x47828
movq %rsi, %r14
addq %rsi, %rdi
movq %rsp, %r15
movl $0xa, %esi
callq 0x27590
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x27bb0
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x47815
movq (%rsp), %rax
movsbl (%rax), %edi
callq 0x270a0
testl %eax, %eax
jne 0x47815
testq %r12, %r12
je 0x47871
movq (%rsp), %rsi
cmpb $0x23, (%rsi)
jne 0x4785a
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
testb $0x2, 0x20(%r14,%rax)
je 0x477d5
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x47849
callq 0x27560
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
addq %rsi, %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x2f122
jmp 0x4783b
leaq 0x2ae90(%rip), %rdi     # 0x72708
xorl %esi, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x278c0
jmp 0x47886
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x47897
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4794a
movq %r14, %rdi
callq 0x47958
movq %r14, %rdi
movq %r15, %rsi
callq 0x47b92
movq %r14, %rdi
movq %r15, %rsi
callq 0x47c42
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47e5c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48f98(%rip), %rsi     # 0x90b38
movq 0x48f99(%rip), %rdx     # 0x90b40
callq 0x276c0
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 0x276c0
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_O1/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 0x27a60
movq %rax, %r14
movq %rbx, %rdi
callq 0x27b80
cmpq %rax, %r14
je 0x48cb6
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 0x2f122
movq %r13, %rdi
callq 0x4645a
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4cf54
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4acd8
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x4cfe6
movq 0x108(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x4b66a
leaq 0xe0(%rsp), %rdi
callq 0x4aa80
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x48c40
callq 0x27560
movq 0x88(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x4b66a
leaq 0x60(%rsp), %rdi
callq 0x4aa80
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48c70
callq 0x27560
movq 0x168(%rsp), %rsi
leaq 0x158(%rsp), %rdi
callq 0x4b66a
leaq 0x140(%rsp), %rdi
callq 0x4aa80
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x48ca6
callq 0x27560
addq $0x198, %r14            # imm = 0x198
cmpq %r15, %r14
jne 0x48bba
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x48d4c
movq %rax, %rbx
jmp 0x48d18
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x4ad68
jmp 0x48d18
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x4aa80
jmp 0x48cfe
jmp 0x48d8e
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x48d18
callq 0x27560
leaq 0x28(%rsp), %rdi
callq 0x4add4
jmp 0x48d4c
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4aa80
jmp 0x48d38
jmp 0x48d8e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48d4c
callq 0x27560
leaq 0x128(%rsp), %rdi
callq 0x4ae40
jmp 0x48d72
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x4aa80
jmp 0x48d72
jmp 0x48d8e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x48d86
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48e4a
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x276b0
movq (%rbx), %rsi
addq $0x50, %rsi
movq %r14, %rdi
callq 0x46e44
testb %al, %al
je 0x48e4e
movq (%rbx), %rsi
leaq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %rdi
callq 0x475de
movb $0x1, %bpl
testb %al, %al
jne 0x48ebd
movq 0x471eb(%rip), %rdi     # 0x8ffe0
leaq 0x2bbc9(%rip), %rsi     # 0x749c5
movl $0x35, %edx
callq 0x276c0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x471c8(%rip), %rdi     # 0x8ffe0
callq 0x276c0
movq %rax, %rbx
leaq 0x2bbd4(%rip), %rsi     # 0x749fb
movl $0x9, %edx
movq %rax, %rdi
callq 0x276c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
jmp 0x48ea8
xorl %ebp, %ebp
jmp 0x48ec7
movq 0x4718b(%rip), %rdi     # 0x8ffe0
leaq 0x2bb34(%rip), %rsi     # 0x74990
movl $0x34, %edx
callq 0x276c0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x47168(%rip), %rdi     # 0x8ffe0
callq 0x276c0
movq %rax, %rbx
leaq 0x2de79(%rip), %rsi     # 0x76d00
movl $0xc, %edx
movq %rax, %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 %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x4af12
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4af12
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/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 0x49a94
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x27aa0
movq (%rbx), %rsi
addq $0x50, %rsi
movq %r14, %rdi
callq 0x478bc
testb %al, %al
je 0x49a98
movq (%rbx), %rsi
leaq 0x8(%rbx), %rdx
movq %rsp, %rdi
callq 0x47902
movb $0x1, %bpl
testb %al, %al
jne 0x49b07
movq 0x465a1(%rip), %rdi     # 0x8ffe0
leaq 0x2b150(%rip), %rsi     # 0x74b96
movl $0x35, %edx
callq 0x276c0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x4657e(%rip), %rdi     # 0x8ffe0
callq 0x276c0
movq %rax, %rbx
leaq 0x2af8a(%rip), %rsi     # 0x749fb
movl $0x9, %edx
movq %rax, %rdi
callq 0x276c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x27590
jmp 0x49af2
xorl %ebp, %ebp
jmp 0x49b0f
movq 0x46541(%rip), %rdi     # 0x8ffe0
leaq 0x2aeea(%rip), %rsi     # 0x74990
movl $0x34, %edx
callq 0x276c0
movq (%rbx), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq 0x4651e(%rip), %rdi     # 0x8ffe0
callq 0x276c0
movq %rax, %rbx
leaq 0x2b199(%rip), %rsi     # 0x74c6a
movl $0xc, %edx
movq %rax, %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 %ebp, %ebp
movq %rsp, %rdi
callq 0x4aff2
movl %ebp, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4aff2
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4526c(%rip), %rax     # 0x8fa88
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4a87b
movq 0x70(%r14), %rdi
leaq 0x80(%r14), %rax
cmpq %rax, %rdi
je 0x4a83d
callq 0x27560
movq 0x50(%r14), %rdi
leaq 0x60(%r14), %rax
cmpq %rax, %rdi
je 0x4a84f
callq 0x27560
movq 0x30(%r14), %rdi
leaq 0x40(%r14), %rax
cmpq %rax, %rdi
je 0x4a861
callq 0x27560
movq 0x10(%r14), %rdi
leaq 0x20(%r14), %rax
cmpq %rax, %rdi
je 0x4a873
callq 0x27560
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x4a8a1
leaq 0x8(%r14), %rdi
movq 0x18(%r14), %rsi
callq 0x4bbd6
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 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/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 0x64002
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 0x49532
xorb $0x1, %al
movzbl %al, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
cmpb $0x0, 0x4(%rax)
jne 0x4d414
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
cmpb $0x0, 0x130(%rbx)
jne 0x4d405
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x4d405
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 0x43905(%rip), %rsi     # 0x90ca0
movq %rbx, %rdi
callq 0x27710
movl %eax, %ebp
testb %al, %al
je 0x4d405
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
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x274c0
testb %bpl, %bpl
je 0x4d405
leaq 0x68(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x27350
leaq 0x438a3(%rip), %rsi     # 0x90ca0
movq %rbx, %rdi
callq 0x27660
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d414
callq 0x27560
movq (%r14), %rax
cmpb $0x0, 0x3(%rax)
jne 0x4d427
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27c30
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d446
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/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 0x41dd6(%rip), %rax     # 0x8fb08
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4dd6a
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x4dd50
callq 0x27560
movq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
cmpq %rax, %rdi
je 0x4dd62
callq 0x27560
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4dd80
callq 0x27560
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4df0e
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
addq $0x8, %rsi
leaq 0x27c41(%rip), %rax     # 0x75af6
movl $0x4, %ecx
movq %rsi, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x27ae0
cmpq $-0x1, %rax
je 0x4deff
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 0x4deff
callq 0x27560
leaq 0x27bf5(%rip), %rsi     # 0x75afb
movq %r14, %rdi
callq 0x27c10
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 0x4df39
callq 0x27560
jmp 0x4df39
jmp 0x4df36
movq %rax, %r15
leaq 0x68(%rbx), %rdi
callq 0x2f0de
leaq 0x50(%rbx), %rdi
callq 0x2e378
movq 0x30(%rbx), %rdi
cmpq %r13, %rdi
je 0x4df59
callq 0x27560
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x4df66
callq 0x27560
movq %r15, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4e3ec
leaq 0x20(%rsp), %rdi
callq 0x27440
leaq 0x30(%rsp), %rdi
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
callq 0x276c0
movl 0x28(%rbx), %esi
movq %rax, %rdi
callq 0x27ac0
leaq 0x38(%rsp), %r15
movq %rsp, %rdi
movq %r15, %rsi
callq 0x279a0
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4e522
movl %eax, %ebp
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x4e335
callq 0x27560
movq %rsp, %rdi
movq %r15, %rsi
callq 0x279a0
leaq 0x68(%rbx), %rdi
movq %rsp, %rsi
callq 0x2e1b0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4e35a
callq 0x27560
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r12, %r13
je 0x4e381
movq %r12, %r15
movq %r15, %rdi
callq 0x27930
addq $0x158, %r15            # imm = 0x158
cmpq %r13, %r15
jne 0x4e369
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 0x4e3c3
jmp 0x4e3d1
jmp 0x4e3ce
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e3d1
callq 0x27560
jmp 0x4e3d1
jmp 0x4e3ce
jmp 0x4e3ce
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x27490
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::SortToolPrivate::SortBuffer(std::vector<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment>>&)
void SortTool::SortToolPrivate::SortBuffer(vector<BamAlignment>& buffer) {
 
    // ** add further custom sort options later ?? **
    
    // sort buffer by desired method
    if ( m_settings->IsSortingByName )
        std::stable_sort( buffer.begin(), buffer.end(), Sort::ByName() );
    else
        std::stable_sort( buffer.begin(), buffer.end(), Sort::ByPosition() );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq (%rdi), %rax
movq (%rsi), %r14
movq 0x8(%rsi), %rbx
cmpb $0x1, 0x4(%rax)
jne 0x4e466
cmpq %rbx, %r14
je 0x4e4e9
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83
imulq %rax, %rcx
leaq 0x1(%rcx), %rax
shrq $0x3f, %rax
leaq (%rcx,%rax), %rdx
incq %rdx
sarq %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4f656
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x4e4c3
movq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0x4f779
jmp 0x4e4df
cmpq %rbx, %r14
je 0x4e4e9
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83
imulq %rax, %rcx
leaq 0x1(%rcx), %rax
shrq $0x3f, %rax
leaq (%rcx,%rax), %rdx
incq %rdx
sarq %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4f656
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x4e4d2
movq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
callq 0x51a5d
jmp 0x4e4df
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4f6d7
jmp 0x4e4df
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x519bb
leaq 0x8(%rsp), %rdi
callq 0x4f868
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4f868
jmp 0x4e511
jmp 0x4e519
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4f868
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
nop
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::SortToolPrivate::WriteTempFile(std::vector<BamTools::BamAlignment, std::allocator<BamTools::BamAlignment>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool SortTool::SortToolPrivate::WriteTempFile(const vector<BamAlignment>& buffer,
                                              const string& tempFilename)
{
    // open temp file for writing
    BamWriter tempWriter;
    if ( !tempWriter.Open(tempFilename, m_headerText, m_references) ) {
        cerr << "bamtools sort ERROR: could not open " << tempFilename
             << " for writing." << endl;
        return false;
    }
  
    // write data
    vector<BamAlignment>::const_iterator buffIter = buffer.begin();
    vector<BamAlignment>::const_iterator buffEnd  = buffer.end();
    for ( ; buffIter != buffEnd; ++buffIter )  {
        const BamAlignment& al = (*buffIter);
        tempWriter.SaveAlignment(al);
    }
  
    // close temp file & return success
    tempWriter.Close();
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x27360
leaq 0x30(%rbx), %rdx
addq $0x50, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x279b0
movl %eax, %ebx
testb %al, %al
je 0x4e58a
movq (%r15), %r14
movq 0x8(%r15), %r12
cmpq %r12, %r14
je 0x4e580
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x27be0
addq $0x158, %r14            # imm = 0x158
cmpq %r12, %r14
jne 0x4e569
movq %rsp, %rdi
callq 0x27370
jmp 0x4e5f3
movq 0x41a4f(%rip), %rdi     # 0x8ffe0
leaq 0x2756f(%rip), %rsi     # 0x75b07
movl $0x24, %edx
callq 0x276c0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x41a30(%rip), %rdi     # 0x8ffe0
callq 0x276c0
movq %rax, %r14
leaq 0x248b1(%rip), %rsi     # 0x72e70
movl $0xd, %edx
movq %rax, %rdi
callq 0x276c0
movq (%r14), %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 %rsp, %rdi
callq 0x27430
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4e60d
jmp 0x4e60d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x27430
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::~SortTool()
SortTool::~SortTool(void) {

    delete m_settings;
    m_settings = 0;

    delete m_impl;
    m_impl = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40b48(%rip), %rax     # 0x8fb50
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x4f040
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rax
cmpq %rax, %rdi
je 0x4f026
callq 0x27560
movq 0x8(%r14), %rdi
leaq 0x18(%r14), %rax
cmpq %rax, %rdi
je 0x4f038
callq 0x27560
movq %r14, %rdi
callq 0x27560
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x4f061
movq %r14, %rdi
callq 0x4f2f4
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 0x27b20
// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_sort.cpp
// Function: BamTools::SortTool::Run(int, char**)
int SortTool::Run(int argc, char* argv[]) {

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

    // initialize SortTool with settings
    m_impl = new SortToolPrivate(m_settings);

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %ebx
movl %esi, %edi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x64002
movl $0x80, %edi
callq 0x275c0
movq %rax, %r14
movq 0x8(%r15), %rsi
movq %rax, %rdi
callq 0x4de58
movq %r14, 0x10(%r15)
movq %r14, %rdi
callq 0x4df76
testb %al, %al
je 0x4f10e
movq %r14, %rdi
callq 0x4e628
xorb $0x1, %al
movzbl %al, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
movq %rbx, %rdi
callq 0x27b20
nop