// File: /workspace/github_c_makefile_star2_O0/mati75[P]evilwm/client_move.c
// Function: client_resize_sweep
void client_resize_sweep(struct client *c, unsigned button) {
	// Ensure we can grab pointer events.
	if (!grab_pointer(c->screen->root, display.resize_curs))
		return;

	// Sweeping always raises.
	client_raise(c);

	int old_cx = c->x;
	int old_cy = c->y;

#ifdef INFOBANNER_MOVERESIZE
	create_info_window(c);
#endif
	XGrabServer(display.dpy);
	draw_outline(c);  // draw

	// Warp pointer to the bottom-right of the client for resizing
	setmouse(c->window, c->width, c->height);

	for (;;) {
		XEvent ev;
		XMaskEvent(display.dpy, ButtonPressMask|ButtonReleaseMask|PointerMotionMask, &ev);
		switch (ev.type) {
			case MotionNotify:
				if (ev.xmotion.root != c->screen->root)
					break;
				draw_outline(c);  // erase
				XUngrabServer(display.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(display.dpy, False);
				XGrabServer(display.dpy);
				draw_outline(c);  // draw
				break;

			case ButtonRelease:
				if (ev.xbutton.button != button)
					continue;
				draw_outline(c);  // erase
				XUngrabServer(display.dpy);
#ifdef INFOBANNER_MOVERESIZE
				remove_info_window();
#endif
				XUngrabPointer(display.dpy, CurrentTime);
				client_moveresizeraise(c);
				// In case maximise state has changed:
				ewmh_set_net_wm_state(c);
				return;

			default:
				break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xc3d7(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0xc3c1(%rip), %rax      # 0x12d80
movq 0x170(%rax), %rax
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r9d
xorl %r8d, %r8d
movl %r9d, %r8d
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x4230
cmpl $0x0, %eax
je 0x69fe
jmp 0x6ba6
movq -0x8(%rbp), %rdi
callq 0x5cb0
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x14(%rbp)
leaq 0xc35e(%rip), %rax      # 0x12d80
movq (%rax), %rdi
callq 0x4120
movq -0x8(%rbp), %rdi
callq 0x6bb0
leaq 0xc346(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x30(%rax), %r10d
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
xorl %ecx, %ecx
movl %ecx, %esi
xorl %r9d, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x4540
leaq 0xc304(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movl $0x4c, %esi
leaq -0xd8(%rbp), %rdx
callq 0x4520
movl -0xd8(%rbp), %eax
movl %eax, -0xdc(%rbp)
subl $0x5, %eax
je 0x6b50
jmp 0x6aa7
movl -0xdc(%rbp), %eax
subl $0x6, %eax
jne 0x6b9f
jmp 0x6ab8
movq -0xb0(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x10(%rcx), %rax
je 0x6ad2
jmp 0x6ba1
movq -0x8(%rbp), %rdi
callq 0x6bb0
leaq 0xc29e(%rip), %rax      # 0x12d80
movq (%rax), %rdi
callq 0x43b0
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x98(%rbp), %ecx
movl -0x94(%rbp), %r8d
movl -0x88(%rbp), %eax
leaq 0xb8e2(%rip), %r9       # 0x123f0
andl 0x28(%r9), %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %r9d
andl $0x1, %r9d
callq 0x6d80
leaq 0xc254(%rip), %rax      # 0x12d80
movq (%rax), %rdi
xorl %esi, %esi
callq 0x4510
leaq 0xc243(%rip), %rax      # 0x12d80
movq (%rax), %rdi
callq 0x4120
movq -0x8(%rbp), %rdi
callq 0x6bb0
jmp 0x6ba1
movl -0x84(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x6b60
jmp 0x6a75
movq -0x8(%rbp), %rdi
callq 0x6bb0
leaq 0xc210(%rip), %rax      # 0x12d80
movq (%rax), %rdi
callq 0x43b0
leaq 0xc201(%rip), %rax      # 0x12d80
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x41c0
movq -0x8(%rbp), %rdi
callq 0x6f40
movq -0x8(%rbp), %rdi
callq 0xa0f0
jmp 0x6ba6
jmp 0x6ba1
jmp 0x6a75
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nop