// File: /workspace/github_c_makefile_star2_O3/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 0x18af
callq 0x2c80
movl %r13d, %edi
movq 0x38(%rsp), %rsi
callq 0x23ac
testq %rax, %rax
jne 0x1920
movq $0x0, 0x20(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
leaq 0x4874(%rip), %rax      # 0x6158
cmpl %r13d, (%rax)
jne 0x1c62
movl 0x20(%rsp), %eax
leaq 0x170c(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $-0x1, 0x8(%rsp)
jne 0x1c62
cmpl $-0x1, (%rsp)
jne 0x1c62
callq 0x1de8
jmp 0x1c57
movq %rax, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x484c(%rip), %r14      # 0x6188
leaq 0x1714(%rip), %rbp      # 0x3057
leaq 0x1710(%rip), %rbx      # 0x305a
leaq 0x170c(%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 0x1993
movq %r12, %rdi
callq 0x26f3
addq 0x10(%rsp), %rax
jmp 0x19a1
movq 0x40(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x40(%rsp)
cmpq $0x33, %rax
jle 0x19dd
cmpq $0x3c, %rax
jg 0x1a14
cmpq $0x34, %rax
je 0x1a37
cmpq $0x3a, %rax
jne 0x1aa7
cmpl $0x0, (%r14)
jne 0x1bd3
movl $0x3a, %esi
subq 0x10(%rsp), %rsi
movq %rbx, %rdi
jmp 0x1a6b
cmpq $0x28, %rax
je 0x1a50
cmpq $0x2b, %rax
je 0x1a77
cmpq $0x31, %rax
jne 0x1aa7
cmpl $0x0, (%r14)
jne 0x1bda
movl $0x31, %esi
subq 0x10(%rsp), %rsi
leaq 0x1642(%rip), %rdi      # 0x3054
jmp 0x1a6b
cmpq $0x3d, %rax
jne 0x1aa1
cmpl $0x0, (%r14)
jne 0x1ae4
movl $0x3d, %esi
subq 0x10(%rsp), %rsi
movq %r15, %rdi
jmp 0x1a6b
cmpl $0x0, (%r14)
jne 0x1aee
movl $0x34, %esi
subq 0x10(%rsp), %rsi
movq %rbp, %rdi
jmp 0x1a92
cmpl $0x0, (%r14)
jne 0x1bcc
movl $0x28, %esi
subq 0x10(%rsp), %rsi
leaq 0x15ad(%rip), %rdi      # 0x3018
xorl %edx, %edx
callq 0x27b0
jmp 0x197e
cmpl $0x0, (%r14)
jne 0x1b63
movl $0x2b, %esi
subq 0x10(%rsp), %rsi
leaq 0x15b6(%rip), %rdi      # 0x3048
movl $0x1, %edx
callq 0x27b0
jmp 0x197e
cmpq $0x40, %rax
je 0x1ad8
cmpl $0x0, (%r14)
jne 0x1c62
cmpl $0x0, 0x2c(%rsp)
jne 0x197e
movl $0x40, %edi
subq 0x10(%rsp), %rdi
callq 0x2901
movl $0x1, 0x2c(%rsp)
jmp 0x197e
movl $0x1, (%r14)
jmp 0x1bf6
movl $0x3, %eax
jmp 0x1bdf
leaq 0x468b(%rip), %rax      # 0x6180
movq (%rax), %r13
testq %r13, %r13
je 0x1c87
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 0x1be6
cmpb $0x0, (%rcx)
movl 0x1c(%rsp), %r13d
jne 0x1beb
cmpq $0x2711, (%rsp)         # imm = 0x2711
jb 0x1bef
movl $0x22, %eax
movq $0x0, (%rsp)
jmp 0x1beb
leaq 0x4616(%rip), %rax      # 0x6180
movq (%rax), %r13
testq %r13, %r13
je 0x1ca6
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 0x1be6
cmpb $0x0, (%rcx)
movl 0x1c(%rsp), %r13d
jne 0x1beb
cmpq $0x2711, 0x8(%rsp)      # imm = 0x2711
jb 0x1bef
movl $0x22, %eax
movq $0x0, 0x8(%rsp)
jmp 0x1beb
movl $0x1, %eax
jmp 0x1bdf
movl $0x4, %eax
jmp 0x1bdf
movl $0x2, %eax
movq %rax, 0x20(%rsp)
jmp 0x1bf6
movl 0x1c(%rsp), %r13d
movl %eax, (%r12)
cmpl $0x0, (%r12)
jne 0x1c67
movl %r13d, %edi
movq 0x38(%rsp), %rsi
callq 0x23ac
movq %rax, %r12
testq %rax, %rax
jne 0x1960
jmp 0x18dd
cmpl $-0x1, 0x8(%rsp)
je 0x1c62
cmpl $-0x1, (%rsp)
je 0x1c62
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x1ee8
jmp 0x1c57
cmpl $-0x1, 0x8(%rsp)
jne 0x1c62
cmpl $-0x1, (%rsp)
jne 0x1c62
callq 0x1d0c
jmp 0x1c57
cmpl $-0x1, 0x8(%rsp)
jne 0x1c62
cmpl $-0x1, (%rsp)
jne 0x1c62
callq 0x1d88
testl %eax, %eax
jne 0x1c7d
xorl %edi, %edi
callq 0x11f0
callq 0x1cc5
leaq 0x13dd(%rip), %rdi      # 0x304b
xorl %eax, %eax
callq 0x2d00
movl $0x0, (%r12)
movl $0x1, %edi
callq 0x11f0
leaq 0x138d(%rip), %rdi      # 0x301b
leaq 0x1395(%rip), %rsi      # 0x302a
leaq 0x1395(%rip), %rcx      # 0x3031
movl $0x34, %edx
callq 0x1110
leaq 0x136e(%rip), %rdi      # 0x301b
leaq 0x1376(%rip), %rsi      # 0x302a
leaq 0x1376(%rip), %rcx      # 0x3031
movl $0x2b, %edx
callq 0x1110