LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::OpenFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool BamMultiReaderPrivate::OpenFile(const std::string& filename) {
    vector<string> filenames(1, filename);
    if ( Open(filenames) )
        return true;
    else {
        const string currentError = m_errorString;
        const string message = string("could not open file: ") + filename + "\n\t" + currentError;
        SetErrorString("BamMultiReader::OpenFile", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0xa8(%rsp), %rbx
leaq 0x28(%rsp), %rcx
movl $0x1, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x28ef0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27f90
movl %eax, %ebx
testb %al, %al
jne 0x3788d
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x267c0
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1ddc4(%rip), %rsi     # 0x55551
leaq 0x1ddd2(%rip), %rdx     # 0x55566
leaq 0x48(%rsp), %rdi
callq 0x26750
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r15, %rdx
callq 0x29120
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x267c0
leaq 0x1e318(%rip), %rsi     # 0x55aef
leaq 0x8(%rsp), %rdi
callq 0x29090
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x29120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x37807
callq 0x27560
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3781a
callq 0x27560
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x37829
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1dd2f(%rip), %rsi     # 0x55567
leaq 0x1dd40(%rip), %rdx     # 0x5557f
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r14, %rdi
callq 0x27bd0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x37868
callq 0x27560
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3787e
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3788d
callq 0x27560
leaq 0xa8(%rsp), %rdi
callq 0x270a0
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x378c4
callq 0x27560
jmp 0x378c4
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x37912
jmp 0x3791c
jmp 0x378d9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x378f0
callq 0x27560
jmp 0x378f0
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37908
callq 0x27560
jmp 0x37908
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x3791c
callq 0x27560
jmp 0x3791c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x37932
callq 0x27560
jmp 0x37932
jmp 0x3792f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x270a0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::SaveNextAlignment(BamTools::BamReader*, BamTools::BamAlignment*)
void BamMultiReaderPrivate::SaveNextAlignment(BamReader* reader, BamAlignment* alignment) {

    // if can read alignment from reader, store in cache
    //
    // N.B. - lazy building of alignment's char data - populated only:
    //        automatically by alignment cache to maintain its sorting OR
    //        on demand from client call to future call to GetNextAlignment()

    if ( reader->GetNextAlignmentCore(*alignment) )
        m_alignmentCache->Add( MergeItem(reader, alignment) );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x28840
testb %al, %al
je 0x37c7b
movq 0x18(%r15), %rdi
movq %rsp, %rsi
movq %r14, (%rsi)
movq %rbx, 0x8(%rsi)
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::SetRegion(BamTools::BamRegion const&)
bool BamMultiReaderPrivate::SetRegion(const BamRegion& region) {

    // NB: While it may make sense to track readers in which we can
    // successfully SetRegion, In practice a failure of SetRegion means "no
    // alignments here."  It makes sense to simply accept the failure,
    // UpdateAlignments(), and continue.

    // iterate over alignments
    vector<MergeItem>::iterator readerIter = m_readers.begin();
    vector<MergeItem>::iterator readerEnd  = m_readers.end();
    for ( ; readerIter != readerEnd; ++readerIter ) {
        MergeItem& item = (*readerIter);
        BamReader* reader = item.Reader;
        if ( reader == 0 ) continue;

        // set region of interest
        reader->SetRegion(region);
    }

    // return status of cache update
    return UpdateAlignmentCache();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r12, %r15
je 0x37f5f
movq %rsi, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x37f56
movq %r14, %rsi
callq 0x26810
addq $0x10, %r15
cmpq %r12, %r15
jne 0x37f46
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x26060
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiMerger_p.h
// Function: BamTools::Internal::MultiMerger<BamTools::Algorithms::Sort::Unsorted>::Remove(BamTools::BamReader*)
inline
void MultiMerger<Algorithms::Sort::Unsorted>::Remove(BamReader* reader) {

    if ( reader == 0 ) return;
    const std::string filenameToRemove = reader->GetFilename();

    // iterate over readers in cache
    DataIterator dataIter = m_data.begin();
    DataIterator dataEnd  = m_data.end();
    for ( ; dataIter != dataEnd; ++dataIter ) {
        const MergeItem& item = (*dataIter);
        const BamReader* itemReader = item.Reader;
        if ( itemReader == 0 ) continue;

        // remove iterator on match
        if ( itemReader->GetFilename() == filenameToRemove ) {
            m_data.erase(dataIter);
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rsi, %rsi
je 0x38356
movq %rdi, %r14
leaq 0x28(%rsp), %rdi
callq 0x26c90
movq 0x18(%r14), %r12
movq 0x38(%r14), %rbp
cmpq %rbp, %r12
je 0x38343
leaq 0x8(%r14), %rax
movq %rax, (%rsp)
movq 0x28(%r14), %rbx
movq 0x30(%r14), %r13
movq (%r12), %rsi
testq %rsi, %rsi
je 0x382f7
leaq 0x8(%rsp), %rdi
callq 0x26c90
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x382d3
movq 0x8(%rsp), %r15
testq %rdx, %rdx
je 0x382dd
movq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x277e0
testl %eax, %eax
sete %r14b
jmp 0x382e0
movq 0x8(%rsp), %r15
xorl %r14d, %r14d
jmp 0x382e0
movb $0x1, %r14b
leaq 0x18(%rsp), %rax
cmpq %rax, %r15
je 0x382f2
movq %r15, %rdi
callq 0x27560
testb %r14b, %r14b
jne 0x38317
addq $0x10, %r12
cmpq %rbx, %r12
jne 0x38310
movq 0x8(%r13), %r12
addq $0x8, %r13
leaq 0x200(%r12), %rbx
cmpq %rbp, %r12
jne 0x38295
jmp 0x38343
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
movq (%r13), %rax
movq %rax, 0x8(%rdx)
addq $0x200, %rax            # imm = 0x200
movq %rax, 0x10(%rdx)
movq %r13, 0x18(%rdx)
leaq 0x48(%rsp), %rdi
movq (%rsp), %rsi
callq 0x27330
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38356
callq 0x27560
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38367
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3837d
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiMerger_p.h
// Function: BamTools::Internal::MultiMerger<BamTools::Algorithms::Sort::ByPosition>::Remove(BamTools::BamReader*)
inline void MultiMerger<Compare>::Remove(BamReader* reader) {

    if ( reader == 0 ) return;
    const std::string& filenameToRemove = reader->GetFilename();

    // iterate over readers in cache
    DataIterator dataIter = m_data.begin();
    DataIterator dataEnd  = m_data.end();
    for ( ; dataIter != dataEnd; ++dataIter ) {
        const MergeItem& item = (*dataIter);
        const BamReader* itemReader = item.Reader;
        if ( itemReader == 0 ) continue;

        // remove iterator on match
        if ( itemReader->GetFilename() == filenameToRemove ) {
            m_data.erase(dataIter);
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rsi, %rsi
je 0x3922c
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x26c90
movq 0x20(%rbx), %r15
movq %rbx, (%rsp)
leaq 0x10(%rbx), %r14
cmpq %r14, %r15
je 0x39219
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
movq 0x20(%r15), %rsi
testq %rsi, %rsi
je 0x391ec
movq %r12, %rdi
callq 0x26c90
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x391d0
movq 0x8(%rsp), %r13
testq %rdx, %rdx
je 0x391d9
movq 0x28(%rsp), %rsi
movq %r13, %rdi
callq 0x277e0
testl %eax, %eax
sete %bl
jmp 0x391db
movq 0x8(%rsp), %r13
xorl %ebx, %ebx
jmp 0x391db
movb $0x1, %bl
cmpq %rbp, %r13
je 0x391e8
movq %r13, %rdi
callq 0x27560
testb %bl, %bl
jne 0x391fe
movq %r15, %rdi
callq 0x27ae0
movq %rax, %r15
cmpq %r14, %rax
jne 0x39195
jmp 0x39219
movq %r15, %rdi
movq %r14, %rsi
callq 0x26d70
movq %rax, %rdi
callq 0x27560
movq (%rsp), %rax
decq 0x30(%rax)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3922c
callq 0x27560
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39251
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/algorithms/Sort.h
// Function: BamTools::Algorithms::Sort::ByPosition::operator()(BamTools::BamAlignment const&, BamTools::BamAlignment const&)
bool operator()(const BamTools::BamAlignment& lhs, const BamTools::BamAlignment& rhs) {

            // force unmapped aligmnents to end
            if ( lhs.RefID == -1 ) return false;
            if ( rhs.RefID == -1 ) return true;

            // if on same reference, sort on position
            if ( lhs.RefID == rhs.RefID )
                return sort_helper(m_order, lhs.Position, rhs.Position);

            // otherwise sort on reference ID
            return sort_helper(m_order, lhs.RefID, rhs.RefID);
        }

// Assembly:
movl 0xa8(%rsi), %eax
cmpl $-0x1, %eax
je 0x393d7
movl 0xa8(%rdx), %ecx
cmpl $-0x1, %ecx
je 0x393c3
cmpl %ecx, %eax
jne 0x393c6
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x393da
testl %eax, %eax
jne 0x393d7
movl 0xac(%rsi), %eax
cmpl 0xac(%rdx), %eax
jmp 0x393d3
movb $0x1, %al
retq
movl (%rdi), %edx
cmpl $0x1, %edx
je 0x393e8
testl %edx, %edx
jne 0x393d7
cmpl %ecx, %eax
setl %al
retq
xorl %eax, %eax
retq
movl 0xac(%rsi), %eax
cmpl 0xac(%rdx), %eax
jmp 0x393ea
cmpl %ecx, %eax
setg %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamRandomAccessController_p.cpp
// Function: BamTools::Internal::BamRandomAccessController::AdjustRegion(int const&)
void BamRandomAccessController::AdjustRegion(const int& referenceCount) {

    // skip if no index available
    if ( m_index == 0 )
        return;

    // see if any references in region have alignments
    m_hasAlignmentsInRegion = false;
    int currentId = m_region.LeftRefID;
    const int rightBoundRefId = ( m_region.isRightBoundSpecified() ? m_region.RightRefID : referenceCount - 1 );
    while ( currentId <= rightBoundRefId ) {
        m_hasAlignmentsInRegion = m_index->HasAlignments(currentId);
        if ( m_hasAlignmentsInRegion ) break;
        ++currentId;
    }

    // if no data found on any reference in region
    if ( !m_hasAlignmentsInRegion )
        return;

    // if left bound of desired region had no data, use first reference that had data
    // otherwise, leave requested region as-is
    if ( currentId != m_region.LeftRefID ) {
        m_region.LeftRefID = currentId;
        m_region.LeftPosition = 0;
    }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x39ab5
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, 0x18(%rdi)
movl 0x8(%rdi), %eax
movl %eax, 0xc(%rsp)
movl (%rsi), %ecx
decl %ecx
cmpl $0x0, 0x14(%rdi)
movl 0x10(%rdi), %edx
movl %ecx, %ebp
cmovgl %edx, %ebp
testl %edx, %edx
cmovsl %ecx, %ebp
cmpl %ebp, %eax
jg 0x39aad
leaq 0xc(%rsp), %r14
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
movb %al, 0x18(%rbx)
movl 0xc(%rsp), %ecx
testb %al, %al
jne 0x39a9e
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %ecx
jl 0x39a7a
jmp 0x39aad
cmpl 0x8(%rbx), %ecx
je 0x39aad
movl %ecx, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamRandomAccessController_p.cpp
// Function: BamTools::Internal::BamRandomAccessController::LocateIndex(BamTools::Internal::BamReaderPrivate*, BamTools::BamIndex::IndexType const&)
bool BamRandomAccessController::LocateIndex(BamReaderPrivate* reader,
                                            const BamIndex::IndexType& preferredType)
{
    // look up index filename, deferring to preferredType if possible
    assert(reader);
    const string& indexFilename = BamIndexFactory::FindIndexFilename(reader->Filename(), preferredType);

    // if no index file found (of any type)
    if ( indexFilename.empty() ) {
        const string message = string("could not find index file for:") + reader->Filename();
        SetErrorString("BamRandomAccessController::LocateIndex", message);
        return false;
    }

    // otherwise open & use index file that was found
    return OpenIndex(indexFilename, reader);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x27db0
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x270b0
leaq 0x38(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3a02d
callq 0x27560
cmpq $0x0, 0x50(%rsp)
je 0x3a04c
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x272d0
movl %eax, %ebx
jmp 0x3a0fe
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1b8f2(%rip), %rsi     # 0x5594f
leaq 0x1b909(%rip), %rdx     # 0x5596d
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x27db0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x29120
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a0a2
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a0b1
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x1b8ae(%rip), %rsi     # 0x5596e
leaq 0x1b8cd(%rip), %rdx     # 0x55994
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x263b0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a0ed
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a0fc
callq 0x27560
xorl %ebx, %ebx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a111
callq 0x27560
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a139
callq 0x27560
jmp 0x3a139
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
jne 0x3a16a
jmp 0x3a176
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a160
callq 0x27560
jmp 0x3a160
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a176
callq 0x27560
jmp 0x3a176
jmp 0x3a173
movq %rax, %rbx
leaq 0x58(%rsp), %rax
jmp 0x3a185
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a193
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::Close()
bool BamReaderPrivate::Close(void) {

    // clear BAM metadata
    m_references.clear();
    m_header.Clear();

    // clear filename
    m_filename.clear();

    // close random access controller
    m_randomAccessController.Close();

    // if stream is open, attempt close
    if ( IsOpen() ) {
        try {
            m_stream.Close();
        } catch ( BamException& e ) {
            const string streamError = e.what();
            const string message = string("encountered error closing BAM file: \n\t") + streamError;
            SetErrorString("BamReader::Close", message);
            return false;
        }
    }

    // return success
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x26ac0
leaq 0x50(%rbx), %rdi
callq 0x28b40
movq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
leaq 0x1a8(%rbx), %rdi
callq 0x27940
leaq 0x1e8(%rbx), %r14
movq %r14, %rdi
callq 0x28810
movb $0x1, %bpl
testb %al, %al
je 0x3a8fc
movq %r14, %rdi
callq 0x27180
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x3aa45
movq %r14, %rdi
callq 0x267d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rax, %rsi
callq 0x26770
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b10c(%rip), %rsi     # 0x55a54
leaq 0x1b12b(%rip), %rdx     # 0x55a7a
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x29120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a97c
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1b0f0(%rip), %rsi     # 0x55a7b
leaq 0x1b0f9(%rip), %rdx     # 0x55a8b
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a10
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a9b8
callq 0x27560
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a9cb
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a9de
callq 0x27560
callq 0x287d0
xorl %ebp, %ebp
jmp 0x3a8fc
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3aa01
callq 0x27560
jmp 0x3aa01
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3aa1e
jmp 0x3aa28
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3aa28
callq 0x27560
jmp 0x3aa28
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3aa40
callq 0x27560
jmp 0x3aa40
movq %rax, %r14
callq 0x287d0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::CreateIndex(BamTools::BamIndex::IndexType const&)
bool BamReaderPrivate::CreateIndex(const BamIndex::IndexType& type) {

    // skip if BAM file not open
    if ( !IsOpen() ) {
        SetErrorString("BamReader::CreateIndex", "cannot create index on unopened BAM file");
        return false;
    }

    // attempt to create index
    if ( m_randomAccessController.CreateIndex(this, type) )
        return true;
    else {
        const string bracError = m_randomAccessController.GetErrorString();
        const string message = string("could not create index: \n\t") + bracError;
        SetErrorString("BamReader::CreateIndex", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r15
movq %rdi, %rbx
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x28810
testb %al, %al
je 0x3ac82
leaq 0x1a8(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x27980
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3acf6
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x285b0
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ad3b(%rip), %rsi     # 0x55934
leaq 0x1ad4e(%rip), %rdx     # 0x5594e
movq %rsp, %rdi
callq 0x26750
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x29120
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3ac28
callq 0x27560
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x1ae57(%rip), %rsi     # 0x55a8c
leaq 0x1ae66(%rip), %rdx     # 0x55aa2
callq 0x26750
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a10
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3ac5f
callq 0x27560
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ac72
callq 0x27560
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3acef
jmp 0x3acf4
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1adfa(%rip), %rsi     # 0x55a8c
leaq 0x1ae09(%rip), %rdx     # 0x55aa2
leaq 0x40(%rsp), %rdi
callq 0x26750
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1adf0(%rip), %rsi     # 0x55aa3
leaq 0x1ae11(%rip), %rdx     # 0x55acb
leaq 0x20(%rsp), %rdi
callq 0x26750
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a10
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ace5
callq 0x27560
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x3acf4
callq 0x27560
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3ad16
callq 0x27560
jmp 0x3ad16
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3ad32
jmp 0x3ad3c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3ad3c
callq 0x27560
jmp 0x3ad3c
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3ad6d
jmp 0x3ad77
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ad63
callq 0x27560
jmp 0x3ad63
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ad77
callq 0x27560
jmp 0x3ad77
movq %rax, %rbx
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::GetNextAlignment(BamTools::BamAlignment&)
bool BamReaderPrivate::GetNextAlignment(BamAlignment& alignment) {

    // if valid alignment found
    if ( GetNextAlignmentCore(alignment) ) {

        // store alignment's "source" filename
        alignment.Filename = m_filename;

        // return success/failure of parsing char data
        if ( alignment.BuildCharData() )
            return true;
        else {
            const string alError = alignment.GetErrorString();
            const string message = string("could not populate alignment data: \n\t") + alError;
            SetErrorString("BamReader::GetNextAlignment", message);
            return false;
        }
    }

    // no valid alignment found
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x26260
testb %al, %al
je 0x3aeed
leaq 0x8(%rbx), %rsi
leaq 0xe0(%r14), %rdi
callq 0x26b80
movq %r14, %rdi
callq 0x276c0
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3aeef
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x28470
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ac75(%rip), %rsi     # 0x55acc
leaq 0x1ac93(%rip), %rdx     # 0x55af1
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x29120
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ae8b
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1ac58(%rip), %rsi     # 0x55af2
leaq 0x1ac6c(%rip), %rdx     # 0x55b0d
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a10
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3aec7
callq 0x27560
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3aeda
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3aeed
callq 0x27560
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3af0e
callq 0x27560
jmp 0x3af0e
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3af2b
jmp 0x3af35
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3af35
callq 0x27560
jmp 0x3af35
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3af48
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::GetReferenceID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int BamReaderPrivate::GetReferenceID(const string& refName) const {

    // retrieve names from reference data
    vector<string> refNames;
    RefVector::const_iterator refIter = m_references.begin();
    RefVector::const_iterator refEnd  = m_references.end();
    for ( ; refIter != refEnd; ++refIter)
        refNames.push_back( (*refIter).RefName );

    // return 'index-of' refName (or -1 if not found)
    int index = distance(refNames.begin(), find(refNames.begin(), refNames.end(), refName));
    if ( index == (int)m_references.size() ) return -1;
    else return index;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x28(%rdi), %r15
movq 0x30(%rdi), %r13
cmpq %r13, %r15
je 0x3b420
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x26ab0
addq $0x28, %r15
cmpq %r13, %r15
jne 0x3b401
movq (%rsp), %r15
movq 0x8(%rsp), %rsi
jmp 0x3b425
xorl %esi, %esi
xorl %r15d, %r15d
movq %r15, %rdi
movq %r14, %rdx
callq 0x27080
subq %r15, %rax
shrq $0x5, %rax
movq 0x30(%rbx), %rcx
subq 0x28(%rbx), %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmovnel %eax, %ebx
movq %rsp, %rdi
callq 0x270a0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3b46d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x270a0
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::LocateIndex(BamTools::BamIndex::IndexType const&)
bool BamReaderPrivate::LocateIndex(const BamIndex::IndexType& preferredType) {

    if ( m_randomAccessController.LocateIndex(this, preferredType) )
        return true;
    else {
        const string bracError = m_randomAccessController.GetErrorString();
        const string message = string("could not locate index: \n\t") + bracError;
        SetErrorString("BamReader::LocateIndex", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x1a8(%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28330
movl %eax, %ebx
testb %al, %al
jne 0x3b7ac
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x285b0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a444(%rip), %rsi     # 0x55b64
leaq 0x1a457(%rip), %rdx     # 0x55b7e
movq %rsp, %rdi
callq 0x26750
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x29120
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3b74f
callq 0x27560
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1a423(%rip), %rsi     # 0x55b7f
leaq 0x1a432(%rip), %rdx     # 0x55b95
callq 0x26750
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x27a10
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3b786
callq 0x27560
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b799
callq 0x27560
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b7ac
callq 0x27560
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3b7ce
callq 0x27560
jmp 0x3b7ce
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3b7ea
jmp 0x3b7f4
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3b7f4
callq 0x27560
jmp 0x3b7f4
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b807
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::OpenIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool BamReaderPrivate::OpenIndex(const std::string& indexFilename) {

    if ( m_randomAccessController.OpenIndex(indexFilename, this) )
        return true;
    else {
        const string bracError = m_randomAccessController.GetErrorString();
        const string message = string("could not open index: \n\t") + bracError;
        SetErrorString("BamReader::OpenIndex", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
leaq 0x1a8(%rdi), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x272d0
movl %eax, %ebx
testb %al, %al
jne 0x3bb25
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x285b0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a10d(%rip), %rsi     # 0x55ba6
leaq 0x1a11e(%rip), %rdx     # 0x55bbe
movq %rsp, %rdi
callq 0x26750
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x29120
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3bac8
callq 0x27560
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1a0ea(%rip), %rsi     # 0x55bbf
leaq 0x1a0f7(%rip), %rdx     # 0x55bd3
callq 0x26750
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x27a10
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3baff
callq 0x27560
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bb12
callq 0x27560
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bb25
callq 0x27560
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3bb47
callq 0x27560
jmp 0x3bb47
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3bb63
jmp 0x3bb6d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3bb6d
callq 0x27560
jmp 0x3bb6d
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bb80
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::Rewind()
bool BamReaderPrivate::Rewind(void) {

    // reset region
    m_randomAccessController.ClearRegion();

    // return status of seeking back to first alignment
    if ( Seek(m_alignmentsBeginOffset) )
        return true;
    else {
        const string currentError = m_errorString;
        const string message = string("could not rewind: \n\t") + currentError;
        SetErrorString("BamReader::Rewind", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x275b0
movq %r14, %rdi
movq %r14, %rsi
callq 0x27710
movl %eax, %ebx
testb %al, %al
jne 0x3bc7e
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x228(%r14), %rsi
movq 0x230(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x267c0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x19fe8(%rip), %rsi     # 0x55bd4
leaq 0x19ff5(%rip), %rdx     # 0x55be8
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x29120
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bc20
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x19fba(%rip), %rsi     # 0x55be9
leaq 0x19fc4(%rip), %rdx     # 0x55bfa
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x27a10
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bc5c
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bc6f
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3bc7e
callq 0x27560
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bca3
callq 0x27560
jmp 0x3bca3
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3bcc0
jmp 0x3bcca
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bcca
callq 0x27560
jmp 0x3bcca
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3bcd9
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamReader_p.cpp
// Function: BamTools::Internal::BamReaderPrivate::SetRegion(BamTools::BamRegion const&)
bool BamReaderPrivate::SetRegion(const BamRegion& region) {

    if ( m_randomAccessController.SetRegion(region, m_references.size()) )
        return true;
    else {
        const string bracError = m_randomAccessController.GetErrorString();
        const string message = string("could not set region: \n\t") + bracError;
        SetErrorString("BamReader::SetRegion", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
leaq 0x1a8(%rdi), %r15
movq 0x30(%rdi), %rax
subq 0x28(%rdi), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
leaq 0x20(%rsp), %rdx
movl %eax, (%rdx)
movq %r15, %rdi
callq 0x26f30
movl %eax, %ebx
testb %al, %al
jne 0x3bff9
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x285b0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x19cde(%rip), %rsi     # 0x55c4b
leaq 0x19cef(%rip), %rdx     # 0x55c63
movq %rsp, %rdi
callq 0x26750
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x29120
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3bf9c
callq 0x27560
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x19cbb(%rip), %rsi     # 0x55c64
leaq 0x19cc8(%rip), %rdx     # 0x55c78
callq 0x26750
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x27a10
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3bfd3
callq 0x27560
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bfe6
callq 0x27560
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bff9
callq 0x27560
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3c01b
callq 0x27560
jmp 0x3c01b
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3c037
jmp 0x3c041
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3c041
callq 0x27560
jmp 0x3c041
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c054
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::Close()
void BamWriterPrivate::Close(void) {

    // skip if file not open
    if ( !IsOpen() ) return;

    // close output stream
    try {
        m_stream.Close();
    } catch ( BamException& e ) {
        m_errorString = e.what();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x28810
testb %al, %al
je 0x3c89e
movq %rbx, %rdi
callq 0x27180
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x3c8e2
movq %r14, %rdi
callq 0x267d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27ff0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x287d0
movq %rax, %r14
callq 0x287d0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::CalculateMinimumBin(int, int) const
uint32_t BamWriterPrivate::CalculateMinimumBin(const int begin, int end) const {
    --end;
    if ( (begin >> 14) == (end >> 14) ) return 4681 + (begin >> 14);
    if ( (begin >> 17) == (end >> 17) ) return  585 + (begin >> 17);
    if ( (begin >> 20) == (end >> 20) ) return   73 + (begin >> 20);
    if ( (begin >> 23) == (end >> 23) ) return    9 + (begin >> 23);
    if ( (begin >> 26) == (end >> 26) ) return    1 + (begin >> 26);
    return 0;
}

// Assembly:
decl %edx
movl %esi, %eax
sarl $0xe, %eax
movl %edx, %ecx
sarl $0xe, %ecx
cmpl %ecx, %eax
jne 0x3c908
addl $0x1249, %eax           # imm = 0x1249
retq
movl %esi, %eax
sarl $0x11, %eax
movl %edx, %ecx
sarl $0x11, %ecx
cmpl %ecx, %eax
jne 0x3c91c
addl $0x249, %eax            # imm = 0x249
retq
movl %esi, %eax
sarl $0x14, %eax
movl %edx, %ecx
sarl $0x14, %ecx
cmpl %ecx, %eax
jne 0x3c92e
addl $0x49, %eax
retq
movl %esi, %eax
sarl $0x17, %eax
movl %edx, %ecx
sarl $0x17, %ecx
cmpl %ecx, %eax
jne 0x3c940
addl $0x9, %eax
retq
sarl $0x1a, %esi
sarl $0x1a, %edx
leal 0x1(%rsi), %ecx
xorl %eax, %eax
cmpl %edx, %esi
cmovel %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<BamTools::RefData, std::allocator<BamTools::RefData>> const&)
bool BamWriterPrivate::Open(const string& filename,
                            const string& samHeaderText,
                            const RefVector& referenceSequences)
{
    try {

        // open the BGZF file for writing
        m_stream.Open(filename, IBamIODevice::WriteOnly);

        // write BAM file 'metadata' components
        WriteMagicNumber();
        WriteSamHeaderText(samHeaderText);
        WriteReferences(referenceSequences);

        // return success
        return true;

    } catch ( BamException& e ) {
        m_errorString = e.what();
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movl $0x2, %edx
callq 0x28ad0
leaq 0x186d0(%rip), %rsi     # 0x553bb
movl $0x4, %edx
movq %rbx, %rdi
callq 0x28c90
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26b00
movb $0x1, %bpl
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26730
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x3cd57
movq %r14, %rdi
callq 0x267d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27ff0
callq 0x287d0
xorl %ebp, %ebp
jmp 0x3cd11
movq %rax, %r14
callq 0x287d0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::WriteSamHeaderText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void BamWriterPrivate::WriteSamHeaderText(const std::string& samHeaderText) {

    // write the SAM header  text length
    const uint32_t actualHeaderLen = samHeaderText.size();
    uint32_t maybeSwappedHeaderLen = samHeaderText.size();
    if ( m_isBigEndian ) BamTools::SwapEndian_32(maybeSwappedHeaderLen);
    m_stream.Write((char*)&maybeSwappedHeaderLen, Constants::BAM_SIZEOF_INT);

    // write the SAM header text
    if ( actualHeaderLen > 0 )
        m_stream.Write(samHeaderText.data(), actualHeaderLen);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movl %eax, %r14d
movl %eax, 0xc(%rsp)
cmpb $0x1, 0x40(%rdi)
jne 0x3cda0
bswapl %eax
movl %eax, 0xc(%rsp)
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x28c90
testq %r14, %r14
je 0x3cdc5
movq (%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x28c90
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::WriteReferences(std::vector<BamTools::RefData, std::allocator<BamTools::RefData>> const&)
void BamWriterPrivate::WriteReferences(const BamTools::RefVector& referenceSequences) {

    // write the number of reference sequences
    uint32_t numReferenceSequences = referenceSequences.size();
    if ( m_isBigEndian ) BamTools::SwapEndian_32(numReferenceSequences);
    m_stream.Write((char*)&numReferenceSequences, Constants::BAM_SIZEOF_INT);

    // foreach reference sequence
    RefVector::const_iterator rsIter = referenceSequences.begin();
    RefVector::const_iterator rsEnd  = referenceSequences.end();
    for ( ; rsIter != rsEnd; ++rsIter ) {

        // write the reference sequence name length (+1 for terminator)
        const uint32_t actualNameLen = rsIter->RefName.size() + 1;
        uint32_t maybeSwappedNameLen = actualNameLen;
        if ( m_isBigEndian ) BamTools::SwapEndian_32(maybeSwappedNameLen);
        m_stream.Write((char*)&maybeSwappedNameLen, Constants::BAM_SIZEOF_INT);

        // write the reference sequence name
        m_stream.Write(rsIter->RefName.c_str(), actualNameLen);

        // write the reference sequence length
        int32_t referenceLength = rsIter->RefLength;
        if ( m_isBigEndian ) BamTools::SwapEndian_32(referenceLength);
        m_stream.Write((char*)&referenceLength, Constants::BAM_SIZEOF_INT);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
movl %eax, 0x14(%rsp)
cmpb $0x1, 0x40(%rdi)
jne 0x3ce05
bswapl %eax
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x28c90
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0x3cebc
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movl 0x8(%r12), %ebp
incl %ebp
movl %ebp, 0x10(%rsp)
cmpb $0x1, 0x40(%rbx)
jne 0x3ce4a
movl %ebp, %eax
bswapl %eax
movl %eax, 0x10(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c90
movq (%r12), %rsi
movl %ebp, %edx
movq %rbx, %rdi
callq 0x28c90
movl 0x20(%r12), %eax
movl %eax, 0xc(%rsp)
cmpb $0x1, 0x40(%rbx)
jne 0x3ce9f
movl %eax, %ecx
sarl $0x18, %ecx
movl %eax, %edx
shll $0x8, %edx
andl $0xff0000, %edx         # imm = 0xFF0000
movl %eax, %esi
shrl $0x8, %esi
andl $0xff00, %esi           # imm = 0xFF00
shll $0x18, %eax
orl %ecx, %eax
orl %edx, %eax
orl %esi, %eax
movl %eax, 0xc(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28c90
addq $0x28, %r12
cmpq %r13, %r12
jne 0x3ce31
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamWriter_p.cpp
// Function: BamTools::Internal::BamWriterPrivate::SaveAlignment(BamTools::BamAlignment const&)
bool BamWriterPrivate::SaveAlignment(const BamAlignment& al) {

    try {

        // if BamAlignment contains only the core data and a raw char data buffer
        // (as a result of BamReader::GetNextAlignmentCore())
        if ( al.SupportData.HasCoreOnly )
            WriteCoreAlignment(al);

        // otherwise, BamAlignment should contain character in the standard fields: Name, QueryBases, etc
        // (resulting from BamReader::GetNextAlignment() *OR* being generated directly by client code)
        else WriteAlignment(al);

        // if we get here, everything OK
        return true;

    } catch ( BamException& e ) {
        m_errorString = e.what();
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x130(%rsi)
jne 0x3cee9
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x26940
jmp 0x3cef4
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x26c00
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x3cf34
movq %r14, %rdi
callq 0x267d0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
addq $0x48, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27ff0
callq 0x287d0
xorl %ebp, %ebp
jmp 0x3cef4
movq %rax, %r14
callq 0x287d0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/index/BamIndexFactory_p.cpp
// Function: BamTools::Internal::BamIndexFactory::CreateIndexFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BamTools::BamIndex::IndexType const&)
const string BamIndexFactory::CreateIndexFilename(const string& bamFilename,
                                                  const BamIndex::IndexType& type)
{
    switch ( type ) {
        case ( BamIndex::STANDARD ) : return ( bamFilename + BamStandardIndex::Extension() );
        case ( BamIndex::BAMTOOLS ) : return ( bamFilename + BamToolsIndex::Extension() );
        default :
            return string();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdx), %eax
testl %eax, %eax
je 0x3d7cd
cmpl $0x1, %eax
jne 0x3d7fb
movq %rsp, %r15
movq %r15, %rdi
callq 0x27fe0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x29120
jmp 0x3d7e6
movq %rsp, %r15
movq %r15, %rdi
callq 0x28600
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x29120
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d80e
callq 0x27560
jmp 0x3d80e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3d81d
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d833
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/index/BamIndexFactory_p.cpp
// Function: BamTools::Internal::BamIndexFactory::CreateIndexFromFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BamTools::Internal::BamReaderPrivate*)
BamIndex* BamIndexFactory::CreateIndexFromFilename(const string& indexFilename, BamReaderPrivate* reader) {

    // get file extension from index filename, including dot (".EXT")
    // if can't get file extension, return null index
    const string extension = FileExtension(indexFilename);
    if ( extension.empty() )
        return 0;

    // create index based on extension
    if      ( extension == BamStandardIndex::Extension() ) return new BamStandardIndex(reader);
    else if ( extension == BamToolsIndex::Extension()    ) return new BamToolsIndex(reader);
    else
        return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x27900
cmpq $0x0, 0x8(%r14)
je 0x3d943
leaq 0x8(%rsp), %rdi
callq 0x27fe0
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x3d899
movq 0x8(%rsp), %r14
testq %rdx, %rdx
je 0x3d8a2
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x277e0
testl %eax, %eax
sete %bpl
jmp 0x3d8a5
movq 0x8(%rsp), %r14
xorl %ebp, %ebp
jmp 0x3d8a5
movb $0x1, %bpl
leaq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0x3d8b7
movq %r14, %rdi
callq 0x27560
testb %bpl, %bpl
je 0x3d8d6
movl $0x68, %edi
callq 0x276b0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28000
jmp 0x3d946
leaq 0x8(%rsp), %rdi
callq 0x28600
movq 0x30(%rsp), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x3d90b
movq 0x8(%rsp), %r14
testq %rdx, %rdx
je 0x3d914
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x277e0
testl %eax, %eax
sete %bpl
jmp 0x3d917
movq 0x8(%rsp), %r14
xorl %ebp, %ebp
jmp 0x3d917
movb $0x1, %bpl
cmpq %r15, %r14
je 0x3d924
movq %r14, %rdi
callq 0x27560
testb %bpl, %bpl
je 0x3d943
movl $0x68, %edi
callq 0x276b0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x27a00
jmp 0x3d946
xorl %r14d, %r14d
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d959
callq 0x27560
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d969
movq %rax, %rbx
movq %r14, %rdi
callq 0x27560
jmp 0x3d97d
jmp 0x3d97a
jmp 0x3d97a
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d990
callq 0x27560
movq %rbx, %rdi
callq 0x28c10