// File: /workspace/github_c_makefile_star2_O1/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, (%rsp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x61a8
movq %rax, %r14
movq %r12, %rdi
movl $0x2d, %esi
callq 0x5530
testq %rax, %rax
je 0x966b
movq %rax, %r13
xorl %ebp, %ebp
leaq 0x5198(%rip), %rbx      # 0xe7d0
movsbl (%rbx,%rbp,8), %esi
movq %r12, %rdi
callq 0x5530
testq %rax, %rax
sete %cl
cmpq %r13, %rax
setae %al
orb %cl, %al
jne 0x965c
movl 0x4(%rbx,%rbp,8), %eax
orl %eax, 0x20(%r14)
incq %rbp
cmpq $0x4, %rbp
jne 0x9638
incq %r13
movq %r13, %r12
cmpb $0x5b, (%r12)
jne 0x969f
movq %r12, %rdi
callq 0x5330
cmpb $0x5d, -0x1(%rax,%r12)
jne 0x969f
movq %r14, %rdx
addq $0x28, %rdx
leaq 0x4d25(%rip), %rsi      # 0xe3b5
xorl %r13d, %r13d
movq %r12, %rdi
xorl %eax, %eax
callq 0x5160
jmp 0x96b2
movl $0x0, 0x28(%r14)
movq %r12, %rdi
callq 0x50d0
movq %rax, %r13
movq (%rsp), %rbp
movl %r13d, 0x24(%r14)
testl %r13d, %r13d
jne 0x96ca
cmpl $0x0, 0x28(%r14)
je 0x97e1
movq (%rbp), %r13
testq %r13, %r13
je 0x9738
movq %r13, %r12
movq (%r13), %r13
movl 0x20(%r12), %eax
cmpl 0x20(%r14), %eax
jne 0x96ce
movl 0x28(%r12), %eax
testl %eax, %eax
je 0x96fc
cmpl $0x0, 0x24(%r12)
jne 0x96fc
cmpl 0x28(%r14), %eax
je 0x9707
movl 0x24(%r12), %eax
cmpl 0x24(%r14), %eax
jne 0x96ce
movq %r12, %rsi
callq 0x9c7a
movq (%r12), %rax
testq %rax, %rax
movq %rax, %rcx
cmoveq %rbp, %rcx
movq 0x8(%r12), %rdx
movq %rdx, 0x8(%rcx)
movq 0x8(%r12), %rcx
movq %rax, (%rcx)
movq %r12, %rdi
callq 0x61c8
jmp 0x96ce
leaq 0x4c7b(%rip), %rdi      # 0xe3ba
movq %r15, %rsi
callq 0x5620
testl %eax, %eax
je 0x97d2
movl $0x18, %ebx
leaq 0x9ad5(%rip), %r12      # 0x13230
movq -0x18(%rbx,%r12), %rdi
movq %r15, %rsi
callq 0x5620
testl %eax, %eax
je 0x979a
addq $0x20, %rbx
cmpq $0x9b8, %rbx            # imm = 0x9B8
jne 0x975b
leaq 0x1bb6(%rip), %rax      # 0xb336
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x61cd
movq %rax, 0x18(%r14)
movl $0x0, 0x2c(%r14)
jmp 0x97b4
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 0x9c45
movq $0x0, (%r14)
movq 0x8(%rbp), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x8(%rbp)
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 0x61c8