// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/muse/muse.c
// Function: main
int
main(int argc, char **argv)
{
	Optctx ctx;
	size_t i;
	FILE *f;

	localincpath = ".";
	optinit(&ctx, "sd:hmo:p:l:", argv, argc);
	while (!optdone(&ctx)) {
		switch (optnext(&ctx)) {
		case 'h':
			usage(argv[0]);
			exit(0);
			break;
		case 'p':
			pkgname = ctx.optarg;
			break;
		case 'o':
			outfile = ctx.optarg;
			break;
		case 'd':
			while (ctx.optarg && *ctx.optarg)
				debugopt[*ctx.optarg++ & 0x7f] = 1;
			break;
		case 'l':
			lappend(&extralibs, &nextralibs, ctx.optarg);
			break;
		default:
			usage(argv[0]);
			exit(0);
			break;
		}
	}

	if (!outfile && !show) {
		fprintf(stderr, "output file needed when merging usefiles.\n");
		exit(1);
	}
	if (!pkgname) {
		fprintf(stderr, "package needed when merging usefiles.\n");
		exit(1);
	}

	/* read and parse the file */
	initfile(&file, outfile);
	updatens(file.globls, pkgname);
	for (i = 0; i < ctx.nargs; i++)
		mergeuse(ctx.args[i]);
	loaduses();
	infer();
	tagexports(1);
	addextlibs(extralibs, nextralibs);

	/* generate the usefile */
	f = fopen(outfile, "w");
	writeuse(f);
	fclose(f);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq 0x15e1b(%rip), %rax     # 0x182bf
movq %rax, 0x1d765(%rip)     # 0x1fc10
movslq %edi, %rcx
leaq 0x13b73(%rip), %rsi     # 0x16028
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x15300
movq %r14, %rdi
callq 0x15467
testl %eax, %eax
jne 0x257a
movq %rsp, %r14
leaq 0x1d753(%rip), %r13     # 0x1fc30
leaq 0x13b20(%rip), %rbp     # 0x16004
leaq 0x1d7c5(%rip), %r15     # 0x1fcb0
leaq 0x1d7c6(%rip), %r12     # 0x1fcb8
movq %r14, %rdi
callq 0x15385
leal -0x68(%rax), %ecx
cmpl $0x8, %ecx
ja 0x251d
movslq (%rbp,%rcx,4), %rax
addq %rbp, %rax
jmpq *%rax
movq (%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x13ef7
jmp 0x256a
cmpl $0x64, %eax
jne 0x2684
movq (%rsp), %rax
testq %rax, %rax
je 0x256a
cmpb $0x0, (%rax)
je 0x256a
incq %rax
movq %rax, (%rsp)
movzbl -0x1(%rax), %ecx
andl $0x7f, %ecx
movb $0x1, (%rcx,%r13)
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x2537
jmp 0x256a
movq (%rsp), %rax
movq %rax, 0x1d6bb(%rip)     # 0x1fc18
jmp 0x256a
movq (%rsp), %rax
movq %rax, 0x1d6b6(%rip)     # 0x1fc20
movq %r14, %rdi
callq 0x15467
testl %eax, %eax
je 0x24f2
movq 0x1d69f(%rip), %rsi     # 0x1fc20
testq %rsi, %rsi
jne 0x2593
cmpl $0x0, 0x1d733(%rip)     # 0x1fcc0
je 0x2693
cmpq $0x0, 0x1d67d(%rip)     # 0x1fc18
je 0x2698
leaq 0x1d720(%rip), %rdi     # 0x1fcc8
callq 0x9420
movq 0x1d7a4(%rip), %rdi     # 0x1fd58
movq 0x1d65d(%rip), %rsi     # 0x1fc18
callq 0xc0e1
cmpq $0x0, 0x10(%rsp)
je 0x261e
xorl %r13d, %r13d
leaq 0x14f77(%rip), %rbx     # 0x17549
movq 0x8(%rsp), %rax
movq (%rax,%r13,8), %r14
movq 0x1d776(%rip), %r15     # 0x1fd58
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21d0
testq %rax, %rax
je 0x267c
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x10a4d
movq %r12, %rdi
callq 0x20a0
incq %r13
cmpq 0x10(%rsp), %r13
jb 0x25d2
callq 0x11918
callq 0x36f4
movl $0x1, %edi
callq 0x27f7
movq 0x1d677(%rip), %rdi     # 0x1fcb0
movq 0x1d678(%rip), %rsi     # 0x1fcb8
callq 0xfe98
movq 0x1d5d4(%rip), %rdi     # 0x1fc20
leaq 0x13a33(%rip), %rsi     # 0x16086
callq 0x21d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x11954
movq %rbx, %rdi
callq 0x20a0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x2265
movq (%rbx), %rdi
callq 0x269d
xorl %edi, %edi
callq 0x21f0
callq 0x2240
callq 0x2289