// File: /workspace/github_c_makefile_star2_O0/alexgirao[P]aimant/aimant.c
// Function: process_args
static int process_args(struct getopt_x *state, int argc, char **argv)
{
	int c;
	if (getopt_x_prepare(state, argc, argv, options_short, options_long, options_mandatory)) {
		DEBUG("error: failed to parse options");
		exit(1);
	}
	do {
		struct option *opt;
		switch (c = getopt_x_next(state, &opt)) {
		case 'p': strncpy_sizeof(args->pid_file, optarg); break;
		case 'l': strncpy_sizeof(args->log_file, optarg); break;
		case 's': strncpy_sizeof(args->svlogd_path, optarg); break;
		case 'c': args->count_to_rotate = atol(optarg); break;
		case 'e': args->exit_on_timeout = 1; break;
		case 'o': strncpy_sizeof(args->output_dir, optarg); break;
		case 'h': help(argv[0], state); exit(0);
		case -1: break;
		default:
			getopt_x_option_debug(state, c, opt);
			return -1;
		}
	} while (c != -1);
	if (args->count_to_rotate < 1) {
		DEBUG("invalid value for -c flag: %li", args->count_to_rotate);
		return -1;
	}
	return state->got_error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq 0x125c0(%rip), %rcx     # 0x16778
movq 0x12551(%rip), %r9      # 0x16710
leaq 0x1244a(%rip), %r8      # 0x16610
callq 0xb860
cmpl $0x0, %eax
je 0x41f6
jmp 0x41d2
leaq 0xbe83(%rip), %rdi      # 0x1005c
movl $0x47c, %esi            # imm = 0x47C
leaq 0xc50d(%rip), %rdx      # 0x106f2
movb $0x0, %al
callq 0xdfe0
movl $0x1, %edi
callq 0x2350
jmp 0x41f8
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc610
movl %eax, -0x24(%rbp)
movl %eax, %ecx
movl %ecx, -0x90(%rbp)
subl $-0x1, %eax
je 0x459a
jmp 0x421b
movl -0x90(%rbp), %eax
subl $0x63, %eax
je 0x4498
jmp 0x422c
movl -0x90(%rbp), %eax
subl $0x65, %eax
je 0x44b3
jmp 0x423d
movl -0x90(%rbp), %eax
subl $0x68, %eax
je 0x4583
jmp 0x424e
movl -0x90(%rbp), %eax
subl $0x6c, %eax
je 0x433a
jmp 0x425f
movl -0x90(%rbp), %eax
subl $0x6f, %eax
je 0x44c2
jmp 0x4270
movl -0x90(%rbp), %eax
subl $0x70, %eax
je 0x4291
jmp 0x427d
movl -0x90(%rbp), %eax
subl $0x73, %eax
je 0x43e9
jmp 0x459c
jmp 0x4293
leaq 0x11f66(%rip), %rax     # 0x16200
movq %rax, -0x38(%rbp)
leaq 0x126ab(%rip), %rax     # 0x16950
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x100, -0x44(%rbp)     # imm = 0x100
cmpl $0x0, -0x44(%rbp)
jle 0x42bb
jmp 0x42da
leaq 0xc44f(%rip), %rdi      # 0x10711
leaq 0xbd93(%rip), %rsi      # 0x1005c
movl $0x482, %edx            # imm = 0x482
leaq 0xc444(%rip), %rcx      # 0x10719
callq 0x21a0
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x5a, (%rax,%rcx)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movslq -0x44(%rbp), %rdx
callq 0x2080
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x4314
jmp 0x4333
leaq 0xc430(%rip), %rdi      # 0x1074b
leaq 0xbd3a(%rip), %rsi      # 0x1005c
movl $0x482, %edx            # imm = 0x482
leaq 0xc3eb(%rip), %rcx      # 0x10719
callq 0x21a0
jmp 0x4335
jmp 0x45b5
jmp 0x433c
leaq 0x11ebd(%rip), %rax     # 0x16200
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x50(%rbp)
leaq 0x125fc(%rip), %rax     # 0x16950
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x100, -0x5c(%rbp)     # imm = 0x100
cmpl $0x0, -0x5c(%rbp)
jle 0x436a
jmp 0x4389
leaq 0xc3a0(%rip), %rdi      # 0x10711
leaq 0xbce4(%rip), %rsi      # 0x1005c
movl $0x483, %edx            # imm = 0x483
leaq 0xc395(%rip), %rcx      # 0x10719
callq 0x21a0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x5a, (%rax,%rcx)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movslq -0x5c(%rbp), %rdx
callq 0x2080
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x43c3
jmp 0x43e2
leaq 0xc381(%rip), %rdi      # 0x1074b
leaq 0xbc8b(%rip), %rsi      # 0x1005c
movl $0x483, %edx            # imm = 0x483
leaq 0xc33c(%rip), %rcx      # 0x10719
callq 0x21a0
jmp 0x43e4
jmp 0x45b5
jmp 0x43eb
leaq 0x11e0e(%rip), %rax     # 0x16200
addq $0x200, %rax            # imm = 0x200
movq %rax, -0x68(%rbp)
leaq 0x1254d(%rip), %rax     # 0x16950
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movl $0x100, -0x74(%rbp)     # imm = 0x100
cmpl $0x0, -0x74(%rbp)
jle 0x4419
jmp 0x4438
leaq 0xc2f1(%rip), %rdi      # 0x10711
leaq 0xbc35(%rip), %rsi      # 0x1005c
movl $0x484, %edx            # imm = 0x484
leaq 0xc2e6(%rip), %rcx      # 0x10719
callq 0x21a0
movq -0x68(%rbp), %rax
movl -0x74(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x5a, (%rax,%rcx)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
movslq -0x74(%rbp), %rdx
callq 0x2080
movq -0x68(%rbp), %rax
movl -0x74(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x4472
jmp 0x4491
leaq 0xc2d2(%rip), %rdi      # 0x1074b
leaq 0xbbdc(%rip), %rsi      # 0x1005c
movl $0x484, %edx            # imm = 0x484
leaq 0xc28d(%rip), %rcx      # 0x10719
callq 0x21a0
jmp 0x4493
jmp 0x45b5
leaq 0x124b1(%rip), %rax     # 0x16950
movq (%rax), %rdi
callq 0x22e0
movq %rax, 0x12052(%rip)     # 0x16500
jmp 0x45b5
movl $0x1, 0x1204b(%rip)     # 0x16508
jmp 0x45b5
jmp 0x44c4
leaq 0x11d35(%rip), %rax     # 0x16200
addq $0x30c, %rax            # imm = 0x30C
movq %rax, -0x80(%rbp)
leaq 0x12474(%rip), %rax     # 0x16950
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movl $0x100, -0x8c(%rbp)     # imm = 0x100
cmpl $0x0, -0x8c(%rbp)
jle 0x44fb
jmp 0x451a
leaq 0xc20f(%rip), %rdi      # 0x10711
leaq 0xbb53(%rip), %rsi      # 0x1005c
movl $0x487, %edx            # imm = 0x487
leaq 0xc204(%rip), %rcx      # 0x10719
callq 0x21a0
movq -0x80(%rbp), %rax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x5a, (%rax,%rcx)
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
movslq -0x8c(%rbp), %rdx
callq 0x2080
movq -0x80(%rbp), %rax
movl -0x8c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x4560
jmp 0x457f
leaq 0xc1e4(%rip), %rdi      # 0x1074b
leaq 0xbaee(%rip), %rsi      # 0x1005c
movl $0x487, %edx            # imm = 0x487
leaq 0xc19f(%rip), %rcx      # 0x10719
callq 0x21a0
jmp 0x4581
jmp 0x45b5
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x4610
xorl %edi, %edi
callq 0x2350
jmp 0x45b5
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x30(%rbp), %rdx
callq 0xcfc0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4604
jmp 0x45b7
cmpl $-0x1, -0x24(%rbp)
jne 0x41f8
cmpq $0x1, 0x11f37(%rip)     # 0x16500
jge 0x45f7
jmp 0x45cd
movq 0x11f2c(%rip), %rcx     # 0x16500
leaq 0xba81(%rip), %rdi      # 0x1005c
movl $0x490, %esi            # imm = 0x490
leaq 0xc172(%rip), %rdx      # 0x10759
movb $0x0, %al
callq 0xdfe0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4604
movq -0x10(%rbp), %rax
movl 0x114(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq