// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/wm.c
// Function: event_configure_request
static void
event_configure_request(xcb_generic_event_t *ev)
{
	xcb_configure_request_event_t *e = (xcb_configure_request_event_t *)ev;
	struct client *client;
	uint32_t values[7];
	int i = 0;

	client = find_client(&e->window);
	if (client != NULL) {

		if (e->value_mask & XCB_CONFIG_WINDOW_X
				&& !client->maxed && !client->monocled && !client->hmaxed)
			client->geom.x = e->x;

		if (e->value_mask & XCB_CONFIG_WINDOW_Y
				&& !client->maxed && !client->monocled && !client->vmaxed)
			client->geom.y = e->y;

		if (e->value_mask & XCB_CONFIG_WINDOW_WIDTH
				&& !client->maxed && !client->monocled && !client->hmaxed)
			client->geom.width = e->width;

		if (e->value_mask & XCB_CONFIG_WINDOW_HEIGHT
				&& !client->maxed && !client->monocled && !client->vmaxed)
			client->geom.height = e->height;

		if (e->value_mask & XCB_CONFIG_WINDOW_STACK_MODE) {
			values[0] = e->stack_mode;
			xcb_configure_window(conn, e->window,
					XCB_CONFIG_WINDOW_STACK_MODE, values);
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH) {
			values[0] = e->border_width;
			xcb_configure_window(conn, e->window,
					XCB_CONFIG_WINDOW_BORDER_WIDTH, values);
		}

		if (!client->maxed) {
			fit_on_screen(client);
		}

		teleport_window(client->window, client->geom.x, client->geom.y);
		resize_window_absolute(client->window, client->geom.width, client->geom.height);
	} else {
		if (e->value_mask & XCB_CONFIG_WINDOW_X) {
			values[i] = e->x;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_Y) {
			values[i] = e->y;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_WIDTH) {
			values[i] = e->width;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_HEIGHT) {
			values[i] = e->height;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_SIBLING) {
			values[i] = e->sibling;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_STACK_MODE) {
			values[i] = e->stack_mode;
			i++;
		}

		if (e->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH) {
			values[i] = e->border_width;
			i++;
		}

		if (i == 0)
			return;
		xcb_configure_window(conn, e->window, e->value_mask, values);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x821a(%rip), %rax      # 0xc3c8
testq %rax, %rax
je 0x41cb
movl 0x8(%rbx), %ecx
movq (%rax), %r14
cmpl %ecx, (%r14)
je 0x425b
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x41b6
movzwl 0x1a(%rbx), %eax
xorl %ecx, %ecx
testb $0x1, %al
je 0x41e1
movswl 0x10(%rbx), %ecx
movl %ecx, (%rsp)
movl $0x1, %ecx
testb $0x2, %al
je 0x41f0
movswl 0x12(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x4, %al
je 0x41ff
movzwl 0x14(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x8, %al
je 0x420e
movzwl 0x16(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x20, %al
je 0x421c
movl 0xc(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x40, %al
je 0x422b
movzbl 0x1(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x10, %al
jne 0x4238
testl %ecx, %ecx
jne 0x4241
jmp 0x4360
movzwl 0x18(%rbx), %edx
movl %ecx, %ecx
movl %edx, (%rsp,%rcx,4)
movq 0x8170(%rip), %rdi      # 0xc3b8
movl 0x8(%rbx), %esi
movzwl %ax, %edx
movq %rsp, %rcx
callq 0x3200
jmp 0x4360
movzwl 0x1a(%rbx), %eax
testb $0x1, %al
je 0x4281
cmpb $0x0, 0x24(%r14)
jne 0x4281
cmpb $0x0, 0x27(%r14)
jne 0x4281
cmpb $0x0, 0x25(%r14)
jne 0x4281
movzwl 0x10(%rbx), %ecx
movw %cx, 0x4(%r14)
testb $0x2, %al
je 0x42a3
cmpb $0x0, 0x24(%r14)
jne 0x42a3
cmpb $0x0, 0x27(%r14)
jne 0x42a3
cmpb $0x0, 0x26(%r14)
jne 0x42a3
movzwl 0x12(%rbx), %ecx
movw %cx, 0x6(%r14)
testb $0x4, %al
je 0x42c5
cmpb $0x0, 0x24(%r14)
jne 0x42c5
cmpb $0x0, 0x27(%r14)
jne 0x42c5
cmpb $0x0, 0x25(%r14)
jne 0x42c5
movzwl 0x14(%rbx), %ecx
movw %cx, 0x8(%r14)
testb $0x8, %al
je 0x42e7
cmpb $0x0, 0x24(%r14)
jne 0x42e7
cmpb $0x0, 0x27(%r14)
jne 0x42e7
cmpb $0x0, 0x26(%r14)
jne 0x42e7
movzwl 0x16(%rbx), %ecx
movw %cx, 0xa(%r14)
testb $0x40, %al
je 0x430c
movzbl 0x1(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movq 0x80bd(%rip), %rdi      # 0xc3b8
movl 0x8(%rbx), %esi
movl $0x40, %edx
callq 0x3200
movzwl 0x1a(%rbx), %eax
testb $0x10, %al
je 0x432d
movzwl 0x18(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movq 0x8098(%rip), %rdi      # 0xc3b8
movl 0x8(%rbx), %esi
movl $0x10, %edx
callq 0x3200
cmpb $0x0, 0x24(%r14)
jne 0x433c
movq %r14, %rdi
callq 0x4b33
movl (%r14), %edi
movswl 0x4(%r14), %esi
movswl 0x6(%r14), %edx
callq 0x4d70
movl (%r14), %edi
movzwl 0x8(%r14), %esi
movzwl 0xa(%r14), %edx
callq 0x4dd8
addq $0x28, %rsp
popq %rbx
popq %r14
retq