// File: 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:
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x40(%rsp)
movb $0x0, 0xa7(%rsp)
callq 0x7b6e0
movq 0x40(%rsp), %rax
testb $0x1, 0x130(%rax)
jne 0x8819d
movq 0x40(%rsp), %rdi
addq $0x88, %rdi
callq 0x7aba0
movb %al, 0x2f(%rsp)
jmp 0x88193
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x8819d
jmp 0x881ce
movb $0x1, 0xa7(%rsp)
movl $0x1, 0x90(%rsp)
jmp 0x88388
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x883a9
movq 0x40(%rsp), %rdi
addq $0x88, %rdi
callq 0x785e0
movq %rax, 0x20(%rsp)
jmp 0x881e6
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rax
movq %rax, 0x88(%rsp)
addq $0x88, %rdi
callq 0x74cd0
movq %rax, 0x18(%rsp)
jmp 0x8820b
movq 0x18(%rsp), %rax
movl %eax, 0x84(%rsp)
movl $0x0, 0x80(%rsp)
movl 0x80(%rsp), %eax
cmpl 0x84(%rsp), %eax
jae 0x88375
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x70(%rsp)
movq 0x88(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x88(%rsp)
movl 0x80(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x7b5f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
leaq 0x50(%rsp), %rdi
movl $0x2, %edx
callq 0x77510
jmp 0x882ad
movq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x73a70
jmp 0x882be
leaq 0x50(%rsp), %rdi
callq 0x7cce8
jmp 0x882ca
leaq 0x4f(%rsp), %rdi
callq 0x76f80
movq 0x70(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x8832a
jmp 0x88375
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x8831e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x7cce8
jmp 0x8831c
jmp 0x8831e
leaq 0x4f(%rsp), %rdi
callq 0x76f80
jmp 0x883a9
movq 0x40(%rsp), %rdi
movq 0x70(%rsp), %rax
movsbl (%rax), %esi
leaq 0x88(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x741e0
movb %al, 0x7(%rsp)
jmp 0x88352
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x8835e
jmp 0x8835c
jmp 0x88375
movq 0x88(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x88370
jmp 0x88375
jmp 0x88222
movb $0x1, 0xa7(%rsp)
movl $0x1, 0x90(%rsp)
testb $0x1, 0xa7(%rsp)
jne 0x8839c
movq 0x30(%rsp), %rdi
callq 0x74e60
movq 0x38(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x74e60
jmp 0x883b5
jmp 0x883b7
movq 0x98(%rsp), %rdi
callq 0x7b550
movq %rax, %rdi
callq 0x88ef0
nopl (%rax)