// File: /workspace/github_cpp_makefile_star2_O2/tedsharpe[P]ORFCall/ORFCall.cc
// Function: (anonymous namespace)::FastqReader::getChunk(std::vector<std::vector<unsigned char, std::allocator<unsigned char>>, std::allocator<std::vector<unsigned char, std::allocator<unsigned char>>>>&, std::vector<std::vector<unsigned char, std::allocator<unsigned char>>, std::allocator<std::vector<unsigned char, std::allocator<unsigned char>>>>&, unsigned int)
bool FastqReader::getChunk( std::vector<Sequence>& seqs,
                            std::vector<Quals>& quals,
                            unsigned chunkSize )
{
    if ( mIS.eof() )
        return false;

    seqs.clear(); seqs.reserve(chunkSize);
    quals.clear(); quals.reserve(chunkSize);

    std::string seqheader;
    std::string sSeq;
    std::string qualheader;
    std::string sQual;
    Sequence sq;
    Quals qs;
    while ( ++mLineNo && std::getline(mIS,seqheader) )
    {
        if ( seqheader.empty() )
            FatalErr("Read empty header at line " << mLineNo);
        if ( ++mLineNo && !std::getline(mIS,sSeq) )
            FatalErr("Early EOF at line " << mLineNo);
        if ( !sSeq.empty() && sSeq.back() == '\r' )
            sSeq.resize(sSeq.size()-1);
        if ( sSeq.empty() )
            FatalErr("Empty sequence at line " << mLineNo);
        if ( ++mLineNo && !std::getline(mIS,qualheader) )
            FatalErr("Early EOF at line " << mLineNo);
        if ( qualheader.empty() || qualheader[0] != '+' )
            FatalErr("Quals header doesn't begin with '+' at line " << mLineNo);
        if ( ++mLineNo && !std::getline(mIS,sQual) )
            FatalErr("Early EOF at line " << mLineNo);
        if ( !sQual.empty() && sQual.back() == '\r' )
            sQual.resize(sQual.size()-1);
        if ( sSeq.size() != sQual.size() )
            FatalErr("Calls and quals of unequal length at line " << mLineNo);

        sq.clear(); sq.reserve(sSeq.size());
        qs.clear(); qs.reserve(sSeq.size());
        auto qItr(sQual.begin());
        for ( char chr : sSeq )
        {
            switch (chr)
            {
            case 'a': case 'A': sq.push_back(0); break;
            case 'c': case 'C': sq.push_back(1); break;
            case 'g': case 'G': sq.push_back(2); break;
            case 't': case 'T':
            case 'u': case 'U': sq.push_back(3); break;
            default: sq.push_back(4); break;
            }
            qs.push_back(*qItr-FASTQ_QUAL_OFFSET);
            ++qItr;
        }
        seqs.push_back(sq);
        quals.push_back(qs);
        if ( seqs.size() == chunkSize )
            return true;
    }
    if ( !mIS.eof() )
        FatalErr("Failed to read to EOF (read to line " << mLineNo << ").");
    return !seqs.empty();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq 0x8(%rdi), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
jne 0x6bb7
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %r15
movq %rsi, %r14
callq 0x99cc
movl $0x186a0, %esi          # imm = 0x186A0
movq %r14, %rdi
callq 0x99d4
movq %r15, %rdi
callq 0x99cc
movl $0x186a0, %esi          # imm = 0x186A0
movq %r15, %rdi
callq 0x99d4
leaq 0x40(%rsp), %rdx
leaq 0xd8(%rsp), %rax
leaq 0xb8(%rsp), %rsi
xorl %ecx, %ecx
leaq 0x70(%rsp), %r13
vxorps %xmm0, %xmm0, %xmm0
leaq 0xf(%rsp), %rbp
movq %rbx, 0x90(%rsp)
movq %r14, 0xa0(%rsp)
movq %r15, 0x98(%rsp)
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rdx)
leaq 0x60(%rsp), %rdx
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, -0x10(%rsi)
andq $0x0, -0x8(%rsi)
movb %cl, (%rax)
movb %cl, (%rsi)
andq $0x0, 0x10(%r13)
vmovaps %xmm0, (%r13)
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rdx)
leaq 0x10(%rsp), %rcx
andq $0x0, 0x10(%rcx)
vmovaps %xmm0, (%rcx)
incl 0x10(%rbx)
je 0x6bbb
movq 0x8(%rbx), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x3040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6bbb
cmpq $0x0, 0xd0(%rsp)
je 0x6c87
incl 0x10(%rbx)
je 0x6993
movq 0x8(%rbx), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6cda
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x6c5c
movq 0x30(%rsp), %rax
cmpb $0xd, -0x1(%rax,%rsi)
jne 0x69c6
decq %rsi
leaq 0x30(%rsp), %rdi
callq 0x3270
cmpq $0x0, 0x38(%rsp)
je 0x6c5c
incl 0x10(%rbx)
je 0x69ee
movq 0x8(%rbx), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x3040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6d02
cmpq $0x0, 0xb0(%rsp)
je 0x6c31
movq 0xa8(%rsp), %rax
cmpb $0x2b, (%rax)
jne 0x6c31
incl 0x10(%rbx)
je 0x6a33
movq 0x8(%rbx), %rdi
leaq 0x50(%rsp), %rsi
callq 0x3040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6d2a
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x6a5d
movq 0x50(%rsp), %rax
cmpb $0xd, -0x1(%rax,%rsi)
jne 0x6a5f
decq %rsi
leaq 0x50(%rsp), %rdi
callq 0x3270
movq 0x58(%rsp), %rsi
jmp 0x6a5f
xorl %esi, %esi
cmpq %rsi, 0x38(%rsp)
jne 0x6cb2
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x6a7b
movq %rax, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x883e
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x6a96
movq %rax, 0x78(%rsp)
movq 0x38(%rsp), %rsi
movq %r13, %rdi
callq 0x883e
movq 0x50(%rsp), %r15
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rbx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x6b70
movzbl (%r14,%r12), %eax
leal -0x54(%rax), %ecx
cmpl $0x2, %ecx
jb 0x6b05
leal -0x74(%rax), %ecx
cmpl $0x2, %ecx
jb 0x6b05
cmpl $0x41, %eax
je 0x6af1
cmpl $0x43, %eax
je 0x6b2d
cmpl $0x47, %eax
je 0x6b19
cmpl $0x67, %eax
je 0x6b19
cmpl $0x63, %eax
je 0x6b2d
cmpl $0x61, %eax
jne 0x6b41
movb $0x0, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x897c
jmp 0x6b53
movb $0x3, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x897c
jmp 0x6b53
movb $0x2, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x897c
jmp 0x6b53
movb $0x1, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x897c
jmp 0x6b53
movb $0x4, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x897c
movb (%r15,%r12), %al
addb $-0x21, %al
movb %al, 0xf(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x897c
incq %r12
jmp 0x6ab5
movq 0xa0(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x9a6a
movq 0x98(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x9a6a
movq 0x8(%r14), %rax
movq 0x90(%rsp), %rbx
subq (%r14), %rax
cmpq $0x249f00, %rax         # imm = 0x249F00
jne 0x6933
movb $0x1, %bl
jmp 0x6bdb
xorl %ebx, %ebx
jmp 0x6c1d
movq 0x8(%rbx), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x2, 0x20(%rax,%rcx)
je 0x6d58
movq (%r14), %rax
cmpq 0x8(%r14), %rax
setne %bl
leaq 0x70(%rsp), %rdi
callq 0x9070
leaq 0x10(%rsp), %rdi
callq 0x9070
leaq 0x50(%rsp), %rdi
callq 0x30f0
leaq 0xa8(%rsp), %rdi
callq 0x30f0
leaq 0x30(%rsp), %rdi
callq 0x30f0
leaq 0xc8(%rsp), %rdi
callq 0x30f0
movl %ebx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x93b8(%rip), %rdi      # 0xfff0
leaq 0x4c8a(%rip), %rsi      # 0xb8c9
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x938d(%rip), %rdi      # 0xfff0
leaq 0x4c47(%rip), %rsi      # 0xb8b1
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x9362(%rip), %rdi      # 0xfff0
leaq 0x4bee(%rip), %rsi      # 0xb883
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x9337(%rip), %rdi      # 0xfff0
leaq 0x4c36(%rip), %rsi      # 0xb8f6
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x930f(%rip), %rdi      # 0xfff0
leaq 0x4bb6(%rip), %rsi      # 0xb89e
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x92e7(%rip), %rdi      # 0xfff0
leaq 0x4b8e(%rip), %rsi      # 0xb89e
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
movq 0x92bf(%rip), %rdi      # 0xfff0
leaq 0x4b66(%rip), %rsi      # 0xb89e
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x3110
pushq $0x1
popq %rdi
callq 0x3210
movq 0x9291(%rip), %rdi      # 0xfff0
leaq 0x4bbb(%rip), %rsi      # 0xb921
callq 0x31d0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3150
leaq 0x4bc9(%rip), %rsi      # 0xb946
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x3110
jmp 0x6d50
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
jmp 0x6d9f
leaq 0x70(%rsp), %rdi
movq %rax, %rbx
callq 0x9070
leaq 0x10(%rsp), %rdi
callq 0x9070
leaq 0x50(%rsp), %rdi
callq 0x30f0
leaq 0xa8(%rsp), %rdi
callq 0x30f0
leaq 0x30(%rsp), %rdi
callq 0x30f0
leaq 0xc8(%rsp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x3390