// File: raemarks[P]SuffixTree/src/io.cpp
// Function: ReadInputFasta(std::basic_ifstream<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void
ReadInputFasta(
	std::ifstream &in,
	std::string& str,
	std::string& name
	)
{
	int BUFSIZE = 4 * MB;
	char buf[BUFSIZE], _name[MB/2], c = '\0';
	int i = 0;
	memset(buf, 0, BUFSIZE);

	// Skip over '>'
	while (c != '>' && !in.eof()) {
		in >> c;
	}

	in.getline(buf, BUFSIZE);
	// Get unique identifier of sequence, up to first whitespace
	sscanf(buf, "%s", _name);
	// Allocate and copy
	name = std::string(_name);

	i = 0;
	c = '\0';
	memset(buf, 0, BUFSIZE);

	in >> c;
	while (c != '>' && !in.eof()) {
		if (notLineEnd(c)) {
			buf[i++] = c;
		}
		in >> c;
	}
	str = std::string(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x800d0, %rsp          # imm = 0x800D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x400000, -0x1c(%rbp)  # imm = 0x400000
movl -0x1c(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x800a0(%rbp)
movq %rdi, %rsp
movq %rax, -0x30(%rbp)
movb $0x0, -0x80031(%rbp)
movl $0x0, -0x80038(%rbp)
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x20d0
movsbl -0x80031(%rbp), %ecx
xorl %eax, %eax
cmpl $0x3e, %ecx
movb %al, -0x800a1(%rbp)
je 0x421f
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x2320
xorb $-0x1, %al
movb %al, -0x800a1(%rbp)
movb -0x800a1(%rbp), %al
testb $0x1, %al
jne 0x422b
jmp 0x423d
movq -0x8(%rbp), %rdi
leaq -0x80031(%rbp), %rsi
callq 0x2240
jmp 0x41f3
movq -0x800a0(%rbp), %rsi
movq -0x8(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
callq 0x2070
movq -0x800a0(%rbp), %rdi
leaq 0xf13(%rip), %rsi       # 0x5172
xorl %eax, %eax
leaq -0x80030(%rbp), %rdx
movq %rdx, -0x800b8(%rbp)
callq 0x2170
leaq -0x80059(%rbp), %rdi
movq %rdi, -0x800b0(%rbp)
callq 0x22f0
movq -0x800b8(%rbp), %rsi
movq -0x800b0(%rbp), %rdx
leaq -0x80058(%rbp), %rdi
callq 0x4440
jmp 0x42a3
movq -0x18(%rbp), %rdi
leaq -0x80058(%rbp), %rsi
callq 0x2220
leaq -0x80058(%rbp), %rdi
callq 0x20f0
leaq -0x80059(%rbp), %rdi
callq 0x21d0
movq -0x800a0(%rbp), %rdi
movl $0x0, -0x80038(%rbp)
movb $0x0, -0x80031(%rbp)
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x20d0
movq -0x8(%rbp), %rdi
leaq -0x80031(%rbp), %rsi
callq 0x2240
movsbl -0x80031(%rbp), %ecx
xorl %eax, %eax
cmpl $0x3e, %ecx
movb %al, -0x800b9(%rbp)
je 0x432a
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x2320
xorb $-0x1, %al
movb %al, -0x800b9(%rbp)
movb -0x800b9(%rbp), %al
testb $0x1, %al
jne 0x4336
jmp 0x43a6
movsbl -0x80031(%rbp), %edi
callq 0x44f0
testb $0x1, %al
jne 0x4348
jmp 0x4391
movq -0x800a0(%rbp), %rax
movb -0x80031(%rbp), %dl
movl -0x80038(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x80038(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80068(%rbp)
movl %eax, -0x8006c(%rbp)
leaq -0x80059(%rbp), %rdi
callq 0x21d0
jmp 0x4427
movq -0x8(%rbp), %rdi
leaq -0x80031(%rbp), %rsi
callq 0x2240
jmp 0x42fe
leaq -0x80091(%rbp), %rdi
movq %rdi, -0x800c8(%rbp)
callq 0x22f0
movq -0x800a0(%rbp), %rsi
movq -0x800c8(%rbp), %rdx
leaq -0x80090(%rbp), %rdi
callq 0x4440
jmp 0x43d5
movq -0x10(%rbp), %rdi
leaq -0x80090(%rbp), %rsi
callq 0x2220
leaq -0x80090(%rbp), %rdi
callq 0x20f0
leaq -0x80091(%rbp), %rdi
callq 0x21d0
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80068(%rbp)
movl %eax, -0x8006c(%rbp)
leaq -0x80091(%rbp), %rdi
callq 0x21d0
movq -0x80068(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)
nopl (%rax)