// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x4ff0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4627
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x44a5
movq -0x18(%rbp), %rax
testb $0x1, 0x24(%rax)
jne 0x44a5
movq -0x18(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0x44a5
movq -0x18(%rbp), %rax
testb $0x1, 0x25(%rax)
jne 0x44a5
movq -0x10(%rbp), %rax
movw 0x10(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x44e3
movq -0x18(%rbp), %rax
testb $0x1, 0x24(%rax)
jne 0x44e3
movq -0x18(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0x44e3
movq -0x18(%rbp), %rax
testb $0x1, 0x26(%rax)
jne 0x44e3
movq -0x10(%rbp), %rax
movw 0x12(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4521
movq -0x18(%rbp), %rax
testb $0x1, 0x24(%rax)
jne 0x4521
movq -0x18(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0x4521
movq -0x18(%rbp), %rax
testb $0x1, 0x25(%rax)
jne 0x4521
movq -0x10(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x455f
movq -0x18(%rbp), %rax
testb $0x1, 0x24(%rax)
jne 0x455f
movq -0x18(%rbp), %rax
testb $0x1, 0x27(%rax)
jne 0x455f
movq -0x18(%rbp), %rax
testb $0x1, 0x26(%rax)
jne 0x455f
movq -0x10(%rbp), %rax
movw 0x16(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4599
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x40(%rbp)
movq 0xae57(%rip), %rdi      # 0xf3d8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
leaq -0x40(%rbp), %rcx
movl $0x40, %edx
callq 0x3200
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x45d3
movq -0x10(%rbp), %rax
movzwl 0x18(%rax), %eax
movl %eax, -0x40(%rbp)
movq 0xae1d(%rip), %rdi      # 0xf3d8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
leaq -0x40(%rbp), %rcx
movl $0x10, %edx
callq 0x3200
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
testb $0x1, 0x24(%rax)
jne 0x45e6
movq -0x18(%rbp), %rdi
callq 0x5060
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rax
movw 0x4(%rax), %cx
movq -0x18(%rbp), %rax
movswl %cx, %esi
movswl 0x6(%rax), %edx
callq 0x5460
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x18(%rbp), %rax
movzwl %cx, %esi
movzwl 0xa(%rax), %edx
callq 0x54e0
jmp 0x4772
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4650
movq -0x10(%rbp), %rax
movswl 0x10(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4679
movq -0x10(%rbp), %rax
movswl 0x12(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x46a2
movq -0x10(%rbp), %rax
movzwl 0x14(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x46cb
movq -0x10(%rbp), %rax
movzwl 0x16(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x46f3
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x471c
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1a(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4745
movq -0x10(%rbp), %rax
movzwl 0x18(%rax), %ecx
movslq -0x44(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x474d
jmp 0x4772
movq 0xac84(%rip), %rdi      # 0xf3d8
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x10(%rbp), %rax
movw 0x1a(%rax), %ax
leaq -0x40(%rbp), %rcx
movzwl %ax, %edx
callq 0x3200
movl %eax, -0x50(%rbp)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)