// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x13, %rax
ja 0x93eb
movq -0x18(%rbp), %rax
leaq 0x2f07(%rip), %rcx      # 0xc038
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, 0x6679(%rip)       # 0xf7c0
testb $0x1, 0x6697(%rip)      # 0xf7e5
je 0x9155
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x6661(%rip)      # 0xf7c8
testb $0x1, 0x6677(%rip)      # 0xf7e5
je 0x9175
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x6645(%rip)      # 0xf7cc
testb $0x1, 0x6657(%rip)      # 0xf7e5
je 0x9195
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, 0x661a(%rip)       # 0xf7c1
testb $0x1, 0x6637(%rip)      # 0xf7e5
je 0x91b5
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x6609(%rip)      # 0xf7d0
testb $0x1, 0x6617(%rip)      # 0xf7e5
je 0x91d5
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x65ed(%rip)      # 0xf7d4
testb $0x1, 0x65f7(%rip)      # 0xf7e5
je 0x91f5
callq 0x6660
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x927e
movq -0x20(%rbp), %rax
leaq 0x2e6e(%rip), %rcx      # 0xc088
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, 0x6593(%rip)       # 0xf7c3
jmp 0x9280
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, 0x6585(%rip)       # 0xf7c4
jmp 0x9280
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, 0x6577(%rip)       # 0xf7c5
jmp 0x9280
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, 0x6569(%rip)       # 0xf7c6
jmp 0x9280
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, 0x655a(%rip)       # 0xf7c6
movb %al, 0x6553(%rip)       # 0xf7c5
movb %al, 0x654c(%rip)       # 0xf7c4
movb %al, 0x6545(%rip)       # 0xf7c3
jmp 0x9280
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, 0x6530(%rip)       # 0xf7c2
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x6534(%rip)      # 0xf7d8
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edi
callq 0xb0b0
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x6513(%rip)       # 0xf7e0
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x64fc(%rip)       # 0xf7e1
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x64e5(%rip)       # 0xf7e2
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x64ce(%rip)       # 0xf7e3
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x64b7(%rip)       # 0xf7e4
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x64a0(%rip)       # 0xf7e5
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
andb $0x1, %al
movb %al, 0x6489(%rip)       # 0xf7e6
jmp 0x93ed
movl $0x0, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jge 0x9399
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movslq -0x10(%rbp), %rcx
leaq 0x6436(%rip), %rax      # 0xf7c0
movl %edx, 0x28(%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9369
callq 0x43a0
callq 0xb1c0
jmp 0x93ed
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movw %ax, 0x6441(%rip)       # 0xf7f4
callq 0x43a0
callq 0xb1c0
jmp 0x93ed
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0x93d2
movb $-0x1, 0x6426(%rip)     # 0xf7f6
jmp 0x93df
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, 0x6417(%rip)       # 0xf7f6
callq 0x43a0
callq 0xb1c0
jmp 0x93ed
jmp 0x93ed
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)