// File: /workspace/github_c_makefile_star2_O2/cirocosta[P]stress/src/./common.h
// Function: stress_parse_args
void
stress_parse_args(int argc, char** argv, stress_args_t* args)
{
	int c;
	size_t arglen;

	_STRESS_MUST(argc > 1, "%s\n", "Argument -n must be specified.");

	opterr = 0;
	while ((c = getopt(argc, argv, "bd:f:n:")) != -1) {
		arglen = 0;
		if (optarg != NULL) {
			arglen = strlen(optarg);
			_STRESS_MUST(arglen < ARG_VALUE_MAX,
			             "-f option can't take more than "
			             "%d characters",
			             ARG_VALUE_MAX);
		}

		switch (c) {
			case 'n':
				_STRESS_MUST(stress_is_num(optarg),
				             "Argument (n=%s) must be an int",
				             optarg);
				args->n = atoi(optarg);
				break;
			case 'b':
				args->b = 1;
				break;
			case 'f':
				strncpy(args->f, optarg, arglen);
				break;
			case 'd':
				strncpy(args->d, optarg, arglen);
				break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x1, %edi
jle 0x1564
movq %rsi, %r14
movl %edi, %ebp
movq 0x2ca0(%rip), %rax      # 0x3ff0
andl $0x0, (%rax)
leaq 0x1005(%rdx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, (%rsp)
leaq 0x5(%rdx), %rax
movq %rax, 0x8(%rsp)
leaq 0xd16(%rip), %r13       # 0x2089
leaq 0xc8a(%rip), %rbx       # 0x2004
movl %ebp, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1180
cmpl $-0x1, %eax
je 0x1415
movl %eax, %r12d
movq 0x2c36(%rip), %rax      # 0x3fd0
movq (%rax), %r15
testq %r15, %r15
je 0x13b4
movq %r15, %rdi
callq 0x10c0
cmpq $0x100, %rax            # imm = 0x100
jb 0x13b6
jmp 0x1424
xorl %eax, %eax
addl $-0x62, %r12d
rorl %r12d
cmpl $0x6, %r12d
ja 0x137a
movslq (%rbx,%r12,4), %rcx
addq %rbx, %rcx
jmpq *%rcx
movq (%rsp), %rax
movb $0x1, 0x4(%rax)
jmp 0x137a
movq 0x8(%rsp), %rdi
jmp 0x1405
movq %r15, %rdi
callq 0x12fc
testb %al, %al
je 0x14ac
movq %r15, %rdi
callq 0x1190
movq (%rsp), %rcx
movl %eax, (%rcx)
jmp 0x137a
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1050
jmp 0x137a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2bcd(%rip), %r14      # 0x3ff8
movq (%r14), %rcx
leaq 0xd52(%rip), %rdi       # 0x2187
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rcx
leaq 0xd40(%rip), %rdi       # 0x218d
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
leaq 0xc2f(%rip), %rsi       # 0x2091
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x1120
movq (%r14), %rcx
leaq 0xbda(%rip), %rdi       # 0x2052
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
leaq 0xbc8(%rip), %rsi       # 0x2055
leaq 0xbce(%rip), %rdx       # 0x2062
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
leaq 0xbcc(%rip), %rsi       # 0x2071
pushq $0x75
jmp 0x1534
movq 0x2b45(%rip), %r14      # 0x3ff8
movq (%r14), %rcx
leaq 0xcca(%rip), %rdi       # 0x2187
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rcx
leaq 0xcb8(%rip), %rdi       # 0x218d
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
movq 0x2ae6(%rip), %rax      # 0x3fd0
movq (%rax), %rdx
leaq 0xbca(%rip), %rsi       # 0x20be
xorl %eax, %eax
callq 0x1120
movq (%r14), %rcx
leaq 0xb4d(%rip), %rdi       # 0x2052
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
leaq 0xb3b(%rip), %rsi       # 0x2055
leaq 0xb41(%rip), %rdx       # 0x2062
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
leaq 0xb3f(%rip), %rsi       # 0x2071
pushq $0x7c
popq %rdx
xorl %eax, %eax
callq 0x1120
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x1100
movq (%r14), %rcx
leaq 0xb2d(%rip), %rdi       # 0x207e
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x11b0
pushq $0x1
popq %rdi
callq 0x11a0
movq 0x2a8d(%rip), %r14      # 0x3ff8
movq (%r14), %rcx
leaq 0xc12(%rip), %rdi       # 0x2187
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rcx
leaq 0xc00(%rip), %rdi       # 0x218d
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
leaq 0xa8d(%rip), %rsi       # 0x202f
leaq 0xa8a(%rip), %rdx       # 0x2033
xorl %eax, %eax
callq 0x1120
movq (%r14), %rcx
leaq 0xa98(%rip), %rdi       # 0x2052
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x11b0
movq (%r14), %rdi
leaq 0xa86(%rip), %rsi       # 0x2055
leaq 0xa8c(%rip), %rdx       # 0x2062
xorl %eax, %eax
callq 0x1120
movq (%r14), %rdi
leaq 0xa8a(%rip), %rsi       # 0x2071
pushq $0x6b
jmp 0x1534