// File: /workspace/github_c_makefile_star2_O2/mati75[P]evilwm/xconfig.c
// Function: set_option
static void set_option(struct xconfig_option *option, const char *arg) {
	unset_option(option);
	switch (option->type) {
		case XCONFIG_BOOL:
			*(int *)option->dest.i = 1;
			break;
		case XCONFIG_INT:
			*(int *)option->dest.i = strtol(arg, NULL, 0);
			break;
		case XCONFIG_UINT:
			*(unsigned *)option->dest.u = strtoul(arg, NULL, 0);
			break;
		case XCONFIG_STRING:
			*(char **)option->dest.s = xstrdup(arg);
			break;
		case XCONFIG_STR_LIST:
			*(char ***)option->dest.sl = split_string(arg);
			break;
		case XCONFIG_CALL_0:
			((void (*)(void))option->dest.c0)();
			break;
		case XCONFIG_CALL_1:
			((void (*)(const char *))option->dest.c1)(arg);
			break;
		default:
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x996b
movq %r14, (%rsp)
movl (%r14), %eax
cmpq $0x6, %rax
ja 0x9810
leaq 0x1d4c(%rip), %rcx      # 0xb370
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rax
movq 0x10(%rax), %rax
movl $0x1, (%rax)
jmp 0x9810
movq %rbx, %rdi
callq 0x42f0
leaq 0x1(%rax), %rdi
callq 0x41e0
testq %rax, %rax
je 0x9803
movq $0x0, 0x30(%rsp)
pushq $0x2
popq %r13
pushq $0x1
popq %rbp
xorl %edx, %edx
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, %r14
movq %rdx, 0x18(%rsp)
movzbl (%rbx), %r15d
cmpl $0x5c, %r15d
je 0x9698
testl %r15d, %r15d
jne 0x96a2
jmp 0x96c7
movb 0x1(%rbx), %al
movq %r13, %rcx
testb %al, %al
jne 0x96bc
movsbq %r15b, %r12
callq 0x4340
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
movq %rbp, %rcx
movl %r15d, %eax
jne 0x96c7
addq %rcx, %rbx
movb %al, (%r14)
incq %r14
jmp 0x9687
movb $0x0, (%r14)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x96ef
movq 0x18(%rsp), %rax
leal 0x1(%rax), %r15d
movq 0x30(%rsp), %rcx
cmpl %ecx, %r15d
jge 0x96f9
movq 0x8(%rsp), %rcx
jmp 0x9738
movq 0x18(%rsp), %rax
movl %eax, %r15d
jmp 0x9750
movl %r15d, 0x24(%rsp)
movslq %ecx, %rax
leaq 0x20(,%rax,8), %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rcx, %r15
callq 0x46c0
testq %rax, %rax
je 0x97f1
addl $0x4, %r15d
movq %r15, 0x30(%rsp)
movq %rax, %rcx
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %r15d
cltq
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
incq %r14
movq %r14, 0x10(%rsp)
callq 0x4340
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x975b
movl %r15d, %edx
testb %cl, %cl
jne 0x9682
testl %r15d, %r15d
je 0x97f9
movslq %r15d, %rax
movq 0x8(%rsp), %rcx
andq $0x0, (%rcx,%rax,8)
jmp 0x9805
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4720
jmp 0x97b8
movq %rbx, %rdi
callq 0x9a48
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
jmp 0x9810
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4420
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movl %eax, (%rcx)
jmp 0x9810
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
movq %rbx, %rdi
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
movq %r12, %rdi
callq 0x42d0
movq 0x28(%rsp), %rdi
callq 0x42d0
xorl %ecx, %ecx
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq