// File: /workspace/github_cpp_makefile_star2_O1/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 0xf017
movq %rcx, %r12
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x50(%rbp), %rdx
movb $0x1, (%rdx)
leaq 0x272a(%rip), %rdi      # 0x11694
leaq 0x26be(%rip), %rcx      # 0x1162f
movl $0xca, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xf0a8
movq 0x8(%rbx), %rax
movl $0x1, %r13d
cmpb $0x2b, (%rax)
jne 0xf01d
cmpq 0x10(%rbx), %rax
leaq -0x50(%rbp), %rdx
setne (%rdx)
leaq 0x26e7(%rip), %rdi      # 0x11694
leaq 0x267b(%rip), %rcx      # 0x1162f
xorl %r13d, %r13d
movl $0xbd, %esi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xb89e
testb %al, %al
je 0xf0a8
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
cmpq 0x10(%rbx), %rax
je 0xf01d
leaq -0x50(%rbp), %r13
movq %r13, %rdi
callq 0x8ef8
movq %r13, %rdi
movq %rbx, %rsi
callq 0xea54
movl %eax, %r13d
testl %eax, %eax
je 0xf02f
cmpl $0x400, %r13d           # imm = 0x400
je 0xf00c
movl $0x1, %r13d
movq -0x50(%rbp), %rdi
callq 0x32f0
jmp 0xf01d
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 0x2212(%rip), %rdx      # 0x11248
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xf33e
testb $0x1, -0x30(%rbp)
jne 0xf065
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %r12, %rdx
callq 0xa076
testb $0x1, -0x30(%rbp)
movl $0x1, %r13d
je 0xf00c
movq 0x8(%rbx), %rax
xorl %r13d, %r13d
cmpq 0x10(%rbx), %rax
je 0xf00c
leaq -0x38(%rbp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0xf2b9
testl %eax, %eax
je 0xf09b
cmpl $0x400, %eax            # imm = 0x400
jne 0xf006
movl %eax, %r13d
jmp 0xf00c
movq %rbx, %rdi
callq 0xe94c
jmp 0xf00c
callq 0x31e0
jmp 0xf0af
movq %rax, %rbx
movq -0x50(%rbp), %rdi
callq 0x32f0
movq %rbx, %rdi
callq 0x35b0