// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3a5a(%rip), %r14      # 0x50b0
leaq 0x19db(%rip), %r15      # 0x3038
xorl %r13d, %r13d
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1ac8
testq %rax, %rax
jne 0x1681
movl %ebp, %edi
movl %r13d, %esi
movq %rbx, %rdx
callq 0x1100
xorl %r13d, %r13d
jmp 0x16c2
movq %rax, %r12
movq 0x396d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x19cf(%rip), %rsi      # 0x3064
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a0
movq $0x2b, 0x8(%rsp)
movq 0x8(%rsp), %rax
decq %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
jmp 0x18ac
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1ac8
testq %rax, %rax
je 0x1a2e
movq %rax, %r12
movq 0x3919(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x197b(%rip), %rsi      # 0x3064
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a0
movq $0x5c, (%rsp)
movq (%rsp), %rax
decq %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x10(%rsp)
cmpl $0x0, (%r14)
je 0x1723
movq %r12, %rdi
callq 0x1df3
addq (%rsp), %rax
jmp 0x1731
movq 0x18(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rsp)
addq $-0x5d, %rax
cmpq $0xc, %rax
ja 0x1773
leaq 0x18c2(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, (%r14)
je 0x181a
cmpl $0x0, (%r14)
je 0x17fa
incl %r13d
jmp 0x16c2
movl $0x1, (%r14)
jmp 0x16c2
cmpl $0x0, (%r14)
jne 0x1a44
cmpl $0x0, 0x10(%rsp)
je 0x185d
leaq 0x250(%rip), %rax       # 0x19df
jmpq *%rax
cmpl $0x0, (%r14)
je 0x183a
leaq 0x3906(%rip), %rax      # 0x50a8
cmpq $0x0, (%rax)
je 0x1aa6
cmpl $0x0, (%r14)
jne 0x187c
movl $0x64, %esi
subq (%rsp), %rsi
leaq 0x18f3(%rip), %rdi      # 0x30b9
movl $0x1, %edx
callq 0x1eb0
leaq 0x208(%rip), %rax       # 0x19df
jmpq *%rax
cmpl $0x0, (%r14)
jne 0x1a3f
movl $0x67, %edi
subq (%rsp), %rdi
callq 0x1fc7
leaq 0x1e7(%rip), %rax       # 0x19df
jmpq *%rax
movl $0x5f, %esi
subq (%rsp), %rsi
leaq 0x1879(%rip), %rdi      # 0x3083
xorl %edx, %edx
callq 0x1eb0
leaq 0x1c7(%rip), %rax       # 0x19df
jmpq *%rax
movl $0x5d, %esi
subq (%rsp), %rsi
leaq 0x1856(%rip), %rdi      # 0x3080
xorl %edx, %edx
callq 0x1eb0
leaq 0x1a7(%rip), %rax       # 0x19df
jmpq *%rax
movl $0x62, %esi
subq (%rsp), %rsi
leaq 0x186c(%rip), %rdi      # 0x30b6
movl $0x1, %edx
callq 0x1eb0
leaq 0x184(%rip), %rax       # 0x19df
jmpq *%rax
movl $0x69, %edi
subq (%rsp), %rdi
callq 0x2007
movl $0x1, 0x10(%rsp)
leaq 0x165(%rip), %rax       # 0x19df
jmpq *%rax
leaq 0x3825(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
je 0x1a68
movq 0x3762(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x181f(%rip), %rsi      # 0x30bf
xorl %eax, %eax
callq 0x10a0
jmp 0x16c2
cmpl $0x0, (%r14)
je 0x18c1
movq %r12, %rdi
callq 0x1df3
addq 0x8(%rsp), %rax
jmp 0x18cf
movq 0x20(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rsp)
addq $-0x2c, %rax
cmpq $0xa, %rax
ja 0x1960
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
cmpl $0x0, (%r14)
je 0x197a
cmpl $0x0, (%r14)
jne 0x19e4
movl $0x2e, %esi
subq 0x8(%rsp), %rsi
leaq 0x1778(%rip), %rdi      # 0x3083
xorl %edx, %edx
callq 0x1eb0
leaq -0x6d(%rip), %rax       # 0x18ac
jmpq *%rax
cmpl $0x0, (%r14)
je 0x199b
leaq 0x3780(%rip), %rax      # 0x50a8
cmpq $0x0, (%rax)
je 0x1a87
cmpl $0x0, (%r14)
jne 0x19ec
movl $0x33, %esi
subq 0x8(%rsp), %rsi
leaq 0x176c(%rip), %rdi      # 0x30b9
movl $0x1, %edx
callq 0x1eb0
leaq -0xb2(%rip), %rax       # 0x18ac
jmpq *%rax
cmpl $0x0, (%r14)
jne 0x1a24
cmpl $0x0, 0x14(%rsp)
je 0x19bf
leaq -0xcc(%rip), %rax       # 0x18ac
jmpq *%rax
movl $0x2c, %esi
subq 0x8(%rsp), %rsi
leaq 0x16f5(%rip), %rdi      # 0x3080
xorl %edx, %edx
callq 0x1eb0
leaq -0xed(%rip), %rax       # 0x18ac
jmpq *%rax
movl $0x31, %esi
subq 0x8(%rsp), %rsi
leaq 0x170a(%rip), %rdi      # 0x30b6
movl $0x1, %edx
callq 0x1eb0
leaq -0x111(%rip), %rax      # 0x18ac
jmpq *%rax
movl $0x36, %edi
subq 0x8(%rsp), %rdi
callq 0x2007
movl $0x1, 0x14(%rsp)
leaq -0x131(%rip), %rax      # 0x18ac
jmpq *%rax
jmp 0x170f
incl %r13d
jmp 0x1660
leaq 0x36b5(%rip), %rax      # 0x50a8
movq (%rax), %rdx
testq %rdx, %rdx
je 0x1a49
movq 0x35f6(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x16b3(%rip), %rsi      # 0x30bf
xorl %eax, %eax
callq 0x10a0
jmp 0x1660
movl $0x1, (%r14)
jmp 0x1660
callq 0x11db
jmp 0x1660
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x119a
callq 0x11b6
leaq 0x1639(%rip), %rdi      # 0x3089
leaq 0x1641(%rip), %rsi      # 0x3098
leaq 0x1641(%rip), %rcx      # 0x309f
movl $0x33, %edx
callq 0x1070
leaq 0x161a(%rip), %rdi      # 0x3089
leaq 0x1622(%rip), %rsi      # 0x3098
leaq 0x1622(%rip), %rcx      # 0x309f
movl $0x64, %edx
callq 0x1070
leaq 0x15fb(%rip), %rdi      # 0x3089
leaq 0x1603(%rip), %rsi      # 0x3098
leaq 0x1603(%rip), %rcx      # 0x309f
movl $0x31, %edx
callq 0x1070
leaq 0x15dc(%rip), %rdi      # 0x3089
leaq 0x15e4(%rip), %rsi      # 0x3098
leaq 0x15e4(%rip), %rcx      # 0x309f
movl $0x62, %edx
callq 0x1070
nopl (%rax)