// File: /workspace/github_c_makefile_star2_O0/kek[P]evilwm/screen.c
// Function: drag
void drag(Client *c) {
	XEvent ev;
	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);
				}
				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, -0xd4(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0xd8(%rbp)
leaq 0x6040(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x604a(%rip), %rax      # 0xf9a0
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 0x9991
jmp 0x9bb6
movq -0x8(%rbp), %rdi
callq 0x39f0
leaq 0x5fdf(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0xe0(%rbp), %rcx
leaq -0xcc(%rbp), %r8
leaq -0xd0(%rbp), %r9
leaq -0xe4(%rbp), %r10
leaq -0xe8(%rbp), %rax
movq %rcx, %rdx
movq %r10, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x33b0
leaq 0x5f38(%rip), %rax      # 0xf928
cmpl $0x0, (%rax)
je 0x9a0d
leaq 0x5f84(%rip), %rax      # 0xf980
movq (%rax), %rdi
callq 0x34d0
movq -0x8(%rbp), %rdi
callq 0x9240
jmp 0x9a0f
leaq 0x5f6a(%rip), %rax      # 0xf980
movq (%rax), %rdi
movl $0x4c, %esi
leaq -0xc8(%rbp), %rdx
callq 0x3740
movl -0xc8(%rbp), %eax
movl %eax, -0xec(%rbp)
subl $0x5, %eax
je 0x9b61
jmp 0x9a41
movl -0xec(%rbp), %eax
subl $0x6, %eax
jne 0x9baf
jmp 0x9a52
movq -0xa0(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x8(%rcx), %rax
je 0x9a6c
jmp 0x9bb1
leaq 0x5eb5(%rip), %rax      # 0xf928
cmpl $0x0, (%rax)
je 0x9a90
movq -0x8(%rbp), %rdi
callq 0x9240
leaq 0x5ef8(%rip), %rax      # 0xf980
movq (%rax), %rdi
callq 0x3410
movl -0xd4(%rbp), %ecx
movl -0x88(%rbp), %eax
subl -0xcc(%rbp), %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0xd8(%rbp), %ecx
movl -0x84(%rbp), %eax
subl -0xd0(%rbp), %eax
addl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
leaq 0x5e57(%rip), %rax      # 0xf924
cmpl $0x0, (%rax)
je 0x9aec
movl -0x78(%rbp), %eax
leaq 0x58fc(%rip), %rcx      # 0xf3d8
andl (%rcx), %eax
cmpl $0x0, %eax
jne 0x9aec
movq -0x8(%rbp), %rdi
callq 0x9bc0
leaq 0x5e35(%rip), %rax      # 0xf928
cmpl $0x0, (%rax)
je 0x9b23
leaq 0x5e81(%rip), %rax      # 0xf980
movq (%rax), %rdi
xorl %esi, %esi
callq 0x34b0
leaq 0x5e70(%rip), %rax      # 0xf980
movq (%rax), %rdi
callq 0x34d0
movq -0x8(%rbp), %rdi
callq 0x9240
jmp 0x9b5f
leaq 0x5e56(%rip), %rax      # 0xf980
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 0x3b60
jmp 0x9bb1
leaq 0x5dc0(%rip), %rax      # 0xf928
cmpl $0x0, (%rax)
je 0x9b85
movq -0x8(%rbp), %rdi
callq 0x9240
leaq 0x5e03(%rip), %rax      # 0xf980
movq (%rax), %rdi
callq 0x3410
leaq 0x5df4(%rip), %rax      # 0xf980
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33e0
leaq 0x5d89(%rip), %rax      # 0xf928
cmpl $0x0, (%rax)
je 0x9bad
movq -0x8(%rbp), %rdi
callq 0x95c0
jmp 0x9bb6
jmp 0x9bb1
jmp 0x9a0f
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nop