// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatParser_p.cpp
// Function: BamTools::Internal::SamFormatParser::ParseSQLine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void SamFormatParser::ParseSQLine(const string& line) {

    SamSequence seq;

    // split SQ line into tokens
    vector<string> tokens = Split(line, Constants::SAM_TAB);

    // iterate over tokens
    vector<string>::const_iterator tokenIter = tokens.begin();
    vector<string>::const_iterator tokenEnd  = tokens.end();
    for ( ; tokenIter != tokenEnd; ++tokenIter ) {

        // get tag/value
        const string tokenTag = (*tokenIter).substr(0,2);
        const string tokenValue = (*tokenIter).substr(3);

        // set sequence contents
        if      ( tokenTag == Constants::SAM_SQ_NAME_TAG       ) seq.Name = tokenValue;
        else if ( tokenTag == Constants::SAM_SQ_LENGTH_TAG     ) seq.Length = tokenValue;
        else if ( tokenTag == Constants::SAM_SQ_ASSEMBLYID_TAG ) seq.AssemblyID = tokenValue;
        else if ( tokenTag == Constants::SAM_SQ_CHECKSUM_TAG   ) seq.Checksum = tokenValue;
        else if ( tokenTag == Constants::SAM_SQ_SPECIES_TAG    ) seq.Species = tokenValue;
        else if ( tokenTag == Constants::SAM_SQ_URI_TAG        ) seq.URI = tokenValue;
        else { // custom tag
            CustomHeaderTag otherTag;
            otherTag.TagName  = tokenTag;
            otherTag.TagValue = tokenValue;
            seq.CustomTags.push_back(otherTag);
        }
    }

    // check for required tags
    if ( !seq.HasName() )
        throw BamException("SamFormatParser::ParseSQLine", "@SQ line is missing SN tag");
    if ( !seq.HasLength() )
        throw BamException("SamFormatParser::ParseSQLine", "@SQ line is missing LN tag");

    // store SAM sequence entry
    m_header.Sequences.Add(seq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %rbx
movq %rdi, 0x50(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x31780
leaq 0x78(%rsp), %rdi
pushq $0x9
popq %rcx
movq %rbx, %rdx
callq 0x34150
movq 0x78(%rsp), %r15
movq 0x80(%rsp), %rbx
leaq 0x58(%rsp), %rbp
leaq 0x90(%rsp), %r13
pushq $-0x1
popq %r14
leaq 0x20bb5(%rip), %r12     # 0x78570
cmpq %rbx, %r15
je 0x57b0a
movq %rbp, %rdi
movq %r15, %rsi
xorl %edx, %edx
pushq $0x2
popq %rcx
callq 0x332a0
movq %r13, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
movq %r14, %rcx
callq 0x332a0
movq %rbp, %rdi
movq %r12, %rsi
callq 0x32220
leaq 0x110(%rsp), %rdi
testb %al, %al
jne 0x57a87
movq %rbp, %rdi
leaq 0x20b46(%rip), %rsi     # 0x78550
callq 0x32220
leaq 0xf0(%rsp), %rdi
testb %al, %al
jne 0x57a87
movq %rbp, %rdi
leaq 0x20aeb(%rip), %rsi     # 0x78510
callq 0x32220
leaq 0xb0(%rsp), %rdi
testb %al, %al
jne 0x57a87
movq %rbp, %rdi
leaq 0x20af0(%rip), %rsi     # 0x78530
callq 0x32220
leaq 0xd0(%rsp), %rdi
testb %al, %al
jne 0x57a87
movq %rbp, %rdi
leaq 0x20b35(%rip), %rsi     # 0x78590
callq 0x32220
leaq 0x130(%rsp), %rdi
testb %al, %al
jne 0x57a87
movq %rbp, %rdi
leaq 0x20b3a(%rip), %rsi     # 0x785b0
callq 0x32220
leaq 0x150(%rsp), %rdi
testb %al, %al
je 0x57aa8
movq %r13, %rsi
callq 0x32060
movq %r13, %rdi
callq 0x33a00
movq %rbp, %rdi
callq 0x33a00
addq $0x20, %r15
jmp 0x579bb
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
xorl %ecx, %ecx
movb %cl, 0x20(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb %cl, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x32060
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x32060
leaq 0x170(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x32380
leaq 0x10(%rsp), %rdi
callq 0x32d30
jmp 0x57a8f
leaq 0xb0(%rsp), %rdi
callq 0x31a40
testb %al, %al
je 0x57b72
leaq 0xb0(%rsp), %rdi
callq 0x35740
testb %al, %al
je 0x57bdb
movq 0x50(%rsp), %rax
movq (%rax), %rdi
addq $0x78, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x341f0
leaq 0x78(%rsp), %rdi
callq 0x32810
leaq 0xb0(%rsp), %rdi
callq 0x354b0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %r14
leaq 0x5882(%rip), %rsi      # 0x5d406
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x31b30
leaq 0x5886(%rip), %rsi      # 0x5d423
leaq 0x58(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
movq %r14, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x1d36e(%rip), %rsi     # 0x74f38
movq 0x1d3a7(%rip), %rdx     # 0x74f78
movq %r14, %rdi
callq 0x34c90
jmp 0x57c42
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %r14
leaq 0x5819(%rip), %rsi      # 0x5d406
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x31b30
leaq 0x5838(%rip), %rsi      # 0x5d43e
leaq 0x58(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
movq %r14, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x1d305(%rip), %rsi     # 0x74f38
movq 0x1d33e(%rip), %rdx     # 0x74f78
movq %r14, %rdi
callq 0x34c90
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x33a00
jmp 0x57c57
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x33a00
jmp 0x57c82
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x33a00
jmp 0x57c78
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x57c90
jmp 0x57cd4
jmp 0x57cba
jmp 0x57c8d
movq %rax, %rbx
movq %r14, %rdi
callq 0x327c0
jmp 0x57cd4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x32d30
jmp 0x57cbd
movq %rax, %rbx
jmp 0x57cde
jmp 0x57cb0
movq %rax, %rbx
jmp 0x57cd4
movq %rax, %rbx
jmp 0x57cca
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x33a00
leaq 0x58(%rsp), %rdi
callq 0x33a00
leaq 0x78(%rsp), %rdi
callq 0x32810
leaq 0xb0(%rsp), %rdi
callq 0x354b0
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f
nop