// File: /workspace/github_cpp_makefile_star2_O3/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 0x28490
movq %rax, %r14
movq (%r15), %rdi
addq $0x78, %rdi
callq 0x28f40
movq %rax, 0x20(%rsp)
cmpq %rax, %r14
je 0x52ade
addq $0x10, %rbx
leaq 0x10(%rsp), %r12
movq %rsp, %r13
movq 0x1b772(%rip), %rsi     # 0x6e030
movq 0x1b773(%rip), %rdx     # 0x6e038
movq %rbx, %rdi
callq 0x27a70
movq %rax, %rbp
leaq 0x60(%r14), %rdx
movq %r13, %rdi
leaq 0x1b7d2(%rip), %rsi     # 0x6e0b0
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rdi
callq 0x27a70
movq %rax, %rbp
leaq 0x40(%r14), %rdx
leaq 0x28(%rsp), %rdi
leaq 0x1b789(%rip), %rsi     # 0x6e090
callq 0x53278
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 0x52932
callq 0x27560
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52940
callq 0x27560
movq %r14, %rdi
callq 0x27b10
testb %al, %al
je 0x5297d
movq %r13, %rdi
leaq 0x1b6fa(%rip), %rsi     # 0x6e050
movq %r14, %rdx
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5297d
callq 0x27560
movq %r14, %rdi
callq 0x26d20
testb %al, %al
je 0x529bb
leaq 0x20(%r14), %rdx
movq %r13, %rdi
leaq 0x1b6d9(%rip), %rsi     # 0x6e070
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x529bb
callq 0x27560
movq %r14, %rdi
callq 0x27d10
testb %al, %al
je 0x529fc
leaq 0x80(%r14), %rdx
movq %r13, %rdi
leaq 0x1b6f8(%rip), %rsi     # 0x6e0d0
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x529fc
callq 0x27560
movq %r14, %rdi
callq 0x28ff0
testb %al, %al
je 0x52a3d
leaq 0xa0(%r14), %rdx
movq %r13, %rdi
leaq 0x1b6d7(%rip), %rsi     # 0x6e0f0
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52a3d
callq 0x27560
movq 0xc0(%r14), %rsi
cmpq 0xc8(%r14), %rsi
je 0x52aa5
xorl %ebp, %ebp
xorl %r15d, %r15d
leaq (%rsi,%rbp), %rdx
addq $0x20, %rdx
addq %rbp, %rsi
movq %r13, %rdi
callq 0x53278
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x27a70
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52a84
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 0x52a52
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 0x528b7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x52b12
jmp 0x52b12
jmp 0x52b12
jmp 0x52b12
jmp 0x52b12
jmp 0x52b12
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x52b15
callq 0x27560
jmp 0x52b15
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x52b23
callq 0x27560
movq %rbx, %rdi
callq 0x28c10
nop