// File: 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
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x168a0
testb $0x1, %al
jne 0x1733d
jmp 0x17349
movl $0x400, -0x4(%rbp)      # imm = 0x400
jmp 0x17510
movq -0x18(%rbp), %rdi
callq 0x168c0
movsbl %al, %eax
cmpl $0x2b, %eax
je 0x17366
movl $0x1, -0x4(%rbp)
jmp 0x17510
movq -0x18(%rbp), %rdi
callq 0x16920
movq -0x18(%rbp), %rdi
callq 0x17570
cmpl $0x0, %eax
je 0x1738e
movq -0x18(%rbp), %rdi
callq 0x17570
movl %eax, -0x4(%rbp)
jmp 0x17510
movq -0x18(%rbp), %rdi
callq 0x168a0
testb $0x1, %al
jne 0x1739d
jmp 0x173a9
movl $0x0, -0x4(%rbp)
jmp 0x17510
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xb3a0
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x16a20
movl %eax, -0x68(%rbp)
jmp 0x173c8
movl -0x68(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x1740a
cmpl $0x400, -0x4c(%rbp)     # imm = 0x400
jne 0x1740a
movl $0x400, -0x4(%rbp)      # imm = 0x400
movl $0x1, -0x60(%rbp)
jmp 0x17507
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xb7b0
jmp 0x1751c
cmpl $0x0, -0x4c(%rbp)
je 0x17423
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x17507
jmp 0x17425
leaq 0x110f6(%rip), %rsi     # 0x28522
leaq -0x48(%rbp), %rdi
callq 0x176d0
movb %al, -0x71(%rbp)
jmp 0x1743a
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x17443
jmp 0x17471
movq -0x28(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x17740
movb %al, -0x72(%rbp)
jmp 0x17455
movb -0x72(%rbp), %al
testb $0x1, %al
jne 0x1745e
jmp 0x17471
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x17507
movq -0x18(%rbp), %rdi
callq 0x168a0
movb %al, -0x73(%rbp)
jmp 0x1747f
movb -0x73(%rbp), %al
testb $0x1, %al
jne 0x17488
jmp 0x17498
movl $0x0, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x17507
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x61(%rbp), %rcx
callq 0x17790
movl %eax, -0x78(%rbp)
jmp 0x174b1
movl -0x78(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x174d6
cmpl $0x400, -0x4c(%rbp)     # imm = 0x400
jne 0x174d6
movl $0x400, -0x4(%rbp)      # imm = 0x400
movl $0x1, -0x60(%rbp)
jmp 0x17507
cmpl $0x0, -0x4c(%rbp)
je 0x174ec
movl $0x1, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x17507
jmp 0x174ee
movq -0x18(%rbp), %rdi
callq 0x169c0
jmp 0x174f9
movl $0x0, -0x4(%rbp)
movl $0x1, -0x60(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xb7b0
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x4770
nopw %cs:(%rax,%rax)
nop