LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movaps 0x2b9c(%rip), %xmm0     # 0x9bd0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
leaq 0x8(%rsp), %rdi
pushq $0x4
popq %r15
leaq 0x7(%rsp), %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x7c76
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7c76
movzbl %bpl, %eax
movq 0x8(%rsp), %rdx
leaq 0xc(%rdx), %rsi
movq (%rbx), %rdi
leaq 0x8(%rdx), %r8
leaq 0x4(%rdx), %r9
xorl %ecx, %ecx
leaq 0x2b21(%rip), %r10      # 0x9bb4
cmpq $0x7, %rcx
jae 0x70ca
movl %eax, %r11d
shrl %cl, %r11d
andl $0x3, %r11d
movslq (%r10,%r11,4), %r14
addq %r10, %r14
movq %rdx, %r11
jmpq *%r14
movq %r9, %r11
jmp 0x70bd
movq %r8, %r11
jmp 0x70bd
movq %rsi, %r11
movl (%r11), %r11d
movl %r11d, (%rdi,%rcx,2)
addq $0x2, %rcx
jmp 0x7093
leaq 0x8(%rsp), %rdi
callq 0x5b6e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5b6e
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/segtree.cpp
// Function: SegTree::_init(int, int, int, double const*)
void SegTree::_init(int root, int first, int last, const value_type* a) {
    if(first == last) {
        v[root] = a[first];
    }
    else {
        int mid = (first + last) / 2;
        int left = 2 * root + 1;
        _init(left, first, mid, a);
        _init(left+1, mid+1, last, a);
        v[root] = segtree_join(v[left], v[left+1]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ecx
movl %esi, %ebx
movq %rdi, %r14
cmpl %r12d, %edx
jne 0x129b
movslq %ecx, %rax
movsd (%r15,%rax,8), %xmm0
movslq %ebx, %rax
movq 0x8(%r14), %rcx
jmp 0x12fb
leal (%r12,%rcx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %ebp
leal (%rbx,%rbx), %eax
movl %eax, 0x4(%rsp)
leal 0x1(,%rbx,2), %r13d
movq %r14, %rdi
movl %r13d, %esi
movl %ecx, %edx
movl %ebp, %ecx
movq %r15, %r8
callq 0x126c
leal 0x2(,%rbx,2), %esi
incl %ebp
movq %r14, %rdi
movl %ebp, %edx
movl %r12d, %ecx
movq %r15, %r8
callq 0x126c
movslq %r13d, %rax
movq 0x8(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movslq 0x4(%rsp), %rax
addsd 0x10(%rcx,%rax,8), %xmm0
movslq %ebx, %rax
movsd %xmm0, (%rcx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/segtree.cpp
// Function: SegTree::_print(_IO_FILE*, int, int, int, int) const
void SegTree::_print(FILE* fp, int root, int first, int last, int indent) const {
    for(int i=0; i<indent; ++i) {
        fprintf(fp, "  ");
    }
    fprintf(fp, "%d(%d-%d): %lf\n", root, first, last, v[root]);
    if(first != last) {
        int mid = (first + last) / 2;
        int left = 2 * root + 1;
        _print(fp, left, first, mid, indent+1);
        _print(fp, left+1, mid+1, last, indent+1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movq %r8, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
leaq 0xcca(%rip), %rbp       # 0x2004
pushq $0x2
popq %r13
pushq $0x1
popq %r15
testl %r14d, %r14d
movl $0x0, %ebx
movl %r14d, 0x4(%rsp)
cmovgl %r14d, %ebx
subl $0x1, %ebx
jb 0x1371
movq %rbp, %rdi
movq %r13, %rsi
movq %rdx, %r14
movq %r15, %rdx
movq %r12, %rcx
callq 0x1110
movq %r14, %rdx
jmp 0x1353
movq %rdx, 0x20(%rsp)
movslq %edx, %rdx
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movsd (%rax,%rdx,8), %xmm0
movq %r12, %rdi
leaq 0xc76(%rip), %rsi       # 0x2007
movq 0x8(%rsp), %r14
movl %r14d, %ecx
movq 0x18(%rsp), %rbx
movl %ebx, %r8d
movb $0x1, %al
callq 0x10d0
cmpl %ebx, %r14d
je 0x1400
movq %r14, %r8
leal (%r14,%rbx), %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movl %eax, (%rsp)
movq 0x20(%rsp), %rbx
leal 0x1(,%rbx,2), %edx
movl 0x4(%rsp), %r14d
incl %r14d
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %r8d, %ecx
movl %eax, %r8d
movl %r14d, %r9d
callq 0x1310
leal 0x2(,%rbx,2), %ebx
movl (%rsp), %eax
incl %eax
movq %rax, 0x8(%rsp)
movq %rbx, %rdx
jmp 0x1342
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/segtree.cpp
// Function: SegTree::_query(int, int, int, int) const
typename SegTree::value_type SegTree::_query(int root, int first, int last, int index) const {
    if(index < first || index > last) {
        return segtree_zero;
    }
    else if(first == last) {
        return v[root];
    }
    else {
        int mid = (first+last) / 2;
        int left = 2 * root + 1;
        return _query(left, first, mid, index) + _query(left+1, mid+1, last, index);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movl %edx, %ecx
cmpl %edx, %r8d
setl %al
cmpl %r14d, %r8d
setg %dl
orb %al, %dl
xorpd %xmm0, %xmm0
jne 0x1497
movl %esi, %r12d
movq %rdi, %r15
cmpl %r14d, %ecx
jne 0x144e
movslq %r12d, %rax
movq 0x8(%r15), %rcx
movsd (%rcx,%rax,8), %xmm0
jmp 0x1497
movl %r8d, %ebx
leal (%r14,%rcx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %ebp
leal 0x1(,%r12,2), %esi
movq %r15, %rdi
movl %ecx, %edx
movl %eax, %ecx
callq 0x1410
movsd %xmm0, 0x8(%rsp)
leal 0x2(,%r12,2), %esi
incl %ebp
movq %r15, %rdi
movl %ebp, %edx
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x1410
addsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/segtree.cpp
// Function: SegTree::_update(int, int, int, int, double)
void SegTree::_update(int root, int first, int last, int index, value_type x) {
    if(index < first || index > last) {
        return;
    }
    else if(first == last) {
        v[root] = x;
    }
    else {
        int mid = (first + last) / 2;
        int left = 2 * root + 1;
        _update(left, first, mid, index, x);
        _update(left+1, mid+1, last, index, x);
        v[root] = segtree_join(v[left], v[left+1]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %ecx
cmpl %edx, %r8d
setl %al
cmpl %r15d, %r8d
setg %dl
orb %al, %dl
jne 0x1553
movl %esi, %ebx
movq %rdi, %r14
cmpl %r15d, %ecx
jne 0x14de
movslq %ebx, %rax
movq 0x8(%r14), %rcx
jmp 0x154e
movl %r8d, %ebp
leal (%r15,%rcx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %r12d
leal (%rbx,%rbx), %eax
movl %eax, 0xc(%rsp)
leal 0x1(,%rbx,2), %r13d
movq %r14, %rdi
movl %r13d, %esi
movl %ecx, %edx
movl %r12d, %ecx
movsd %xmm0, 0x10(%rsp)
callq 0x14a4
leal 0x2(,%rbx,2), %esi
incl %r12d
movq %r14, %rdi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movsd 0x10(%rsp), %xmm0
callq 0x14a4
movslq %r13d, %rax
movq 0x8(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
movslq 0xc(%rsp), %rax
addsd 0x10(%rcx,%rax,8), %xmm0
movslq %ebx, %rax
movsd %xmm0, (%rcx,%rax,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r8d
movq 0x8(%rdi), %r9
pushq $-0x1
popq %rdi
pushq $0x2
popq %r10
movslq %esi, %rax
movsd (%r9,%rax,8), %xmm1
movl %ecx, %eax
ucomisd %xmm1, %xmm0
ja 0x15c2
movl %eax, %ecx
cmpl %eax, %r8d
je 0x15bf
movl %esi, %r11d
leal 0x1(,%r11,2), %esi
leal (%rcx,%r8), %eax
cltd
idivl %r10d
movslq %esi, %rdx
movsd (%r9,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x157b
addl %r11d, %r11d
addl $0x2, %r11d
incl %eax
subsd %xmm1, %xmm0
movl %r11d, %esi
movl %eax, %r8d
jmp 0x1570
movl %r8d, %edi
movl %edi, %eax
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/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 0x39193
movq (%r15), %rbp
leaq 0x3(%rbp), %rcx
movq %rcx, (%r15)
addl $0x3, %eax
movl %eax, (%rbx)
movq (%r12), %rsi
movq %rbp, %rdi
pushq $0x2
popq %rdx
callq 0x31dd0
testl %eax, %eax
je 0x39197
movb 0x2(%rbp), %al
testb %al, %al
je 0x39193
movsbl %al, %esi
movq %r13, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x32260
testb %al, %al
je 0x39193
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x39146
xorl %eax, %eax
jmp 0x39199
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_O2/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
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
cmpb $0x0, 0x130(%rsi)
jne 0x39695
movq %rsi, %r14
movq 0x90(%rsi), %r12
testq %r12, %r12
je 0x39695
movq 0x88(%r14), %rax
movq %rax, 0x10(%rsp)
testl %r12d, %r12d
je 0x39695
xorl %eax, %eax
leaq 0x18(%rsp), %r15
leaq 0xc(%rsp), %r13
movq 0x10(%rsp), %rsi
leaq 0x2(%rsi), %rbp
leaq 0x3(%rsi), %rcx
movq %rcx, 0x10(%rsp)
addl $0x3, %eax
movl %eax, 0xc(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r15, %rdi
movq %rbp, %rdx
callq 0x31b10
movq %rbx, %rdi
movq %r15, %rsi
callq 0x31f80
movq %r15, %rdi
callq 0x33a00
movb (%rbp), %al
testb %al, %al
je 0x39695
movsbl %al, %esi
movq %r14, %rdi
leaq 0x10(%rsp), %rdx
movq %r13, %rcx
callq 0x32260
testb %al, %al
je 0x39695
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x39695
movl 0xc(%rsp), %eax
cmpl %r12d, %eax
jb 0x39623
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x396b8
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x33a00
jmp 0x396bb
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/BamAlignment.cpp
// Function: BamTools::BamAlignment::GetTagType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&) const
bool BamAlignment::GetTagType(const std::string& tag, char& type) const {
  
    // skip if alignment is core-only
    if ( SupportData.HasCoreOnly ) {
        // TODO: set error string?
        return false;
    }

    // skip if no tags present
    if ( TagData.empty() ) {
        // TODO: set error string?
        return false;
    }

    // localize the tag data
    char* pTagData = (char*)TagData.data();
    const unsigned int tagDataLength = TagData.size();
    unsigned int numBytesParsed = 0;
    
    // if tag not found, return failure
    if ( !FindTag(tag, pTagData, tagDataLength, numBytesParsed) ){
        // TODO: set error string?
        return false;
    }

    // otherwise, retrieve & validate tag type code
    type = *(pTagData - 1);
    switch ( type ) {
        case (Constants::BAM_TAG_TYPE_ASCII)  :
        case (Constants::BAM_TAG_TYPE_INT8)   :
        case (Constants::BAM_TAG_TYPE_UINT8)  :
        case (Constants::BAM_TAG_TYPE_INT16)  :
        case (Constants::BAM_TAG_TYPE_UINT16) :
        case (Constants::BAM_TAG_TYPE_INT32)  :
        case (Constants::BAM_TAG_TYPE_UINT32) :
        case (Constants::BAM_TAG_TYPE_FLOAT)  :
        case (Constants::BAM_TAG_TYPE_STRING) :
        case (Constants::BAM_TAG_TYPE_HEX)    :
        case (Constants::BAM_TAG_TYPE_ARRAY)  :
            return true;

        // unknown tag type
        default:
            const string message = string("invalid tag type: ") + type;
            SetErrorString("BamAlignment::GetTagType", message);
            return false;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
cmpb $0x0, 0x130(%rdi)
jne 0x397c4
movq %rdi, %rbx
movq 0x90(%rdi), %rax
testq %rax, %rax
je 0x397c4
movq %rdx, %r14
movq 0x88(%rbx), %rcx
leaq 0x28(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x34(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x30(%rsp), %r8
andl $0x0, (%r8)
movq %rbx, %rdi
callq 0x33910
testb %al, %al
je 0x397c4
movq 0x28(%rsp), %rax
movb -0x1(%rax), %cl
movb %cl, (%r14)
addb $-0x41, %cl
cmpb $0x33, %cl
jae 0x39755
movb $0x1, %al
movzbl %cl, %ecx
movabsq $0x4012402040187, %rdx  # imm = 0x4012402040187
btq %rcx, %rdx
jb 0x397c6
leaq 0x21976(%rip), %rsi     # 0x5b0d2
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
movsbl (%r14), %edx
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x32560
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x21956(%rip), %rsi     # 0x5b0e5
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x31120
leaq 0x8(%rsp), %rdi
callq 0x33a00
leaq 0x38(%rsp), %rdi
callq 0x33a00
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x397ef
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x397fe
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x33a00
jmp 0x397fe
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x39850
movq 0x90(%rdi), %rax
testq %rax, %rax
je 0x39850
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
andl $0x0, (%r8)
callq 0x33910
addq $0x18, %rsp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x35640
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x326d0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x328d0
leaq 0x8(%rsp), %rdi
callq 0x328e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r15
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x328e0
jmp 0x3a77e
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x3a7c1
movq %r14, %rdi
callq 0x31bb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x35640
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
addq $0x138, %rbx            # imm = 0x138
movq %rbx, %rdi
movq %rax, %rsi
callq 0x35550
callq 0x34970
jmp 0x3a75c
movq %rax, %r14
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/SamHeader.cpp
// Function: BamTools::SamHeader::Clear()
void SamHeader::Clear(void) {

    // clear SAM header components
    Version.clear();
    SortOrder.clear();
    GroupOrder.clear();
    CustomTags.clear();
    Sequences.Clear();
    ReadGroups.Clear();
    Programs.Clear();
    Comments.clear();

    // clear error string
    m_errorString.clear();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x8(%rdi)
movq (%rdi), %rax
xorl %ebp, %ebp
movb %bpl, (%rax)
andq $0x0, 0x28(%rdi)
movq 0x20(%rdi), %rax
movb %bpl, (%rax)
andq $0x0, 0x48(%rdi)
movq 0x40(%rdi), %rax
movb %bpl, (%rax)
addq $0x60, %rdi
callq 0x32120
leaq 0x78(%rbx), %rdi
callq 0x31790
leaq 0xc0(%rbx), %rdi
callq 0x33090
leaq 0x108(%rbx), %rdi
callq 0x33170
leaq 0x120(%rbx), %rdi
callq 0x33010
andq $0x0, 0x140(%rbx)
movq 0x138(%rbx), %rax
movb %bpl, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x1f0, %rsp            # imm = 0x1F0
movl %esi, %ebp
movq %rdi, %r14
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x312f0
movq %rbx, %rdi
callq 0x32f50
movl %eax, %ebx
testb %al, %al
jne 0x3abc7
testb %bpl, %bpl
je 0x3ab4c
movq 0x3a4a8(%rip), %rsi     # 0x74fe8
leaq 0x30(%rsp), %rdi
callq 0x34670
jmp 0x3abc7
leaq 0x21311(%rip), %rsi     # 0x5be64
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x34880
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x78(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x34670
leaq 0x80(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x34870
addq $0x138, %r14            # imm = 0x138
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x32060
leaq 0x10(%rsp), %rdi
callq 0x33a00
leaq 0x68(%rsp), %rdi
callq 0x32870
leaq 0x30(%rsp), %rdi
callq 0x31530
movl %ebx, %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3ac12
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3ac04
jmp 0x3ac01
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3ac15
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x32870
jmp 0x3ac15
jmp 0x3ac12
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x31530
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x348b0
testb %al, %al
jne 0x3b4f1
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x3b4e6
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x32030
leaq 0xb8(%rbx), %rdi
movq %r12, %rsi
callq 0x32060
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34a70
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
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/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 %rdx, %r15
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r12
cmpq %r12, %r14
je 0x3b56f
movq %r14, %rdi
callq 0x341b0
testb %al, %al
jne 0x3b566
leaq 0x60(%r14), %rdi
movq %r15, %rsi
callq 0x32220
testb %al, %al
jne 0x3b581
addq $0xd8, %r14
jmp 0x3b545
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x3b590
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33ff0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamProgramChain.cpp
// Function: BamTools::SamProgramChain::Add(std::vector<BamTools::SamProgram, std::allocator<BamTools::SamProgram>>&)
void SamProgramChain::Add(std::vector<SamProgram>& programs) {
    vector<SamProgram>::iterator pgIter = programs.begin();
    vector<SamProgram>::iterator pgEnd  = programs.end();
    for ( ; pgIter != pgEnd; ++pgIter )
        Add(*pgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3b5c8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33050
addq $0xd8, %r14
jmp 0x3b5af
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamProgramChain.cpp
// Function: BamTools::SamProgramChain::IndexOf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int SamProgramChain::IndexOf(const std::string& programId) const {
    SamProgramConstIterator begin = ConstBegin();
    SamProgramConstIterator iter  = begin;
    SamProgramConstIterator end   = ConstEnd();
    for ( ; iter != end; ++iter ) {
        const SamProgram& current = (*iter);
        if ( current.ID == programId )
            break;
    }
    return distance( begin, iter );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %rbx
movq %r15, %r12
cmpq %rbx, %r12
je 0x3b641
leaq 0x20(%r12), %rdi
movq %r14, %rsi
callq 0x32220
testb %al, %al
jne 0x3b63e
addq $0xd8, %r12
jmp 0x3b61f
movq %r12, %rbx
subq %r15, %rbx
movl $0xd8, %ecx
movq %rbx, %rax
cqto
idivq %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x35500
movl %eax, %ecx
movq 0x8(%r14), %rax
subq (%r14), %rax
movl $0xd8, %esi
cqto
idivq %rsi
cmpl %eax, %ecx
je 0x3b804
movslq %ecx, %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32750
movq 0x397dd(%rip), %rdi     # 0x74fe8
leaq 0x1fab7(%rip), %rsi     # 0x5b2c9
callq 0x330f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32d80
movq %rax, %rdi
callq 0x31e60
pushq $0x1
popq %rdi
callq 0x33990
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::Add(BamTools::SamReadGroupDictionary const&)
void SamReadGroupDictionary::Add(const SamReadGroupDictionary& readGroups) {
    SamReadGroupConstIterator rgIter = readGroups.ConstBegin();
    SamReadGroupConstIterator rgEnd  = readGroups.ConstEnd();
    for ( ; rgIter != rgEnd; ++rgIter )
        Add(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3c740
movq %rbx, %rdi
movq %r14, %rsi
callq 0x344f0
addq $0x198, %r14            # imm = 0x198
jmp 0x3c727
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::Add(std::vector<BamTools::SamReadGroup, std::allocator<BamTools::SamReadGroup>> const&)
void SamReadGroupDictionary::Add(const std::vector<SamReadGroup>& readGroups) {
    vector<SamReadGroup>::const_iterator rgIter = readGroups.begin();
    vector<SamReadGroup>::const_iterator rgEnd  = readGroups.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Add(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3c778
movq %rbx, %rdi
movq %r14, %rsi
callq 0x344f0
addq $0x198, %r14            # imm = 0x198
jmp 0x3c75f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::Add(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void SamReadGroupDictionary::Add(const std::vector<std::string>& readGroupIds) {
    vector<string>::const_iterator rgIter = readGroupIds.begin();
    vector<string>::const_iterator rgEnd  = readGroupIds.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Add(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3c7a3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x314d0
addq $0x20, %r14
jmp 0x3c78d
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::Remove(std::vector<BamTools::SamReadGroup, std::allocator<BamTools::SamReadGroup>> const&)
void SamReadGroupDictionary::Remove(const std::vector<SamReadGroup>& readGroups) {
    vector<SamReadGroup>::const_iterator rgIter = readGroups.begin();
    vector<SamReadGroup>::const_iterator rgEnd  = readGroups.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Remove(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3c8cd
leaq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x31b60
addq $0x198, %r14            # imm = 0x198
jmp 0x3c8b3
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamReadGroupDictionary.cpp
// Function: BamTools::SamReadGroupDictionary::Remove(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void SamReadGroupDictionary::Remove(const std::vector<std::string>& readGroupIds) {
    vector<string>::const_iterator rgIter = readGroupIds.begin();
    vector<string>::const_iterator rgEnd  = readGroupIds.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Remove(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3c8f9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31b60
addq $0x20, %r14
jmp 0x3c8e3
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
callq 0x33740
testb %al, %al
jne 0x3c97c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x345a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x349e0
movq (%rbx), %r12
movq 0x8(%rbx), %r15
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x34eb0
movq %rax, %rcx
subq %r12, %r15
movl $0x198, %esi            # imm = 0x198
movq %r15, %rax
cqto
idivq %rsi
decq %rax
movq %rax, (%rcx)
movq %rsp, %rdi
callq 0x35080
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x34eb0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x35160
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x35080
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::Add(BamTools::SamSequenceDictionary const&)
void SamSequenceDictionary::Add(const SamSequenceDictionary& sequences) {
    SamSequenceConstIterator seqIter = sequences.ConstBegin();
    SamSequenceConstIterator seqEnd  = sequences.ConstEnd();
    for ( ; seqIter != seqEnd; ++seqIter )
        Add(*seqIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3e198
movq %rbx, %rdi
movq %r14, %rsi
callq 0x341f0
addq $0xd8, %r14
jmp 0x3e17f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::Add(std::vector<BamTools::SamSequence, std::allocator<BamTools::SamSequence>> const&)
void SamSequenceDictionary::Add(const std::vector<SamSequence>& sequences) {
    vector<SamSequence>::const_iterator seqIter = sequences.begin();
    vector<SamSequence>::const_iterator seqEnd  = sequences.end();
    for ( ; seqIter!= seqEnd; ++seqIter )
        Add(*seqIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3e1d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x341f0
addq $0xd8, %r14
jmp 0x3e1b7
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r14
movq 0x18(%rsi), %r12
addq $0x8, %rbx
movq %rsp, %r15
cmpq %rbx, %r12
je 0x3e22c
leaq 0x20(%r12), %rsi
leaq 0x40(%r12), %rdx
movq %r15, %rdi
callq 0x32f00
movq %r14, %rdi
movq %r15, %rsi
callq 0x341f0
movq %r15, %rdi
callq 0x354b0
movq %r12, %rdi
callq 0x33750
movq %rax, %r12
jmp 0x3e1f5
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x354b0
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::Remove(std::vector<BamTools::SamSequence, std::allocator<BamTools::SamSequence>> const&)
void SamSequenceDictionary::Remove(const std::vector<SamSequence>& sequences) {
    vector<SamSequence>::const_iterator rgIter = sequences.begin();
    vector<SamSequence>::const_iterator rgEnd  = sequences.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Remove(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3e379
leaq 0x60(%r14), %rsi
movq %rbx, %rdi
callq 0x334a0
addq $0xd8, %r14
jmp 0x3e35f
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamSequenceDictionary.cpp
// Function: BamTools::SamSequenceDictionary::Remove(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void SamSequenceDictionary::Remove(const std::vector<std::string>& sequenceNames) {
    vector<string>::const_iterator rgIter = sequenceNames.begin();
    vector<string>::const_iterator rgEnd  = sequenceNames.end();
    for ( ; rgIter!= rgEnd; ++rgIter )
        Remove(*rgIter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %r14
movq 0x8(%rsi), %r15
cmpq %r15, %r14
je 0x3e3a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x334a0
addq $0x20, %r14
jmp 0x3e38f
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x328c0
testb %al, %al
jne 0x3e434
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x32f00
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32240
movq (%rbx), %r12
movq 0x8(%rbx), %r15
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x34eb0
movq %rax, %rcx
subq %r12, %r15
movl $0xd8, %esi
movq %r15, %rax
cqto
idivq %rsi
decq %rax
movq %rax, (%rcx)
leaq 0x10(%rsp), %rdi
callq 0x354b0
leaq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x34eb0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x32460
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x354b0
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/SamSequence.h
// Function: BamTools::SamSequence::operator=(BamTools::SamSequence const&)
struct API_EXPORT SamSequence {

    // ctor & dtor
    SamSequence(void);
    SamSequence(const std::string& name, const int& length);
    SamSequence(const std::string& name, const std::string& length);
    SamSequence(const SamSequence& other);
    ~SamSequence(void);

    // query/modify entire sequence
    void Clear(void);                // clears all contents

    // convenience query methods
    bool HasAssemblyID(void) const;  // returns true if sequence has an assembly ID
    bool HasChecksum(void) const;    // returns true if sequence has an MD5 checksum
    bool HasLength(void) const;      // returns true if sequence has a length
    bool HasName(void) const;        // returns true if sequence has a name
    bool HasSpecies(void) const;     // returns true if sequence has a species ID
    bool HasURI(void) const;         // returns true if sequence has a URI

    // data members
    std::string AssemblyID;          // AS:<AssemblyID>
    std::string Checksum;            // M5:<Checksum>
    std::string Length;              // LN:<Length>      *Required for valid SAM header*
    std::string Name;                // SN:<Name>        *Required for valid SAM header*
    std::string Species;             // SP:<Species>
    std::string URI;                 // UR:<URI>
    std::vector<CustomHeaderTag> CustomTags;   // optional custom tags
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x32060
leaq 0x20(%rbx), %rdi
leaq 0x20(%r14), %rsi
callq 0x32060
leaq 0x40(%rbx), %rdi
leaq 0x40(%r14), %rsi
callq 0x32060
leaq 0x60(%rbx), %rdi
leaq 0x60(%r14), %rsi
callq 0x32060
movl $0x80, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x32060
movl $0xa0, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x32060
movl $0xc0, %eax
leaq (%rbx,%rax), %rdi
addq %rax, %r14
movq %r14, %rsi
callq 0x32550
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rdi
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x343e0
cmpq $0x4, %rax
jne 0x3ea5d
cmpl $0x14d4142, 0xc(%rsp)   # imm = 0x14D4142
jne 0x3eac3
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %rbx
leaq 0x1c8d6(%rip), %rsi     # 0x5b345
leaq 0x30(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x31b30
leaq 0x1c8dc(%rip), %rsi     # 0x5b361
leaq 0x10(%rsp), %rdi
leaq 0xa(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x36486(%rip), %rsi     # 0x74f38
movq 0x364bf(%rip), %rdx     # 0x74f78
movq %rbx, %rdi
callq 0x34c90
jmp 0x3eb27
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %rbx
leaq 0x1c870(%rip), %rsi     # 0x5b345
leaq 0x30(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x31b30
leaq 0x1c892(%rip), %rsi     # 0x5b37d
leaq 0x10(%rsp), %rdi
leaq 0xa(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x36420(%rip), %rsi     # 0x74f38
movq 0x36459(%rip), %rdx     # 0x74f78
movq %rbx, %rdi
callq 0x34c90
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3eb3c
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x33a00
jmp 0x3eb67
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3eb5d
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x3eb73
jmp 0x3eb7b
jmp 0x3eb70
movq %rax, %r14
movq %rbx, %rdi
callq 0x327c0
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/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 0x317c0
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rsi
movq %r15, %rdx
callq 0x34750
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x31490
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %rdi
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x343e0
cmpq $0x4, %rax
jne 0x3ec0a
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %rbx
leaq 0x1c776(%rip), %rsi     # 0x5b392
leaq 0x30(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x31b30
leaq 0x1c77c(%rip), %rsi     # 0x5b3ae
leaq 0x10(%rsp), %rdi
leaq 0xa(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x362d9(%rip), %rsi     # 0x74f38
movq 0x36312(%rip), %rdx     # 0x74f78
movq %rbx, %rdi
callq 0x34c90
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x3ec83
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x3ec9f
jmp 0x3eca7
movq %rax, %rdi
callq 0x39b2f
movq %rax, %r14
movq %rbx, %rdi
callq 0x327c0
movq %r14, %rdi
callq 0x34ed0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x32590
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x343e0
movl (%r15), %ecx
cmpq %rcx, %rax
jne 0x3ed2f
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rbx, %rsi
callq 0x31b30
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x34530
leaq 0x8(%rsp), %rdi
callq 0x33a00
movq %rbx, %rdi
callq 0x338d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x338d0
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %rbx
leaq 0x1c682(%rip), %rsi     # 0x5b3cb
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x31b30
leaq 0x1c686(%rip), %rsi     # 0x5b3e5
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x361ac(%rip), %rsi     # 0x74f38
movq 0x361e5(%rip), %rdx     # 0x74f78
movq %rbx, %rdi
callq 0x34c90
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x33a00
jmp 0x3edb0
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x3edc4
jmp 0x3ede8
movq %rax, %r14
movq %rbx, %rdi
callq 0x327c0
jmp 0x3ede8
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x33a00
jmp 0x3ede8
movq %rax, %rdi
callq 0x39b2f
movq %rax, %r14
movq %r14, %rdi
callq 0x34ed0