// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/api/internal/sam/SamFormatPrinter_p.cpp
// Function: BamTools::Internal::SamFormatPrinter::PrintRG(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&) const
void SamFormatPrinter::PrintRG(std::stringstream& out) const {

    // iterate over read group entries
    SamReadGroupConstIterator rgIter = m_header.ReadGroups.ConstBegin();
    SamReadGroupConstIterator rgEnd  = m_header.ReadGroups.ConstEnd();
    for ( ; rgIter != rgEnd; ++rgIter ) {
        const SamReadGroup& rg = (*rgIter);

        // @RG ID:<ID>
        out << Constants::SAM_RG_BEGIN_TOKEN
            << FormatTag(Constants::SAM_RG_ID_TAG, rg.ID);

        // CN:<SequencingCenter>
        if ( rg.HasSequencingCenter() )
            out << FormatTag(Constants::SAM_RG_SEQCENTER_TAG, rg.SequencingCenter);

        // DS:<Description>
        if ( rg.HasDescription() )
            out << FormatTag(Constants::SAM_RG_DESCRIPTION_TAG, rg.Description);

        // DT:<ProductionDate>
        if ( rg.HasProductionDate() )
            out << FormatTag(Constants::SAM_RG_PRODUCTIONDATE_TAG, rg.ProductionDate);

        // FO:<FlowOrder>
        if ( rg.HasFlowOrder() )
            out << FormatTag(Constants::SAM_RG_FLOWORDER_TAG, rg.FlowOrder);

        // KS:<KeySequence>
        if ( rg.HasKeySequence() )
            out << FormatTag(Constants::SAM_RG_KEYSEQUENCE_TAG, rg.KeySequence);

        // LB:<Library>
        if ( rg.HasLibrary() )
            out << FormatTag(Constants::SAM_RG_LIBRARY_TAG, rg.Library);

        // PG:<Program>
        if ( rg.HasProgram() )
            out << FormatTag(Constants::SAM_RG_PROGRAM_TAG, rg.Program);

        // PI:<PredictedInsertSize>
        if ( rg.HasPredictedInsertSize() )
            out << FormatTag(Constants::SAM_RG_PREDICTEDINSERTSIZE_TAG, rg.PredictedInsertSize);

        // PL:<SequencingTechnology>
        if ( rg.HasSequencingTechnology() )
            out << FormatTag(Constants::SAM_RG_SEQTECHNOLOGY_TAG, rg.SequencingTechnology);

        // PU:<PlatformUnit>
        if ( rg.HasPlatformUnit() )
            out << FormatTag(Constants::SAM_RG_PLATFORMUNIT_TAG, rg.PlatformUnit);

        // SM:<Sample>
        if ( rg.HasSample() )
            out << FormatTag(Constants::SAM_RG_SAMPLE_TAG, rg.Sample);

        // custom tags
        if ( !rg.CustomTags.empty() ) {
            for (size_t i = 0; i < rg.CustomTags.size(); ++i) {
                const CustomHeaderTag& customTag = rg.CustomTags[i];
                out << FormatTag(customTag.TagName, customTag.TagValue);
            }
        }

        // newline
        out << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0xc0, %r12d
movq (%rdi), %rdi
addq %r12, %rdi
callq 0x288a0
movq %rax, %r14
addq (%r15), %r12
movq %r12, %rdi
callq 0x28d40
movq %rax, 0x20(%rsp)
cmpq %rax, %r14
je 0x52fea
addq $0x10, %rbx
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq 0x1b4e4(%rip), %rsi     # 0x6e118
movq 0x1b4e5(%rip), %rdx     # 0x6e120
movq %rbx, %rdi
callq 0x27a70
movq %rax, %rbp
leaq 0x40(%r14), %rdx
movq %r13, %rdi
leaq 0x1b524(%rip), %rsi     # 0x6e178
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52c78
callq 0x27560
movq %r14, %rdi
callq 0x27c40
testb %al, %al
je 0x52cb9
leaq 0x140(%r14), %rdx
movq %r13, %rdi
leaq 0x1b5e3(%rip), %rsi     # 0x6e278
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52cb9
callq 0x27560
movq %r14, %rdi
callq 0x27380
testb %al, %al
je 0x52cf6
movq %r13, %rdi
leaq 0x1b469(%rip), %rsi     # 0x6e138
movq %r14, %rdx
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52cf6
callq 0x27560
movq %r14, %rdi
callq 0x27770
testb %al, %al
je 0x52d37
leaq 0xe0(%r14), %rdx
movq %r13, %rdi
leaq 0x1b505(%rip), %rsi     # 0x6e218
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52d37
callq 0x27560
movq %r14, %rdi
callq 0x28510
testb %al, %al
je 0x52d75
leaq 0x20(%r14), %rdx
movq %r13, %rdi
leaq 0x1b407(%rip), %rsi     # 0x6e158
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52d75
callq 0x27560
movq %r14, %rdi
callq 0x26f60
testb %al, %al
je 0x52db3
leaq 0x60(%r14), %rdx
movq %r13, %rdi
leaq 0x1b409(%rip), %rsi     # 0x6e198
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52db3
callq 0x27560
movq %r14, %rdi
callq 0x26190
testb %al, %al
je 0x52df4
leaq 0x80(%r14), %rdx
movq %r13, %rdi
leaq 0x1b3e8(%rip), %rsi     # 0x6e1b8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52df4
callq 0x27560
movq %r14, %rdi
callq 0x28fc0
testb %al, %al
je 0x52e35
leaq 0x100(%r14), %rdx
movq %r13, %rdi
leaq 0x1b427(%rip), %rsi     # 0x6e238
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52e35
callq 0x27560
movq %r14, %rdi
callq 0x274d0
testb %al, %al
je 0x52e76
leaq 0xc0(%r14), %rdx
movq %r13, %rdi
leaq 0x1b3a6(%rip), %rsi     # 0x6e1f8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52e76
callq 0x27560
movq %r14, %rdi
callq 0x26dc0
testb %al, %al
je 0x52eb7
leaq 0x160(%r14), %rdx
movq %r13, %rdi
leaq 0x1b405(%rip), %rsi     # 0x6e298
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52eb7
callq 0x27560
movq %r14, %rdi
callq 0x28940
testb %al, %al
je 0x52ef8
leaq 0xa0(%r14), %rdx
movq %r13, %rdi
leaq 0x1b304(%rip), %rsi     # 0x6e1d8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52ef8
callq 0x27560
movq %r14, %rdi
callq 0x27870
testb %al, %al
je 0x52f39
leaq 0x120(%r14), %rdx
movq %r13, %rdi
leaq 0x1b343(%rip), %rsi     # 0x6e258
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52f39
callq 0x27560
movq 0x180(%r14), %rax
cmpq 0x188(%r14), %rax
je 0x52fb1
movq 0x180(%r14), %rsi
cmpq %rsi, 0x188(%r14)
je 0x52fb1
xorl %ebp, %ebp
xorl %r15d, %r15d
leaq (%rsi,%rbp), %rdx
addq $0x20, %rdx
addq %rbp, %rsi
movq %r13, %rdi
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52f90
callq 0x27560
incq %r15
movq 0x180(%r14), %rsi
movq 0x188(%r14), %rax
subq %rsi, %rax
sarq $0x6, %rax
addq $0x40, %rbp
cmpq %rax, %r15
jb 0x52f5e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x275a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x260a0
movq %rax, %rdi
callq 0x26fc0
addq $0x198, %r14            # imm = 0x198
cmpq 0x20(%rsp), %r14
jne 0x52c2d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
jmp 0x53011
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x53022
callq 0x27560
movq %rbx, %rdi
callq 0x28c20