// File: /workspace/github_c_makefile_star2_O0/mati75[P]evilwm/xconfig.c
// Function: xconfig_parse_cli
enum xconfig_result xconfig_parse_cli(struct xconfig_option *options,
		int argc, char **argv, int *argn) {
	int _argn;
	const char *optstr;
	_argn = argn ? *argn : 1;

	while (_argn < argc) {
		// No leading '-' means end of options
		if (argv[_argn][0] != '-') {
			break;
		}

		// "--" ends options, per tradition
		if (0 == strcmp("--", argv[_argn])) {
			_argn++;
			break;
		}

		optstr = argv[_argn]+1;
		// Allow double '-' to introduce option
		if (*optstr == '-')
			optstr++;

		struct xconfig_option *opt = find_option(options, optstr);
		if (opt == NULL) {
			if (argn) *argn = _argn;
			return XCONFIG_BAD_OPTION;
		}

		// Option types with no argument
		if (opt->type == XCONFIG_BOOL || opt->type == XCONFIG_CALL_0) {
			set_option(opt, NULL);
			_argn++;
			continue;
		}

		// Option types with one argument
		if ((_argn + 1) >= argc) {
			if (argn)
				*argn = _argn;
			return XCONFIG_MISSING_ARG;
		}
		set_option(opt, argv[_argn+1]);
		_argn += 2;
	}

	if (argn) {
		*argn = _argn;
	}
	return XCONFIG_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd3f9
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0xd403
movl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xd403
movl -0x44(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xd535
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xd42e
jmp 0xd535
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1edd(%rip), %rdi      # 0xf31e
callq 0x4550
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xd45c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd535
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xd488
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xd1b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xd4bc
cmpq $0x0, -0x28(%rbp)
je 0xd4b0
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xd54c
movq -0x40(%rbp), %rax
cmpl $0x0, (%rax)
je 0xd4ce
movq -0x40(%rbp), %rax
cmpl $0x5, (%rax)
jne 0xd4e9
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd240
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd409
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jl 0xd50d
cmpq $0x0, -0x28(%rbp)
je 0xd504
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xd54c
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0xd240
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd409
cmpq $0x0, -0x28(%rbp)
je 0xd545
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)