// File: /workspace/github_c_makefile_star2_O1/Cloudef[P]dwm-fork/dwm.c
// Function: movemouse
void
movemouse(const Arg *arg) {

   int x, y, ocx, ocy, nx, ny;
   Client *c;
   Monitor *m;
   XEvent ev;

   if(!(c = selmon->sel))
      return;
   if(c->iszombie || c->isfullscreen)
      return;
   if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
            None, cursor[CurMove], CurrentTime) != GrabSuccess)
      return;
   if(!getrootptr(&x, &y))
      return;

   if(!c->isfloating)
   {
      ocx = x - c->fw / 2; /* center */
      ocy = y - c->fh / 2; /* center */
      resizeclient(c, ocx, ocy, c->fw, c->fh);
   }
   else
   {
      ocx = c->x;
      ocy = c->y;
      resizeclient(c, c->x, c->y, c->fw, c->fh );
   }
   c->isfloating = True;
   arrange(c->mon);
   focus(c);

   if(!c->isbelow) XRaiseWindow(dpy, c->win);
   do {
      XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
      switch (ev.type) {
         case ConfigureRequest:
         case Expose:
         case MapRequest:
            handler[ev.type](&ev);
            break;
         case MotionNotify:
            nx = ocx + (ev.xmotion.x - x);
            ny = ocy + (ev.xmotion.y - y);
            if(!selmon->lt[selmon->sellt]->arrange || c->isfloating)
               resize(c, nx, ny, c->w, c->h, True);
            if((m = ptrtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
               sendmon(c, m);
               focusmon(m);
               focus(c);
               if(!c->isbelow) XRaiseWindow( dpy, c->win );
            }
            break;
      }
   } while(ev.type != ButtonRelease);
   XUngrabPointer(dpy, CurrentTime);
   if((m = ptrtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
      sendmon(c, m);
      focusmon(m);
      focus(c);
      if(!c->isbelow) XRaiseWindow( dpy, c->win );
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq 0x930d(%rip), %rax      # 0x13470
movq 0x80(%rax), %rbx
testq %rbx, %rbx
je 0xa1bd
cmpl $0x0, 0x17c(%rbx)
jne 0xa1bd
cmpl $0x0, 0x160(%rbx)
jne 0xa1bd
movq 0x9300(%rip), %rdi      # 0x13488
movq 0x94c1(%rip), %rsi      # 0x13650
subq $0x8, %rsp
xorl %eax, %eax
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %rax
pushq 0x94f1(%rip)            # 0x136a0
pushq %rax
callq 0x5200
addq $0x20, %rsp
testl %eax, %eax
je 0xa1cf
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x92b2(%rip), %rdi      # 0x13488
movq 0x9473(%rip), %rsi      # 0x13650
subq $0x8, %rsp
leaq 0x18(%rsp), %rax
leaq 0x1c(%rsp), %r10
leaq 0x20(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
movq %rcx, %rdx
pushq %rax
pushq %r10
pushq %r10
callq 0x5620
addq $0x20, %rsp
testl %eax, %eax
je 0xa1bd
cmpl $0x0, 0x168(%rbx)
movl 0x12c(%rbx), %r8d
je 0xa234
movl 0x108(%rbx), %ebp
movl 0x10c(%rbx), %r14d
movl 0x128(%rbx), %ecx
jmp 0xa25c
movl 0xc(%rsp), %ebp
movl 0x128(%rbx), %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
subl %eax, %ebp
movl 0x8(%rsp), %r14d
movl %r8d, %eax
shrl $0x1f, %eax
addl %r8d, %eax
sarl %eax
subl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x75b8
movl $0x1, 0x168(%rbx)
movq 0x1a0(%rbx), %rdi
callq 0x98ef
movq %rbx, %rdi
callq 0x9b58
cmpl $0x0, 0x174(%rbx)
jne 0xa2a3
movq 0x91f1(%rip), %rdi      # 0x13488
movq 0x1a8(%rbx), %rsi
callq 0x5170
leaq 0x18(%rsp), %r15
leaq 0x6f11(%rip), %r13      # 0x111c0
movq 0x91d2(%rip), %rdi      # 0x13488
movl $0x10804c, %esi         # imm = 0x10804C
movq %r15, %rdx
callq 0x54e0
movslq 0x18(%rsp), %rax
cmpq $0x13, %rax
jg 0xa2da
cmpl $0x6, %eax
je 0xa2f8
cmpl $0xc, %eax
je 0xa2e4
jmp 0xa2ec
cmpl $0x17, %eax
je 0xa2e4
cmpl $0x14, %eax
jne 0xa2ec
movq %r15, %rdi
callq *(%r13,%rax,8)
cmpl $0x5, 0x18(%rsp)
jne 0xa2af
jmp 0xa3c9
movl 0x58(%rsp), %esi
addl %ebp, %esi
subl 0xc(%rsp), %esi
movl 0x5c(%rsp), %edx
addl %r14d, %edx
movq 0x9160(%rip), %rax      # 0x13470
movl 0x5c(%rax), %ecx
movq 0xa0(%rax,%rcx,8), %rax
subl 0x8(%rsp), %edx
cmpq $0x0, 0x10(%rax)
je 0xa32f
cmpl $0x0, 0x168(%rbx)
je 0xa34a
movl 0x110(%rbx), %ecx
movl 0x114(%rbx), %r8d
movq %rbx, %rdi
movl $0x1, %r9d
callq 0x7373
movl 0x110(%rbx), %eax
movl 0x114(%rbx), %ecx
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
addl 0x108(%rbx), %edi
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
addl 0x10c(%rbx), %esi
callq 0x76f8
cmpq 0x90f0(%rip), %rax      # 0x13470
je 0xa2ec
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa643
movq %r12, %rdi
callq 0x9dcd
movq %rbx, %rdi
callq 0x9b58
cmpl $0x0, 0x174(%rbx)
jne 0xa2ec
movq 0x90d0(%rip), %rdi      # 0x13488
movq 0x1a8(%rbx), %rsi
callq 0x5170
jmp 0xa2ec
movq 0x90b8(%rip), %rdi      # 0x13488
xorl %esi, %esi
callq 0x5180
movl 0x110(%rbx), %eax
movl 0x114(%rbx), %ecx
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
addl 0x108(%rbx), %edi
movl %ecx, %esi
shrl $0x1f, %esi
addl %ecx, %esi
sarl %esi
addl 0x10c(%rbx), %esi
callq 0x76f8
cmpq 0x9063(%rip), %rax      # 0x13470
je 0xa1bd
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa643
movq %r14, %rdi
callq 0x9dcd
movq %rbx, %rdi
callq 0x9b58
cmpl $0x0, 0x174(%rbx)
jne 0xa1bd
movq 0x9043(%rip), %rdi      # 0x13488
movq 0x1a8(%rbx), %rsi
callq 0x5170
jmp 0xa1bd