// File: /workspace/github_c_makefile_star2_O3/kek[P]evilwm/screen.c
// Function: sweep
void sweep(Client *c) {
	XEvent ev;
	int old_cx = c->x;
	int old_cy = c->y;

	if (!grab_pointer(c->screen->root, MouseMask, resize_curs)) return;

	client_raise(c);
#ifdef INFOBANNER_MOVERESIZE
	create_info_window(c);
#endif
	XGrabServer(dpy);
	draw_outline(c);

	setmouse(c->window, c->width, c->height);
	for (;;) {
		XMaskEvent(dpy, MouseMask, &ev);
		switch (ev.type) {
			case MotionNotify:
				if (ev.xmotion.root != c->screen->root)
					break;
				draw_outline(c); /* clear */
				XUngrabServer(dpy);
				recalculate_sweep(c, old_cx, old_cy, ev.xmotion.x, ev.xmotion.y, ev.xmotion.state & altmask);
#ifdef INFOBANNER_MOVERESIZE
				update_info_window(c);
#endif
				XSync(dpy, False);
				XGrabServer(dpy);
				draw_outline(c);
				break;
			case ButtonRelease:
				draw_outline(c); /* clear */
				XUngrabServer(dpy);
#ifdef INFOBANNER_MOVERESIZE
				remove_info_window();
#endif
				XUngrabPointer(dpy, CurrentTime);
				moveresize(c);
				/* In case maximise state has changed: */
				ewmh_set_net_wm_state(c);
				return;
			default: break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movl 0x24(%rdi), %ebp
movl 0x28(%rdi), %r12d
leaq 0x5756(%rip), %r15      # 0xc7e0
movq (%r15), %rdi
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x576c(%rip), %rax      # 0xc808
subq $0x8, %rsp
xorl %r13d, %r13d
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %r13
pushq (%rax)
pushq %r13
callq 0x32a0
addq $0x20, %rsp
testl %eax, %eax
jne 0x726e
movq %rbx, %rdi
callq 0x3ad0
movq (%r15), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x7280
movq (%r15), %rdi
movq (%rbx), %rdx
movl 0x2c(%rbx), %eax
movl 0x30(%rbx), %r10d
subq $0x8, %rsp
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x32c0
addq $0x20, %rsp
leaq 0x8(%rsp), %r14
movq (%r15), %rdi
movl $0x4c, %esi
movq %r14, %rdx
callq 0x3730
movl 0x8(%rsp), %eax
cmpl $0x6, %eax
je 0x7136
cmpl $0x5, %eax
jne 0x7113
jmp 0x7244
movq 0x30(%rsp), %rax
movq 0x10(%rbx), %rcx
cmpq 0x8(%rcx), %rax
jne 0x7113
movq %rbx, %rdi
callq 0x7280
movq (%r15), %rdi
callq 0x33f0
movl 0x48(%rsp), %edi
movl 0x4c(%rsp), %ecx
leaq 0x5274(%rip), %rax      # 0xc3d8
movl (%rax), %esi
andl 0x58(%rsp), %esi
je 0x71cc
movl %ebp, %eax
subl %edi, %eax
movl %eax, %r8d
negl %r8d
cmovsl %eax, %r8d
movl %r8d, %eax
subl 0x60(%rbx), %eax
cltd
idivl 0x58(%rbx)
subl %edx, %r8d
movl 0x48(%rbx), %edx
movl %r8d, %eax
cmpl %edx, %r8d
jg 0x7194
movl %edx, %eax
movl 0x50(%rbx), %r9d
testl %edx, %edx
cmovel %r8d, %eax
movl %eax, %edx
cmpl %r9d, %eax
jl 0x71a8
movl %r9d, %edx
testl %r9d, %r9d
cmovel %eax, %edx
cmpl %edi, %ebp
movl $0x0, %eax
cmovgl %edx, %eax
movl %ebp, %edi
subl %eax, %edi
movl %r13d, 0x40(%rbx)
movl %edx, 0x2c(%rbx)
movl %edi, 0x24(%rbx)
testl %esi, %esi
jne 0x71d8
jmp 0x71d2
cmpl $0x0, 0x40(%rbx)
je 0x716c
cmpl $0x0, 0x44(%rbx)
jne 0x7225
movl %r12d, %eax
subl %ecx, %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movl %esi, %eax
subl 0x64(%rbx), %eax
cltd
idivl 0x5c(%rbx)
subl %edx, %esi
movl 0x4c(%rbx), %edx
movl %esi, %eax
cmpl %edx, %esi
jg 0x71fa
movl %edx, %eax
movl 0x54(%rbx), %edi
testl %edx, %edx
cmovel %esi, %eax
movl %eax, %edx
cmpl %edi, %eax
jl 0x720a
movl %edi, %edx
testl %edi, %edi
cmovel %eax, %edx
cmpl %ecx, %r12d
movl %r13d, 0x44(%rbx)
movl %edx, 0x30(%rbx)
cmovlel %r13d, %edx
movl %r12d, %eax
subl %edx, %eax
movl %eax, 0x28(%rbx)
movq (%r15), %rdi
xorl %esi, %esi
callq 0x3490
movq (%r15), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x7280
jmp 0x7113
movq %rbx, %rdi
callq 0x7280
movq (%r15), %rdi
callq 0x33f0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x33c0
movq %rbx, %rdi
callq 0x738f
movq %rbx, %rdi
callq 0x5a42
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq