// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbm6502asm/src/outline.c
// Function: clean_list
void clean_list() {
	char linestat[FIRSTCHAR + 1], c, spec, formfeed = '\n';
	int i, j, page = 1, subpage = 0, nline = 999;

	fclose(file_tmp);
	file_tmp = fopen(tmpdev, "r");

	while (!feof(file_tmp)) {
		for (c = i = linestat[FIRSTCHAR] = 0;
		     i < FIRSTCHAR && c != '\n'; i++)
			c = linestat[i] = fgetc(file_tmp);

		if (c == '\n') {
			linestat[--i] = 0;
			spec = ' ';
			*line = 0;
		} else {
			spec = fgetc(file_tmp);
			for (c = i = 0;
			     i < 2 * LINELENG && c != '\n' && c != EOF; i++)
				c = line[i] = fgetc(file_tmp);
			line[--i] = 0;
		}

		if (c == EOF) continue;
		if (spec == 'F') {
			strcpy(srcfile, line);
			continue;
		}
		if (spec == 'S') { /* .subttl directive */
			parselin();
			strcpy(subttl, s3);
		}
		if (nline > formln) {
			nline = 6;
			fprintf(file_lst,
			        "%c%s  Commodore 6502ASM %s  %s  Page %d",
			        formfeed, name, VERSION, &datetime[4], page);
			formfeed = '\f';
			if (subpage) fprintf(file_lst, "-%d", subpage);
			subpage++;
			fprintf(file_lst, "\n%s   %s\n", subttl, srcfile);
			fprintf(file_lst,
			        "\nError Addr  Code          Seq   Source "
			        "statement\n\n");
		}
		if (spec == 'p') { /* .page directive */
			nline = 999;
			page++;
			subpage = 0;
			continue;
		}
		if (spec == 'f') { /* .formln directive */
			for (formln = i = 0; line[i]; i++)
				formln = formln * 10 + line[i] - '0';
			continue;
		}
		if (spec == 's') { /* .space or .skip directive */
			sscanf(line, "%d", &j);
			for (i = 0; i < j; i++, nline++)
				if (nline < formln) fprintf(file_lst, "\n");
			continue;
		}
		if (spec == 'L') { /* .mlist, .nmlist, .blist, .list, .nlist */
			mlist = line[0] - '1';
			list = line[1] - '0';
			continue;
		}
		if (spec == 'l') /* .clist and .nclist directive */
			continue;
		macrolevel = linestat[29] != ' ';
		if (spec == 'M' && !macrolevel) linestat[29] = '+';
		data = isxdigit(linestat[12]);
		if (list)
			if (mlist == 1 || !macrolevel || (mlist == 0 && data)) {
				if (!wide) {
					linestat[FIRSTCHAR - 2] = 0;
					linestat[FIRSTCHAR - 3] = ' ';
				}
				fprintf(file_lst, "%s%s\n", linestat, line);
				nline++;
			}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb $0xa, -0x33(%rbp)
movl $0x1, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x3e7, -0x48(%rbp)     # imm = 0x3E7
leaq 0x66a0(%rip), %rax      # 0x10738
movq (%rax), %rdi
callq 0x1090
leaq 0x6819(%rip), %rdi      # 0x108c0
leaq 0x3185(%rip), %rsi      # 0xd233
callq 0x11a0
movq %rax, %rcx
leaq 0x667b(%rip), %rax      # 0x10738
movq %rcx, (%rax)
leaq 0x6671(%rip), %rax      # 0x10738
movq (%rax), %rdi
callq 0x1140
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa0e0
jmp 0xa526
movb $0x0, -0x10(%rbp)
movl $0x0, -0x38(%rbp)
movb $0x0, -0x31(%rbp)
xorl %eax, %eax
cmpl $0x20, -0x38(%rbp)
movb %al, -0x49(%rbp)
jge 0xa107
movsbl -0x31(%rbp), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xa110
jmp 0xa135
leaq 0x6621(%rip), %rax      # 0x10738
movq (%rax), %rdi
callq 0x10f0
movslq -0x38(%rbp), %rcx
movb %al, -0x30(%rbp,%rcx)
movb %al, -0x31(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa0ef
movsbl -0x31(%rbp), %eax
cmpl $0xa, %eax
jne 0xa161
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
cltq
movb $0x0, -0x30(%rbp,%rax)
movb $0x20, -0x32(%rbp)
leaq 0x6f47(%rip), %rax      # 0x110a0
movb $0x0, (%rax)
jmp 0xa1f2
leaq 0x65d0(%rip), %rax      # 0x10738
movq (%rax), %rdi
callq 0x10f0
movb %al, -0x32(%rbp)
movl $0x0, -0x38(%rbp)
movb $0x0, -0x31(%rbp)
xorl %eax, %eax
cmpl $0x10c, -0x38(%rbp)     # imm = 0x10C
movb %al, -0x4a(%rbp)
jge 0xa1a7
movsbl -0x31(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x4a(%rbp)
je 0xa1a7
movsbl -0x31(%rbp), %eax
cmpl $-0x1, %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0xa1b0
jmp 0xa1db
leaq 0x6581(%rip), %rax      # 0x10738
movq (%rax), %rdi
callq 0x10f0
movslq -0x38(%rbp), %rdx
leaq 0x6ed6(%rip), %rcx      # 0x110a0
movb %al, (%rcx,%rdx)
movb %al, -0x31(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa17e
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
movslq %eax, %rcx
leaq 0x6eb2(%rip), %rax      # 0x110a0
movb $0x0, (%rax,%rcx)
movsbl -0x31(%rbp), %eax
cmpl $-0x1, %eax
jne 0xa200
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x46, %eax
jne 0xa221
leaq 0x64a0(%rip), %rdi      # 0x106b0
leaq 0x6e89(%rip), %rsi      # 0x110a0
callq 0x1070
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x53, %eax
jne 0xa247
movb $0x0, %al
callq 0x6cb0
leaq 0x6e58(%rip), %rax      # 0x11090
movq (%rax), %rsi
leaq 0x687e(%rip), %rdi      # 0x10ac0
callq 0x1070
movl -0x48(%rbp), %eax
leaq 0x691f(%rip), %rcx      # 0x10b70
cmpl (%rcx), %eax
jle 0xa307
movl $0x6, -0x48(%rbp)
leaq 0x6819(%rip), %rax      # 0x10a80
movq (%rax), %rdi
movsbl -0x33(%rbp), %edx
movl -0x40(%rbp), %eax
leaq 0x37ba(%rip), %rsi      # 0xda32
leaq 0x6901(%rip), %rcx      # 0x10b80
leaq 0x37d4(%rip), %r8       # 0xda5a
leaq 0x69b3(%rip), %r9       # 0x10c40
addq $0x4, %r9
movl %eax, (%rsp)
movb $0x0, %al
callq 0x1120
movb $0xc, -0x33(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0xa2c0
leaq 0x67d4(%rip), %rax      # 0x10a80
movq (%rax), %rdi
movl -0x44(%rbp), %edx
leaq 0x37a6(%rip), %rsi      # 0xda5f
movb $0x0, %al
callq 0x1120
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x67b0(%rip), %rax      # 0x10a80
movq (%rax), %rdi
leaq 0x3789(%rip), %rsi      # 0xda63
leaq 0x67df(%rip), %rdx      # 0x10ac0
leaq 0x63c8(%rip), %rcx      # 0x106b0
movb $0x0, %al
callq 0x1120
leaq 0x678a(%rip), %rax      # 0x10a80
movq (%rax), %rdi
leaq 0x376d(%rip), %rsi      # 0xda6d
movb $0x0, %al
callq 0x1120
movsbl -0x32(%rbp), %eax
cmpl $0x70, %eax
jne 0xa32c
movl $0x3e7, -0x48(%rbp)     # imm = 0x3E7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x66, %eax
jne 0xa391
movl $0x0, -0x38(%rbp)
leaq 0x682d(%rip), %rax      # 0x10b70
movl $0x0, (%rax)
movslq -0x38(%rbp), %rcx
leaq 0x6d4c(%rip), %rax      # 0x110a0
cmpb $0x0, (%rax,%rcx)
je 0xa38c
leaq 0x680f(%rip), %rax      # 0x10b70
imull $0xa, (%rax), %ecx
movslq -0x38(%rbp), %rdx
leaq 0x6d31(%rip), %rax      # 0x110a0
movsbl (%rax,%rdx), %eax
addl %eax, %ecx
subl $0x30, %ecx
leaq 0x67f1(%rip), %rax      # 0x10b70
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xa349
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x73, %eax
jne 0xa403
leaq 0x6cff(%rip), %rdi      # 0x110a0
leaq 0x36af(%rip), %rsi      # 0xda57
leaq -0x3c(%rbp), %rdx
movb $0x0, %al
callq 0x1170
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xa3fe
movl -0x48(%rbp), %eax
leaq 0x67a4(%rip), %rcx      # 0x10b70
cmpl (%rcx), %eax
jge 0xa3e8
leaq 0x66a9(%rip), %rax      # 0x10a80
movq (%rax), %rdi
leaq 0x36be(%rip), %rsi      # 0xda9f
movb $0x0, %al
callq 0x1120
jmp 0xa3ea
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xa3ba
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x4c, %eax
jne 0xa43e
leaq 0x6c8d(%rip), %rax      # 0x110a0
movsbl (%rax), %ecx
subl $0x31, %ecx
leaq 0x6740(%rip), %rax      # 0x10b60
movl %ecx, (%rax)
leaq 0x6c77(%rip), %rax      # 0x110a0
movsbl 0x1(%rax), %ecx
subl $0x30, %ecx
leaq 0x672d(%rip), %rax      # 0x10b64
movl %ecx, (%rax)
jmp 0xa0c0
movsbl -0x32(%rbp), %eax
cmpl $0x6c, %eax
jne 0xa44c
jmp 0xa0c0
movsbl -0x13(%rbp), %eax
cmpl $0x20, %eax
setne %al
andb $0x1, %al
movzbl %al, %ecx
leaq 0x66ea(%rip), %rax      # 0x10b4c
movl %ecx, (%rax)
movsbl -0x32(%rbp), %eax
cmpl $0x4d, %eax
jne 0xa47d
leaq 0x66d8(%rip), %rax      # 0x10b4c
cmpl $0x0, (%rax)
jne 0xa47d
movb $0x2b, -0x13(%rbp)
callq 0x1200
movq (%rax), %rax
movsbl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax           # imm = 0x1000
movb %al, %cl
leaq 0x6e13(%rip), %rax      # 0x112b1
movb %cl, (%rax)
leaq 0x66bd(%rip), %rax      # 0x10b64
cmpl $0x0, (%rax)
je 0xa521
leaq 0x66ad(%rip), %rax      # 0x10b60
cmpl $0x1, (%rax)
je 0xa4df
leaq 0x668d(%rip), %rax      # 0x10b4c
cmpl $0x0, (%rax)
je 0xa4df
leaq 0x6695(%rip), %rax      # 0x10b60
cmpl $0x0, (%rax)
jne 0xa51f
leaq 0x6dda(%rip), %rax      # 0x112b1
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa51f
leaq 0x646e(%rip), %rax      # 0x10954
cmpl $0x0, (%rax)
jne 0xa4f3
movb $0x0, -0x12(%rbp)
movb $0x20, -0x13(%rbp)
leaq 0x6586(%rip), %rax      # 0x10a80
movq (%rax), %rdi
leaq -0x30(%rbp), %rdx
leaq 0x3599(%rip), %rsi      # 0xdaa1
leaq 0x6b91(%rip), %rcx      # 0x110a0
movb $0x0, %al
callq 0x1120
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xa521
jmp 0xa0c0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)