// File: /workspace/github_cpp_makefile_star2_O1/CK7[P]abawaca/src/SeqIORead_fasta.h
// Function: Bio::SeqIORead_fasta<Bio::Sequence<Bio::DNAString>>::next_seq()
S* SeqIORead_fasta<S>::next_seq()
{
	// If reached EOF - return
	if(this->m_next_line[0] == 0)
		return NULL;

	char	*pdisplay_id = this->m_next_line;
	while(*pdisplay_id && isspace(*pdisplay_id))
		pdisplay_id++;
	if((*pdisplay_id != '>') || (*(pdisplay_id+1) == 0) || isspace(*(pdisplay_id+1)))
	{
		char msg[512];
		sprintf(msg, "Was expeecting a header line for the next sequence in a fasta file but got something else, line %u", (unsigned int)this->m_line_num);
		throw Bio::Bad_file(this->file_name(), msg, __PRETTY_FUNCTION__);
	}
	pdisplay_id++;
	char *pdesc = pdisplay_id+1;

	while(*pdesc && !isspace(*pdesc))
		pdesc++;
	if(*pdesc) {
		// Set the end of the sequence name
		*(pdesc++) = 0;
		// Skip the spaces to the beginning of the description (if exists)
		while(*pdesc && isspace(*pdesc))
			pdesc++;
	}

	string	display_id(pdisplay_id), description(pdesc), sequence;
	
	// Now we are ready to read the sequence itself 
	while(this->getline(true)) {
		// Trim before and after
		char *p = this->m_next_line+strlen(this->m_next_line);	// Get p to the \0 at the end of the string
		while(isspace(*(p-1)))
			p--;
		*p = 0;
		p = this->m_next_line;
		while(isspace(*p))
			p++;
		// If this is true - we reached the next entry
		if(*p == '>')
			break;
		sequence += string(p);
	}

	if(sequence.size() == 0) {
		cerr << "Warning: sequence " << display_id << " is empty" << endl;
	}

	this->m_seq_num++;
	return new S(display_id, description, sequence);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq 0x40(%rdi), %r14
cmpb $0x0, (%r14)
je 0xd6e3
movq %rdi, %rbx
movb (%r14), %r15b
testb %r15b, %r15b
je 0xd324
incq %r14
movsbl %r15b, %edi
callq 0x5070
testl %eax, %eax
je 0xd3db
movb (%r14), %r15b
incq %r14
testb %r15b, %r15b
jne 0xd308
movl 0x28(%rbx), %edx
leaq 0xd7d4(%rip), %rsi      # 0x1ab02
leaq -0x330(%rbp), %rdi
xorl %eax, %eax
callq 0x5090
movl $0x28, %edi
callq 0x51b0
movq %rax, %r14
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0xb27a
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq -0x330(%rbp), %rbx
movq %rbx, %rdi
callq 0x5180
leaq (%rax,%rbp), %rdx
addq $-0x330, %rdx           # imm = 0xFCD0
leaq -0x108(%rbp), %rdi
movq %rbx, %rsi
callq 0xb314
movb $0x1, %r12b
leaq 0xd7bc(%rip), %rcx      # 0x1ab65
leaq -0x128(%rbp), %rsi
leaq -0x108(%rbp), %rdx
movq %r14, %rdi
xorl %r8d, %r8d
callq 0xa392
xorl %r12d, %r12d
leaq 0x15584(%rip), %rsi     # 0x22950
leaq -0x2525(%rip), %rdx     # 0xaeae
movq %r14, %rdi
callq 0x5660
cmpb $0x3e, %r15b
jne 0xd324
movsbl (%r14), %edi
testl %edi, %edi
je 0xd324
callq 0x5070
testl %eax, %eax
jne 0xd324
leaq 0x1(%r14), %r15
movsbl 0x1(%r14), %edi
testl %edi, %edi
sete %r12b
je 0xd45d
callq 0x5070
testl %eax, %eax
jne 0xd437
leaq 0x2(%r14), %r15
movsbl (%r15), %edi
testl %edi, %edi
sete %r12b
je 0xd45d
callq 0x5070
incq %r15
testl %eax, %eax
je 0xd41c
decq %r15
testb %r12b, %r12b
jne 0xd45d
movb $0x0, (%r15)
incq %r15
movq %r15, %rcx
movq %rcx, %r15
movsbl (%rcx), %edi
testl %edi, %edi
je 0xd45d
callq 0x5070
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0xd446
leaq -0x320(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r14, %rdi
callq 0x5180
leaq (%rax,%r14), %rdx
leaq -0x330(%rbp), %rdi
movq %r14, %rsi
callq 0xb314
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r15, %rdi
callq 0x5180
leaq (%rax,%r15), %rdx
leaq -0x68(%rbp), %rdi
movq %r15, %rsi
callq 0xb314
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %r13
leaq -0x48(%rbp), %r15
movq %rbx, %rdi
movl $0x1, %esi
callq 0xf324
testq %rax, %rax
je 0xd56e
movq 0x40(%rbx), %r12
movq %r12, %rdi
callq 0x5180
leaq (%r12,%rax), %r14
incq %r14
movsbl -0x2(%r14), %edi
callq 0x5070
decq %r14
testl %eax, %eax
jne 0xd4e7
movb $0x0, (%r14)
movq 0x40(%rbx), %r12
decq %r12
movb 0x1(%r12), %r14b
incq %r12
movsbl %r14b, %edi
callq 0x5070
testl %eax, %eax
jne 0xd503
cmpb $0x3e, %r14b
je 0xd56e
movq %r13, -0x88(%rbp)
movq %r12, %rdi
callq 0x5180
leaq (%rax,%r12), %rdx
leaq -0x88(%rbp), %rdi
movq %r12, %rsi
callq 0xb314
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %r15, %rdi
callq 0x5120
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0xd564
callq 0x5340
cmpb $0x3e, %r14b
jne 0xd4be
cmpq $0x0, -0x40(%rbp)
jne 0xd5e5
movq 0x15a6c(%rip), %rdi     # 0x22fe8
leaq 0xd651(%rip), %rsi      # 0x1abd4
movl $0x12, %edx
callq 0x5420
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rdx
movq 0x15a46(%rip), %rdi     # 0x22fe8
callq 0x5420
movq %rax, %r14
leaq 0xd278(%rip), %rsi      # 0x1a829
movl $0x9, %edx
movq %rax, %rdi
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5360
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5250
incq 0x30(%rbx)
movl $0x68, %edi
callq 0x53a0
movq %rax, %r14
leaq -0xb8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0xb27a
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0xb27a
leaq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x16368
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
movq %r14, %rdi
callq 0xf478
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd683
callq 0x5340
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0xd694
callq 0x5340
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
leaq -0x320(%rbp), %rbx
je 0xd6ac
callq 0x5340
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xd6be
callq 0x5340
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xd6d0
callq 0x5340
movq -0x330(%rbp), %rdi
cmpq %rbx, %rdi
je 0xd6e6
callq 0x5340
jmp 0xd6e6
xorl %r14d, %r14d
movq %r14, %rax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd718
callq 0x5340
jmp 0xd718
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0xd72e
callq 0x5340
jmp 0xd72e
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0xd744
callq 0x5340
jmp 0xd744
movq %rax, %rbx
movq %r14, %rdi
jmp 0xd796
movq %rax, %rbx
jmp 0xd7c6
movq %rax, %rbx
jmp 0xd7f3
jmp 0xd79f
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0xd774
callq 0x5340
jmp 0xd774
movq %rax, %rbx
movb $0x1, %r12b
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0xd7e6
callq 0x5340
jmp 0xd7e6
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0xd7a2
callq 0x5340
jmp 0xd7a2
jmp 0xd79f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xd7b4
callq 0x5340
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xd7c6
callq 0x5340
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0xd7f3
callq 0x5340
jmp 0xd7f3
movq %rax, %rbx
movb $0x1, %r12b
testb %r12b, %r12b
je 0xd7f3
movq %r14, %rdi
callq 0x5280
movq %rbx, %rdi
callq 0x56a0
nop