// File: /workspace/github_c_makefile_star2_O1/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 0x3e0e
cmpq $0x0, 0x20(%r14)
jne 0x3e0e
xorl %ebx, %ebx
jmp 0x4038
movl 0x44(%r14), %eax
cmpl 0x40(%r14), %eax
jl 0x3e24
movq %r14, %rdi
callq 0x3dc4
testb %al, %al
jne 0x3e07
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x3bfa
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x3bfa
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x3bfa
cmpq $0x0, 0x70(%rsp)
je 0x3fe5
movq 0x50(%rsp), %rsi
testq %rsi, %rsi
je 0x3fe5
cmpq $0x0, 0x30(%rsp)
je 0x3fe5
cmpb $0x0, 0x31(%r14)
je 0x404d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3bfa
cmpq $0x0, 0x10(%rsp)
je 0x41c3
movl $0x88, %edi
callq 0x32d0
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 0x4ea0
leaq 0xf8(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x4ea0
leaq 0xd8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x4ea0
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x4ea0
movzbl 0x32(%r14), %r9d
leaq 0x108(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0xa8(%rsp), %r8
movq %rbx, %rdi
callq 0xa640
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3f85
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3fa2
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fbf
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x41c5
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x41c5
xorl %ebx, %ebx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4002
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x401d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4038
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
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 0x3360
movl $0x88, %edi
callq 0x32d0
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 0x4ea0
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x4ea0
leaq 0x158(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x4ea0
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x4ea0
movzbl 0x32(%r14), %r9d
leaq 0x168(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x148(%rsp), %rcx
leaq 0x128(%rsp), %r8
movq %rbx, %rdi
callq 0xa640
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x4155
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x148(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x98(%rsp), %r14
je 0x417a
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x4197
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x41b4
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x41d7
jmp 0x3fe7
xorl %ebx, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fe7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x3fe7
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x420e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x420e
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4230
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4230
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4252
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4252
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x4274
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4274
movq %rax, %r14
movl $0x88, %esi
movq %rbx, %rdi
callq 0x32e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4347
jmp 0x4360
movq %rax, %r14
jmp 0x4281
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x42c2
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x42c2
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %rbp, %rdi
je 0x42e4
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x42e4
movq %rax, %r14
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x430e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x430e
movq %rax, %r14
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x4330
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4330
movq %rax, %r14
movl $0x88, %esi
movq %rbx, %rdi
callq 0x32e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4360
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4360
movq %rax, %r14
jmp 0x433d
jmp 0x435d
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4380
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x4380
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43a0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x43a0
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43bb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %r14, %rdi
callq 0x3510
nop