// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %r14
cmpb $0x1, 0x30(%rdi)
jne 0x3c3d
cmpq $0x0, 0x20(%r14)
jne 0x3c3d
xorl %ebx, %ebx
jmp 0x3e77
movl 0x44(%r14), %eax
cmpl 0x40(%r14), %eax
jl 0x3c53
movq %r14, %rdi
callq 0x3bfa
testb %al, %al
jne 0x3c36
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3a6e
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x3a6e
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x3a6e
cmpq $0x0, 0x70(%rsp)
je 0x3d7c
movq 0x50(%rsp), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x3e59
cmpq $0x0, 0x30(%rsp)
je 0x3e59
cmpb $0x0, 0x31(%r14)
je 0x3d83
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3a6e
cmpq $0x0, 0x10(%rsp)
je 0x3e85
movl $0x88, %edi
callq 0x3280
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3380
leaq 0xc8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3380
leaq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3380
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3380
movzbl 0x32(%r14), %r9d
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0xa8(%rsp), %rcx
leaq 0x88(%rsp), %r8
movq %rbx, %rdi
callq 0x7fa4
leaq 0x88(%rsp), %rdi
callq 0x3568
leaq 0xa8(%rsp), %rdi
callq 0x3568
leaq 0xc8(%rsp), %rdi
callq 0x3568
leaq 0xe8(%rsp), %rdi
jmp 0x3e4a
xorl %ebx, %ebx
jmp 0x3e59
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
pushq $0x4b
popq %rdx
callq 0x32f0
movl $0x88, %edi
callq 0x3280
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3380
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3380
leaq 0x128(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3380
leaq 0x108(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3380
movzbl 0x32(%r14), %r9d
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x128(%rsp), %rcx
leaq 0x108(%rsp), %r8
movq %rbx, %rdi
callq 0x7fa4
leaq 0x108(%rsp), %rdi
callq 0x3568
leaq 0x128(%rsp), %rdi
callq 0x3568
leaq 0x148(%rsp), %rdi
callq 0x3568
leaq 0x168(%rsp), %rdi
callq 0x3568
leaq 0x8(%rsp), %rdi
callq 0x3568
leaq 0x28(%rsp), %rdi
callq 0x3568
leaq 0x48(%rsp), %rdi
callq 0x3568
leaq 0x68(%rsp), %rdi
callq 0x3568
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
retq
xorl %ebx, %ebx
jmp 0x3e4f
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x3568
jmp 0x3e9e
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0x3568
jmp 0x3eb0
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
callq 0x3568
jmp 0x3ec2
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
jmp 0x3f11
jmp 0x3f18
jmp 0x3f3e
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x3568
jmp 0x3ee5
movq %rax, %r14
leaq 0x128(%rsp), %rdi
callq 0x3568
jmp 0x3ef7
movq %rax, %r14
leaq 0x148(%rsp), %rdi
callq 0x3568
jmp 0x3f09
movq %rax, %r14
leaq 0x168(%rsp), %rdi
callq 0x3568
jmp 0x3f1b
movq %rax, %r14
movl $0x88, %esi
movq %rbx, %rdi
callq 0x3290
leaq 0x8(%rsp), %rdi
callq 0x3568
leaq 0x28(%rsp), %rdi
callq 0x3568
jmp 0x3f4d
movq %rax, %r14
jmp 0x3f28
jmp 0x3f45
movq %rax, %r14
jmp 0x3f32
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x3568
jmp 0x3f5c
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x3568
movq %r14, %rdi
callq 0x34e0