// File: /workspace/github_c_makefile_star2_O2/michaelforney[P]cproc/main.c
// Function: main
int
main(int argc, char *argv[])
{
	bool pponly = false;
	char *output = NULL, *target = NULL;

	argv0 = progname(argv[0], "cproc-qbe");
	ARGBEGIN {
	case 'E':
		pponly = true;
		break;
	case 't':
		target = EARGF(usage());
		break;
	case 'o':
		output = EARGF(usage());
		break;
	default:
		usage();
	} ARGEND

	targinit(target);

	if (output && !freopen(output, "w", stdout))
		fatal("open %s:", output);

	if (argc) {
		while (argc--)
			scanfrom(argv[argc], NULL);
		scanopen();
	} else {
		scanfrom("<stdin>", stdin);
	}

	ppinit();
	if (pponly) {
		ppflags |= PPNEWLINE;
		while (tok.kind != TEOF) {
			tokenprint(&tok);
			next();
		}
	} else {
		scopeinit();
		while (tok.kind != TEOF) {
			if (!decl(&filescope, NULL)) {
				if (tok.kind == TSEMICOLON)
					error(&tok.loc, "unexpected ';' at top-level");
				error(&tok.loc, "expected declaration or function definition");
			}
		}
		emittentativedefns();
	}

	fflush(stdout);
	if (ferror(stdout))
		fatal("write failed");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
leaq 0x9f81(%rip), %rsi      # 0x13693
callq 0xd10c
leaq 0x12a1a(%rip), %rcx     # 0x1c138
movq %rax, (%rcx)
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %edi, %edi
xorl %eax, %eax
testl %ebp, %ebp
setg %al
leaq (%rbx,%rax,8), %rbx
subl %eax, %ebp
je 0x97f3
movq (%rbx), %rsi
cmpb $0x2d, (%rsi)
jne 0x97f0
cmpb $0x2d, 0x1(%rsi)
jne 0x975b
cmpb $0x0, 0x2(%rsi)
je 0x97ea
xorl %eax, %eax
movl %r12d, %ecx
leaq 0x1(%rsi), %rdx
testb %al, %al
jne 0x97d1
movq %rsi, %r8
movzbl (%rdx), %r9d
xorl %eax, %eax
movb $0x1, %r12b
movq %rdx, %rsi
cmpl $0x45, %r9d
je 0x975d
cmpl $0x6f, %r9d
je 0x97a7
cmpl $0x74, %r9d
jne 0x97d9
leaq 0x2(%r8), %rdi
movb $0x1, %al
cmpb $0x0, 0x2(%r8)
movl %ecx, %r12d
movq %rdi, %rsi
jne 0x975d
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
jne 0x97c3
jmp 0x97e5
leaq 0x2(%r8), %r14
movb $0x1, %al
cmpb $0x0, 0x2(%r8)
movl %ecx, %r12d
movq %r14, %rsi
jne 0x975d
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x97e5
addq $0x8, %rbx
decl %ebp
movl %ecx, %r12d
movq %rdx, %rsi
jmp 0x975d
movl %ecx, %r12d
jmp 0x972c
movl %ecx, %r12d
testl %r9d, %r9d
je 0x972c
callq 0x9930
addq $0x8, %rbx
decl %ebp
movl %ebp, %r15d
callq 0xc274
testq %r14, %r14
je 0x982c
movq 0x117bc(%rip), %rax     # 0x1afc0
movq (%rax), %rdx
leaq 0xb8b4(%rip), %rsi      # 0x150c2
movq %r14, %rdi
callq 0x3100
testq %rax, %rax
jne 0x982c
leaq 0x9e7b(%rip), %rdi      # 0x1369d
movq %r14, %rsi
xorl %eax, %eax
callq 0xcffb
testl %r15d, %r15d
je 0x984e
movslq %r15d, %r14
subq $0x1, %r14
jb 0x9847
movq (%rbx,%r14,8), %rdi
xorl %esi, %esi
callq 0xac3c
jmp 0x9834
callq 0xacfa
jmp 0x9864
movq 0x11773(%rip), %rax     # 0x1afc8
movq (%rax), %rsi
leaq 0x9e47(%rip), %rdi      # 0x136a6
callq 0xac3c
callq 0x9c08
testb $0x1, %r12b
je 0x9894
leaq 0x12772(%rip), %rax     # 0x1bfe8
orb $0x1, (%rax)
leaq 0x12888(%rip), %rbx     # 0x1c108
cmpl $0x1, (%rbx)
je 0x98f6
movq %rbx, %rdi
callq 0xc330
callq 0x9c1e
jmp 0x9880
callq 0xb620
leaq 0x12868(%rip), %r13     # 0x1c108
leaq 0x127f9(%rip), %rbx     # 0x1c0a0
leaq 0x8(%r13), %r14
leaq 0x9dfc(%rip), %r15      # 0x136ae
leaq 0x9e11(%rip), %r12      # 0x136ca
cmpl $0x1, (%r13)
je 0x98f1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x48e9
testb %al, %al
jne 0x98b9
cmpl $0x61, (%r13)
jne 0x98e2
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xc536
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0xc536
jmp 0x98b9
callq 0x5424
movq 0x116c3(%rip), %rbx     # 0x1afc0
movq (%rbx), %rdi
callq 0x3190
movq (%rbx), %rdi
callq 0x3060
testl %eax, %eax
je 0x991f
leaq 0x9dde(%rip), %rdi      # 0x136f6
xorl %eax, %eax
callq 0xcffb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq