// File: /workspace/github_cpp_makefile_star2_O3/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 $0x178, %rsp            # imm = 0x178
movq %rsi, %rbx
movq %rdi, 0x60(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x26500
leaq 0x68(%rsp), %rdi
movq %rbx, %rdx
movl $0x9, %ecx
callq 0x28190
movq 0x68(%rsp), %r15
movq 0x70(%rsp), %r13
cmpq %r13, %r15
je 0x516ae
leaq 0x90(%rsp), %r14
movq %rsp, %rbp
leaq 0x80(%rsp), %r12
movl $0x2, %ecx
movq %rbp, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x277f0
movl $0x3, %edx
movq %r12, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x277f0
movq 0x8(%rsp), %rbx
cmpq 0x1c63d(%rip), %rbx     # 0x6dad0
jne 0x514c9
leaq 0x100(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c61b(%rip), %rsi     # 0x6dac8
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0x100(%rsp), %rdi
testl %eax, %eax
je 0x51674
cmpq 0x1c5e0(%rip), %rbx     # 0x6dab0
jne 0x51506
leaq 0xe0(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c5be(%rip), %rsi     # 0x6daa8
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0xe0(%rsp), %rdi
testl %eax, %eax
je 0x51674
cmpq 0x1c563(%rip), %rbx     # 0x6da70
jne 0x51543
leaq 0xa0(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c541(%rip), %rsi     # 0x6da68
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0xa0(%rsp), %rdi
testl %eax, %eax
je 0x51674
cmpq 0x1c546(%rip), %rbx     # 0x6da90
jne 0x51580
leaq 0xc0(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c524(%rip), %rsi     # 0x6da88
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0xc0(%rsp), %rdi
testl %eax, %eax
je 0x51674
cmpq 0x1c569(%rip), %rbx     # 0x6daf0
jne 0x515bd
leaq 0x120(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c547(%rip), %rsi     # 0x6dae8
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0x120(%rsp), %rdi
testl %eax, %eax
je 0x51674
cmpq 0x1c54c(%rip), %rbx     # 0x6db10
jne 0x515f6
leaq 0x140(%rsp), %rdi
testq %rbx, %rbx
je 0x51674
movq 0x1c52a(%rip), %rsi     # 0x6db08
movq (%rsp), %rdi
movq %rbx, %rdx
callq 0x277e0
leaq 0x140(%rsp), %rdi
testl %eax, %eax
je 0x51674
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x28(%rsp)
movb %cl, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movb %cl, 0x50(%rsp)
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x26b80
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x26b80
leaq 0x160(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x26d60
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x5165e
callq 0x27560
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x5167c
callq 0x27560
jmp 0x5167c
movq %r12, %rsi
callq 0x26b80
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x5168e
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x516a1
callq 0x27560
addq $0x20, %r15
cmpq %r13, %r15
jne 0x5145e
leaq 0xa0(%rsp), %rdi
callq 0x266d0
testb %al, %al
je 0x51716
leaq 0xa0(%rsp), %rdi
callq 0x29230
testb %al, %al
je 0x51791
movq 0x60(%rsp), %rax
movq (%rax), %rdi
addq $0x78, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x28220
leaq 0x68(%rsp), %rdi
callq 0x270a0
leaq 0xa0(%rsp), %rdi
callq 0x29030
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x269d0
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5ca3(%rip), %rsi      # 0x573d6
leaq 0x5cb8(%rip), %rdx      # 0x573f2
leaq 0x20(%rsp), %rdi
callq 0x26750
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5c9e(%rip), %rsi      # 0x573f3
leaq 0x5cb1(%rip), %rdx      # 0x5740d
movq %rsp, %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x197b8(%rip), %rsi     # 0x6af38
movq 0x197f1(%rip), %rdx     # 0x6af78
movq %r14, %rdi
callq 0x28a20
jmp 0x5180a
movl $0x28, %edi
callq 0x269d0
movq %rax, %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5c28(%rip), %rsi      # 0x573d6
leaq 0x5c3d(%rip), %rdx      # 0x573f2
leaq 0x20(%rsp), %rdi
callq 0x26750
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5c3e(%rip), %rsi      # 0x5740e
leaq 0x5c51(%rip), %rdx      # 0x57428
movq %rsp, %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x28480
xorl %ebp, %ebp
movq 0x1973d(%rip), %rsi     # 0x6af38
movq 0x19776(%rip), %rdx     # 0x6af78
movq %r14, %rdi
callq 0x28a20
jmp 0x5180e
jmp 0x51835
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5181f
callq 0x27560
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5182e
callq 0x27560
testb %bpl, %bpl
jne 0x5184e
jmp 0x518a0
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x5184e
callq 0x27560
jmp 0x5184e
jmp 0x5184b
movq %rax, %rbx
movq %r14, %rdi
callq 0x27070
jmp 0x518a0
movq %rax, %rbx
jmp 0x518aa
jmp 0x51885
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x273b0
jmp 0x51871
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x5188d
callq 0x27560
jmp 0x5188d
movq %rax, %rbx
jmp 0x518a0
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x518a0
callq 0x27560
leaq 0x68(%rsp), %rdi
callq 0x270a0
leaq 0xa0(%rsp), %rdi
callq 0x29030
movq %rbx, %rdi
callq 0x28c10
movq %rax, %rdi
callq 0x2f047
nop