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

    // iterate over sequence entries
    SamSequenceConstIterator seqIter = m_header.Sequences.ConstBegin();
    SamSequenceConstIterator seqEnd  = m_header.Sequences.ConstEnd();
    for ( ; seqIter != seqEnd; ++seqIter ) {
        const SamSequence& seq = (*seqIter);

        // @SQ SN:<Name> LN:<Length>
        out << Constants::SAM_SQ_BEGIN_TOKEN
            << FormatTag(Constants::SAM_SQ_NAME_TAG, seq.Name)
            << FormatTag(Constants::SAM_SQ_LENGTH_TAG, seq.Length);

        // AS:<AssemblyID>
        if ( seq.HasAssemblyID() )
            out << FormatTag(Constants::SAM_SQ_ASSEMBLYID_TAG, seq.AssemblyID);

        // M5:<Checksum>
        if ( seq.HasChecksum() )
            out << FormatTag(Constants::SAM_SQ_CHECKSUM_TAG, seq.Checksum);

        // SP:<Species>
        if ( seq.HasSpecies() )
            out << FormatTag(Constants::SAM_SQ_SPECIES_TAG, seq.Species);

        // UR:<URI>
        if ( seq.HasURI() )
            out << FormatTag(Constants::SAM_SQ_URI_TAG, seq.URI);

        // custom tags
        if ( !seq.CustomTags.empty() ) {
            for (size_t i = 0; i < seq.CustomTags.size(); ++i) {
                const CustomHeaderTag& customTag = seq.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 $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rdi
addq $0x78, %rdi
callq 0x284a0
movq %rax, %r14
movq (%r15), %rdi
addq $0x78, %rdi
callq 0x28f50
movq %rax, 0x20(%rsp)
cmpq %rax, %r14
je 0x52b92
addq $0x10, %rbx
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq 0x1b6d6(%rip), %rsi     # 0x6e038
movq 0x1b6d7(%rip), %rdx     # 0x6e040
movq %rbx, %rdi
callq 0x27a70
movq %rax, %rbp
leaq 0x60(%r14), %rdx
movq %r13, %rdi
leaq 0x1b736(%rip), %rsi     # 0x6e0b8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x27a70
movq %rax, %rbp
leaq 0x40(%r14), %rdx
leaq 0x28(%rsp), %rdi
leaq 0x1b6ed(%rip), %rsi     # 0x6e098
callq 0x5334c
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbp, %rdi
callq 0x27a70
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x529d6
callq 0x27560
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x529e4
callq 0x27560
movq %r14, %rdi
callq 0x27b10
testb %al, %al
je 0x52a21
movq %r13, %rdi
leaq 0x1b65e(%rip), %rsi     # 0x6e058
movq %r14, %rdx
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52a21
callq 0x27560
movq %r14, %rdi
callq 0x26d20
testb %al, %al
je 0x52a5f
leaq 0x20(%r14), %rdx
movq %r13, %rdi
leaq 0x1b63d(%rip), %rsi     # 0x6e078
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52a5f
callq 0x27560
movq %r14, %rdi
callq 0x27d20
testb %al, %al
je 0x52aa0
leaq 0x80(%r14), %rdx
movq %r13, %rdi
leaq 0x1b65c(%rip), %rsi     # 0x6e0d8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52aa0
callq 0x27560
movq %r14, %rdi
callq 0x29000
testb %al, %al
je 0x52ae1
leaq 0xa0(%r14), %rdx
movq %r13, %rdi
leaq 0x1b63b(%rip), %rsi     # 0x6e0f8
callq 0x5334c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52ae1
callq 0x27560
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
je 0x52b59
movq 0xc0(%r14), %rsi
cmpq %rsi, 0xc8(%r14)
je 0x52b59
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 0x52b38
callq 0x27560
incq %r15
movq 0xc0(%r14), %rsi
movq 0xc8(%r14), %rax
subq %rsi, %rax
sarq $0x6, %rax
addq $0x40, %rbp
cmpq %rax, %r15
jb 0x52b06
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 $0xd8, %r14
cmpq 0x20(%rsp), %r14
jne 0x5295b
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x52bc6
jmp 0x52bc6
jmp 0x52bc6
jmp 0x52bc6
jmp 0x52bc6
jmp 0x52bc6
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x52bc9
callq 0x27560
jmp 0x52bc9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52bd7
callq 0x27560
movq %rbx, %rdi
callq 0x28c20
nop