LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/nicogb.cpp
// Function: NicoGB::tick()
void NicoGB::tick() {
    if (speed) {
        cpu.totalCycles = 0;
    }

    if (cartridge.loaded && cpu.totalCycles < 70224) {
        cpu.cycle();
    }

    if (millis() - last >= 1000/60) {
        last = millis();
        if (cartridge.loaded && !speed) {
            cpu.totalCycles -= 70224;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x2a8(%rdi)
je 0x774f
movq $0x0, 0x210(%rbx)
movb $0x1, %al
jmp 0x775d
cmpq $0x11250, 0x210(%rbx) # imm = 0x11250
setl %al
cmpb $0x1, 0x28(%rbx)
jne 0x7773
testb %al, %al
je 0x7773
leaq 0x200(%rbx), %rdi
callq 0x3310
callq 0x2060
subq 0x298(%rbx), %rax
movabsq $0x431bde82d7b634db, %r14 # imm = 0x431BDE82D7B634DB
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
subq 0x2a0(%rbx), %rdx
cmpq $0x10, %rdx
jl 0x77e5
callq 0x2060
subq 0x298(%rbx), %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
movq %rdx, 0x2a0(%rbx)
cmpb $0x1, 0x28(%rbx)
jne 0x77e5
cmpb $0x0, 0x2a8(%rbx)
jne 0x77e5
addq $-0x11250, 0x210(%rbx) # imm = 0xFFFEEDB0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/ppu.cpp
// Function: PPU::getPalette(unsigned char)
std::vector<uint32_t> PPU::getPalette(uint8_t palette) {
    const std::vector<uint32_t> PALETTE = {0xfffff6d3, 0xfff9a875, 0xffeb6b6f, 0xff7c3f58};
    std::vector<uint32_t> col = {0, 0, 0, 0};
    for (int i = 0; i <= 6; i += 2) {
        switch ((palette >> i) & 0x3) {
            case 0:
                col[i/2] = PALETTE[0];
                break;
            case 1:
                col[i/2] = PALETTE[1];
                break;
            case 2:
                col[i/2] = PALETTE[2];
                break;
            case 3:
                col[i/2] = PALETTE[3];
                break;
        }
    }
    return col;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movaps 0x1d18(%rip), %xmm0     # 0x9bb0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movl $0x4, %edx
movq %r14, %rsi
callq 0x8bea
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rcx
movl $0x4, %edx
movq %rbx, %rdi
callq 0x8bea
movzbl %bpl, %edx
movq 0x8(%rsp), %rsi
leaq 0xc(%rsi), %rdi
movq (%rbx), %r8
leaq 0x8(%rsi), %r9
leaq 0x4(%rsi), %r10
xorl %eax, %eax
movl %edx, %r14d
xorl %ecx, %ecx
shrl %cl, %r14d
andl $0x3, %r14d
leaq 0x1c99(%rip), %r11      # 0x9b9c
movslq (%r11,%r14,4), %r14
addq %r11, %r14
movq %rsi, %rcx
jmpq *%r14
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7f2a
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270
movl (%rcx), %ecx
movl %ecx, (%r8,%rax,2)
cmpq $0x5, %rax
jae 0x7f6a
addq $0x2, %rax
movl %edx, %r14d
movl %eax, %ecx
shrl %cl, %r14d
andl $0x3, %r14d
movslq (%r11,%r14,4), %r14
addq %r11, %r14
movq %rsi, %rcx
jmpq *%r14
movq %r10, %rcx
jmp 0x7f32
movq %rdi, %rcx
jmp 0x7f32
movq %r9, %rcx
jmp 0x7f32
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7f81
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ddos-on-anycast/src/lib/segtree.cpp
// Function: SegTree::_cumsum_search(int, int, int, double) const
int SegTree::_cumsum_search(int root, int first, int last, value_type x) const {
    if(x > v[root]) {
        return -1;
    }
    else if(first == last) {
        return first;
    }
    int left = 2 * root + 1;
    int mid = (first + last) / 2;
    if(x <= v[left]) {
        return _cumsum_search(left, first, mid, x);
    }
    else {
        return _cumsum_search(left+1, mid+1, last, x-v[left]);
    }
}

// Assembly:
movl %edx, %eax
movq 0x8(%rdi), %rdx
movslq %esi, %rdi
movsd (%rdx,%rdi,8), %xmm1
movl %ecx, %r8d
ucomisd %xmm1, %xmm0
ja 0x15d1
movl %r8d, %ecx
cmpl %r8d, %eax
je 0x15d6
movl %esi, %edi
leal 0x1(,%rdi,2), %esi
leal (%rcx,%rax), %r9d
movl %r9d, %r8d
shrl $0x1f, %r8d
addl %r9d, %r8d
sarl %r8d
movslq %esi, %r9
movsd (%rdx,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x1587
addl %edi, %edi
addl $0x2, %edi
incl %r8d
subsd %xmm1, %xmm0
movl %edi, %esi
movl %r8d, %eax
jmp 0x157c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/BamAlignment.cpp
// Function: BamTools::BamAlignment::FindTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char*&, unsigned int const&, unsigned int&) const
bool BamAlignment::FindTag(const std::string& tag,
                           char*& pTagData,
                           const unsigned int& tagDataLength,
                           unsigned int& numBytesParsed) const
{

    while ( numBytesParsed < tagDataLength ) {

        const char* pTagType        = pTagData;
        const char* pTagStorageType = pTagData + 2;
        pTagData       += 3;
        numBytesParsed += 3;

        // check the current tag, return true on match
        if ( strncmp(pTagType, tag.c_str(), 2) == 0 )
            return true;

        // get the storage class and find the next tag
        if ( *pTagStorageType == '\0' ) return false;
        if ( !SkipToNextTag(*pTagStorageType, pTagData, numBytesParsed) ) return false;
        if ( *pTagData == '\0' ) return false;
    }

    // checked all tags, none match
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl (%rbx), %eax
cmpl (%r14), %eax
jae 0x2e4f9
movq (%r15), %rbp
leaq 0x3(%rbp), %rcx
movq %rcx, (%r15)
addl $0x3, %eax
movl %eax, (%rbx)
movq (%r12), %rsi
movl $0x2, %edx
movq %rbp, %rdi
callq 0x26930
testl %eax, %eax
je 0x2e4fd
movb 0x2(%rbp), %al
testb %al, %al
je 0x2e4f9
movsbl %al, %esi
movq %r13, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x26ca0
testb %al, %al
je 0x2e4f9
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x2e4aa
xorl %eax, %eax
jmp 0x2e4ff
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/BamAlignment.cpp
// Function: BamTools::BamAlignment::GetTagNames[abi:cxx11]() const
std::vector<std::string> BamAlignment::GetTagNames(void) const {

    std::vector<std::string> result;
    if ( SupportData.HasCoreOnly || TagData.empty() )
        return result;

    char* pTagData = (char*)TagData.data();
    const unsigned int tagDataLength = TagData.size();
    unsigned int numBytesParsed = 0;
    while ( numBytesParsed < tagDataLength ) {

        // get current tag name & type
        const char* pTagName = pTagData;
        const char* pTagType = pTagData + 2;
        pTagData       += 3;
        numBytesParsed +=3;

        // store tag name
        result.push_back( std::string(pTagName, 2)  );

        // find the next tag
        if ( *pTagType == '\0' ) break;
        if ( !SkipToNextTag(*pTagType, pTagData, numBytesParsed) ) break;
        if ( *pTagData == '\0' ) break;
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpb $0x0, 0x130(%rsi)
jne 0x2eb61
movq %rsi, %r14
movq 0x90(%rsi), %rbp
testq %rbp, %rbp
je 0x2eb61
testl %ebp, %ebp
je 0x2eb61
movq 0x88(%r14), %r13
leaq 0x28(%rsp), %r12
leaq 0x3(%r13), %rax
movq %rax, 0x10(%rsp)
movl $0x3, 0xc(%rsp)
movq %r12, -0x10(%r12)
testq %r13, %r13
je 0x2eb73
leaq 0x18(%rsp), %r15
movzwl (%r13), %eax
movw %ax, 0x28(%rsp)
movq $0x2, 0x20(%rsp)
movb $0x0, 0x2a(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26ab0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x2eb15
callq 0x27560
movb 0x2(%r13), %al
testb %al, %al
je 0x2eb61
movsbl %al, %esi
movq %r14, %rdi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x26ca0
testb %al, %al
je 0x2eb61
movq 0x10(%rsp), %r13
cmpb $0x0, (%r13)
je 0x2eb61
movl 0xc(%rsp), %eax
cmpl %ebp, %eax
jae 0x2eb61
leaq 0x3(%r13), %rcx
movq %rcx, 0x10(%rsp)
addl $0x3, %eax
movl %eax, 0xc(%rsp)
movq %r12, 0x18(%rsp)
jmp 0x2eae3
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x265a0(%rip), %rdi     # 0x5511a
callq 0x27050
jmp 0x2eb81
movq %rax, %r14
jmp 0x2eb98
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x2eb98
callq 0x27560
movq %rbx, %rdi
callq 0x270a0
movq %r14, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/BamAlignment.cpp
// Function: BamTools::BamAlignment::HasTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool BamAlignment::HasTag(const std::string& tag) const {

    // return false if no tag data present
    if ( SupportData.HasCoreOnly || TagData.empty() )
        return false;

    // localize the tag data for lookup
    char* pTagData = (char*)TagData.data();
    const unsigned int tagDataLength = TagData.size();
    unsigned int numBytesParsed = 0;

    // if result of tag lookup
    return FindTag(tag, pTagData, tagDataLength, numBytesParsed);
}

// Assembly:
cmpb $0x0, 0x130(%rdi)
jne 0x2ed57
movq 0x90(%rdi), %rax
testq %rax, %rax
je 0x2ed57
subq $0x18, %rsp
movq 0x88(%rdi), %rcx
leaq 0x10(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x0, (%r8)
callq 0x27c00
addq $0x18, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamHeader.cpp
// Function: BamTools::SamHeader::SetHeaderText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SamHeader::SetHeaderText(const std::string& headerText) {

    // clear prior data
    Clear();

    try {
        SamFormatParser parser(*this);
        parser.Parse(headerText);
    } catch ( BamException& e ) {

        // clear anything parsed so far
        // no telling what's valid and what's partially parsed
        Clear();

        // set error string
        m_errorString = e.what();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x29170
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x26fe0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x270f0
leaq 0x8(%rsp), %rdi
callq 0x27100
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27100
jmp 0x2fd7a
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x2fdbd
movq %r14, %rdi
callq 0x267d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x29170
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
addq $0x138, %rbx            # imm = 0x138
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27ff0
callq 0x287d0
jmp 0x2fd58
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/SamHeader.cpp
// Function: BamTools::SamHeader::IsValid(bool) const
bool SamHeader::IsValid(bool verbose) const {

    SamHeaderValidator validator(*this);

    // if SAM header is valid, return success
    if ( validator.Validate() )
        return true;

    // otherwiser
    else {

        // print messages to stderr
        if ( verbose )
            validator.PrintMessages(std::cerr);

        // or catch in local error string
        else {
            stringstream errorStream("");
            validator.PrintMessages(errorStream);
            m_errorString = errorStream.str();
        }
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movl %esi, %ebp
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26220
movq %rbx, %rdi
callq 0x27520
movl %eax, %ebx
testb %al, %al
jne 0x30296
testb %bpl, %bpl
je 0x3020b
movq 0x3adec(%rip), %rsi     # 0x6afe8
leaq 0x28(%rsp), %rdi
callq 0x285c0
jmp 0x30296
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x25c74(%rip), %rdx     # 0x55e8f
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x26750
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x18, %edx
callq 0x28740
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3024b
callq 0x27560
leaq 0x70(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x285c0
leaq 0x78(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x28730
addq $0x138, %r14            # imm = 0x138
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x26b80
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3028c
callq 0x27560
leaq 0x60(%rsp), %rdi
callq 0x270d0
leaq 0x28(%rsp), %rdi
callq 0x26390
movl %ebx, %eax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x302ed
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x302cb
callq 0x27560
jmp 0x302cb
jmp 0x302c8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x270d0
jmp 0x302f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x302f0
callq 0x27560
jmp 0x302f0
jmp 0x302ed
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x26390
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamProgramChain.cpp
// Function: BamTools::SamProgramChain::Add(BamTools::SamProgram&)
void SamProgramChain::Add(SamProgram& program) {

    // ignore duplicated records
    if ( Contains(program) )
        return;

    // if other programs already in chain, try to find the "next" record
    // tries to match another record's PPID with @program's ID
    if ( !IsEmpty() )
        program.NextProgramID = NextIdFor(program.ID);

    // store program record
    m_data.push_back(program);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsi), %r15
movq %r15, %rsi
callq 0x29070
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
shrq $0x3, %rsi
imull $0x684bda13, %esi, %esi # imm = 0x684BDA13
cmpl %esi, %eax
jne 0x30d71
cmpq %rdx, %rcx
je 0x30d66
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26b50
leaq 0xb8(%rbx), %rdi
movq %r12, %rsi
callq 0x26b80
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30d66
callq 0x27560
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28870
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30d93
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamProgramChain.cpp
// Function: BamTools::SamProgramChain::NextIdFor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const std::string SamProgramChain::NextIdFor(const std::string& programId) const {

    // find first record in container whose PreviousProgramID matches @programId
    SamProgramConstIterator iter = ConstBegin();
    SamProgramConstIterator end  = ConstEnd();
    for ( ; iter != end; ++iter ) {
        const SamProgram& current = (*iter);
        if ( !current.HasPreviousProgramID() &&
              current.PreviousProgramID == programId
           )
        {
            return current.ID;
        }
    }

    // none found
    return string();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r12
cmpq %r12, %r14
je 0x30e1f
movq %rdx, %r15
movq %r14, %rdi
callq 0x281f0
testb %al, %al
jne 0x30e13
movq 0x68(%r14), %rdx
cmpq 0x8(%r15), %rdx
jne 0x30e13
testq %rdx, %rdx
je 0x30e34
movq (%r15), %rsi
movq 0x60(%r14), %rdi
callq 0x277e0
testl %eax, %eax
je 0x30e34
addq $0xd8, %r14
cmpq %r12, %r14
jne 0x30de8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x30e4e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x267c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamProgramChain.cpp
// Function: BamTools::SamProgramChain::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SamProgram& SamProgramChain::operator[](const std::string& programId) {

    // look up program record matching this ID
    int index = IndexOf(programId);

    // if record not found
    if ( index == (int)m_data.size() ) {
        cerr << "SamProgramChain::operator[] - unknown programId: " << programId << endl;
        exit(1);
    }

    // otherwise return program record at index
    return m_data.at(index);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x29070
movl %eax, %ecx
movq (%r14), %rax
movq 0x8(%r14), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x7b425ed097b425ed, %rdx # imm = 0x84BDA12F684BDA13
imulq %rsi, %rdx
cmpl %edx, %ecx
je 0x3112d
movslq %ecx, %rsi
cmpq %rsi, %rdx
jbe 0x3115d
imulq $0xd8, %rsi, %rcx
addq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x39eb4(%rip), %rdi     # 0x6afe8
leaq 0x24135(%rip), %rsi     # 0x55270
callq 0x27670
movq %rax, %rdi
movq %rbx, %rsi
callq 0x273e0
movq %rax, %rdi
callq 0x269c0
movl $0x1, %edi
callq 0x27c60
leaq 0x2413e(%rip), %rdi     # 0x552a2
xorl %eax, %eax
callq 0x284e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SamReadGroup& SamReadGroupDictionary::operator[](const std::string& readGroupId) {

    if ( !Contains(readGroupId) ) {
        SamReadGroup rg(readGroupId);
        m_data.push_back(rg);
        m_lookupData[readGroupId] = m_data.size() - 1;
    }

    const size_t index = m_lookupData[readGroupId];
    return m_data.at(index);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x26b20
leaq 0x20(%rbx), %rcx
movabsq $-0x505050505050505, %r13 # imm = 0xFAFAFAFAFAFAFAFB
cmpq %rcx, %rax
jne 0x32738
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x28520
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28820
movq (%rbx), %rbp
movq 0x8(%rbx), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bf0
subq %rbp, %r12
sarq $0x3, %r12
imulq %r13, %r12
decq %r12
movq %r12, (%rax)
movq %rsp, %rdi
callq 0x28d70
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bf0
movq (%rax), %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
cmpq %rsi, %rdx
jbe 0x32779
imulq $0x198, %rsi, %rcx      # imm = 0x198
addq %rcx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22b22(%rip), %rdi     # 0x552a2
xorl %eax, %eax
callq 0x284e0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x28d70
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamSequence.cpp
// Function: BamTools::SamSequence::Clear()
void SamSequence::Clear(void) {
    AssemblyID.clear();
    Checksum.clear();
    Length.clear();
    Name.clear();
    Species.clear();
    URI.clear();
    CustomTags.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movq (%rdi), %rcx
movb %al, (%rcx)
movq %rax, 0x28(%rdi)
movq 0x20(%rdi), %rcx
movb %al, (%rcx)
movq %rax, 0x48(%rdi)
movq 0x40(%rdi), %rcx
movb %al, (%rcx)
movq %rax, 0x68(%rdi)
movq 0x60(%rdi), %rcx
movb %al, (%rcx)
movq %rax, 0x88(%rdi)
movq 0x80(%rdi), %rcx
movb %al, (%rcx)
movq %rax, 0xa8(%rdi)
movq 0xa0(%rdi), %rcx
movb %al, (%rcx)
movq 0xc0(%rdi), %r14
movq 0xc8(%rdi), %rsi
cmpq %r14, %rsi
je 0x33fc0
movq %rdi, %rbx
movq %r14, %rdi
callq 0x26a20
movq %r14, 0xc8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::Add(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>> const&)
void SamSequenceDictionary::Add(const std::map<std::string, int>& sequenceMap) {
    map<string, int>::const_iterator seqIter = sequenceMap.begin();
    map<string, int>::const_iterator seqEnd  = sequenceMap.end();
    for ( ; seqIter != seqEnd; ++seqIter ) {
        const string& name = (*seqIter).first;
        const int& length = (*seqIter).second;
        Add( SamSequence(name, length) );
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x3425f
movq %rdi, %r14
movq %rsp, %r12
leaq 0x20(%r15), %rsi
leaq 0x40(%r15), %rdx
movq %r12, %rdi
callq 0x274e0
movq %r14, %rdi
movq %r12, %rsi
callq 0x28220
movq %r12, %rdi
callq 0x29030
movq %r15, %rdi
callq 0x27ae0
movq %rax, %r15
cmpq %rbx, %rax
jne 0x3422c
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x29030
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SamSequence& SamSequenceDictionary::operator[](const std::string& sequenceName) {

    if ( !Contains(sequenceName) ) {
        SamSequence seq(sequenceName, 0);
        m_data.push_back(seq);
        m_lookupData[sequenceName] = m_data.size() - 1;
    }

    const size_t index = m_lookupData[sequenceName];
    return m_data.at(index);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x26b20
leaq 0x20(%rbx), %rcx
movabsq $-0x7b425ed097b425ed, %r13 # imm = 0x84BDA12F684BDA13
cmpq %rcx, %rax
jne 0x3453b
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x274e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x26c80
movq (%rbx), %rbp
movq 0x8(%rbx), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bf0
subq %rbp, %r12
sarq $0x3, %r12
imulq %r13, %r12
decq %r12
movq %r12, (%rax)
leaq 0x10(%rsp), %rdi
callq 0x29030
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bf0
movq (%rax), %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
cmpq %rsi, %rdx
jbe 0x3457c
imulq $0xd8, %rsi, %rcx
addq %rcx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20d1f(%rip), %rdi     # 0x552a2
xorl %eax, %eax
callq 0x284e0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x29030
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/BamHeader_p.cpp
// Function: BamTools::Internal::BamHeader::CheckMagicNumber(BamTools::Internal::BgzfStream*)
void BamHeader::CheckMagicNumber(BgzfStream* stream) {

    // try to read magic number
    char buffer[Constants::BAM_HEADER_MAGIC_LENGTH];
    const size_t numBytesRead = stream->Read(buffer, Constants::BAM_HEADER_MAGIC_LENGTH);
    if ( numBytesRead != (int)Constants::BAM_HEADER_MAGIC_LENGTH )
        throw BamException("BamHeader::CheckMagicNumber", "could not read magic number");

    // validate magic number
    if ( !isValidMagicNumber(buffer) )
        throw BamException("BamHeader::CheckMagicNumber", "invalid magic number");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x283c0
cmpq $0x4, %rax
jne 0x34b9b
cmpl $0x14d4142, 0xc(%rsp)   # imm = 0x14D4142
jne 0x34c1a
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x269d0
movq %rax, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x20748(%rip), %rsi     # 0x55300
leaq 0x2075c(%rip), %rdx     # 0x5531b
leaq 0x10(%rsp), %rdi
callq 0x26750
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20742(%rip), %rsi     # 0x5531c
leaq 0x20756(%rip), %rdx     # 0x55337
leaq 0x30(%rsp), %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x3632f(%rip), %rsi     # 0x6af38
movq 0x36368(%rip), %rdx     # 0x6af78
movq %rbx, %rdi
callq 0x28a20
jmp 0x34c97
movl $0x28, %edi
callq 0x269d0
movq %rax, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x206c9(%rip), %rsi     # 0x55300
leaq 0x206dd(%rip), %rdx     # 0x5531b
leaq 0x10(%rsp), %rdi
callq 0x26750
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x206df(%rip), %rsi     # 0x55338
leaq 0x206ec(%rip), %rdx     # 0x5534c
leaq 0x30(%rsp), %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x362b0(%rip), %rsi     # 0x6af38
movq 0x362e9(%rip), %rdx     # 0x6af78
movq %rbx, %rdi
callq 0x28a20
jmp 0x34c9b
jmp 0x34cc3
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x34cad
callq 0x27560
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x34cbc
callq 0x27560
testb %bpl, %bpl
jne 0x34cdc
jmp 0x34ce4
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x34cdc
callq 0x27560
jmp 0x34cdc
jmp 0x34cd9
movq %rax, %r14
movq %rbx, %rdi
callq 0x27070
movq %r14, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamHeader_p.cpp
// Function: BamTools::Internal::BamHeader::Load(BamTools::Internal::BgzfStream*)
void BamHeader::Load(BgzfStream* stream) {

    // read & check magic number
    CheckMagicNumber(stream);

    // read header (length, then actual text)
    uint32_t length(0);
    ReadHeaderLength(stream, length);
    ReadHeaderText(stream, length);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x26530
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rsi
movq %r15, %rdx
callq 0x28670
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x26320
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/BamHeader_p.cpp
// Function: BamTools::Internal::BamHeader::ReadHeaderLength(BamTools::Internal::BgzfStream*, unsigned int&)
void BamHeader::ReadHeaderLength(BgzfStream* stream, uint32_t& length) {

    // read BAM header text length
    char buffer[sizeof(uint32_t)];
    const size_t numBytesRead = stream->Read(buffer, sizeof(uint32_t));
    if ( numBytesRead != sizeof(uint32_t) )
        throw BamException("BamHeader::ReadHeaderLength", "could not read header length");

    // convert char buffer to length
    length = BamTools::UnpackUnsignedInt(buffer);
    if ( BamTools::SystemIsBigEndian() )
        BamTools::SwapEndian_32(length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x283c0
cmpq $0x4, %rax
jne 0x34d78
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x269d0
movq %rax, %rbx
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x205b8(%rip), %rsi     # 0x5534d
leaq 0x205cc(%rip), %rdx     # 0x55368
leaq 0x10(%rsp), %rdi
callq 0x26750
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x205b2(%rip), %rsi     # 0x55369
leaq 0x205c7(%rip), %rdx     # 0x55385
leaq 0x30(%rsp), %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x36152(%rip), %rsi     # 0x6af38
movq 0x3618b(%rip), %rdx     # 0x6af78
movq %rbx, %rdi
callq 0x28a20
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x34e07
callq 0x27560
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x34e16
callq 0x27560
testb %bpl, %bpl
jne 0x34e34
jmp 0x34e3c
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x34e34
callq 0x27560
jmp 0x34e34
movq %rax, %r14
movq %rbx, %rdi
callq 0x27070
movq %r14, %rdi
callq 0x28c10
// File: /workspace/github_cpp_makefile_star2_O3/zeeev[P]DASVC/bamtools/src/api/internal/bam/BamHeader_p.cpp
// Function: BamTools::Internal::BamHeader::ReadHeaderText(BamTools::Internal::BgzfStream*, unsigned int const&)
void BamHeader::ReadHeaderText(BgzfStream* stream, const uint32_t& length) {

    // read header text
    char* headerText = (char*)calloc(length + 1, 1);
    const size_t bytesRead = stream->Read(headerText, length);

    // if error reading, clean up buffer & throw
    if ( bytesRead != length ) {
        free(headerText);
        throw BamException("BamHeader::ReadHeaderText", "could not read header text");
    }

    // otherwise, text was read OK
    // store & cleanup
    m_header.SetHeaderText( (string)((const char*)headerText) );
    free(headerText);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl (%rdx), %r13d
leal 0x1(%r13), %edi
movl $0x1, %esi
callq 0x26ec0
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x283c0
movl (%r15), %ecx
cmpq %rcx, %rax
jne 0x34ece
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rbx, %rsi
callq 0x26770
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x284d0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34eb7
callq 0x27560
movq %rbx, %rdi
callq 0x27bc0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x27bc0
movl $0x28, %edi
callq 0x269d0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x20493(%rip), %rsi     # 0x55386
leaq 0x204a5(%rip), %rdx     # 0x5539f
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2048b(%rip), %rsi     # 0x553a0
leaq 0x2049e(%rip), %rdx     # 0x553ba
leaq 0x28(%rsp), %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x35ff4(%rip), %rsi     # 0x6af38
movq 0x3602d(%rip), %rdx     # 0x6af78
movq %rbx, %rdi
callq 0x28a20
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x34f65
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x34f74
callq 0x27560
testb %bpl, %bpl
jne 0x34f92
jmp 0x34fb7
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x34f92
callq 0x27560
jmp 0x34f92
movq %rax, %r14
movq %rbx, %rdi
callq 0x27070
jmp 0x34fb7
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34fb7
callq 0x27560
jmp 0x34fb7
movq %rax, %r14
movq %r14, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq $0x0, 0x30(%rdi)
movq 0x28(%rdi), %rax
movb $0x0, (%rax)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27e30
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28f30
movl %eax, %ebx
leaq 0x28(%rsp), %rdi
callq 0x270a0
testb %bl, %bl
jne 0x35267
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x267c0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x201eb(%rip), %rsi     # 0x553c0
leaq 0x20211(%rip), %rdx     # 0x553ed
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 0x35209
callq 0x27560
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x201d6(%rip), %rsi     # 0x553ee
leaq 0x201e4(%rip), %rdx     # 0x55403
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x27bd0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x35245
callq 0x27560
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35258
callq 0x27560
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35267
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 0x3528c
callq 0x27560
jmp 0x3528c
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x352a9
jmp 0x352b3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x352b3
callq 0x27560
jmp 0x352b3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x352d1
callq 0x27560
jmp 0x352d1
movq %rax, %rbx
leaq 0x28(%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::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 %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
sarq $0x4, %rsi
callq 0x27cd0
movq (%r14), %r15
movq 0x8(%r14), %r12
cmpq %r12, %r15
je 0x355e7
leaq 0x10(%rsp), %r13
movq %rsp, %r14
movq (%r15), %rsi
testq %rsi, %rsi
je 0x355de
movq %r14, %rdi
callq 0x26c90
cmpq $0x0, 0x8(%rsp)
je 0x355d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26ab0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x355de
callq 0x27560
addq $0x10, %r15
cmpq %r12, %r15
jne 0x355ad
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3560d
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x35610
callq 0x27560
jmp 0x35610
movq %rax, %r14
movq %rbx, %rdi
callq 0x270a0
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/BamMultiReader_p.cpp
// Function: BamTools::Internal::BamMultiReaderPrivate::GetHeaderText[abi:cxx11]() const
string BamMultiReaderPrivate::GetHeaderText(void) const {

    // N.B. - right now, simply copies all header data from first BAM,
    //        and then appends RG's from other BAM files
    // TODO: make this more intelligent wrt other header lines/fields

    // if no readers open
    const size_t numReaders = m_readers.size();
    if ( numReaders == 0 ) return string();

    // retrieve first reader's header
    const MergeItem& firstItem = m_readers.front();
    const BamReader* reader = firstItem.Reader;
    if ( reader == 0 ) return string();
    SamHeader mergedHeader = reader->GetHeader();

    // iterate over any remaining readers (skipping the first)
    for ( size_t i = 1; i < numReaders; ++i ) {
        const MergeItem& item = m_readers.at(i);
        const BamReader* reader = item.Reader;
        if ( reader == 0 ) continue;

        // retrieve current reader's header
        const SamHeader currentHeader = reader->GetHeader();

        // append current reader's RG entries to merged header
        // N.B. - SamReadGroupDictionary handles duplicate-checking
        mergedHeader.ReadGroups.Add(currentHeader.ReadGroups);

        // TODO: merge anything else??
    }

    // return stringified header
    return mergedHeader.ToString();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %r15
movq (%rsi), %rax
movq 0x8(%rsi), %rbx
subq %rax, %rbx
je 0x35eb9
movq %rsi, %r14
movq (%rax), %rsi
testq %rsi, %rsi
je 0x35eb9
movq %r15, (%rsp)
sarq $0x4, %rbx
leaq 0x160(%rsp), %r15
movq %r15, %rdi
callq 0x27f70
cmpq $0x2, %rbx
jb 0x35e96
movl $0xc0, %r13d
addq %r13, %r15
leaq 0x8(%rsp), %rax
addq %rax, %r13
movl $0x1, %r12d
movl $0x10, %ebp
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %r12, %rdx
jbe 0x35ee2
movq (%rax,%rbp), %rsi
testq %rsi, %rsi
je 0x35e8a
leaq 0x8(%rsp), %rdi
callq 0x27f70
movq %r15, %rdi
movq %r13, %rsi
callq 0x28fa0
leaq 0x8(%rsp), %rdi
callq 0x275d0
incq %r12
addq $0x10, %rbp
cmpq %r12, %rbx
jne 0x35e4b
leaq 0x160(%rsp), %rsi
movq (%rsp), %r15
movq %r15, %rdi
callq 0x285d0
leaq 0x160(%rsp), %rdi
callq 0x275d0
jmp 0x35ecd
leaq 0x10(%r15), %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
movq %r15, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f3b9(%rip), %rdi     # 0x552a2
movq %r12, %rsi
xorl %eax, %eax
callq 0x284e0
jmp 0x35f06
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x275d0
jmp 0x35f09
jmp 0x35f06
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x275d0
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/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 0x35f5e
movl %edx, %r13d
movq %rsi, %r14
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
je 0x35f71
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 0x35f60
testb %r13b, %r13b
je 0x35fe2
movq %r12, %rdi
callq 0x276c0
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x26c90
leaq 0xe0(%r12), %rdi
movq %r13, %rsi
callq 0x26b80
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35fe2
callq 0x27560
movq %r14, %rdi
movq %r12, %rsi
callq 0x26b80
movl 0x20(%r12), %eax
movl %eax, 0x20(%r14)
leaq 0x28(%r14), %rdi
leaq 0x28(%r12), %rsi
callq 0x26b80
leaq 0x48(%r14), %rdi
leaq 0x48(%r12), %rsi
callq 0x26b80
leaq 0x68(%r14), %rdi
leaq 0x68(%r12), %rsi
callq 0x26b80
movl $0x88, %esi
leaq (%r14,%rsi), %rdi
addq %r12, %rsi
callq 0x26b80
movups 0xa8(%r12), %xmm0
movups %xmm0, 0xa8(%r14)
movl $0xb8, %esi
leaq (%r14,%rsi), %rdi
addq %r12, %rsi
callq 0x28440
movq 0xd0(%r12), %rax
movq %rax, 0xd0(%r14)
movl 0xd8(%r12), %eax
movl %eax, 0xd8(%r14)
movl $0xe0, %esi
leaq (%r14,%rsi), %rdi
addq %r12, %rsi
callq 0x26b80
movl $0x100, %esi            # imm = 0x100
leaq (%r14,%rsi), %rdi
addq %r12, %rsi
callq 0x26b80
movb 0x130(%r12), %al
movb %al, 0x130(%r14)
movups 0x120(%r12), %xmm0
movups %xmm0, 0x120(%r14)
movl $0x138, %eax            # imm = 0x138
addq %rax, %r14
movq %r12, %rsi
addq %rax, %rsi
movq %r14, %rdi
callq 0x26b80
movq %r15, %rdi
movq %r12, %rsi
callq 0x28840
testb %al, %al
je 0x35f60
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x35f60
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3610d
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3615d
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3615d
callq 0x26160
movq %rbx, %rdi
movq %rax, %rsi
callq 0x28960
jmp 0x3616b
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r12, %r15
je 0x36231
movl %edx, %ebx
movl %esi, %ebp
movq (%r15), %rdi
testq %rdi, %rdi
je 0x36228
movl %ebp, %esi
movl %ebx, %edx
callq 0x26540
addq $0x10, %r15
cmpq %r12, %r15
jne 0x36217
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x26060
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x36270
movq %rbx, %rdi
callq 0x26ff0
movq %rax, %rdi
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x362d8
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %r13
movq 0x8(%rbx), %rbp
movb $0x1, %al
cmpq %rbp, %r13
je 0x3634c
leaq 0x8(%rsp), %r14
movq (%r13), %r15
movq 0x8(%r13), %r12
testq %r15, %r15
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x362cb
movq %r15, %rdi
movq %r12, %rsi
callq 0x28840
testb %al, %al
je 0x362cb
movq 0x18(%rbx), %rdi
movq %r15, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
addq $0x10, %r13
cmpq %rbp, %r13
jne 0x3628d
movb $0x1, %al
jmp 0x3634c
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f38f(%rip), %rsi     # 0x55677
leaq 0x1f3ac(%rip), %rdx     # 0x5569b
leaq 0x8(%rsp), %rdi
callq 0x26750
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1f393(%rip), %rsi     # 0x5569c
leaq 0x1f3b0(%rip), %rdx     # 0x556c0
leaq 0x28(%rsp), %rdi
callq 0x26750
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x27bd0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3633b
callq 0x27560
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3634a
callq 0x27560
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x36372
callq 0x27560
jmp 0x36372
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x36381
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop