// File: /workspace/github_cpp_makefile_star2_O2/mshabbirhasan[P]ups-indel/include/seqan/seq_io/read_fasta_fastq.h
// Function: int seqan::_readQualityBlock<seqan::String<char, seqan::Alloc<void>>, seqan::String<char, seqan::Alloc<void>>, seqan::String<char, seqan::MMap<seqan::MMapConfig<seqan::File<seqan::Async<void>>, unsigned long>>>, seqan::SinglePass<seqan::Tag<seqan::StringReader_>>>(seqan::String<char, seqan::Alloc<void>>&, seqan::RecordReader<seqan::String<char, seqan::MMap<seqan::MMapConfig<seqan::File<seqan::Async<void>>, unsigned long>>>, seqan::SinglePass<seqan::Tag<seqan::StringReader_>>>&, unsigned int, seqan::String<char, seqan::Alloc<void>> const&, seqan::Tag<seqan::TagFastq_> const&)
inline int
_readQualityBlock(TQualString & qual,
                  RecordReader<TFile, TPass > & reader,
                  unsigned const seqLength,
                  TIdString const & meta,
                  Fastq const & /*tag*/)
{
    // READ AND CHECK QUALITIES' META
    if (atEnd(reader))
        return EOF_BEFORE_SUCCESS;
    if (value(reader) != '+')
        return RecordReader<TFile, TPass >::INVALID_FORMAT;
    goNext(reader);
    if (resultCode(reader))
        return resultCode(reader);
    if (atEnd(reader)) // empty ID, no sequence, this is legal? TODO
        return 0;

    CharString qualmeta_buffer;
    int res = readLine(qualmeta_buffer, reader);
    if (res && res == EOF_BEFORE_SUCCESS)
        return EOF_BEFORE_SUCCESS;
    else if (res)
        return RecordReader<TFile, TPass >::INVALID_FORMAT;

    // meta string has to be empty or identical to sequence's meta
    if ((qualmeta_buffer != "") && (qualmeta_buffer != meta))
        return RecordReader<TFile, TPass >::INVALID_FORMAT;

    if (atEnd(reader)) // empty qualities, is this legal?
        return 0;

    // READ QUALITIES
    res = _readQualityBlockHelper(qual, reader, seqLength, typename HasQualities<typename Value<TQualString>::Type>::Type());
    // there have to be n qualities
    if (res && res == EOF_BEFORE_SUCCESS)
        return EOF_BEFORE_SUCCESS;
    else if (res)
        return RecordReader<TFile, TPass >::INVALID_FORMAT;
    skipLine(reader); // goto to next line if it exists, result is unimportant

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0xb8a7
movq %rcx, %r13
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0xb3d7
cmpb $0x2b, %al
jne 0xb8af
movq %rbx, %rdi
callq 0xb41d
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0xb8b5
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x6e2e
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb4b6
movl %eax, %r12d
testl %eax, %eax
je 0xb8ca
cmpl $0x400, %r12d           # imm = 0x400
je 0xb89c
pushq $0x1
popq %r12
movq -0x48(%rbp), %rdi
callq 0x32e0
jmp 0xb8b8
movl $0x400, %r12d           # imm = 0x400
jmp 0xb8b8
pushq $0x1
popq %r12
jmp 0xb8b8
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x195b(%rip), %rsi      # 0xd22c
leaq -0x48(%rbp), %rdi
callq 0xb9d2
testb %al, %al
je 0xb8ee
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0xb9fb
testb %al, %al
jne 0xb898
movq 0x8(%rbx), %rax
xorl %r12d, %r12d
cmpq 0x10(%rbx), %rax
je 0xb89c
leaq -0x29(%rbp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0xba24
testl %eax, %eax
je 0xb920
cmpl $0x400, %eax            # imm = 0x400
jne 0xb898
movl %eax, %r12d
jmp 0xb89c
movq %rbx, %rdi
callq 0xb47a
jmp 0xb89c
jmp 0xb92f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
callq 0x32e0
movq %rbx, %rdi
callq 0x3590