// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/getopt/main.c
// Function: main
int
main(int argc, char * argv[])
{
	int argc_orig = argc;
	char ** argv_orig = argv;
	const char * ch;
	int bflag = 0;

	/* Process the arguments without GETOPT_MISSING_ARG. */
	while ((ch = GETOPT(argc, argv)) != NULL) {
		fprintf(stderr, "Option being processed: %s\n", ch);
		WARNING_UNINITIALIZED_SUPPRESS
		GETOPT_SWITCH(ch) {
		GETOPT_OPT("-b"):
			/* FALLTHROUGH */
		GETOPT_OPT("--bar"):
			bflag++;
			break;
		GETOPT_OPTARG("-f"):
			/* FALLTHROUGH */
		GETOPT_OPTARG("--foo"):
			fprintf(stderr, "foo: %s\n", optarg);
			break;
		GETOPT_DEFAULT:
			WARNING_UNINITIALIZED_ALLOW
			/*
			 * We can't call usage(), because that would exit(1).
			 * This test deliberately does not include
			 * GETOPT_MISSING_ARG, so it is likely that we will
			 * reach this point.
			 */
			fprintf(stderr, "usage: blah blah blah\n");
		}
	}
	argc -= optind;
	argv += optind;

	/* Output some status. */
	fprintf(stderr, "bflag = %d\n", bflag);
	fprintf(stderr, "Remaining arguments:");
	while (argc > 0) {
		fprintf(stderr, " %s", *argv);
		argc--;
		argv++;
	}
	fprintf(stderr, "\n");

	/* Reset getopt state. */
	optreset = 1;
	argc = argc_orig;
	argv = argv_orig;
	bflag = 0;

	/*
	 * Process the arguments again, with GETOPT_MISSING_ARG this time.
	 * This should be in the same function as before, to make sure
	 * that we're not (ab)using any function-local language constructs.
	 */
	while ((ch = GETOPT(argc, argv)) != NULL) {
		fprintf(stderr, "Option being processed: %s\n", ch);
		WARNING_UNINITIALIZED_SUPPRESS
		GETOPT_SWITCH(ch) {
		GETOPT_OPT("-b"):
			/* FALLTHROUGH */
		GETOPT_OPT("--bar"):
			bflag++;
			break;
		GETOPT_OPTARG("-f"):
			/* FALLTHROUGH */
		GETOPT_OPTARG("--foo"):
			fprintf(stderr, "foo: %s\n", optarg);
			break;
		GETOPT_MISSING_ARG:
			fprintf(stderr, "missing argument\n");
		GETOPT_DEFAULT:
			WARNING_UNINITIALIZED_ALLOW
			usage();
		}
	}
	argc -= optind;
	argv += optind;

	/*
	 * Silence "value stored is never read" warnings; the adjustments to
	 * arg[cv] at the end of the argument-parsing loop are idiomatic.
	 */
	(void)argc;
	(void)argv;

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3e82(%rip), %r15      # 0x5088
movq 0x3deb(%rip), %r13      # 0x4ff8
leaq 0x1e50(%rip), %r12      # 0x3064
movl $0x0, 0xc(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1768
testq %rax, %rax
jne 0x1296
movslq (%r15), %rax
movl %ebp, %r12d
movl %ebp, %r14d
subl %eax, %r14d
movq %rbx, %r15
leaq (%rbx,%rax,8), %rbx
movq (%r13), %rdi
leaq 0x1e96(%rip), %rsi      # 0x30df
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0x10a0
movq (%r13), %rcx
leaq 0x1e8c(%rip), %rdi      # 0x30eb
pushq $0x14
popq %rsi
pushq $0x1
popq %rdx
callq 0x10e0
movq %r13, %rbp
movq (%r13), %rsi
testl %r14d, %r14d
jle 0x12cd
movq (%rbx), %rdx
movq %rsi, %rdi
leaq 0x20c2(%rip), %rsi      # 0x3345
xorl %eax, %eax
callq 0x10a0
decl %r14d
addq $0x8, %rbx
movq %rbp, %r13
jmp 0x126a
movq %rax, %r14
movq (%r13), %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10a0
movq $0x2b, 0x18(%rsp)
movq 0x18(%rsp), %rax
decq %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
jmp 0x1508
pushq $0xa
popq %rdi
callq 0x1080
leaq 0x3db4(%rip), %rax      # 0x5090
movl $0x1, (%rax)
movl $0x0, 0xc(%rsp)
movq %rbp, %r13
movq %r15, %rbx
movl %r12d, %ebp
leaq 0x3d8e(%rip), %r15      # 0x5088
leaq 0x1d63(%rip), %r12      # 0x3064
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1768
testq %rax, %rax
je 0x16b8
movq %rax, %r14
movq (%r13), %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10a0
movq $0x5c, 0x10(%rsp)
movq 0x10(%rsp), %rax
decq %rax
movq %rax, 0x28(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x3d63(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
je 0x1361
movq %r14, %rdi
callq 0x1b7d
addq 0x10(%rsp), %rax
jmp 0x136f
movq 0x28(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x28(%rsp)
addq $-0x5d, %rax
cmpq $0xc, %rax
ja 0x13fe
leaq 0x1c80(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3d1c(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x142e
pushq $0x5d
popq %rsi
subq 0x10(%rsp), %rsi
leaq 0x1cd4(%rip), %rdi      # 0x3080
xorl %edx, %edx
callq 0x1c95
leaq 0x289(%rip), %rax       # 0x1643
jmpq *%rax
leaq 0x3ced(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x14ca
pushq $0x62
popq %rsi
subq 0x10(%rsp), %rsi
leaq 0x1cdb(%rip), %rdi      # 0x30b6
pushq $0x1
popq %rdx
callq 0x1c95
leaq 0x259(%rip), %rax       # 0x1643
jmpq *%rax
leaq 0x3cbd(%rip), %rax      # 0x50b0
movl $0x1, (%rax)
jmp 0x1301
leaq 0x3cab(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x16df
cmpl $0x0, 0x20(%rsp)
je 0x14ac
leaq 0x223(%rip), %rax       # 0x1643
jmpq *%rax
leaq 0x3c87(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
je 0x148d
incl 0xc(%rsp)
jmp 0x1301
leaq 0x3c72(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x14de
pushq $0x64
popq %rsi
subq 0x10(%rsp), %rsi
leaq 0x1c63(%rip), %rdi      # 0x30b9
pushq $0x1
popq %rdx
callq 0x1c95
leaq 0x1de(%rip), %rax       # 0x1643
jmpq *%rax
leaq 0x3c42(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x16c9
pushq $0x67
popq %rdi
subq 0x10(%rsp), %rdi
callq 0x1e5f
leaq 0x1b8(%rip), %rax       # 0x1643
jmpq *%rax
pushq $0x5f
popq %rsi
subq 0x10(%rsp), %rsi
leaq 0x1be7(%rip), %rdi      # 0x3083
xorl %edx, %edx
callq 0x1c95
leaq 0x199(%rip), %rax       # 0x1643
jmpq *%rax
pushq $0x69
popq %rdi
subq 0x10(%rsp), %rdi
callq 0x1eea
movl $0x1, 0x20(%rsp)
leaq 0x17b(%rip), %rax       # 0x1643
jmpq *%rax
leaq 0x3bd7(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
jne 0x14f1
jmp 0x1748
leaq 0x3bc3(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
je 0x172f
movq (%r13), %rdi
leaq 0x1bc3(%rip), %rsi      # 0x30bf
xorl %eax, %eax
callq 0x10a0
jmp 0x1301
leaq 0x3ba1(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
je 0x1523
movq %r14, %rdi
callq 0x1b7d
addq 0x18(%rsp), %rax
jmp 0x1531
movq 0x30(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rsp)
addq $-0x2c, %rax
cmpq $0xa, %rax
ja 0x1609
leaq 0x1af2(%rip), %rcx      # 0x3038
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3b5a(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x1648
pushq $0x2c
popq %rsi
subq 0x18(%rsp), %rsi
leaq 0x1b12(%rip), %rdi      # 0x3080
xorl %edx, %edx
callq 0x1c95
leaq -0x74(%rip), %rax       # 0x1508
jmpq *%rax
leaq 0x3b2b(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x1692
pushq $0x31
popq %rsi
subq 0x18(%rsp), %rsi
leaq 0x1b19(%rip), %rdi      # 0x30b6
pushq $0x1
popq %rdx
callq 0x1c95
leaq -0xa4(%rip), %rax       # 0x1508
jmpq *%rax
leaq 0x3afb(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x1648
pushq $0x2e
popq %rsi
subq 0x18(%rsp), %rsi
leaq 0x1ab6(%rip), %rdi      # 0x3083
xorl %edx, %edx
callq 0x1c95
leaq -0xd3(%rip), %rax       # 0x1508
jmpq *%rax
leaq 0x3acc(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x1663
pushq $0x33
popq %rsi
subq 0x18(%rsp), %rsi
leaq 0x1ac1(%rip), %rdi      # 0x30b9
pushq $0x1
popq %rdx
callq 0x1c95
leaq -0xff(%rip), %rax       # 0x1508
jmpq *%rax
leaq 0x3aa0(%rip), %rax      # 0x50b0
cmpl $0x0, (%rax)
jne 0x1677
cmpl $0x0, 0x24(%rsp)
je 0x1625
leaq -0x11b(%rip), %rax      # 0x1508
jmpq *%rax
pushq $0x36
popq %rdi
subq 0x18(%rsp), %rdi
callq 0x1eea
movl $0x1, 0x24(%rsp)
leaq -0x139(%rip), %rax      # 0x1508
jmpq *%rax
jmp 0x1346
incl 0xc(%rsp)
jmp 0x121c
leaq 0x3a58(%rip), %rax      # 0x50b0
movl $0x1, (%rax)
jmp 0x121c
leaq 0x3a3e(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
jne 0x16a1
jmp 0x16fd
movq (%r13), %rcx
leaq 0x1a46(%rip), %rdi      # 0x30c8
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x10e0
jmp 0x121c
leaq 0x3a0f(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
je 0x1716
movq (%r13), %rdi
leaq 0x1a13(%rip), %rsi      # 0x30bf
xorl %eax, %eax
callq 0x10a0
jmp 0x121c
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rcx
leaq 0x1a2c(%rip), %rdi      # 0x3100
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
callq 0x10e0
movq (%r13), %rcx
leaq 0x1a28(%rip), %rdi      # 0x3112
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x10e0
pushq $0x1
popq %rdi
callq 0x10d0
leaq 0x1985(%rip), %rdi      # 0x3089
leaq 0x198d(%rip), %rsi      # 0x3098
leaq 0x198d(%rip), %rcx      # 0x309f
pushq $0x33
jmp 0x175f
leaq 0x196c(%rip), %rdi      # 0x3089
leaq 0x1974(%rip), %rsi      # 0x3098
leaq 0x1974(%rip), %rcx      # 0x309f
pushq $0x31
jmp 0x175f
leaq 0x1953(%rip), %rdi      # 0x3089
leaq 0x195b(%rip), %rsi      # 0x3098
leaq 0x195b(%rip), %rcx      # 0x309f
pushq $0x64
jmp 0x175f
leaq 0x193a(%rip), %rdi      # 0x3089
leaq 0x1942(%rip), %rsi      # 0x3098
leaq 0x1942(%rip), %rcx      # 0x309f
pushq $0x62
popq %rdx
callq 0x1070
nopl (%rax)