// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/mousefunc.c
// Function: mousefunc_window_move
void
mousefunc_window_move(struct client_ctx *cc, void *arg)
{
	XEvent			 ev;
	Time			 ltime = 0;
	struct screen_ctx	*sc = cc->sc;
	int			 px, py;

	client_raise(cc);

	if (cc->flags & CLIENT_FREEZE)
		return;

	if (xu_ptr_grab(cc->win, MOUSEMASK, Cursor_move) < 0)
		return;

	xu_ptr_getpos(cc->win, &px, &py);

	for (;;) {
		XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev);

		switch (ev.type) {
		case Expose:
			client_draw_border(cc);
			break;
		case MotionNotify:
			cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
			cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;

			cc->geom.x += client_snapcalc(cc->geom.x,
			    cc->geom.w, sc->view.w,
			    cc->bwidth, Conf.snapdist);
			cc->geom.y += client_snapcalc(cc->geom.y,
			    cc->geom.h, sc->view.h,
			    cc->bwidth, Conf.snapdist);

			/* don't move more than 60 times / second */
			if ((ev.xmotion.time - ltime) > (1000 / 60)) {
				ltime = ev.xmotion.time;
				client_move(cc);
			}
			break;
		case ButtonRelease:
			if (ltime)
				client_move(cc);
			xu_ptr_ungrab();
			return;
		}
	}
	/* NOTREACHED */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x81a0
movq -0x8(%rbp), %rax
movl 0xa8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x103ad
jmp 0x10548
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0xc3fc(%rip), %rax      # 0x1c7b8
movq (%rax), %rdx
movl $0x4c, %esi
callq 0xaa30
cmpl $0x0, %eax
jge 0x103d3
jmp 0x10548
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
leaq -0xe4(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0xabf0
leaq 0xc3b3(%rip), %rax      # 0x1c7a8
movq (%rax), %rdi
movl $0x804c, %esi           # imm = 0x804C
leaq -0xd0(%rbp), %rdx
callq 0x55c0
movl -0xd0(%rbp), %eax
movl %eax, -0xec(%rbp)
subl $0x5, %eax
je 0x10529
jmp 0x10420
movl -0xec(%rbp), %eax
subl $0x6, %eax
je 0x1044c
jmp 0x1042d
movl -0xec(%rbp), %eax
subl $0xc, %eax
jne 0x10543
jmp 0x1043e
movq -0x8(%rbp), %rdi
callq 0x7210
jmp 0x10543
movl -0x88(%rbp), %ecx
subl -0xe4(%rbp), %ecx
movq -0x8(%rbp), %rax
subl 0x50(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movl -0x84(%rbp), %ecx
subl -0xe8(%rbp), %ecx
movq -0x8(%rbp), %rax
subl 0x50(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %esi
movq -0xe0(%rbp), %rax
movl 0xac(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
leaq 0xa217(%rip), %rax      # 0x1a6c0
movl 0x5c(%rax), %r8d
callq 0x8880
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x60(%rax), %esi
movq -0xe0(%rbp), %rax
movl 0xb0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
leaq 0xa1d9(%rip), %rax      # 0x1a6c0
movl 0x5c(%rax), %r8d
callq 0x8880
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq -0x98(%rbp), %rax
subq -0xd8(%rbp), %rax
cmpq $0x10, %rax
jbe 0x10527
movq -0x98(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x71d0
jmp 0x10543
cmpq $0x0, -0xd8(%rbp)
je 0x1053c
movq -0x8(%rbp), %rdi
callq 0x71d0
callq 0xaae0
jmp 0x10548
jmp 0x103ee
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)