// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/conf.c
// Function: conf_bindname
void
conf_bindname(struct conf *c, char *name, char *binding)
{
	struct keybinding	*current_binding;
	char			*substring, *tmp;
	int			 iter;

	current_binding = xcalloc(1, sizeof(*current_binding));

	if ((substring = strchr(name, '-')) != NULL) {
		for (iter = 0; iter < nitems(bind_mods); iter++) {
			if ((tmp = strchr(name, bind_mods[iter].chr)) !=
			    NULL && tmp < substring) {
				current_binding->modmask |=
				    bind_mods[iter].mask;
			}
		}

		/* skip past the modifiers */
		substring++;
	} else {
		substring = name;
	}

	if (substring[0] == '[' &&
	    substring[strlen(substring)-1] == ']') {
		sscanf(substring, "[%d]", &current_binding->keycode);
		current_binding->keysym = NoSymbol;
	} else {
		current_binding->keycode = 0;
		current_binding->keysym = XStringToKeysym(substring);
	}

	if (current_binding->keysym == NoSymbol &&
	    current_binding->keycode == 0) {
		xfree(current_binding);
		return;
	}

	/* We now have the correct binding, remove duplicates. */
	conf_unbind(c, current_binding);

	if (strcmp("unmap", binding) == 0)
		return;

	for (iter = 0; iter < nitems(name_to_kbfunc); iter++) {
		if (strcmp(name_to_kbfunc[iter].tag, binding) != 0)
			continue;

		current_binding->callback = name_to_kbfunc[iter].handler;
		current_binding->flags = name_to_kbfunc[iter].flags;
		current_binding->argument = name_to_kbfunc[iter].argument;
		conf_grab(c, current_binding);
		TAILQ_INSERT_TAIL(&c->keybindingq, current_binding, entry);
		return;
	}

	current_binding->callback = kbfunc_cmdexec;
	current_binding->argument.c = xstrdup(binding);
	current_binding->flags = 0;
	conf_grab(c, current_binding);
	TAILQ_INSERT_TAIL(&c->keybindingq, current_binding, entry);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl $0x1, %edi
movl $0x30, %esi
callq 0x6198
movq %rax, %r14
movq %r12, %rdi
movl $0x2d, %esi
callq 0x5520
testq %rax, %rax
je 0x94c6
movq %rax, %r13
movq %rbx, (%rsp)
xorl %ebp, %ebp
leaq 0x5331(%rip), %rbx      # 0xe7c0
movsbl (%rbx,%rbp,8), %esi
movq %r12, %rdi
callq 0x5520
testq %rax, %rax
sete %cl
cmpq %r13, %rax
setae %al
orb %cl, %al
jne 0x94b3
movl 0x4(%rbx,%rbp,8), %eax
orl %eax, 0x20(%r14)
incq %rbp
cmpq $0x4, %rbp
jne 0x948f
incq %r13
movq %r13, %r12
movq (%rsp), %rbx
cmpb $0x5b, (%r12)
jne 0x9503
movq %r12, %rdi
callq 0x5320
cmpb $0x5d, -0x1(%rax,%r12)
jne 0x9503
leaq 0x28(%r14), %rdx
leaq 0x4ebd(%rip), %rsi      # 0xe3a5
movq %r12, %rdi
xorl %eax, %eax
callq 0x5160
movq %r14, %r13
addq $0x24, %r13
movl $0x0, 0x24(%r14)
jmp 0x9522
movl $0x0, 0x28(%r14)
movq %r12, %rdi
callq 0x50d0
movq %r14, %r13
addq $0x24, %r13
movl %eax, 0x24(%r14)
testl %eax, %eax
jne 0x952d
cmpl $0x0, 0x28(%r14)
je 0x964b
movq (%rbx), %rbp
testq %rbp, %rbp
je 0x959f
movq %rbp, %r12
movq (%rbp), %rbp
movl 0x20(%r12), %eax
cmpl 0x20(%r14), %eax
jne 0x9530
movl 0x24(%r12), %eax
movl 0x28(%r12), %ecx
testl %ecx, %ecx
setne %dl
testl %eax, %eax
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x956d
xorl %eax, %eax
cmpl 0x28(%r14), %ecx
je 0x9573
cmpl (%r13), %eax
jne 0x9530
movq %r12, %rsi
callq 0x9acc
movq (%r12), %rax
movq 0x8(%r12), %rcx
testq %rax, %rax
movq %rax, %rdx
cmoveq %rbx, %rdx
movq %rcx, 0x8(%rdx)
movq %rax, (%rcx)
movq %r12, %rdi
callq 0x61b8
jmp 0x9530
leaq 0x4e04(%rip), %rdi      # 0xe3aa
movq %r15, %rsi
callq 0x5610
testl %eax, %eax
je 0x963c
movq %rbx, %r13
movl $0x18, %ebx
leaq 0x9c6b(%rip), %r12      # 0x13230
movq -0x18(%rbx,%r12), %rdi
movq %r15, %rsi
callq 0x5610
testl %eax, %eax
je 0x9604
addq $0x20, %rbx
cmpq $0x9b8, %rbx            # imm = 0x9B8
jne 0x95c5
leaq 0x1b85(%rip), %rax      # 0xb16f
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x61bd
movq %rax, 0x18(%r14)
movl $0x0, 0x2c(%r14)
jmp 0x961e
movq -0x10(%rbx,%r12), %rax
movq %rax, 0x10(%r14)
movl -0x8(%rbx,%r12), %eax
movl %eax, 0x2c(%r14)
movq (%rbx,%r12), %rax
movq %rax, 0x18(%r14)
movq %r14, %rsi
callq 0x9a97
movq $0x0, (%r14)
movq 0x8(%r13), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x8(%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61b8