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

    SamReadGroup rg;

    // split string 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 token tag/value
        const string tokenTag = (*tokenIter).substr(0,2);
        const string tokenValue = (*tokenIter).substr(3);

        // set read group contents
        if      ( tokenTag == Constants::SAM_RG_ID_TAG                  ) rg.ID = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_DESCRIPTION_TAG         ) rg.Description = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_FLOWORDER_TAG           ) rg.FlowOrder = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_KEYSEQUENCE_TAG         ) rg.KeySequence = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_LIBRARY_TAG             ) rg.Library = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_PLATFORMUNIT_TAG        ) rg.PlatformUnit = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_PREDICTEDINSERTSIZE_TAG ) rg.PredictedInsertSize = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_PRODUCTIONDATE_TAG      ) rg.ProductionDate = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_PROGRAM_TAG             ) rg.Program = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_SAMPLE_TAG              ) rg.Sample = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_SEQCENTER_TAG           ) rg.SequencingCenter = tokenValue;
        else if ( tokenTag == Constants::SAM_RG_SEQTECHNOLOGY_TAG       ) rg.SequencingTechnology = tokenValue;
        else { // custom tag
            CustomHeaderTag otherTag;
            otherTag.TagName  = tokenTag;
            otherTag.TagValue = tokenValue;
            rg.CustomTags.push_back(otherTag);
        }
    }

    // check for required tags
    if ( !rg.HasID() )
        throw BamException("SamFormatParser::ParseRGLine", "@RG line is missing ID tag");

    // store SAM read group entry
    m_header.ReadGroups.Add(rg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x32070
leaq 0x58(%rsp), %rdi
pushq $0x9
popq %rcx
movq %rbx, %rdx
callq 0x34150
movq 0x58(%rsp), %r15
movq 0x60(%rsp), %rbx
leaq 0x70(%rsp), %rbp
leaq 0x90(%rsp), %r13
pushq $-0x1
popq %r14
leaq 0x208dc(%rip), %r12     # 0x78630
cmpq %rbx, %r15
je 0x57f5d
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 0xf0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x2084d(%rip), %rsi     # 0x785f0
callq 0x32220
leaq 0xb0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x2084e(%rip), %rsi     # 0x78610
callq 0x32220
leaq 0xd0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x2086f(%rip), %rsi     # 0x78650
callq 0x32220
leaq 0x110(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20870(%rip), %rsi     # 0x78670
callq 0x32220
leaq 0x130(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20871(%rip), %rsi     # 0x78690
callq 0x32220
leaq 0x150(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20872(%rip), %rsi     # 0x786b0
callq 0x32220
leaq 0x170(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20873(%rip), %rsi     # 0x786d0
callq 0x32220
leaq 0x190(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20878(%rip), %rsi     # 0x786f0
callq 0x32220
leaq 0x1b0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x2087d(%rip), %rsi     # 0x78710
callq 0x32220
leaq 0x1d0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20882(%rip), %rsi     # 0x78730
callq 0x32220
leaq 0x1f0(%rsp), %rdi
testb %al, %al
jne 0x57eda
movq %rbp, %rdi
leaq 0x20887(%rip), %rsi     # 0x78750
callq 0x32220
leaq 0x210(%rsp), %rdi
testb %al, %al
je 0x57efb
movq %r13, %rsi
callq 0x32060
movq %r13, %rdi
callq 0x33a00
movq %rbp, %rdi
callq 0x33a00
addq $0x20, %r15
jmp 0x57d54
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
andq $0x0, 0x20(%rsp)
xorl %ecx, %ecx
movb %cl, 0x28(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
movb %cl, 0x48(%rsp)
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x32060
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x32060
leaq 0x230(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x32380
leaq 0x18(%rsp), %rdi
callq 0x32d30
jmp 0x57ee2
leaq 0xb0(%rsp), %rdi
callq 0x33a80
testb %al, %al
je 0x57fb1
movl $0xc0, %edi
movq 0x10(%rsp), %rax
addq (%rax), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x344f0
leaq 0x58(%rsp), %rdi
callq 0x32810
leaq 0xb0(%rsp), %rdi
callq 0x35080
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x31e70
movq %rax, %r14
leaq 0x5496(%rip), %rsi      # 0x5d459
leaq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x31b30
leaq 0x549a(%rip), %rsi      # 0x5d476
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x31b30
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movq %r14, %rdi
callq 0x344c0
xorl %ebp, %ebp
movq 0x1cf2f(%rip), %rsi     # 0x74f38
movq 0x1cf68(%rip), %rdx     # 0x74f78
movq %r14, %rdi
callq 0x34c90
jmp 0x5806d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x32d30
jmp 0x58070
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x33a00
jmp 0x5803e
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x18(%rsp), %rdi
callq 0x33a00
testb %bpl, %bpl
jne 0x58052
jmp 0x58087
movq %rax, %rbx
movq %r14, %rdi
callq 0x327c0
jmp 0x58087
jmp 0x58063
movq %rax, %rbx
jmp 0x58091
movq %rax, %rbx
jmp 0x58087
movq %rax, %rbx
jmp 0x5807d
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x33a00
leaq 0x70(%rsp), %rdi
callq 0x33a00
leaq 0x58(%rsp), %rdi
callq 0x32810
leaq 0xb0(%rsp), %rdi
callq 0x35080
movq %rbx, %rdi
callq 0x34ed0
movq %rax, %rdi
callq 0x39b2f