// File: /workspace/github_cpp_makefile_star2_O2/simonrharris[P]SKA/src/DNA.cpp
// Function: readNextFastqSequence(igzstream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int readNextFastqSequence(igzstream & gzfileStream, const std::string & filename, std::string & sequence, std::string & quality){
	std::string line;
	line.reserve(1000);
	if (gzfileStream.peek()!='@'){
		std::cerr << "Error: " << filename << " is not in the correct format. Expecting header line to start with @." << std::endl << std::endl;
		return 1;
	}
  	getline(gzfileStream, line);
  	getline(gzfileStream, sequence);
  	if (gzfileStream.peek()!='+'){
		std::cerr << "Error: " << filename << " is not in the correct format. Expecting separator line to start with +." << std::endl << std::endl;
		return 1;
	}
  	getline(gzfileStream, line);
  	getline(gzfileStream, quality);
  	if (quality.length()!=sequence.length()){
  		std::cerr << "Error: " << filename << " is not in the correct format. Sequence and quality lines must be of equal length." << std::endl << std::endl;
		return 1;
  	}
	if (gzfileStream.fail()){
		std::cerr << "Error: " << filename << " is not in the correct format. Expecting a multiple of 4 lines." << std::endl << std::endl;
		return 1;
	}
	std::transform(sequence.begin(), sequence.end(), sequence.begin(), ::toupper);//change all letters in the string to upper case	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x55f0
leaq 0x188(%r15), %r13
movq %r13, %rdi
callq 0x5140
cmpl $0x40, %eax
jne 0x6a64
movq %rsp, %rsi
movq %r13, %rdi
callq 0x5080
movq %r13, %rdi
movq %r14, %rsi
callq 0x5080
movq %r13, %rdi
callq 0x5140
cmpl $0x2b, %eax
jne 0x6a8b
movq %rsp, %rsi
movq %r13, %rdi
callq 0x5080
movq %r13, %rdi
movq %r12, %rsi
callq 0x5080
movq 0x8(%r12), %r12
cmpq 0x8(%r14), %r12
jne 0x6ab2
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
je 0x6b0a
movq 0x2f5ac(%rip), %rdi     # 0x35ff0
leaq 0x1e60f(%rip), %rsi     # 0x2505a
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
leaq 0x1e747(%rip), %rsi     # 0x251a9
jmp 0x6ad7
movq 0x2f585(%rip), %rdi     # 0x35ff0
leaq 0x1e5e8(%rip), %rsi     # 0x2505a
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
leaq 0x1e63e(%rip), %rsi     # 0x250c7
jmp 0x6ad7
movq 0x2f55e(%rip), %rdi     # 0x35ff0
leaq 0x1e5c1(%rip), %rsi     # 0x2505a
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
leaq 0x1e65d(%rip), %rsi     # 0x2510d
jmp 0x6ad7
movq 0x2f537(%rip), %rdi     # 0x35ff0
leaq 0x1e59a(%rip), %rsi     # 0x2505a
callq 0x53f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x53a0
leaq 0x1e67f(%rip), %rsi     # 0x25156
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
pushq $0x1
popq %rbx
movq %rsp, %rdi
callq 0x5778
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x6af2
movsbl (%r14,%r15), %edi
callq 0x56f0
movb %al, (%r14,%r15)
incq %r15
jmp 0x6b12
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5778
movq %rbx, %rdi
callq 0x56c0