// File: /workspace/github_c_makefile_star2_O0/georgeweigt[P]sassafras/sassafras.c
// Function: get_dataline
char *
get_dataline(char *buf, int len)
{
	int i;

	// scan to end of current line

	while (*inp && *inp != ';' && *inp != '\n' && *inp != '\r')
		inp++;

	// end of input?

	if (*inp == 0 || *inp == ';')
		return NULL;

	// skip end of line

	if (inp[0] == '\r' && inp[1] == '\n')
		inp += 2;
	else
		inp += 1;

	while (isspace(*inp) && *inp != '\n' && *inp != '\r')
		inp++;

	if (*inp == 0 || *inp == ';' || *inp == '\n' || *inp == '\r')
		return NULL;

	// copy data line into buf

	for (i = 0; i < len - 1; i++) {
		buf[i] = *inp++;
		if (*inp == 0 || *inp == ';' || *inp == '\n' || *inp == '\r')
			break;
	}

	if (i == len - 1)
		stop("Buffer overrun");

	buf[i + 1] = 0;

	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq 0xfc12(%rip), %rax      # 0x13888
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0x3cbe
movq 0xfbfe(%rip), %rax      # 0x13888
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3b, %ecx
movb %al, -0x19(%rbp)
je 0x3cbe
movq 0xfbea(%rip), %rax      # 0x13888
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x19(%rbp)
je 0x3cbe
movq 0xfbd6(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xd, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x3cc7
jmp 0x3cdb
movq 0xfbba(%rip), %rax      # 0x13888
addq $0x1, %rax
movq %rax, 0xfbaf(%rip)      # 0x13888
jmp 0x3c6f
movq 0xfba6(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3cf9
movq 0xfb97(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x3b, %eax
jne 0x3d06
movq $0x0, -0x8(%rbp)
jmp 0x3eb6
movq 0xfb7b(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x3d39
movq 0xfb6c(%rip), %rax      # 0x13888
movsbl 0x1(%rax), %eax
cmpl $0xa, %eax
jne 0x3d39
movq 0xfb5c(%rip), %rax      # 0x13888
addq $0x2, %rax
movq %rax, 0xfb51(%rip)      # 0x13888
jmp 0x3d4b
movq 0xfb48(%rip), %rax      # 0x13888
addq $0x1, %rax
movq %rax, 0xfb3d(%rip)      # 0x13888
jmp 0x3d4d
callq 0x2210
movq (%rax), %rax
movq 0xfb2c(%rip), %rcx      # 0x13888
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1a(%rbp)
je 0x3d9d
movq 0xfb0b(%rip), %rax      # 0x13888
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x1a(%rbp)
je 0x3d9d
movq 0xfaf7(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xd, %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x3da6
jmp 0x3dba
movq 0xfadb(%rip), %rax      # 0x13888
addq $0x1, %rax
movq %rax, 0xfad0(%rip)      # 0x13888
jmp 0x3d4d
movq 0xfac7(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3df6
movq 0xfab8(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x3df6
movq 0xfaa9(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x3df6
movq 0xfa9a(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x3e03
movq $0x0, -0x8(%rbp)
jmp 0x3eb6
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3e84
movq 0xfa6a(%rip), %rax      # 0x13888
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xfa5c(%rip)      # 0x13888
movb (%rax), %dl
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq 0xfa48(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3e75
movq 0xfa39(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x3e75
movq 0xfa2a(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0x3e75
movq 0xfa1b(%rip), %rax      # 0x13888
movsbl (%rax), %eax
cmpl $0xd, %eax
jne 0x3e77
jmp 0x3e84
jmp 0x3e79
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3e0a
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3e9d
leaq 0xb739(%rip), %rdi      # 0xf5d1
callq 0x2790
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq