// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: updatemenu
static void
updatemenu( menu_t *m, int x, int y ) {
   Drawable dble = dc.drawable;
   int ow = dc.w, oh = dc.h, ox = dc.x, oy = dc.y;
   size_t col;

   if(!m) return;
   const int osel = m->sel;

   dc.drawable = m->drawable;
#ifdef XFT
   XftDrawChange(dc.xftdrawable, dc.drawable);
#endif
   size_t i;
   dc.x = 0; dc.y = 0;
   dc.w = m->w;

   for(i = 0; m->ctx[i].title; ++i)
   {
      if (x > 0    && x < m->w &&
          y > dc.y && y < dc.y + dc.font.height &&
          strlen(m->ctx[i].title))
         m->sel = i;

      /* this check cause there is keyboard input too */
      if(m->sel == i) { col = 9; m->sely = dc.y; }
      else col = 10;

      if(strlen(m->ctx[i].title))
      {
         dc.h = dc.font.height;
         drawtext(m->ctx[i].title, col, False);

      }
      else { dc.h = 4; drawhline(11); }
      dc.y += dc.h;
   }

   XCopyArea(dpy, dc.drawable, m->win, dc.gc, 0, 0, m->w, m->h, 0, 0);
   XSync(dpy, False);

   dc.w = ow; dc.h = oh; dc.x = ox; dc.y = oy;
   dc.drawable = dble;
#ifdef XFT
   XftDrawChange(dc.xftdrawable, dc.drawable);
#endif

   /* only for mouse */
   if(m->sel != osel)
   {
      if(m->child) { closemenu(m->child); m->child = NULL; }
      if(m->ctx[m->sel].ctx != NULL)
         m->child = openmenupos( m->ctx[m->sel].ctx, m->x + m->w, m->y + m->sely );
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq 0x9cf7(%rip), %rax      # 0x187b0
movq %rax, -0x18(%rbp)
movl 0x9bc5(%rip), %eax      # 0x18688
movl %eax, -0x1c(%rbp)
movl 0x9bc0(%rip), %eax      # 0x1868c
movl %eax, -0x20(%rbp)
movl 0x9bab(%rip), %eax      # 0x18680
movl %eax, -0x24(%rbp)
movl 0x9ba6(%rip), %eax      # 0x18684
movl %eax, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xeaed
jmp 0xed84
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x9caa(%rip)      # 0x187b0
movl $0x0, 0x9b70(%rip)      # 0x18680
movl $0x0, 0x9b6a(%rip)      # 0x18684
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x9b61(%rip)      # 0x18688
movq $0x0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0xec5e
cmpl $0x0, -0xc(%rbp)
jle 0xebaa
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0xebaa
movl -0x10(%rbp), %eax
cmpl 0x9b1d(%rip), %eax      # 0x18684
jle 0xebaa
movl -0x10(%rbp), %eax
movl 0x9b12(%rip), %ecx      # 0x18684
addl 0x9c50(%rip), %ecx      # 0x187c8
cmpl %ecx, %eax
jge 0xebaa
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x52d0
cmpq $0x0, %rax
je 0xebaa
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movslq 0x38(%rax), %rax
cmpq -0x40(%rbp), %rax
jne 0xebcf
movq $0x9, -0x30(%rbp)
movl 0x9abe(%rip), %ecx      # 0x18684
movq -0x8(%rbp), %rax
movl %ecx, 0x3c(%rax)
jmp 0xebd7
movq $0xa, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x52d0
cmpq $0x0, %rax
je 0xec27
movl 0x9bca(%rip), %eax      # 0x187c8
movl %eax, 0x9a88(%rip)      # 0x1868c
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x97e0
jmp 0xec3b
movl $0x4, 0x9a5b(%rip)      # 0x1868c
movl $0xb, %edi
callq 0xed90
movl 0x9a4b(%rip), %eax      # 0x1868c
addl 0x9a3d(%rip), %eax      # 0x18684
movl %eax, 0x9a37(%rip)      # 0x18684
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xeb2f
movq 0x99b3(%rip), %rdi      # 0x18618
movq 0x9b44(%rip), %rsi      # 0x187b0
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq 0x9b3e(%rip), %rcx      # 0x187b8
movq -0x8(%rbp), %rax
movl 0x10(%rax), %r10d
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
xorl %r9d, %r9d
movl %r9d, %r8d
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
callq 0x52c0
movq 0x9965(%rip), %rdi      # 0x18618
xorl %esi, %esi
callq 0x54d0
movl -0x1c(%rbp), %eax
movl %eax, 0x99c5(%rip)      # 0x18688
movl -0x20(%rbp), %eax
movl %eax, 0x99c0(%rip)      # 0x1868c
movl -0x24(%rbp), %eax
movl %eax, 0x99ab(%rip)      # 0x18680
movl -0x28(%rbp), %eax
movl %eax, 0x99a6(%rip)      # 0x18684
movq -0x18(%rbp), %rax
movq %rax, 0x9ac7(%rip)      # 0x187b0
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
cmpl -0x34(%rbp), %eax
je 0xed84
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xed1d
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xeef0
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x38(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xed82
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x38(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x8(%rbp), %rax
addl 0x10(%rax), %esi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x8(%rbp), %rax
addl 0x3c(%rax), %edx
callq 0xf050
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0xed84
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)