// File: /workspace/github_c_makefile_star2_O3/OpenGene[P]pecheck/src/fastqreader.cpp
// Function: FastqReader::read()
Read* FastqReader::read(){
	if (mZipped){
		if (mZipFile == NULL)
			return NULL;
	}

	if(mBufUsedLen >= mBufDataLen && eof()) {
		return NULL;
	}

	string name = getLine();
	string sequence = getLine();
	string strand = getLine();

	if(name.empty() || sequence.empty() || strand.empty())
		return NULL;

	// WAR for FQ with no quality
	if (!mHasQuality){
		string quality = string(sequence.length(), 'K');
		return new Read(name, sequence, strand, quality, mPhred64);
	}
	else {
		string quality = getLine();
		if(quality.empty())
			return NULL;
		return new Read(name, sequence, strand, quality, mPhred64);
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
jne 0x3dba
cmpq $0x0, 0x20(%r14)
jne 0x3dba
xorl %ebx, %ebx
jmp 0x3fe4
movl 0x44(%r14), %eax
cmpl 0x40(%r14), %eax
jl 0x3dd0
movq %r14, %rdi
callq 0x3d70
testb %al, %al
jne 0x3db3
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3bcc
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x3bcc
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x3bcc
cmpq $0x0, 0x70(%rsp)
je 0x3f91
movq 0x50(%rsp), %rsi
testq %rsi, %rsi
je 0x3f91
cmpq $0x0, 0x30(%rsp)
je 0x3f91
cmpb $0x0, 0x31(%r14)
je 0x3ff9
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3bcc
cmpq $0x0, 0x10(%rsp)
je 0x416f
movl $0x88, %edi
callq 0x32c0
movq %rax, %rbx
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x4d7a
leaq 0xf8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x4d7a
leaq 0xd8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x4d7a
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x4d7a
movzbl 0x32(%r14), %r9d
leaq 0x108(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0xa8(%rsp), %r8
movq %rbx, %rdi
callq 0xa328
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3f31
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3f4e
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f6b
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x4171
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x4171
xorl %ebx, %ebx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fae
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fc9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fe4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8(%rsp), %rdi
movl $0x4b, %edx
callq 0x3350
movl $0x88, %edi
callq 0x32c0
movq %rax, %rbx
leaq 0x178(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x4d7a
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x4d7a
leaq 0x158(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x4d7a
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x4d7a
movzbl 0x32(%r14), %r9d
leaq 0x168(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x148(%rsp), %rcx
leaq 0x128(%rsp), %r8
movq %rbx, %rdi
callq 0xa328
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x4101
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x148(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x98(%rsp), %r14
je 0x4126
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x4143
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x4160
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x4183
jmp 0x3f93
xorl %ebx, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f93
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x3f93
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x41ba
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x41ba
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x41dc
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x41dc
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x41fe
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x41fe
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x4220
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x4220
movq %rax, %r14
movl $0x88, %esi
movq %rbx, %rdi
callq 0x32d0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x42f3
jmp 0x430c
movq %rax, %r14
jmp 0x422d
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x426e
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x426e
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4290
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x4290
movq %rax, %r14
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x42ba
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x42ba
movq %rax, %r14
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x42dc
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x42dc
movq %rax, %r14
movl $0x88, %esi
movq %rbx, %rdi
callq 0x32d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x430c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x430c
movq %rax, %r14
jmp 0x42e9
jmp 0x4309
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x432c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x432c
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x434c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x434c
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4367
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %r14, %rdi
callq 0x3500
nop