// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x49ea
movq %rax, %r14
movzwl 0x1a(%rbx), %eax
testq %r14, %r14
je 0x4278
testb $0x1, %al
je 0x4198
cmpb $0x0, 0x24(%r14)
jne 0x4198
cmpb $0x0, 0x27(%r14)
jne 0x4198
cmpb $0x0, 0x25(%r14)
jne 0x4198
movzwl 0x10(%rbx), %ecx
movw %cx, 0x4(%r14)
testb $0x2, %al
je 0x41ba
cmpb $0x0, 0x24(%r14)
jne 0x41ba
cmpb $0x0, 0x27(%r14)
jne 0x41ba
cmpb $0x0, 0x26(%r14)
jne 0x41ba
movzwl 0x12(%rbx), %ecx
movw %cx, 0x6(%r14)
testb $0x4, %al
je 0x41dc
cmpb $0x0, 0x24(%r14)
jne 0x41dc
cmpb $0x0, 0x27(%r14)
jne 0x41dc
cmpb $0x0, 0x25(%r14)
jne 0x41dc
movzwl 0x14(%rbx), %ecx
movw %cx, 0x8(%r14)
testb $0x8, %al
je 0x41fe
cmpb $0x0, 0x24(%r14)
jne 0x41fe
cmpb $0x0, 0x27(%r14)
jne 0x41fe
cmpb $0x0, 0x26(%r14)
jne 0x41fe
movzwl 0x16(%rbx), %ecx
movw %cx, 0xa(%r14)
testb $0x40, %al
je 0x4221
movzbl 0x1(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movq 0x81a6(%rip), %rdi      # 0xc3b8
movl 0x8(%rbx), %esi
pushq $0x40
popq %rdx
callq 0x31f0
movzwl 0x1a(%rbx), %eax
testb $0x10, %al
je 0x4240
movzwl 0x18(%rbx), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movq 0x8183(%rip), %rdi      # 0xc3b8
movl 0x8(%rbx), %esi
pushq $0x10
popq %rdx
callq 0x31f0
cmpb $0x0, 0x24(%r14)
jne 0x424f
movq %r14, %rdi
callq 0x4a0a
movl (%r14), %edi
movswl 0x4(%r14), %esi
movswl 0x6(%r14), %edx
callq 0x4c44
movl (%r14), %edi
movzwl 0x8(%r14), %esi
movzwl 0xa(%r14), %edx
callq 0x4c9e
jmp 0x42fa
xorl %ecx, %ecx
testb $0x1, %al
je 0x4288
movswl 0x10(%rbx), %ecx
movl %ecx, (%rsp)
pushq $0x1
popq %rcx
testb $0x2, %al
je 0x4297
movswl 0x12(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x4, %al
je 0x42a6
movzwl 0x14(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x8, %al
je 0x42b5
movzwl 0x16(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x20, %al
je 0x42c3
movl 0xc(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x40, %al
je 0x42d2
movzbl 0x1(%rbx), %edx
movl %ecx, %esi
movl %edx, (%rsp,%rsi,4)
incl %ecx
testb $0x10, %al
jne 0x42dc
testl %ecx, %ecx
jne 0x42e5
jmp 0x42fa
movzwl 0x18(%rbx), %edx
movl %ecx, %ecx
movl %edx, (%rsp,%rcx,4)
movq 0x80cc(%rip), %rdi      # 0xc3b8
movl (%r15), %esi
movzwl %ax, %edx
movq %rsp, %rcx
callq 0x31f0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq