// File: /workspace/github_c_makefile_star2_O0/darwin-on-arm[P]darwin-sdk/developer_cmds/unifdef/unifdef.c
// Function: main
int
main(int argc, char *argv[])
{
	int opt;

	while ((opt = getopt(argc, argv, "i:D:U:I:o:bBcdeKklnsStV")) != -1)
		switch (opt) {
		case 'i': /* treat stuff controlled by these symbols as text */
			/*
			 * For strict backwards-compatibility the U or D
			 * should be immediately after the -i but it doesn't
			 * matter much if we relax that requirement.
			 */
			opt = *optarg++;
			if (opt == 'D')
				addsym(true, true, optarg);
			else if (opt == 'U')
				addsym(true, false, optarg);
			else
				usage();
			break;
		case 'D': /* define a symbol */
			addsym(false, true, optarg);
			break;
		case 'U': /* undef a symbol */
			addsym(false, false, optarg);
			break;
		case 'I': /* no-op for compatibility with cpp */
			break;
		case 'b': /* blank deleted lines instead of omitting them */
		case 'l': /* backwards compatibility */
			lnblank = true;
			break;
		case 'B': /* compress blank lines around removed section */
			compblank = true;
			break;
		case 'c': /* treat -D as -U and vice versa */
			complement = true;
			break;
		case 'd':
			debugging = true;
			break;
		case 'e': /* fewer errors from dodgy lines */
			iocccok = true;
			break;
		case 'K': /* keep ambiguous #ifs */
			strictlogic = true;
			break;
		case 'k': /* process constant #ifs */
			killconsts = true;
			break;
		case 'n': /* add #line directive after deleted lines */
			lnnum = true;
			break;
		case 'o': /* output to a file */
			ofilename = optarg;
			break;
		case 's': /* only output list of symbols that control #ifs */
			symlist = true;
			break;
		case 'S': /* list symbols with their nesting depth */
			symlist = symdepth = true;
			break;
		case 't': /* don't parse C comments */
			text = true;
			break;
		case 'V': /* print version */
			version();
		default:
			usage();
		}
	argc -= optind;
	argv += optind;
	if (compblank && lnblank)
		errx(2, "-B and -b are mutually exclusive");
	if (argc > 1) {
		errx(2, "can only do one file");
	} else if (argc == 1 && strcmp(*argv, "-") != 0) {
		filename = *argv;
		input = fopen(filename, "rb");
		if (input == NULL)
			err(2, "can't open %s", filename);
	} else {
		filename = "[stdin]";
		input = stdin;
	}
	if (ofilename == NULL) {
		ofilename = "[stdout]";
		output = stdout;
	} else {
		struct stat ist, ost;
		if (stat(ofilename, &ost) == 0 &&
		    fstat(fileno(input), &ist) == 0)
			overwriting = (ist.st_dev == ost.st_dev
				    && ist.st_ino == ost.st_ino);
		if (overwriting) {
			const char *dirsep;
			int ofd;

			dirsep = strrchr(ofilename, '/');
			if (dirsep != NULL)
				snprintf(tempname, sizeof(tempname),
				    "%.*s/" TEMPLATE,
				    (int)(dirsep - ofilename), ofilename);
			else
				snprintf(tempname, sizeof(tempname),
				    TEMPLATE);
			ofd = mkstemp(tempname);
			if (ofd != -1)
				output = fdopen(ofd, "wb+");
			if (output == NULL)
				err(2, "can't create temporary file");
			fchmod(ofd, ist.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO));
		} else {
			output = fopen(ofilename, "wb");
			if (output == NULL)
				err(2, "can't open %s", ofilename);
		}
	}
	process();
	abort(); /* bug */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x2e1d(%rip), %rdx      # 0x61d4
