// File: /workspace/github_c_makefile_star2_O1/gitluin[P]sara/src/sara.c
// Function: configurerequest
void
configurerequest(XEvent* e){
	client* c;
	monitor* m;
	XWindowChanges wc;
	XConfigureRequestEvent* ev = &e->xconfigurerequest;

	if ( (c = findclient(ev->window)) ){
		if (c->isfloat){
			m = c->mon;
			if (ev->value_mask & CWX)
				c->x = m->mx + ev->x;
			if (ev->value_mask & CWY)
				c->y = (ev->y < barpx) ? barpx : ev->y;
			if (ev->value_mask & CWWidth)
				c->w = ev->width;
			if (ev->value_mask & CWHeight)
				c->h = ev->height;
			if ((c->x + c->w) > m->mx + m->mw)
				c->x = m->mx + (m->mw / 2 - c->w / 2);
			if ((c->y + c->h) > m->wy + m->wh)
				c->y = m->wy + (m->wh / 2 - c->h / 2);
			if ((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
				configure(c);
			if (ISVISIBLE(c))
				XMoveResizeWindow(dis, c->win, c->x, c->y, c->w, c->h);

		} else {
			configure(c);
		}

	} else {
		wc.x = ev->x;
		wc.y = ev->y;
		wc.width = ev->width;
		wc.height = ev->height;
		wc.sibling = ev->above;
		wc.stack_mode = ev->detail;
		XConfigureWindow(dis, ev->window, ev->value_mask, &wc);
	}

	XSync(dis, False);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x28(%rdi), %rdi
callq 0x4e5b
testq %rax, %rax
je 0x2b80
movq %rax, %rbx
cmpl $0x0, 0x10(%rax)
je 0x2bc3
movq 0x30(%rbx), %rcx
movq 0x58(%r14), %rax
testb $0x1, %al
je 0x2aae
movl 0x30(%r14), %edx
addl 0x8(%rcx), %edx
movl %edx, (%rbx)
testb $0x2, %al
je 0x2ac4
movl 0x34(%r14), %edx
cmpl $0x15, %edx
movl $0x14, %esi
cmovgel %edx, %esi
movl %esi, 0x4(%rbx)
testb $0x4, %al
je 0x2acf
movl 0x38(%r14), %edx
movl %edx, 0x8(%rbx)
testb $0x8, %al
je 0x2ada
movl 0x3c(%r14), %edx
movl %edx, 0xc(%rbx)
movl 0x8(%rbx), %esi
movl (%rbx), %r8d
addl %esi, %r8d
movl 0x8(%rcx), %edx
movl 0x14(%rcx), %edi
leal (%rdi,%rdx), %r9d
cmpl %r9d, %r8d
jle 0x2b0f
movl %edi, %r8d
shrl $0x1f, %r8d
addl %edi, %r8d
sarl %r8d
movl %esi, %edi
shrl $0x1f, %edi
addl %esi, %edi
sarl %edi
subl %edi, %edx
addl %r8d, %edx
movl %edx, (%rbx)
movl 0xc(%rbx), %esi
movl 0x4(%rbx), %edi
addl %esi, %edi
movl 0x18(%rcx), %edx
movl 0x1c(%rcx), %ecx
leal (%rcx,%rdx), %r8d
cmpl %r8d, %edi
jle 0x2b3f
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
movl %esi, %ecx
shrl $0x1f, %ecx
addl %esi, %ecx
sarl %ecx
subl %ecx, %edx
addl %edi, %edx
movl %edx, 0x4(%rbx)
testb $0x3, %al
sete %cl
testb $0xc, %al
setne %al
orb %cl, %al
jne 0x2b55
movq %rbx, %rdi
callq 0x5096
movq 0x30(%rbx), %rax
movl 0x24(%rax), %eax
testl %eax, 0x1c(%rbx)
je 0x2bcb
movq 0x6958(%rip), %rdi      # 0x94c0
movq 0x38(%rbx), %rsi
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
callq 0x2250
jmp 0x2bcb
movl 0x30(%r14), %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl 0x34(%r14), %eax
movl %eax, 0x4(%rcx)
movl 0x38(%r14), %eax
movl %eax, 0x8(%rcx)
movl 0x3c(%r14), %eax
movl %eax, 0xc(%rcx)
movq 0x48(%r14), %rax
movq %rax, 0x18(%rcx)
movl 0x50(%r14), %eax
movl %eax, 0x20(%rcx)
movq 0x690c(%rip), %rdi      # 0x94c0
movq 0x28(%r14), %rsi
movl 0x58(%r14), %edx
callq 0x20a0
jmp 0x2bcb
movq %rbx, %rdi
callq 0x5096
movq 0x68ee(%rip), %rdi      # 0x94c0
xorl %esi, %esi
callq 0x2330
addq $0x28, %rsp
popq %rbx
popq %r14
retq