// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
movl 0x24(%rdi), %r15d
movl 0x28(%rdi), %ebp
leaq 0x504b(%rip), %r12      # 0xc7e0
movq (%r12), %rdi
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x5058(%rip), %rax      # 0xc800
subq $0x8, %rsp
xorl %r10d, %r10d
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %r10
pushq (%rax)
pushq %r10
callq 0x32a0
addq $0x20, %rsp
testl %eax, %eax
jne 0x7c8e
movq %rbx, %rdi
callq 0x3ad0
movq (%r12), %rdi
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
subq $0x8, %rsp
leaq 0x38(%rsp), %rax
leaq 0x3c(%rsp), %r10
leaq 0x40(%rsp), %rcx
leaq 0x2c(%rsp), %r8
leaq 0x28(%rsp), %r9
movq %rcx, %rdx
pushq %rax
pushq %r10
pushq %r10
callq 0x3390
addq $0x20, %rsp
leaq 0x4f66(%rip), %r14      # 0xc788
cmpl $0x0, (%r14)
je 0x7839
movq (%r12), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x7280
movl %ebp, 0x4(%rsp)
movl %r15d, 0x10(%rsp)
movq (%r12), %rdi
movl $0x4c, %esi
leaq 0x38(%rsp), %rdx
callq 0x3730
movl 0x38(%rsp), %eax
cmpl $0x6, %eax
je 0x7868
cmpl $0x5, %eax
jne 0x7842
jmp 0x7c5e
movq 0x60(%rsp), %rax
movq 0x10(%rbx), %rcx
cmpq 0x8(%rcx), %rax
jne 0x7842
cmpl $0x0, (%r14)
je 0x788e
movq %rbx, %rdi
callq 0x7280
movq (%r12), %rdi
callq 0x33f0
movl 0x78(%rsp), %edx
subl 0x24(%rsp), %edx
addl %r15d, %edx
movl %edx, 0x24(%rbx)
movl 0x7c(%rsp), %ecx
subl 0x20(%rsp), %ecx
addl %ebp, %ecx
movl %ecx, 0x28(%rbx)
leaq 0x4ed4(%rip), %rax      # 0xc784
movl (%rax), %edi
testl %edi, %edi
je 0x7c1a
leaq 0x4b17(%rip), %rax      # 0xc3d8
movl (%rax), %eax
testl %eax, 0x88(%rsp)
jne 0x7c1a
movq (%r12), %rax
movq 0xe8(%rax), %rax
movq 0x10(%rbx), %r9
movslq (%r9), %rsi
shlq $0x7, %rsi
movl 0x18(%rax,%rsi), %r8d
movl %r8d, 0x8(%rsp)
movl 0x1c(%rax,%rsi), %eax
movl %eax, 0x18(%rsp)
leaq 0x4e99(%rip), %rax      # 0xc798
movq (%rax), %r11
movl %edi, %r10d
movl %edi, (%rsp)
testq %r11, %r11
je 0x7b2d
movl %edi, (%rsp)
movl %edi, %r10d
movq 0x8(%r11), %r13
cmpq %rbx, %r13
je 0x7926
cmpq %r9, 0x10(%r13)
je 0x7933
movq (%r11), %r11
testq %r11, %r11
jne 0x7917
jmp 0x7b2d
movl 0x74(%r13), %eax
cmpl $-0x1, %eax
je 0x7942
cmpl 0x40(%r9), %eax
jne 0x7926
cmpl $0x0, 0x78(%r13)
je 0x7950
cmpl $0x0, 0x68(%r9)
je 0x7926
movl %r10d, 0xc(%rsp)
movl 0x28(%r13), %r8d
movl 0x34(%rbx), %esi
addl 0x34(%r13), %esi
movl 0x30(%rbx), %eax
addl %ecx, %eax
movl %r8d, %ebp
subl %eax, %ebp
subl %esi, %ebp
cmpl %edi, %ebp
movl %ebp, 0x1c(%rsp)
jle 0x797d
movl 0x2c(%rbx), %r14d
jmp 0x7a5c
leal (%r8,%rsi), %r10d
addl 0x30(%r13), %r10d
movl %ecx, %r15d
subl %r10d, %r15d
movl 0x2c(%rbx), %r14d
cmpl %edi, %r15d
jle 0x799e
movl 0x10(%rsp), %r15d
jmp 0x7a5c
movq %r8, 0x28(%rsp)
movl 0x24(%r13), %r8d
movl 0x2c(%r13), %r15d
movl %r8d, 0x14(%rsp)
addl %r8d, %r15d
movl %esi, %r10d
subl %edx, %r10d
addl %r15d, %r10d
movl (%rsp), %r8d
movl %r8d, %ebp
negl %ebp
cmovsl %r8d, %ebp
movl %r10d, %r12d
negl %r12d
cmovsl %r10d, %r12d
cmpl %r12d, %ebp
jb 0x79db
movl %r10d, %r8d
leal (%r14,%rdx), %r12d
subl %r12d, %r15d
movl %r8d, %r10d
negl %r10d
cmovsl %r8d, %r10d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
cmpl %ebp, %r10d
jb 0x79fd
movl %r15d, %r8d
addl %esi, %r12d
movl 0x14(%rsp), %r15d
subl %r12d, %r15d
movl %r8d, %r10d
negl %r10d
cmovsl %r8d, %r10d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
cmpl %ebp, %r10d
jb 0x7a23
movl %r15d, %r8d
movl 0x14(%rsp), %r15d
subl %edx, %r15d
movl %r8d, %r10d
negl %r10d
movl %r8d, (%rsp)
cmovsl %r8d, %r10d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
cmpl %ebp, %r10d
leaq 0x4d94(%rip), %r12      # 0xc7e0
jb 0x7a52
movl %r15d, (%rsp)
movl 0x10(%rsp), %r15d
movq 0x28(%rsp), %r8
movl 0x24(%r13), %r10d
addl %esi, %r14d
addl %edx, %r14d
movl %r10d, %ebp
subl %r14d, %ebp
cmpl %edi, %ebp
jg 0x7a80
addl %esi, %r10d
addl 0x2c(%r13), %r10d
movl %edx, %ebp
subl %r10d, %ebp
cmpl %edi, %ebp
jle 0x7a95
movl 0x4(%rsp), %ebp
leaq 0x4cfd(%rip), %r14      # 0xc788
movl 0xc(%rsp), %r10d
jmp 0x7926
movl 0x30(%r13), %r10d
addl %r8d, %r10d
subl %ecx, %esi
addl %r10d, %esi
movl 0xc(%rsp), %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl %esi, %r14d
negl %r14d
cmovsl %esi, %r14d
cmpl %r14d, %ebp
jb 0x7ac1
movl %esi, %r13d
subl %eax, %r10d
movl %r13d, %eax
negl %eax
cmovsl %r13d, %eax
movl %r10d, %esi
negl %esi
cmovsl %r10d, %esi
cmpl %esi, %eax
movl 0x1c(%rsp), %ebp
jb 0x7ae1
movl %r10d, %r13d
movl %r13d, %eax
negl %eax
cmovsl %r13d, %eax
movl %ebp, %esi
negl %esi
cmovsl %ebp, %esi
cmpl %esi, %eax
movl %ebp, %eax
movl 0x4(%rsp), %ebp
leaq 0x4c88(%rip), %r14      # 0xc788
movl %r13d, %r10d
jb 0x7b08
movl %eax, %r10d
subl %ecx, %r8d
movl %r10d, %eax
negl %eax
cmovsl %r10d, %eax
movl %r8d, %esi
negl %esi
cmovsl %r8d, %esi
cmpl %esi, %eax
jb 0x7926
movl %r8d, %r10d
jmp 0x7926
movl (%rsp), %esi
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
cmpl %edi, %eax
jge 0x7b42
addl %edx, %esi
movl %esi, 0x24(%rbx)
movl %esi, %edx
movl 0x18(%rsp), %r11d
movl %r10d, %eax
negl %eax
cmovsl %r10d, %eax
cmpl %edi, %eax
jge 0x7b5e
addl %ecx, %r10d
movl %r10d, 0x28(%rbx)
movl %r10d, %ecx
movl 0x34(%rbx), %eax
movl %edx, %esi
subl %eax, %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl %edi, %r8d
jge 0x7b79
movl %eax, 0x24(%rbx)
movl %eax, %edx
movl %ecx, %esi
subl %eax, %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl %edi, %r8d
jge 0x7b91
movl %eax, 0x28(%rbx)
movl %eax, %ecx
movl 0x2c(%rbx), %esi
movl %eax, %r8d
subl 0x8(%rsp), %r8d
addl %edx, %r8d
addl %esi, %r8d
movl %r8d, %r9d
negl %r9d
cmovsl %r8d, %r9d
cmpl %edi, %r9d
jge 0x7bbc
movl 0x8(%rsp), %edx
subl %eax, %edx
subl %esi, %edx
movl %edx, 0x24(%rbx)
movl 0x30(%rbx), %r8d
movl %eax, %r9d
subl %r11d, %r9d
addl %ecx, %r9d
addl %r8d, %r9d
movl %r9d, %r10d
negl %r10d
cmovsl %r9d, %r10d
cmpl %edi, %r10d
jge 0x7be6
movl %r11d, %ecx
subl %eax, %ecx
subl %r8d, %ecx
movl %ecx, 0x28(%rbx)
movl %edx, %edi
negl %edi
cmovsl %edx, %edi
xorl %eax, %edi
xorl 0x8(%rsp), %esi
orl %edi, %esi
jne 0x7c00
movl $0x0, 0x24(%rbx)
xorl %edx, %edx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
xorl %eax, %esi
xorl %r11d, %r8d
orl %esi, %r8d
jne 0x7c1a
movl $0x0, 0x28(%rbx)
xorl %ecx, %ecx
cmpl $0x0, (%r14)
movq (%r12), %rdi
je 0x7c41
xorl %esi, %esi
callq 0x3490
movq (%r12), %rdi
callq 0x34b0
movq %rbx, %rdi
callq 0x7280
jmp 0x7842
movq 0x8(%rbx), %rsi
movl 0x34(%rbx), %eax
subl %eax, %edx
subl %eax, %ecx
callq 0x3220
movq %rbx, %rdi
callq 0x3bac
jmp 0x7842
cmpl $0x0, (%r14)
je 0x7c75
movq %rbx, %rdi
callq 0x7280
movq (%r12), %rdi
callq 0x33f0
movq (%r12), %rdi
xorl %esi, %esi
callq 0x33c0
cmpl $0x0, (%r14)
je 0x7c8e
movq %rbx, %rdi
callq 0x738f
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq