// File: /workspace/github_c_makefile_star2_O2/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 $0xd8, %rsp
movq %rdi, %rbx
movl 0x24(%rdi), %ebp
movl 0x28(%rdi), %r13d
leaq 0x6ace(%rip), %r12      # 0xd7e0
movq (%r12), %rdi
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x6ae3(%rip), %rax      # 0xd808
movq (%rax), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
andq $0x0, (%rsp)
pushq $0x4c
popq %rcx
pushq $0x1
popq %r8
xorl %edx, %edx
movl %r8d, %r9d
callq 0x32a0
testl %eax, %eax
jne 0x6efe
movq %rbx, %rdi
callq 0x391b
movq (%r12), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x6f10
movq (%r12), %rdi
movq (%rbx), %rdx
movl 0x2c(%rbx), %eax
movl 0x30(%rbx), %ecx
andl $0x0, (%rsp)
movl %ecx, 0x10(%rsp)
movl %eax, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x32c0
pushq $0x4c
popq %r14
leaq 0x18(%rsp), %r15
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3730
movl 0x18(%rsp), %eax
cmpl $0x6, %eax
je 0x6dbd
cmpl $0x5, %eax
jne 0x6d9b
jmp 0x6ed2
movq 0x40(%rsp), %rax
movq 0x10(%rbx), %rcx
cmpq 0x8(%rcx), %rax
jne 0x6d9b
movq %rbx, %rdi
callq 0x6f10
movq (%r12), %rdi
callq 0x33f0
movl 0x58(%rsp), %edi
movl 0x5c(%rsp), %ecx
leaq 0x65ec(%rip), %rax      # 0xd3d8
movl (%rax), %esi
andl 0x68(%rsp), %esi
je 0x6e54
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 0x6e1c
movl %edx, %eax
movl 0x50(%rbx), %r9d
testl %edx, %edx
cmovel %r8d, %eax
movl %eax, %edx
cmpl %r9d, %eax
jl 0x6e30
movl %r9d, %edx
testl %r9d, %r9d
cmovel %eax, %edx
cmpl %edi, %ebp
movl $0x0, %eax
cmovgl %edx, %eax
andl $0x0, 0x40(%rbx)
movl %ebp, %edi
subl %eax, %edi
movl %edx, 0x2c(%rbx)
movl %edi, 0x24(%rbx)
testl %esi, %esi
jne 0x6e60
jmp 0x6e5a
cmpl $0x0, 0x40(%rbx)
je 0x6df4
cmpl $0x0, 0x44(%rbx)
jne 0x6eb1
movl %r13d, %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 0x6e82
movl %edx, %eax
movl 0x54(%rbx), %edi
testl %edx, %edx
cmovel %esi, %eax
movl %eax, %edx
cmpl %edi, %eax
jl 0x6e92
movl %edi, %edx
testl %edi, %edi
cmovel %eax, %edx
cmpl %ecx, %r13d
movl %edx, 0x30(%rbx)
movl $0x0, %eax
cmovlel %eax, %edx
andl $0x0, 0x44(%rbx)
movl %r13d, %eax
subl %edx, %eax
movl %eax, 0x28(%rbx)
movq (%r12), %rdi
xorl %esi, %esi
callq 0x3490
movq (%r12), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x6f10
jmp 0x6d9b
movq %rbx, %rdi
callq 0x6f10
movq (%r12), %rdi
callq 0x33f0
movq (%r12), %rdi
xorl %esi, %esi
callq 0x33c0
movq %rbx, %rdi
callq 0x701d
movq %rbx, %rdi
callq 0x5738
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq