// File: /workspace/github_cpp_makefile_star2_O1/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 $0x238, %rsp            # imm = 0x238
movq %rsi, %r15
movq %rdi, 0x60(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x26b90
leaq 0x68(%rsp), %rdi
movq %r15, %rdx
movl $0x9, %ecx
callq 0x281a0
movq 0x68(%rsp), %r15
movq 0x70(%rsp), %rbx
cmpq %rbx, %r15
je 0x51d7e
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), %r13
cmpq 0x1c181(%rip), %r13     # 0x6db98
jne 0x51a4d
leaq 0xe0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c15f(%rip), %rsi     # 0x6db90
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0xe0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c104(%rip), %r13     # 0x6db58
jne 0x51a8a
leaq 0xa0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c0e2(%rip), %rsi     # 0x6db50
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0xa0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c0e7(%rip), %r13     # 0x6db78
jne 0x51ac7
leaq 0xc0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c0c5(%rip), %rsi     # 0x6db70
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0xc0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c0ea(%rip), %r13     # 0x6dbb8
jne 0x51b04
leaq 0x100(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c0c8(%rip), %rsi     # 0x6dbb0
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x100(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c0cd(%rip), %r13     # 0x6dbd8
jne 0x51b41
leaq 0x120(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c0ab(%rip), %rsi     # 0x6dbd0
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x120(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c0b0(%rip), %r13     # 0x6dbf8
jne 0x51b7e
leaq 0x140(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c08e(%rip), %rsi     # 0x6dbf0
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x140(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c093(%rip), %r13     # 0x6dc18
jne 0x51bbb
leaq 0x160(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c071(%rip), %rsi     # 0x6dc10
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x160(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c076(%rip), %r13     # 0x6dc38
jne 0x51bf8
leaq 0x180(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c054(%rip), %rsi     # 0x6dc30
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x180(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c059(%rip), %r13     # 0x6dc58
jne 0x51c35
leaq 0x1a0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c037(%rip), %rsi     # 0x6dc50
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x1a0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c03c(%rip), %r13     # 0x6dc78
jne 0x51c72
leaq 0x1c0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1c01a(%rip), %rsi     # 0x6dc70
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x1c0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c01f(%rip), %r13     # 0x6dc98
jne 0x51caf
leaq 0x1e0(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1bffd(%rip), %rsi     # 0x6dc90
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x1e0(%rsp), %rdi
testl %eax, %eax
je 0x51d44
cmpq 0x1c002(%rip), %r13     # 0x6dcb8
jne 0x51ce4
leaq 0x200(%rsp), %rdi
testq %r13, %r13
je 0x51d44
movq 0x1bfe4(%rip), %rsi     # 0x6dcb0
movq (%rsp), %rdi
movq %r13, %rdx
callq 0x277e0
leaq 0x200(%rsp), %rdi
testl %eax, %eax
je 0x51d44
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 0x220(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x26d60
leaq 0x20(%rsp), %rdi
callq 0x273b0
jmp 0x51d4c
movq %r12, %rsi
callq 0x26b80
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x51d5e
callq 0x27560
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x51d71
callq 0x27560
addq $0x20, %r15
cmpq %rbx, %r15
jne 0x519e2
leaq 0xa0(%rsp), %rdi
callq 0x27d10
testb %al, %al
je 0x51dd2
movl $0xc0, %edi
movq 0x60(%rsp), %rax
addq (%rax), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x284b0
leaq 0x68(%rsp), %rdi
callq 0x270a0
leaq 0xa0(%rsp), %rdi
callq 0x28d80
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x269d0
movq %rax, %r14
leaq 0x30(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x563a(%rip), %rsi      # 0x57429
leaq 0x564f(%rip), %rdx      # 0x57445
leaq 0x20(%rsp), %rdi
callq 0x26750
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x5635(%rip), %rsi      # 0x57446
leaq 0x5648(%rip), %rdx      # 0x57460
movq %rsp, %rdi
callq 0x26750
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x28490
xorl %ebp, %ebp
movq 0x190fc(%rip), %rsi     # 0x6af38
movq 0x19135(%rip), %rdx     # 0x6af78
movq %r14, %rdi
callq 0x28a30
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x51e64
callq 0x27560
jmp 0x51e64
movq %rax, %r15
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x51e7d
callq 0x27560
jmp 0x51e7d
jmp 0x51ea2
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x51ed4
movq %r14, %rdi
callq 0x27070
jmp 0x51ed4
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x273b0
jmp 0x51ea5
jmp 0x51eb9
movq %rax, %r15
jmp 0x51ede
movq %rax, %r15
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x51ec1
callq 0x27560
jmp 0x51ec1
movq %rax, %r15
jmp 0x51ed4
movq %rax, %r15
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x51ed4
callq 0x27560
leaq 0x68(%rsp), %rdi
callq 0x270a0
leaq 0xa0(%rsp), %rdi
callq 0x28d80
movq %r15, %rdi
callq 0x28c20
movq %rax, %rdi
callq 0x2f0bd
nop