LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::Close()
bool BamMultiReaderPrivate::Close(void) {

    m_errorString.clear();

    if ( CloseFiles(Filenames()) )
        return true;
    else {
        const string currentError = m_errorString;
        const string message = string("error encountered while closing all files: \n\t") + currentError;
        SetErrorString("BamMultiReader::Close", message);
        return false;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
andq $0x0, 0x30(%rdi)
movq 0x28(%rdi), %rax
movb $0x0, (%rax)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33c30
movq %r14, %rdi
movq %rbx, %rsi
callq 0x35330
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x32810
testb %bl, %bl
jne 0x3f023
leaq 0x28(%r14), %rsi
leaq 0x28(%rsp), %rdi
callq 0x33ff0
leaq 0x1c455(%rip), %rsi     # 0x5b405
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x355e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x1c44f(%rip), %rsi     # 0x5b433
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x338e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
leaq 0x28(%rsp), %rdi
callq 0x33a00
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
jmp 0x3f05c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3f050
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3f05f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x33a00
jmp 0x3f05f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x3f078
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x32810
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::Filenames[abi:cxx11]() const
const vector<string> BamMultiReaderPrivate::Filenames(void) const {

    // init filename container
    vector<string> filenames;
    filenames.reserve( m_readers.size() );

    // iterate over readers
    vector<MergeItem>::const_iterator itemIter = m_readers.begin();
    vector<MergeItem>::const_iterator itemEnd  = m_readers.end();
    for ( ; itemIter != itemEnd; ++itemIter ) {
        const MergeItem& item = (*itemIter);
        const BamReader* reader = item.Reader;
        if ( reader == 0 ) continue;

        // store filename if not empty
        const string& filename = reader->GetFilename();
        if ( !filename.empty() )
            filenames.push_back(filename);
    }

    // return result
    return filenames;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
sarq $0x4, %rsi
callq 0x33a40
movq (%r14), %r15
movq 0x8(%r14), %r12
leaq 0x8(%rsp), %r14
cmpq %r12, %r15
je 0x3f2c2
movq (%r15), %rsi
testq %rsi, %rsi
je 0x3f2bc
movq %r14, %rdi
callq 0x32250
cmpq $0x0, 0x10(%rsp)
je 0x3f2b4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31f80
movq %r14, %rdi
callq 0x33a00
addq $0x10, %r15
jmp 0x3f28c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3f2e4
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3f2e7
jmp 0x3f2e4
movq %rax, %r14
movq %rbx, %rdi
callq 0x32810
movq %r14, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::CloseFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool BamMultiReaderPrivate::CloseFile(const string& filename) {

    m_errorString.clear();

    vector<string> filenames(1, filename);
    if ( CloseFiles(filenames) )
        return true;
    else {
        const string currentError = m_errorString;
        const string message = string("error while closing file: ") + filename + "\n" + currentError;
        SetErrorString("BamMultiReader::CloseFile", message);
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %r14
andq $0x0, 0x30(%rdi)
movq %rsi, %r15
movq 0x28(%rdi), %rax
movb $0x0, (%rax)
leaq 0xa8(%rsp), %rbx
pushq $0x1
popq %rsi
leaq 0x48(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x352e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x35330
movl %eax, %ebx
testb %al, %al
jne 0x3f521
leaq 0x28(%r14), %rsi
leaq 0x48(%rsp), %rdi
callq 0x33ff0
leaq 0x1bfe0(%rip), %rsi     # 0x5b449
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r15, %rdx
callq 0x355e0
leaq 0x1c0dd(%rip), %rdx     # 0x5b56e
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x33c40
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x355e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x33a00
leaq 0x1bf88(%rip), %rsi     # 0x5b464
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r14, %rdi
callq 0x338e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x88(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
leaq 0xa8(%rsp), %rdi
callq 0x32810
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3f571
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3f560
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3f57e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x33a00
jmp 0x3f592
jmp 0x3f59e
movq %rax, %rbx
jmp 0x3f592
movq %rax, %rbx
jmp 0x3f588
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
jmp 0x3f5a1
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x32810
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::CreateAlignmentCache()
IMultiMerger* BamMultiReaderPrivate::CreateAlignmentCache(void) {

    // if no merge order set explicitly, use SAM header to lookup proper order
    if ( !m_hasUserMergeOrder ) {

        // fetch SamHeader from BAM files
        SamHeader header = GetHeader();

        // if BAM files are sorted by position
        if ( header.SortOrder == Constants::SAM_HD_SORTORDER_COORDINATE )
            m_mergeOrder = BamMultiReader::MergeByCoordinate;

        // if BAM files are sorted by read name
        else if ( header.SortOrder == Constants::SAM_HD_SORTORDER_QUERYNAME )
            m_mergeOrder = BamMultiReader::MergeByName;

        // otherwise, sorting is either "unknown" or marked as "unsorted"
        else
            m_mergeOrder = BamMultiReader::RoundRobinMerge;
    }

    // use current merge order to create proper 'multi-merger'
    switch ( m_mergeOrder ) {

        // merge BAM files by position
        case BamMultiReader::MergeByCoordinate :
            return new MultiMerger<Algorithms::Sort::ByPosition>();

        // merge BAM files by read name
        case BamMultiReader::MergeByName :
            return new MultiMerger<Algorithms::Sort::ByName>();

        // sorting is "unknown", "unsorted" or "ignored"... so use unsorted merger
        case BamMultiReader::RoundRobinMerge :
            return new MultiMerger<Algorithms::Sort::Unsorted>();

        // unknown merge order, can't create merger
        default:
            return 0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %rbx
cmpb $0x0, 0x20(%rdi)
jne 0x3f80b
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x32080
leaq 0x20(%rsp), %r14
leaq 0x3869a(%rip), %rsi     # 0x77e68
movq %r14, %rdi
callq 0x32220
testb %al, %al
je 0x3f7e3
movl $0x1, 0x24(%rbx)
jmp 0x3f803
leaq 0x3869e(%rip), %rsi     # 0x77e88
movq %r14, %rdi
callq 0x32220
testb %al, %al
je 0x3f7ff
movl $0x2, 0x24(%rbx)
jmp 0x3f803
andl $0x0, 0x24(%rbx)
movq %rsp, %rdi
callq 0x33030
movl 0x24(%rbx), %eax
testl %eax, %eax
je 0x3f85e
cmpl $0x1, %eax
je 0x3f825
cmpl $0x2, %eax
jne 0x3f882
movq 0x35785(%rip), %r14     # 0x74fa8
jmp 0x3f82c
movq 0x3571c(%rip), %r14     # 0x74f48
addq $0x10, %r14
pushq $0x38
popq %rdi
callq 0x33130
movq %rax, %rbx
movq %r14, (%rax)
andl $0x0, 0x8(%rax)
addq $0x10, %rax
andl $0x0, 0x10(%rbx)
andq $0x0, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
jmp 0x3f884
pushq $0x58
popq %rdi
callq 0x33130
movq %rax, %rbx
movq 0x35680(%rip), %rax     # 0x74ef0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
callq 0x32510
jmp 0x3f884
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x32fa0
jmp 0x3f8aa
movq %rax, %r14
movq %rsp, %rdi
callq 0x33030
movq %r14, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::PopNextCachedAlignment(BamTools::BamAlignment&, bool)
bool BamMultiReaderPrivate::PopNextCachedAlignment(BamAlignment& al, const bool needCharData) {

    // skip if no alignments available
    if ( m_alignmentCache == 0 || m_alignmentCache->IsEmpty() )
        return false;

    // pop next merge item entry from cache
    MergeItem item = m_alignmentCache->TakeFirst();
    BamReader* reader = item.Reader;
    BamAlignment* alignment = item.Alignment;
    if ( reader == 0 || alignment == 0 )
        return false;

    // set char data if requested
    if ( needCharData ) {
        alignment->BuildCharData();
        alignment->Filename = reader->GetFilename();
    }

    // store cached alignment into destination parameter (by copy)
    al = *alignment;

    // load next alignment from reader & store in cache
    SaveNextAlignment(reader, alignment);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x3fa60
movl %edx, %r13d
movq %rsi, %r14
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x3fa73
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rsi
movq (%rsi), %rax
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq *0x40(%rax)
movq (%r12), %r15
movq 0x8(%r12), %r12
testq %r15, %r15
setne %al
testq %r12, %r12
setne %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x3fa62
testb %r13b, %r13b
je 0x3fadd
movq %r12, %rdi
callq 0x33140
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x32250
movq %r12, %rdi
addq $0xe0, %rdi
movq %r13, %rsi
callq 0x32060
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %r14, %rdi
movq %r12, %rsi
callq 0x32230
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x32a00
jmp 0x3fa62
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::GetReferenceData() const
const RefVector BamMultiReaderPrivate::GetReferenceData(void) const {

    // handle empty multireader
    if ( m_readers.empty() ) return RefVector();

    // return reference data from first BamReader
    const MergeItem& item = m_readers.front();
    const BamReader* reader = item.Reader;
    if ( reader == 0 ) return RefVector();
    else
        return reader->GetReferenceData();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x3fb5f
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3fb5f
callq 0x311b0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x34ba0
jmp 0x3fb6a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::Jump(int, int)
bool BamMultiReaderPrivate::Jump(int refID, int position) {

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

    // iterate over readers
    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;

        // jump in each BamReader to position of interest
        reader->Jump(refID, position);
    }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r12, %r15
je 0x3fc2c
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3fc26
movl %ebp, %esi
movl %ebx, %edx
callq 0x317d0
addq $0x10, %r15
jmp 0x3fc10
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31070
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::UpdateAlignmentCache()
bool BamMultiReaderPrivate::UpdateAlignmentCache(void) {

    // create alignment cache if not created yet
    if ( m_alignmentCache == 0 ) {
        m_alignmentCache = CreateAlignmentCache();
        if ( m_alignmentCache == 0 ) {
            SetErrorString("BamMultiReader::UpdateAlignmentCache", "unable to create new alignment cache");
            return false;
        }
    }

    // clear any prior cache data
    m_alignmentCache->Clear();

    // iterate over readers
    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;
        BamAlignment* alignment = item.Alignment;
        if ( reader == 0 || alignment == 0 ) continue;

        // save next alignment from each reader in cache
        SaveNextAlignment(reader, alignment);
    }

    // if we get here, ok
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x3fc65
movq %rbx, %rdi
callq 0x326e0
movq %rax, %rdi
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x3fca8
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x3fc9c
movq (%r14), %rsi
movq 0x8(%r14), %rdx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x3fc96
movq %rbx, %rdi
callq 0x32a00
addq $0x10, %r14
jmp 0x3fc72
movb $0x1, %al
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1ba0d(%rip), %rsi     # 0x5b6bc
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x1ba1c(%rip), %rsi     # 0x5b6e1
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x31b30
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x338e0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
xorl %eax, %eax
jmp 0x3fc9e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3fd10
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0xc0, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0xa8(%rsp), %rbx
pushq $0x1
popq %rsi
leaq 0x48(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x352e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33e00
movl %eax, %ebx
testb %al, %al
jne 0x40cd1
leaq 0x28(%r14), %rsi
leaq 0x48(%rsp), %rdi
callq 0x33ff0
leaq 0x1a97d(%rip), %rsi     # 0x5b596
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r15, %rdx
callq 0x355e0
leaq 0x1aef3(%rip), %rdx     # 0x5bb34
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x33c40
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x355e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x33a00
leaq 0x1a920(%rip), %rsi     # 0x5b5ac
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r14, %rdi
callq 0x338e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x88(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
leaq 0xa8(%rsp), %rdi
callq 0x32810
movl %ebx, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x40d21
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x40d10
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x40d2e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x33a00
jmp 0x40d42
jmp 0x40d4e
movq %rax, %rbx
jmp 0x40d42
movq %rax, %rbx
jmp 0x40d38
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
jmp 0x40d51
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x32810
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x34a30
testb %al, %al
je 0x41031
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_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::RewindReaders()
bool BamMultiReaderPrivate::RewindReaders(void) {

    m_errorString.clear();
    bool errorsEncountered = false;

    // iterate over readers
    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;

        // attempt rewind on BamReader
        if ( !reader->Rewind() ) {
            m_errorString.append(1, '\t');
            m_errorString.append( reader->GetErrorString() );
            m_errorString.append(1, '\n');
            errorsEncountered = true;
        }
    }

    return !errorsEncountered;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x28(%rdi), %rbx
andq $0x0, 0x30(%rdi)
movq 0x28(%rdi), %rax
movb $0x0, (%rax)
movq (%rdi), %r12
movq 0x8(%rdi), %r14
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
cmpq %r14, %r12
je 0x410ca
movq (%r12), %rbp
testq %rbp, %rbp
je 0x410c4
movq %rbp, %rdi
callq 0x35290
testb %al, %al
jne 0x410c4
movq %rbx, %rdi
pushq $0x1
popq %r13
movq %r13, %rsi
pushq $0x9
popq %rdx
callq 0x333e0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x32330
movq %rbx, %rdi
movq %r15, %rsi
callq 0x35680
movq %r15, %rdi
callq 0x33a00
movq %rbx, %rdi
movq %r13, %rsi
pushq $0xa
popq %rdx
callq 0x333e0
movb $0x1, %r13b
addq $0x10, %r12
jmp 0x41069
notb %r13b
andb $0x1, %r13b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::SetExplicitMergeOrder(BamTools::BamMultiReader::MergeOrder)
bool BamMultiReaderPrivate::SetExplicitMergeOrder(BamMultiReader::MergeOrder order) {

    // set new merge flags
    m_hasUserMergeOrder = true;
    m_mergeOrder = order;

    // remove any existing merger (storing any existing data sitting in the cache)
    vector<MergeItem> currentCacheData;
    if ( m_alignmentCache ) {        
        while ( !m_alignmentCache->IsEmpty() )
            currentCacheData.push_back( m_alignmentCache->TakeFirst() );
        delete m_alignmentCache;
        m_alignmentCache = 0;
    }

    // create new cache using the new merge flags
    m_alignmentCache = CreateAlignmentCache();
    if ( m_alignmentCache == 0 ) {
        SetErrorString("BamMultiReader::SetExplicitMergeOrder", "requested order is unrecognized");
        return false;
    }

    // push current data onto new cache
    vector<MergeItem>::const_iterator readerIter = currentCacheData.begin();
    vector<MergeItem>::const_iterator readerEnd  = currentCacheData.end();
    for ( ; readerIter != readerEnd; ++readerIter ) {
        const MergeItem& item = (*readerIter);
        m_alignmentCache->Add(item);
    }

    // return success
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movb $0x1, 0x20(%rdi)
movl %esi, 0x24(%rdi)
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x41177
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
jne 0x41163
movq 0x18(%rbx), %rsi
movq (%rsi), %rax
movq %r14, %rdi
callq *0x40(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x32bb0
movq 0x18(%rbx), %rdi
jmp 0x4113b
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x41172
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x18(%rbx)
movq %rbx, %rdi
callq 0x326e0
movq %rax, %r14
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x411bc
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r13
leaq 0x50(%rsp), %r15
cmpq %r13, %r12
je 0x4120e
movq 0x18(%rbx), %rdi
movups (%r12), %xmm0
movaps %xmm0, 0x50(%rsp)
movq (%rdi), %rax
movq %r15, %rsi
callq *0x10(%rax)
addq $0x10, %r12
jmp 0x4119a
leaq 0x1a4b3(%rip), %rsi     # 0x5b676
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x1a4c3(%rip), %rsi     # 0x5b69c
leaq 0x60(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x31b30
leaq 0x30(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movq %rbx, %rdi
callq 0x338e0
leaq 0x60(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
testq %r14, %r14
setne %bl
leaq 0x10(%rsp), %rdi
callq 0x351e0
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x33a00
jmp 0x41245
jmp 0x41259
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x4125c
jmp 0x41259
jmp 0x41259
jmp 0x41259
jmp 0x41259
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x351e0
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r12, %r15
je 0x412a6
movq (%r15), %rdi
testq %rdi, %rdi
je 0x412a0
movq %r14, %rsi
callq 0x31c00
addq $0x10, %r15
jmp 0x4128b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31070
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
testq %rsi, %rsi
je 0x41705
movq %rdi, %r15
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x32250
leaq 0x8(%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%r15), %r13
movq 0x20(%r15), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%r15), %rbx
movq 0x30(%r15), %rax
movq %rax, (%rsp)
movq 0x38(%r15), %r12
leaq 0x18(%rsp), %r15
cmpq %r12, %r13
je 0x416fb
movq (%r13), %rsi
testq %rsi, %rsi
je 0x416a8
movq %r15, %rdi
callq 0x32250
movq %r15, %rdi
movq %r14, %rsi
callq 0x32220
movl %eax, %ebp
movq %r15, %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x416cf
addq $0x10, %r13
cmpq %rbx, %r13
jne 0x41678
movq (%rsp), %rax
movq 0x8(%rax), %r13
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x200(%r13), %rbx
movq %r13, 0x8(%rsp)
jmp 0x41678
leaq 0x58(%rsp), %rdx
movq %r13, (%rdx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %rbx, 0x10(%rdx)
movq (%rsp), %rax
movq %rax, 0x18(%rdx)
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x35020
leaq 0x38(%rsp), %rdi
callq 0x33a00
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x41725
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x33a00
jmp 0x41728
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x427bd
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x32250
leaq 0x8(%rbx), %r15
movq 0x20(%rbx), %r12
addq $0x10, %rbx
leaq 0x28(%rsp), %r13
cmpq %rbx, %r12
je 0x427b3
movq 0x20(%r12), %rsi
testq %rsi, %rsi
je 0x4279b
movq %r13, %rdi
callq 0x32250
movq %r13, %rdi
movq %r14, %rsi
callq 0x32220
movl %eax, %ebp
movq %r13, %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x427a8
movq %r12, %rdi
callq 0x33750
movq %rax, %r12
jmp 0x4276a
movq %r15, %rdi
movq %r12, %rsi
callq 0x349b0
leaq 0x8(%rsp), %rdi
callq 0x33a00
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x427dd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x427e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiMerger_p.h
// Function: BamTools::Internal::MultiMerger<BamTools::Algorithms::Sort::ByPosition>::TakeFirst()
inline MergeItem MultiMerger<Compare>::TakeFirst(void) {
    DataIterator firstIter = m_data.begin();
    MergeItem    firstItem = (*firstIter);
    m_data.erase(firstIter);
    return firstItem;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rsi), %rax
leaq 0x8(%rsi), %rdi
movups 0x20(%rax), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rsi
callq 0x349b0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4297a
movl 0xa8(%rdx), %ecx
cmpl $-0x1, %ecx
je 0x4297d
cmpl %ecx, %eax
jne 0x42980
movl $0xac, %eax
addq %rax, %rsi
addq %rax, %rdx
jmp 0x33510
xorl %eax, %eax
retq
movb $0x1, %al
retq
addq $0xa8, %rsi
addq $0xa8, %rdx
jmp 0x33510
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamMultiMerger_p.h
// Function: BamTools::Internal::MultiMerger<BamTools::Algorithms::Sort::ByName>::Add(BamTools::Internal::MergeItem)
inline void MultiMerger<Compare>::Add(MergeItem item) {

    // N.B. - any future custom Compare types must define this method
    //        see algorithms/Sort.h

    if ( CompareType::UsesCharData() )
        item.Alignment->BuildCharData();
    m_data.insert(item);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
callq 0x33140
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x31880
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43172
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, 0x18(%rdi)
movl 0x8(%rdi), %ecx
leaq 0xc(%rsp), %r14
movl %ecx, (%r14)
movl (%rsi), %eax
decl %eax
cmpl $0x0, 0x14(%rdi)
movl 0x10(%rdi), %edx
movl %eax, %ebp
cmovgl %edx, %ebp
testl %edx, %edx
cmovsl %eax, %ebp
cmpl %ebp, %ecx
jg 0x4316a
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
movb %al, 0x18(%rbx)
movl 0xc(%rsp), %ecx
testb %al, %al
jne 0x4315e
incl %ecx
movl %ecx, 0xc(%rsp)
jmp 0x4313b
cmpl 0x8(%rbx), %ecx
je 0x4316a
movl %ecx, 0x8(%rbx)
andl $0x0, 0xc(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x33b80
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x32820
leaq 0x28(%rsp), %rdi
callq 0x33a00
cmpq $0x0, 0x70(%rsp)
je 0x43603
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x32c00
movl %eax, %ebx
jmp 0x4368c
leaq 0x1838a(%rip), %rsi     # 0x5b994
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x33b80
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x355e0
leaq 0x48(%rsp), %rdi
callq 0x33a00
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x1835e(%rip), %rsi     # 0x5b9b3
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x31560
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x28(%rsp), %rdi
callq 0x33a00
xorl %ebx, %ebx
leaq 0x68(%rsp), %rdi
callq 0x33a00
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x436d8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x436cc
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x33a00
jmp 0x436e0
jmp 0x436d8
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x436ea
movq %rax, %rbx
jmp 0x436ea
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x33a00
jmp 0x43703
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x31f90
leaq 0x50(%rbx), %rdi
callq 0x34de0
andq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
leaq 0x1a8(%rbx), %rdi
callq 0x33480
leaq 0x1e8(%rbx), %r14
movq %r14, %rdi
callq 0x349d0
movb $0x1, %bpl
testb %al, %al
je 0x43d65
movq %r14, %rdi
callq 0x329a0
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x43e6d
movq %r14, %rdi
callq 0x31bb0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rax, %rsi
callq 0x31b30
leaq 0x17cf3(%rip), %rsi     # 0x5ba99
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x355e0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x17ce6(%rip), %rsi     # 0x5bac0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x335a0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
leaq 0x50(%rsp), %rdi
callq 0x33a00
callq 0x34970
xorl %ebp, %ebp
jmp 0x43d65
jmp 0x43e47
jmp 0x43e5b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x43e4f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x43e5e
movq %rax, %r14
jmp 0x43e68
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x43e5e
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x33a00
callq 0x34970
movq %r14, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x70, %rsp
movq %rsi, %r15
movq %rdi, %rbx
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x349d0
testb %al, %al
je 0x44061
leaq 0x1a8(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x334f0
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x440b5
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x34660
leaq 0x1798d(%rip), %rsi     # 0x5b979
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x355e0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x17ab1(%rip), %rsi     # 0x5bad1
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x335a0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
leaq 0x50(%rsp), %rdi
callq 0x33a00
jmp 0x440b3
leaq 0x17a69(%rip), %rsi     # 0x5bad1
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x31b30
leaq 0x17a6a(%rip), %rsi     # 0x5bae8
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x335a0
leaq 0x30(%rsp), %rdi
callq 0x33a00
leaq 0x50(%rsp), %rdi
callq 0x33a00
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x440fd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x440e2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x44100
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x44100
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x44114
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x33a00
jmp 0x4411e
movq %rax, %rbx
jmp 0x4411e
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x31380
testb %al, %al
je 0x44249
leaq 0x8(%rbx), %rsi
leaq 0xe0(%r14), %rdi
callq 0x32060
movq %r14, %rdi
callq 0x33140
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x4424b
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x344b0
leaq 0x1793b(%rip), %rsi     # 0x5bb11
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x355e0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x1792d(%rip), %rsi     # 0x5bb37
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x335a0
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x28(%rsp), %rdi
callq 0x33a00
leaq 0x48(%rsp), %rdi
callq 0x33a00
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
jmp 0x44282
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x44276
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x44285
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x44285
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsp, %r15
andq $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq 0x28(%rdi), %r12
movq 0x30(%rdi), %r13
cmpq %r13, %r12
je 0x446e0
movq %r15, %rdi
movq %r12, %rsi
callq 0x31f80
addq $0x28, %r12
jmp 0x446ca
movq (%rsp), %r15
movq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x327d0
movq %rax, %rcx
subq %r15, %rcx
shrq $0x5, %rcx
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
pushq $0x28
popq %rsi
cqto
idivq %rsi
cmpl %eax, %ecx
pushq $-0x1
popq %rbx
cmovnel %ecx, %ebx
movq %rsp, %rdi
callq 0x32810
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x44730
movq %rax, %rbx
movq %rsp, %rdi
callq 0x32810
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x70, %rsp
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x1a8(%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x34340
movl %eax, %ebx
testb %al, %al
jne 0x449ec
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x34660
leaq 0x17230(%rip), %rsi     # 0x5bba9
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x355e0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x17217(%rip), %rsi     # 0x5bbc4
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x335a0
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x30(%rsp), %rdi
callq 0x33a00
leaq 0x50(%rsp), %rdi
callq 0x33a00
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x44a27
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x44a1b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x44a2a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x44a2a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f