// File: /workspace/github_c_makefile_star2_O1/mist64[P]cbm6502asm/src/line.c
// Function: parselin
void parselin() {
	int i = 0, j;
	char linestat[FIRSTCHAR + 1];

	while ((s3 = strchr(line, '\f'))) { /* search for form feeds */
		for (linestat[FIRSTCHAR] = j = 0; j < FIRSTCHAR;
		     linestat[j++] = ' ')
			;
		fprintf(file_tmp, "%s%c%s\n", linestat, 'p',
		        " .page"); /* generate .page */
		*s3 = ' ';
	}

	p1[0] = p2[0] = p3[0] = 0; /* fields */
	s1 = p1;
	s2 = p2;
	s3 = p3; /* pointers to fields */

	j = strlen(line) - 1; /* remove trailing spaces */
	if (j < 0) return;
	while (isspace(line[j]) && j) line[j--] = 0;
	if (j < 0) return;
	if (line[i] != ';' &&
	    line[i]) { /* don't get fields for comments & blank lines */
		if (!isspace(line[i]))
			for (j = 0; !isspace(line[i]) && line[i]; i++, j++)
				p1[j] = toupper(line[i]);
		p1[j] = 0;
		while (isspace(line[i])) i++;
		for (j = 0; !isspace(line[i]) && line[i]; j++, i++)
			p2[j] = toupper(line[i]);
		p2[j] = 0;
		while (isspace(line[i]) && line[i]) i++;
		while (line[i]) *s3++ = line[i++]; /* the rest of the line */
		*s3++ = 0;
		*s3++ = 0;
		s3 = p3;
	}
	if (*s2 == ';') *s2 = 0;
	if (*s3 == ';') *s3 = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x922f(%rip), %rdi      # 0xe0b0
movl $0xc, %esi
callq 0x10d0
leaq 0x920e(%rip), %r13      # 0xe0a0
movq %rax, (%r13)
testq %rax, %rax
je 0x4f05
leaq 0x88a6(%rip), %rbp      # 0xd748
leaq 0x5ad7(%rip), %rbx      # 0xa980
leaq 0x5ad8(%rip), %r14      # 0xa988
movq %rsp, %r15
leaq 0x91f6(%rip), %r12      # 0xe0b0
movb $0x0, 0x20(%rsp)
movaps 0x5aaa(%rip), %xmm0     # 0xa970
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq (%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x70, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1140
movq (%r13), %rax
movb $0x20, (%rax)
movq %r12, %rdi
movl $0xc, %esi
callq 0x10d0
movq %rax, (%r13)
testq %rax, %rax
jne 0x4eba
leaq 0x9104(%rip), %rcx      # 0xe010
xorl %eax, %eax
movb %al, (%rcx)
leaq 0x9069(%rip), %rdx      # 0xdf80
movb %al, (%rdx)
leaq 0x8ae0(%rip), %rsi      # 0xda00
movb %al, (%rsi)
leaq 0x8b5f(%rip), %rax      # 0xda88
movq %rsi, (%rax)
leaq 0x9165(%rip), %r12      # 0xe098
movq %rdx, (%r12)
movq %rcx, (%r13)
leaq 0x916e(%rip), %rbx      # 0xe0b0
movq %rbx, %rdi
callq 0x10b0
movq %rax, %r15
decl %r15d
js 0x515b
callq 0x1230
movq %rax, %r14
movq (%rax), %rax
testl %r15d, %r15d
je 0x4fa9
movl %r15d, %ecx
movsbq (%rbx,%rcx), %rdx
movzwl (%rax,%rdx,2), %edx
andl $0x2000, %edx           # imm = 0x2000
leaq 0x9001(%rip), %rsi      # 0xdf80
je 0x4fb0
leaq -0x1(%rcx), %r15
movb $0x0, (%rbx,%rcx)
movq (%r14), %rax
cmpq $0x1, %rcx
je 0x4fb0
movsbq -0x1(%rbx,%rcx), %rcx
movzwl (%rax,%rcx,2), %edx
movq %r15, %rcx
andl $0x2000, %edx           # imm = 0x2000
jne 0x4f81
jmp 0x4fb0
leaq 0x8fd0(%rip), %rsi      # 0xdf80
movzbl (%rbx), %ecx
testl %ecx, %ecx
je 0x5143
cmpl $0x3b, %ecx
je 0x5143
movsbq %cl, %rcx
xorl %r12d, %r12d
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x5037
movsbq (%rbx), %r15
testq %r15, %r15
je 0x516a
movq (%r14), %rax
movzwl (%rax,%r15,2), %eax
movl $0x0, %ebp
andl $0x2000, %eax           # imm = 0x2000
jne 0x503c
xorl %r12d, %r12d
callq 0x1030
leaq 0x89fe(%rip), %rdx      # 0xda00
movq (%rax), %rcx
movb (%rcx,%r15,4), %cl
movb %cl, (%rdx,%r12)
movsbq 0x1(%rbx,%r12), %r15
incq %r12
testq %r15, %r15
je 0x502b
movq (%r14), %rcx
movzwl (%rcx,%r15,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
je 0x5002
movl %r12d, %ebp
leaq 0x8f4b(%rip), %rsi      # 0xdf80
jmp 0x503c
xorl %ebp, %ebp
movl %r15d, %r12d
movslq %r12d, %rax
leaq 0x89ba(%rip), %rcx      # 0xda00
movb $0x0, (%rcx,%rax)
movq (%r14), %rax
decq %rbp
movsbq 0x1(%rbx,%rbp), %rcx
incq %rbp
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x5050
movl %ebp, %eax
movsbq (%rbx,%rax), %r15
xorl %eax, %eax
testq %r15, %r15
je 0x50c2
movq (%r14), %rcx
movzwl (%rcx,%r15,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
jne 0x50c2
xorl %r12d, %r12d
callq 0x1030
leaq 0x8ef3(%rip), %rsi      # 0xdf80
movq %r12, %rcx
movq (%rax), %rdx
movb (%rdx,%r15,4), %dl
movb %dl, (%rsi,%r12)
incq %r12
addq %rbx, %rcx
movsbq 0x1(%rbp,%rcx), %r15
testq %r15, %r15
je 0x50bc
movq (%r14), %rcx
movzwl (%rcx,%r15,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
je 0x508d
movl %r12d, %eax
addq %r12, %rbp
movb $0x0, (%rsi,%rax)
movq (%r14), %rdx
movl %ebp, %ecx
leaq 0x8fde(%rip), %rax      # 0xe0b0
addq %rcx, %rax
decq %rcx
movsbq (%rax), %rsi
incq %rax
incq %rcx
testq %rsi, %rsi
je 0x50f3
movzwl (%rdx,%rsi,2), %esi
andl $0x2000, %esi           # imm = 0x2000
jne 0x50d8
movl %ecx, %ecx
movb (%rbx,%rcx), %cl
testb %cl, %cl
leaq 0x8f0f(%rip), %rdi      # 0xe010
leaq 0x8f90(%rip), %r12      # 0xe098
je 0x5121
movq (%r13), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%r13)
movb %cl, (%rdx)
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x510a
movq (%r13), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r13)
xorl %ecx, %ecx
movb %cl, (%rax)
movq (%r13), %rax
leaq 0x1(%rax), %rdx
movq %rdx, (%r13)
movb %cl, (%rax)
movq %rdi, (%r13)
movq (%r12), %rax
cmpb $0x3b, (%rax)
jne 0x514f
movb $0x0, (%rax)
movq (%r13), %rax
cmpb $0x3b, (%rax)
jne 0x515b
movb $0x0, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x503c