// File: /workspace/github_c_makefile_star2_O2/tudurom[P]windowchef/wm.c
// Function: ipc_wm_config
static void
ipc_wm_config(uint32_t *d)
{
	enum IPCConfig key;

	key = d[0];

	switch (key) {
	case IPCConfigBorderWidth:
		conf.border_width = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigColorFocused:
		conf.focus_color = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigColorUnfocused:
		conf.unfocus_color = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigInternalBorderWidth:
		conf.internal_border_width = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigInternalColorFocused:
		conf.internal_focus_color = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigInternalColorUnfocused:
		conf.internal_unfocus_color = d[1];
		if (conf.apply_settings)
			refresh_borders();
		break;
	case IPCConfigGapWidth:
		switch (d[1]) {
		case LEFT: conf.gap_left   = d[2]; break;
		case BOTTOM: conf.gap_down = d[2]; break;
		case TOP: conf.gap_up      = d[2]; break;
		case RIGHT: conf.gap_right = d[2]; break;
		case ALL: conf.gap_left = conf.gap_down
				= conf.gap_up = conf.gap_right = d[2];
		default: break;
		}
		break;
	case IPCConfigGridGapWidth:
		conf.grid_gap = d[1];
		break;
	case IPCConfigCursorPosition:
		conf.cursor_position = d[1];
		break;
	case IPCConfigGroupsNr:
		change_nr_of_groups(d[1]);
		break;
	case IPCConfigEnableSloppyFocus:
		conf.sloppy_focus = d[1];
		break;
	case IPCConfigEnableResizeHints:
		conf.resize_hints = d[1];
		break;
	case IPCConfigStickyWindows:
		conf.sticky_windows = d[1];
		break;
	case IPCConfigEnableBorders:
		conf.borders = d[1];
		break;
	case IPCConfigEnableLastWindowFocusing:
		conf.last_window_focusing = d[1];
		break;
	case IPCConfigApplySettings:
		conf.apply_settings = d[1];
		break;
	case IPCConfigReplayClickOnFocus:
		conf.replay_click_on_focus = d[1];
		break;
	case IPCConfigPointerActions:
		for (int i = 0; i < NR_BUTTONS; i++) {
			conf.pointer_actions[i] = d[i + 1];
		}
		ungrab_buttons();
		grab_buttons();
		break;
	case IPCConfigPointerModifier:
		conf.pointer_modifier = d[1];
		ungrab_buttons();
		grab_buttons();
		break;
	case IPCConfigClickToFocus:
		if (d[1] == UINT32_MAX)
			conf.click_to_focus = -1;
		else
			conf.click_to_focus = d[1];
		ungrab_buttons();
		grab_buttons();
		break;
	default:
		DMSG("!!! unhandled config key %d\n", key);
		break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
cmpq $0x13, %rax
ja 0x78a9
leaq 0x19fc(%rip), %rcx      # 0x90a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x4(%rdi), %al
movb %al, 0x50e2(%rip)       # 0xc7a0
jmp 0x77fa
cmpl $0x0, 0x4(%rdi)
setne 0x50f8(%rip)            # 0xc7c6
jmp 0x78a9
cmpl $0x0, 0x4(%rdi)
setne 0x50e6(%rip)            # 0xc7c4
jmp 0x78a9
cmpl $0x0, 0x4(%rdi)
setne 0x50d3(%rip)            # 0xc7c1
jmp 0x78a9
movl 0x4(%rdi), %eax
movl %eax, 0x50b4(%rip)      # 0xc7b0
jmp 0x77fa
cmpl $0x0, 0x4(%rdi)
setne 0x50b6(%rip)            # 0xc7c2
jmp 0x78a9
movl 0x4(%rdi), %ebx
movq %rbx, %rdi
callq 0x31a0
movq %rax, %r14
movl 0x5097(%rip), %eax      # 0xc7bc
cmpl %ebx, %eax
movl %ebx, %ecx
cmovbl %eax, %ecx
movq 0x50cd(%rip), %rdi      # 0xc800
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x7747
movb (%rdi,%rdx), %sil
movb %sil, (%r14,%rdx)
incq %rdx
jmp 0x7735
cmpl %ebx, %eax
jbe 0x7897
leaq 0x4c72(%rip), %r12      # 0xc3c8
movq (%r12), %r12
testq %r12, %r12
je 0x7890
movq (%r12), %r15
movl 0x58(%r15), %edi
cmpl $-0x1, %edi
sete %al
cmpl %ebx, %edi
setb %cl
orb %al, %cl
jne 0x778c
callq 0x7c42
orl $-0x1, 0x58(%r15)
movq %r15, %rdi
callq 0x5bd5
addq $0x10, %r12
jmp 0x7756
movl 0x4(%rdi), %eax
movl %eax, 0x5011(%rip)      # 0xc7ac
jmp 0x77fa
cmpl $0x0, 0x4(%rdi)
setne 0x501d(%rip)            # 0xc7c5
jmp 0x78a9
movb 0x4(%rdi), %al
movb %al, 0x4feb(%rip)       # 0xc7a1
jmp 0x77fa
movb 0x4(%rdi), %al
movb %al, 0x4fe1(%rip)       # 0xc7a2
jmp 0x78a9
movl 0x4(%rdi), %eax
movl %eax, 0x4fd9(%rip)      # 0xc7a8
jmp 0x77fa
xorl %eax, %eax
leaq 0x4fc6(%rip), %rcx      # 0xc7a0
cmpq $0x3, %rax
je 0x787b
movl 0x4(%rdi,%rax,4), %edx
movl %edx, 0x28(%rcx,%rax,4)
incq %rax
jmp 0x77da
movl 0x4(%rdi), %eax
movl %eax, 0x4fba(%rip)      # 0xc7b4
cmpb $0x1, 0x4fc4(%rip)      # 0xc7c5
jne 0x78a9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x56c4
cmpl $0x0, 0x4(%rdi)
setne 0x4fa1(%rip)            # 0xc7c3
jmp 0x78a9
movl 0x4(%rdi), %eax
addl $-0x5, %eax
cmpl $0x4, %eax
ja 0x78a9
leaq 0x18bf(%rip), %rcx      # 0x90f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x8(%rdi), %al
movb %al, 0x4f58(%rip)       # 0xc7a3
jmp 0x78a9
movzwl 0x4(%rdi), %eax
movw %ax, 0x4f7c(%rip)       # 0xc7d4
jmp 0x787b
cmpl $0x0, 0x4(%rdi)
setne 0x4f5b(%rip)            # 0xc7c0
jmp 0x78a9
movl 0x4(%rdi), %eax
movl %eax, 0x4f48(%rip)      # 0xc7b8
jmp 0x78a9
movb 0x4(%rdi), %al
movb %al, 0x4f5b(%rip)       # 0xc7d6
callq 0x411e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x7cf7
movq 0x4f69(%rip), %rdi      # 0xc800
movl %ebx, 0x4f1f(%rip)      # 0xc7bc
callq 0x32c0
movq %r14, 0x4f57(%rip)      # 0xc800
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movzbl 0x8(%rdi), %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
movl %eax, 0x4ede(%rip)      # 0xc7a3
jmp 0x78a9
movb 0x8(%rdi), %al
movb %al, 0x4ed5(%rip)       # 0xc7a5
jmp 0x78a9
movb 0x8(%rdi), %al
movb %al, 0x4ecb(%rip)       # 0xc7a6
jmp 0x78a9
movb 0x8(%rdi), %al
movb %al, 0x4ebe(%rip)       # 0xc7a4
jmp 0x78a9