// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x5df0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x2ec9
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x2ebe
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2d1f
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x48(%rbp), %rax
addl 0x30(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0x2d59
movq -0x48(%rbp), %rax
cmpl $0x14, 0x34(%rax)
jge 0x2d45
movl $0x14, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2d4f
movq -0x48(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x2d79
movq -0x48(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x2d99
movq -0x48(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x8(%rcx), %eax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x14(%rdx), %ecx
cmpl %ecx, %eax
jle 0x2def
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x50(%rbp), %eax
subl %edx, %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xc(%rcx), %eax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x1c(%rdx), %ecx
cmpl %ecx, %eax
jle 0x2e47
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x54(%rbp), %eax
subl %edx, %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0x3, %rax
cmpq $0x0, %rax
je 0x2e74
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
andq $0xc, %rax
cmpq $0x0, %rax
jne 0x2e74
movq -0x10(%rbp), %rdi
callq 0x6150
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
andl 0x24(%rcx), %eax
cmpl $0x0, %eax
je 0x2ebc
movq 0x866e(%rip), %rdi      # 0xb500
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0xc(%rax), %r9d
callq 0x2250
jmp 0x2ec7
movq -0x10(%rbp), %rdi
callq 0x6150
jmp 0x2f29
movq -0x48(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x48(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x20(%rbp)
movq 0x85f2(%rip), %rdi      # 0xb500
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
movl %eax, %edx
leaq -0x40(%rbp), %rcx
callq 0x20b0
movq 0x85d0(%rip), %rdi      # 0xb500
xorl %esi, %esi
callq 0x2330
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)