// File: /workspace/github_c_makefile_star2_O0/kek[P]evilwm/events.c
// Function: do_window_changes
static void do_window_changes(int value_mask, XWindowChanges *wc, Client *c,
		int gravity) {
	if (gravity == 0)
		gravity = c->win_gravity_hint;
	c->win_gravity = gravity;
	if (value_mask & CWX) c->x = wc->x;
	if (value_mask & CWY) c->y = wc->y;
	if (value_mask & (CWWidth|CWHeight)) {
		int dw = 0, dh = 0;
		if (!(value_mask & (CWX|CWY))) {
			gravitate_border(c, -c->border);
		}
		if (value_mask & CWWidth) {
			int neww = wc->width;
			if (neww < c->min_width)
				neww = c->min_width;
			if (c->max_width && neww > c->max_width)
				neww = c->max_width;
			dw = neww - c->width;
			c->width = neww;
		}
		if (value_mask & CWHeight) {
			int newh = wc->height;
			if (newh < c->min_height)
				newh = c->min_height;
			if (c->max_height && newh > c->max_height)
				newh = c->max_height;
			dh = newh - c->height;
			c->height = newh;
		}
		/* only apply position fixes if not being explicitly moved */
		if (!(value_mask & (CWX|CWY))) {
			switch (gravity) {
			default:
			case NorthWestGravity:
				break;
			case NorthGravity:
				c->x -= (dw / 2);
				break;
			case NorthEastGravity:
				c->x -= dw;
				break;
			case WestGravity:
				c->y -= (dh / 2);
				break;
			case CenterGravity:
				c->x -= (dw / 2);
				c->y -= (dh / 2);
				break;
			case EastGravity:
				c->x -= dw;
				c->y -= (dh / 2);
				break;
			case SouthWestGravity:
				c->y -= dh;
				break;
			case SouthGravity:
				c->x -= (dw / 2);
				c->y -= dh;
				break;
			case SouthEastGravity:
				c->x -= dw;
				c->y -= dh;
				break;
			}
			value_mask |= CWX|CWY;
			gravitate_border(c, c->border);
		}
	}
	wc->x = c->x - c->border;
	wc->y = c->y - c->border;
	wc->border_width = c->border;
	XConfigureWindow(dpy, c->parent, value_mask, wc);
	XMoveResizeWindow(dpy, c->window, 0, 0, c->width, c->height);
	if ((value_mask & (CWX|CWY)) && !(value_mask & (CWWidth|CWHeight))) {
		send_config(c);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x5656
movq -0x18(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x6c(%rax)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5678
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5691
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x4(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x58ee
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x56cb
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
xorl %esi, %esi
subl 0x34(%rax), %esi
callq 0x3bf0
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x572d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x48(%rcx), %eax
jge 0x56f6
movq -0x18(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x5716
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x50(%rcx), %eax
jle 0x5716
movq -0x18(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
subl 0x2c(%rcx), %eax
movl %eax, -0x20(%rbp)
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl -0x4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x578f
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
jge 0x5758
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x5778
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x54(%rcx), %eax
jle 0x5778
movq -0x18(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
subl 0x30(%rcx), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x58ec
movl -0x1c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x8, %eax
ja 0x57c2
movq -0x38(%rbp), %rax
leaq 0x68f3(%rip), %rcx      # 0xc0ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x57c4
jmp 0x58d3
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
jmp 0x58d3
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
jmp 0x58d3
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
jmp 0x58d3
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
jmp 0x58d3
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
jmp 0x58d3
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
jmp 0x58d3
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
jmp 0x58d3
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x24(%rax)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
movl -0x4(%rbp), %eax
orl $0x3, %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x3bf0
jmp 0x58ee
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x34(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x34(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0x34(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
leaq 0xa054(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rcx
callq 0x3040
leaq 0xa036(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %r8d
movq -0x18(%rbp), %rax
movl 0x30(%rax), %r9d
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x3260
movl -0x4(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x598c
movl -0x4(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
jne 0x598c
movq -0x18(%rbp), %rdi
callq 0x3b60
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)