// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x6460
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
callq 0x5520
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xbf80
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
cmpq $0x4, %rax
jae 0xbf72
movq -0x10(%rbp), %rdi
movslq -0x34(%rbp), %rcx
leaq 0xdb31(%rip), %rax      # 0x19a60
movsbl (%rax,%rcx,8), %esi
callq 0x5520
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xbf65
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xbf65
movslq -0x34(%rbp), %rcx
leaq 0xdb09(%rip), %rax      # 0x19a60
movl 0x4(%rax,%rcx,8), %ecx
movq -0x20(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
jmp 0xbf67
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xbf16
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xbf88
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xbfe0
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5320
movq %rax, %rcx
movq -0x40(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
jne 0xbfe0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rdx
addq $0x28, %rdx
leaq 0x853e(%rip), %rsi      # 0x1450a
movb $0x0, %al
callq 0x5160
movq -0x20(%rbp), %rax
movl $0x0, 0x24(%rax)
jmp 0xbffd
movq -0x20(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x28(%rbp), %rdi
callq 0x50d0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x20(%rbp), %rax
movslq 0x24(%rax), %rax
cmpq $0x0, %rax
jne 0xc023
movq -0x20(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0xc023
movq -0x20(%rbp), %rdi
callq 0x64b0
jmp 0xc1a3
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xc900
movq -0x18(%rbp), %rsi
leaq 0x84d4(%rip), %rdi      # 0x1450f
callq 0x5610
cmpl $0x0, %eax
jne 0xc04a
jmp 0xc1a3
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
cmpq $0x4d, %rax
jae 0xc132
movslq -0x34(%rbp), %rcx
leaq 0xdaf6(%rip), %rax      # 0x19b60
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5610
cmpl $0x0, %eax
je 0xc087
jmp 0xc124
movslq -0x34(%rbp), %rcx
leaq 0xdace(%rip), %rax      # 0x19b60
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movslq -0x34(%rbp), %rcx
leaq 0xdab0(%rip), %rax      # 0x19b60
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rdx
leaq 0xda90(%rip), %rcx      # 0x19b60
shlq $0x5, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xc840
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0xc1a3
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xc051
movq -0x20(%rbp), %rax
leaq 0x3063(%rip), %rcx      # 0xf1a0
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rdi
callq 0x64d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xc840
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)