// File: /workspace/github_cpp_makefile_star2_O3/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 0xe8d6
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x50(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x2e31(%rip), %rdi      # 0x1165a
leaq 0x2dff(%rip), %rcx      # 0x1162f
movl $0xca, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe967
movq 0x8(%rbx), %rax
movl $0x1, %r13d
cmpb $0x2b, (%rax)
jne 0xe8dc
cmpq 0x10(%rbx), %rax
leaq -0x50(%rbp), %rdx
setne (%rdx)
leaq 0x2dee(%rip), %rdi      # 0x1165a
leaq 0x2dbc(%rip), %rcx      # 0x1162f
xorl %r13d, %r13d
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb61f
testb %al, %al
je 0xe967
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
je 0xe8dc
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0x8e1e
movq %r13, %rdi
movq %rbx, %rsi
callq 0xe2f6
movl %eax, %r13d
testl %eax, %eax
je 0xe8ee
cmpl $0x400, %r13d           # imm = 0x400
je 0xe8cb
movl $0x1, %r13d
movq -0x50(%rbp), %rdi
callq 0x32f0
jmp 0xe8dc
movl $0x400, %r13d           # imm = 0x400
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2953(%rip), %rdx      # 0x11248
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xebf8
testb $0x1, -0x30(%rbp)
jne 0xe924
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %r12, %rdx
callq 0x9f9a
testb $0x1, -0x30(%rbp)
movl $0x1, %r13d
je 0xe8cb
movq 0x8(%rbx), %rax
xorl %r13d, %r13d
cmpq 0x10(%rbx), %rax
je 0xe8cb
leaq -0x38(%rbp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0xeb71
testl %eax, %eax
je 0xe95a
cmpl $0x400, %eax            # imm = 0x400
jne 0xe8c5
movl %eax, %r13d
jmp 0xe8cb
movq %rbx, %rdi
callq 0xe205
jmp 0xe8cb
callq 0x31e0
jmp 0xe96e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
callq 0x32f0
movq %rbx, %rdi
callq 0x35b0