// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/conf.c
// Function: conf_mousebind
void
conf_mousebind(struct conf *c, char *name, char *binding)
{
	struct mousebinding	*current_binding;
	char			*substring, *tmp;
	const char		*errstr;
	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;

	current_binding->button = strtonum(substring, 1, 3, &errstr);
	if (errstr)
		warnx("number of buttons is %s: %s", errstr, substring);

	conf_mouseunbind(c, current_binding);

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

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

		current_binding->context = name_to_mousefunc[iter].context;
		current_binding->callback = name_to_mousefunc[iter].handler;
		TAILQ_INSERT_TAIL(&c->mousebindingq, current_binding, entry);
		return;
	}
}

// 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 $0x28, %esi
callq 0x6460
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
callq 0x5520
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xc260
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
cmpq $0x4, %rax
jae 0xc252
movq -0x10(%rbp), %rdi
movslq -0x3c(%rbp), %rcx
leaq 0xd851(%rip), %rax      # 0x19a60
movsbl (%rax,%rcx,8), %esi
callq 0x5520
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xc245
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xc245
movslq -0x3c(%rbp), %rcx
leaq 0xd829(%rip), %rax      # 0x19a60
movl 0x4(%rax,%rcx,8), %ecx
movq -0x20(%rbp), %rax
orl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
jmp 0xc247
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc1f6
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xc268
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x1, %esi
movl $0x3, %edx
leaq -0x38(%rbp), %rcx
callq 0x13560
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
cmpq $0x0, -0x38(%rbp)
je 0xc2a5
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0x8277(%rip), %rdi      # 0x14515
movb $0x0, %al
callq 0x5140
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xca00
movq -0x18(%rbp), %rsi
leaq 0x8252(%rip), %rdi      # 0x1450f
callq 0x5610
cmpl $0x0, %eax
jne 0xc2cc
jmp 0xc386
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
cmpq $0x9, %rax
jae 0xc386
movslq -0x3c(%rbp), %rcx
leaq 0xd794(%rip), %rax      # 0x19a80
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5610
cmpl $0x0, %eax
je 0xc306
jmp 0xc378
movslq -0x3c(%rbp), %rcx
leaq 0xd76f(%rip), %rax      # 0x19a80
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20(%rax)
movslq -0x3c(%rbp), %rcx
leaq 0xd753(%rip), %rax      # 0x19a80
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0xc386
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc2d3
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)