callq 0x3240
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x3524
movl -0x14(%rbp), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x150(%rbp)
subl $0x32, %eax
ja 0x351a
movq -0x150(%rbp), %rax
leaq 0x2c22(%rip), %rcx      # 0x6010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x5bda(%rip), %rax      # 0x8fd8
movq (%rax), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq 0x5bc9(%rip), %rcx      # 0x8fd8
movq %rdx, (%rcx)
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x44, -0x14(%rbp)
jne 0x3436
movq 0x5bb3(%rip), %rax      # 0x8fd8
movq (%rax), %rdx
movl $0x1, %esi
movl %esi, %edi
callq 0x3800
jmp 0x345b
cmpl $0x55, -0x14(%rbp)
jne 0x3454
movq 0x5b95(%rip), %rax      # 0x8fd8
movq (%rax), %rdx
movl $0x1, %edi
xorl %esi, %esi
callq 0x3800
jmp 0x3459
callq 0x39a0
jmp 0x345b
jmp 0x351f
movq 0x5b71(%rip), %rax      # 0x8fd8
movq (%rax), %rdx
xorl %edi, %edi
movl $0x1, %esi
callq 0x3800
jmp 0x351f
movq 0x5b56(%rip), %rax      # 0x8fd8
movq (%rax), %rdx
xorl %esi, %esi
movl %esi, %edi
callq 0x3800
jmp 0x351f
jmp 0x351f
movb $0x1, 0x5cd1(%rip)      # 0x9170
jmp 0x351f
movb $0x1, 0x5cc9(%rip)      # 0x9171
jmp 0x351f
movb $0x1, 0x5cc1(%rip)      # 0x9172
jmp 0x351f
movb $0x1, 0x5cb9(%rip)      # 0x9173
jmp 0x351f
movb $0x1, 0x5cb1(%rip)      # 0x9174
jmp 0x351f
movb $0x1, 0x5ca9(%rip)      # 0x9175
jmp 0x351f
movb $0x1, 0x5ca1(%rip)      # 0x9176
jmp 0x351f
movb $0x1, 0x5c99(%rip)      # 0x9177
jmp 0x351f
movq 0x5af1(%rip), %rax      # 0x8fd8
movq (%rax), %rax
movq %rax, 0x5c87(%rip)      # 0x9178
jmp 0x351f
movb $0x1, 0x5c86(%rip)      # 0x9180
jmp 0x351f
movb $0x1, 0x5c7e(%rip)      # 0x9181
movb $0x1, 0x5c76(%rip)      # 0x9180
jmp 0x351f
movb $0x1, 0x5c6f(%rip)      # 0x9182
jmp 0x351f
callq 0x39d0
callq 0x39a0
jmp 0x33a9
movq 0x5aa5(%rip), %rax      # 0x8fd0
movl (%rax), %ecx
movl -0x8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x8(%rbp)
movq 0x5a94(%rip), %rax      # 0x8fd0
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x5c1a(%rip)      # 0x9171
je 0x3575
testb $0x1, 0x5c10(%rip)      # 0x9170
je 0x3575
movl $0x2, %edi
leaq 0x2c7e(%rip), %rsi      # 0x61ec
movb $0x0, %al
callq 0x30e0
cmpl $0x1, -0x8(%rbp)
jle 0x358e
movl $0x2, %edi
leaq 0x2c86(%rip), %rsi      # 0x620d
movb $0x0, %al
callq 0x30e0
cmpl $0x1, -0x8(%rbp)
jne 0x35fa
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2c80(%rip), %rsi      # 0x6222
callq 0x3170
cmpl $0x0, %eax
je 0x35fa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x5bce(%rip)      # 0x9188
movq 0x5bc7(%rip), %rdi      # 0x9188
leaq 0x2c5c(%rip), %rsi      # 0x6224
callq 0x3220
movq %rax, 0x5bbc(%rip)      # 0x9190
cmpq $0x0, 0x5bb4(%rip)      # 0x9190
jne 0x35f8
movq 0x5ba3(%rip), %rdx      # 0x9188
movl $0x2, %edi
leaq 0x2c36(%rip), %rsi      # 0x6227
movb $0x0, %al
callq 0x31d0
jmp 0x3619
leaq 0x2c34(%rip), %rax      # 0x6235
movq %rax, 0x5b80(%rip)      # 0x9188
movq 0x59b9(%rip), %rax      # 0x8fc8
movq (%rax), %rax
movq %rax, 0x5b77(%rip)      # 0x9190
jmp 0x361b
cmpq $0x0, 0x5b55(%rip)      # 0x9178
jne 0x3649
leaq 0x2c11(%rip), %rax      # 0x623d
movq %rax, 0x5b45(%rip)      # 0x9178
movq 0x5986(%rip), %rax      # 0x8fc0
movq (%rax), %rax
movq %rax, 0x5b54(%rip)      # 0x9198
jmp 0x37e8
movq 0x5b28(%rip), %rdi      # 0x9178
leaq -0x138(%rbp), %rsi
callq 0x31a0
cmpl $0x0, %eax
jne 0x36bd
movq 0x5b28(%rip), %rdi      # 0x9190
callq 0x31c0
movl %eax, %edi
leaq -0xa8(%rbp), %rsi
callq 0x3270
cmpl $0x0, %eax
jne 0x36bd
movq -0xa8(%rbp), %rcx
xorl %eax, %eax
cmpq -0x138(%rbp), %rcx
movb %al, -0x151(%rbp)
jne 0x36af
movq -0xa0(%rbp), %rax
cmpq -0x130(%rbp), %rax
sete %al
movb %al, -0x151(%rbp)
movb -0x151(%rbp), %al
andb $0x1, %al
movb %al, 0x5ae3(%rip)       # 0x91a0
testb $0x1, 0x5adc(%rip)      # 0x91a0
je 0x37a6
movq 0x5aa7(%rip), %rdi      # 0x9178
movl $0x2f, %esi
callq 0x3130
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x140(%rbp)
je 0x3722
movq -0x140(%rbp), %rax
movq 0x5a7e(%rip), %rcx      # 0x9178
subq %rcx, %rax
movl %eax, %ecx
movq 0x5a72(%rip), %r8       # 0x9178
leaq 0x5aa3(%rip), %rdi      # 0x91b0
movl $0x1000, %esi           # imm = 0x1000
leaq 0x2b2d(%rip), %rdx      # 0x6246
movb $0x0, %al
callq 0x3120
jmp 0x373c
leaq 0x5a87(%rip), %rdi      # 0x91b0
movl $0x1000, %esi           # imm = 0x1000
leaq 0x2b16(%rip), %rdx      # 0x624b
movb $0x0, %al
callq 0x3120
leaq 0x5a6d(%rip), %rdi      # 0x91b0
callq 0x31f0
movl %eax, -0x144(%rbp)
cmpl $-0x1, -0x144(%rbp)
je 0x3770
movl -0x144(%rbp), %edi
leaq 0x2af6(%rip), %rsi      # 0x625a
callq 0x3200
movq %rax, 0x5a28(%rip)      # 0x9198
cmpq $0x0, 0x5a20(%rip)      # 0x9198
jne 0x378d
movl $0x2, %edi
leaq 0x2ad8(%rip), %rsi      # 0x625e
movb $0x0, %al
callq 0x31d0
movl -0x144(%rbp), %edi
movl -0x90(%rbp), %esi
andl $0x1ff, %esi            # imm = 0x1FF
callq 0x3210
jmp 0x37e6
movq 0x59cb(%rip), %rdi      # 0x9178
leaq 0x2ac6(%rip), %rsi      # 0x627a
callq 0x3220
movq %rax, 0x59d8(%rip)      # 0x9198
cmpq $0x0, 0x59d0(%rip)      # 0x9198
jne 0x37e4
movq 0x59a7(%rip), %rdx      # 0x9178
movl $0x2, %edi
leaq 0x2a4a(%rip), %rsi      # 0x6227
movb $0x0, %al
callq 0x31d0
jmp 0x37e6
jmp 0x37e8
callq 0x3a60
callq 0x3030
nopw %cs:(%rax,%rax)