// File: /workspace/github_c_makefile_star2_O0/yugecin[P]evilwm/screen.c
// Function: drag
void drag(Client *c) {
	XEvent ev;
	int hv;
	int x1, y1;
	int old_cx = c->x;
	int old_cy = c->y;

	if (!grab_pointer(c->screen->root, MouseMask, move_curs)) return;
	client_raise(c);
	get_mouse_position(&x1, &y1, c->screen->root);
#ifdef INFOBANNER_MOVERESIZE
	create_info_window(c);
#endif
	if (no_solid_drag) {
		XGrabServer(dpy);
		draw_outline(c);
	}
	for (;;) {
		XMaskEvent(dpy, MouseMask, &ev);
		switch (ev.type) {
			case MotionNotify:
				if (ev.xmotion.root != c->screen->root)
					break;
				if (no_solid_drag) {
					draw_outline(c); /* clear */
					XUngrabServer(dpy);
				}

				hv = 0;
				if (c->oldh) {
					hv |= MAXIMISE_VERT;
				}
				if (c->oldw) {
					hv |= MAXIMISE_HORZ;
				}
				if (hv) {
					maximise_client(c, NET_WM_STATE_REMOVE, hv);
				}

				c->x = old_cx + (ev.xmotion.x - x1);
				c->y = old_cy + (ev.xmotion.y - y1);
				if (opt_snap && !(ev.xmotion.state & altmask))
					snap_client(c);

#ifdef INFOBANNER_MOVERESIZE
				update_info_window(c);
#endif
				if (no_solid_drag) {
					XSync(dpy, False);
					XGrabServer(dpy);
					draw_outline(c);
				} else {
					XMoveWindow(dpy, c->parent,
							c->x - c->border,
							c->y - c->border);
					send_config(c);
				}
				break;
			case ButtonRelease:
				if (no_solid_drag) {
					draw_outline(c); /* clear */
					XUngrabServer(dpy);
				}
#ifdef INFOBANNER_MOVERESIZE
				remove_info_window();
#endif
				XUngrabPointer(dpy, CurrentTime);
				if (no_solid_drag) {
					moveresize(c);
				}
				return;
			default: break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0xd8(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0xdc(%rbp)
leaq 0x5e20(%rip), %rax      # 0xfa90
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x5e2a(%rip), %rax      # 0xfab0
movq (%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 0x32c0
cmpl $0x0, %eax
je 0x9cc1
jmp 0x9f3c
movq -0x8(%rbp), %rdi
callq 0x39f0
leaq 0x5dbf(%rip), %rax      # 0xfa90
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0xe8(%rbp), %rcx
leaq -0xd0(%rbp), %r8
leaq -0xd4(%rbp), %r9
leaq -0xec(%rbp), %r10
leaq -0xf0(%rbp), %rax
movq %rcx, %rdx
movq %r10, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x33b0
leaq 0x5cc8(%rip), %rax      # 0xf9e8
cmpl $0x0, (%rax)
je 0x9d3d
leaq 0x5d64(%rip), %rax      # 0xfa90
movq (%rax), %rdi
callq 0x34d0
movq -0x8(%rbp), %rdi
callq 0x9550
jmp 0x9d3f
leaq 0x5d4a(%rip), %rax      # 0xfa90
movq (%rax), %rdi
movl $0x4c, %esi
leaq -0xc8(%rbp), %rdx
callq 0x3740
movl -0xc8(%rbp), %eax
movl %eax, -0xf4(%rbp)
subl $0x5, %eax
je 0x9ee7
jmp 0x9d71
movl -0xf4(%rbp), %eax
subl $0x6, %eax
jne 0x9f35
jmp 0x9d82
movq -0xa0(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x8(%rcx), %rax
je 0x9d9c
jmp 0x9f37
leaq 0x5c45(%rip), %rax      # 0xf9e8
cmpl $0x0, (%rax)
je 0x9dc0
movq -0x8(%rbp), %rdi
callq 0x9550
leaq 0x5cd8(%rip), %rax      # 0xfa90
movq (%rax), %rdi
callq 0x3410
movl $0x0, -0xcc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x9de3
movl -0xcc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xcc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0x9dfc
movl -0xcc(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
je 0x9e16
movq -0x8(%rbp), %rdi
movl -0xcc(%rbp), %edx
xorl %esi, %esi
callq 0x9f50
movl -0xd8(%rbp), %ecx
movl -0x88(%rbp), %eax
subl -0xd0(%rbp), %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0xdc(%rbp), %ecx
movl -0x84(%rbp), %eax
subl -0xd4(%rbp), %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
leaq 0x5b91(%rip), %rax      # 0xf9e4
cmpl $0x0, (%rax)
je 0x9e72
movl -0x78(%rbp), %eax
leaq 0x5576(%rip), %rcx      # 0xf3d8
andl (%rcx), %eax
cmpl $0x0, %eax
jne 0x9e72
movq -0x8(%rbp), %rdi
callq 0xa2d0
leaq 0x5b6f(%rip), %rax      # 0xf9e8
cmpl $0x0, (%rax)
je 0x9ea9
leaq 0x5c0b(%rip), %rax      # 0xfa90
movq (%rax), %rdi
xorl %esi, %esi
callq 0x34b0
leaq 0x5bfa(%rip), %rax      # 0xfa90
movq (%rax), %rdi
callq 0x34d0
movq -0x8(%rbp), %rdi
callq 0x9550
jmp 0x9ee5
leaq 0x5be0(%rip), %rax      # 0xfa90
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %edx
movq -0x8(%rbp), %rax
subl 0x34(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0x34(%rax), %ecx
callq 0x3230
movq -0x8(%rbp), %rdi
callq 0x3b20
jmp 0x9f37
leaq 0x5afa(%rip), %rax      # 0xf9e8
cmpl $0x0, (%rax)
je 0x9f0b
movq -0x8(%rbp), %rdi
callq 0x9550
leaq 0x5b8d(%rip), %rax      # 0xfa90
movq (%rax), %rdi
callq 0x3410
leaq 0x5b7e(%rip), %rax      # 0xfa90
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33e0
leaq 0x5ac3(%rip), %rax      # 0xf9e8
cmpl $0x0, (%rax)
je 0x9f33
movq -0x8(%rbp), %rdi
callq 0x98f0
jmp 0x9f3c
jmp 0x9f37
jmp 0x9d3f
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)