// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/fork_func/main.c
// Function: main
int
main(int argc, char ** argv)
{
	int child_ms = -1;
	int num_reps = -1;
	const char * ch;
	enum modes mode = UNSET;

	WARNP_INIT;

	/* Process arguments. */
	while ((ch = GETOPT(argc, argv)) != NULL) {
		GETOPT_SWITCH(ch) {
		GETOPT_OPT("-c"):
			mode = CHECK_ORDER;
			break;
		GETOPT_OPTARG("-d"):
			if (PARSENUM(&child_ms, optarg, 0, 10000)) {
				warnp("parsenum");
				goto err0;
			}
			break;
		GETOPT_OPT("-e"):
			mode = CHECK_EXEC;
			break;
		GETOPT_OPTARG("-n"):
			if (PARSENUM(&num_reps, optarg, 0, 10000)) {
				warnp("parsenum");
				goto err0;
			}
			break;
		GETOPT_OPT("-t"):
			mode = PERFTEST;
			break;
		GETOPT_OPT("-x"):
			mode = CHECK_EXIT;
			break;
		GETOPT_DEFAULT:
			usage();
		}
	}
	argc -= optind;
	argv += optind;

	/* We should have processed all the arguments. */
	if (argc != 0)
		usage();
	(void)argv; /* argv is not used beyond this point. */

	/* Run test. */
	switch (mode) {
	case CHECK_ORDER:
		/* Sanity test. */
		if ((child_ms != -1) || (num_reps != -1))
			usage();

		/* Run check. */
		if (check_order())
			goto err0;
		break;
	case CHECK_EXEC:
		/* Sanity test. */
		if ((child_ms != -1) || (num_reps != -1))
			usage();

		/* Run check. */
		if (check_exec())
			goto err0;
		break;
	case CHECK_EXIT:
		/* Sanity test. */
		if ((child_ms != -1) || (num_reps != -1))
			usage();

		/* Run check. */
		if (check_exit())
			goto err0;
		break;
	case PERFTEST:
		/* Sanity test. */
		if ((child_ms == -1) || (num_reps == -1))
			usage();

		/* Run perftest. */
		if (check_perftest(child_ms, num_reps))
			goto err0;
		break;
	case UNSET:
		usage();
	}

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edi, %r13d
movq %rsi, 0x38(%rsp)
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x187f
callq 0x2bac
movl %r13d, %edi
movq 0x38(%rsp), %rsi
callq 0x237c
testq %rax, %rax
jne 0x18f0
movq $0x0, 0x20(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
leaq 0x38a4(%rip), %rax      # 0x5158
cmpl %r13d, (%rax)
jne 0x1c32
movl 0x20(%rsp), %eax
leaq 0x173c(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $-0x1, 0x8(%rsp)
jne 0x1c32
cmpl $-0x1, (%rsp)
jne 0x1c32
callq 0x1db8
jmp 0x1c27
movq %rax, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x387c(%rip), %r14      # 0x5188
leaq 0x1744(%rip), %rbp      # 0x3057
leaq 0x1740(%rip), %rbx      # 0x305a
leaq 0x173c(%rip), %r15      # 0x305d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl %r13d, 0x1c(%rsp)
movq $0x27, 0x10(%rsp)
movq 0x10(%rsp), %rax
decq %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x0, (%r14)
je 0x1963
movq %r12, %rdi
callq 0x26a7
addq 0x10(%rsp), %rax
jmp 0x1971
movq 0x40(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x40(%rsp)
cmpq $0x33, %rax
jle 0x19ad
cmpq $0x3c, %rax
jg 0x19e4
cmpq $0x34, %rax
je 0x1a07
cmpq $0x3a, %rax
jne 0x1a77
cmpl $0x0, (%r14)
jne 0x1ba3
movl $0x3a, %esi
subq 0x10(%rsp), %rsi
movq %rbx, %rdi
jmp 0x1a3b
cmpq $0x28, %rax
je 0x1a20
cmpq $0x2b, %rax
je 0x1a47
cmpq $0x31, %rax
jne 0x1a77
cmpl $0x0, (%r14)
jne 0x1baa
movl $0x31, %esi
subq 0x10(%rsp), %rsi
leaq 0x1672(%rip), %rdi      # 0x3054
jmp 0x1a3b
cmpq $0x3d, %rax
jne 0x1a71
cmpl $0x0, (%r14)
jne 0x1ab4
movl $0x3d, %esi
subq 0x10(%rsp), %rsi
movq %r15, %rdi
jmp 0x1a3b
cmpl $0x0, (%r14)
jne 0x1abe
movl $0x34, %esi
subq 0x10(%rsp), %rsi
movq %rbp, %rdi
jmp 0x1a62
cmpl $0x0, (%r14)
jne 0x1b9c
movl $0x28, %esi
subq 0x10(%rsp), %rsi
leaq 0x15dd(%rip), %rdi      # 0x3018
xorl %edx, %edx
callq 0x2764
jmp 0x194e
cmpl $0x0, (%r14)
jne 0x1b33
movl $0x2b, %esi
subq 0x10(%rsp), %rsi
leaq 0x15e6(%rip), %rdi      # 0x3048
movl $0x1, %edx
callq 0x2764
jmp 0x194e
cmpq $0x40, %rax
je 0x1aa8
cmpl $0x0, (%r14)
jne 0x1c32
cmpl $0x0, 0x2c(%rsp)
jne 0x194e
movl $0x40, %edi
subq 0x10(%rsp), %rdi
callq 0x28bb
movl $0x1, 0x2c(%rsp)
jmp 0x194e
movl $0x1, (%r14)
jmp 0x1bc6
movl $0x3, %eax
jmp 0x1baf
leaq 0x36bb(%rip), %rax      # 0x5180
movq (%rax), %r13
testq %r13, %r13
je 0x1c57
callq 0x1080
movq %rax, %r12
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x1040
movq %rax, (%rsp)
movq 0x30(%rsp), %rcx
movl $0x16, %eax
cmpq %r13, %rcx
je 0x1bb6
cmpb $0x0, (%rcx)
movl 0x1c(%rsp), %r13d
jne 0x1bbb
cmpq $0x2711, (%rsp)         # imm = 0x2711
jb 0x1bbf
movl $0x22, %eax
movq $0x0, (%rsp)
jmp 0x1bbb
leaq 0x3646(%rip), %rax      # 0x5180
movq (%rax), %r13
testq %r13, %r13
je 0x1c76
callq 0x1080
movq %rax, %r12
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x1040
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rcx
movl $0x16, %eax
cmpq %r13, %rcx
je 0x1bb6
cmpb $0x0, (%rcx)
movl 0x1c(%rsp), %r13d
jne 0x1bbb
cmpq $0x2711, 0x8(%rsp)      # imm = 0x2711
jb 0x1bbf
movl $0x22, %eax
movq $0x0, 0x8(%rsp)
jmp 0x1bbb
movl $0x1, %eax
jmp 0x1baf
movl $0x4, %eax
jmp 0x1baf
movl $0x2, %eax
movq %rax, 0x20(%rsp)
jmp 0x1bc6
movl 0x1c(%rsp), %r13d
movl %eax, (%r12)
cmpl $0x0, (%r12)
jne 0x1c37
movl %r13d, %edi
movq 0x38(%rsp), %rsi
callq 0x237c
movq %rax, %r12
testq %rax, %rax
jne 0x1930
jmp 0x18ad
cmpl $-0x1, 0x8(%rsp)
je 0x1c32
cmpl $-0x1, (%rsp)
je 0x1c32
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x1eb8
jmp 0x1c27
cmpl $-0x1, 0x8(%rsp)
jne 0x1c32
cmpl $-0x1, (%rsp)
jne 0x1c32
callq 0x1cdc
jmp 0x1c27
cmpl $-0x1, 0x8(%rsp)
jne 0x1c32
cmpl $-0x1, (%rsp)
jne 0x1c32
callq 0x1d58
testl %eax, %eax
jne 0x1c4d
xorl %edi, %edi
callq 0x11f0
callq 0x1c95
leaq 0x140d(%rip), %rdi      # 0x304b
xorl %eax, %eax
callq 0x2c2c
movl $0x0, (%r12)
movl $0x1, %edi
callq 0x11f0
leaq 0x13bd(%rip), %rdi      # 0x301b
leaq 0x13c5(%rip), %rsi      # 0x302a
leaq 0x13c5(%rip), %rcx      # 0x3031
movl $0x34, %edx
callq 0x1110
leaq 0x139e(%rip), %rdi      # 0x301b
leaq 0x13a6(%rip), %rsi      # 0x302a
leaq 0x13a6(%rip), %rcx      # 0x3031
movl $0x2b, %edx
callq 0x1110