// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: buttonpress
void
buttonpress(XEvent *e) {
   unsigned int i, x, click;
   Arg arg = {0};
   Client *c = NULL;
   Monitor *m;
   menu_t *mm;
   XButtonPressedEvent *ev = &e->xbutton;

   click = ClkRootWin;

   if(ev->button == Button1)
   {
      if(menu)
      {
         if(!(mm = wintomenu(ev->window)))
         {
            closemenus();
         } else
         { buttonmenu(mm, ev->x, ev->y); return; }
      }
   }

   if(!autofocusmonitor)
   {
      // focus monitor if necessary
      if((m = wintomon(ev->window)) && m != selmon) {
         unfocus(selmon->sel, True);
         focusmon(m);
      }
   }

   if(ev->window == selmon->barwin) {
      i = x = 0;
      do {
         if(autohide) {
            if((occ & 1 << i ) || (m->tagset[m->seltags] & 1 << i))
               x += TEXTW(tags[i]);
         }
         else
            x += TEXTW(tags[i]);
      } while(ev->x >= x && ++i < LENGTH(tags));

      if(i < LENGTH(tags)) {
         if(autohide) {
            if((occ & 1 << i ) || (m->tagset[m->seltags] & 1 << i))
            {
               click  = ClkTagBar;
               arg.ui = 1 << i;
            }
         }
         else {
            click  = ClkTagBar;
            arg.ui = 1 << i;
         }
      }
      else if(ev->x < x + blw)
         click = ClkLtSymbol;
      else if(ev->x > selmon->titlebarend)
         click = ClkStatusText;
      else{
         arg.ui = ev->x;
         click = ClkWinTitle;
      }
   }
   else if((c = wintoclient(ev->window))) {
      if(clicktofocus)
      {
         focusmon(c->mon);
         focus(c);
      }
      click = ClkClientWin;
   }

   for(i = 0; i < LENGTH(buttons); i++)
      if(click                              == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
            && CLEANMASK(buttons[i].mask)   == CLEANMASK(ev->state))
         buttons[i].func((click             == ClkTagBar || click == ClkWinTitle || click == ClkClientWin) && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq 0x48f5(%rip), %rax      # 0x12028
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x5, -0x14(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x1, 0x54(%rax)
jne 0xd7a0
cmpq $0x0, 0xaeb0(%rip)      # 0x18610
je 0xd79e
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x58c0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xd780
callq 0xf690
jmp 0xd79c
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rax
movl 0x40(%rax), %esi
movq -0x40(%rbp), %rax
movl 0x44(%rax), %edx
callq 0xf5f0
jmp 0xdafd
jmp 0xd79e
jmp 0xd7a0
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movq 0xae51(%rip), %rcx      # 0x18600
cmpq 0x98(%rcx), %rax
jne 0xd98f
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x0, 0xae37(%rip)      # 0x18608
je 0xd850
movl 0xb187(%rip), %eax      # 0x18960
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xd80e
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x58(%rcx), %ecx
movl 0x60(%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xd84e
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x9c16(%rip), %rax      # 0x17430
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x9c02(%rip), %rax      # 0x17430
movq (%rax,%rcx,8), %rdi
callq 0x52d0
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0x9690
addl 0xaf80(%rip), %eax      # 0x187c8
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xd890
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x9bd4(%rip), %rax      # 0x17430
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x9bc0(%rip), %rax      # 0x17430
movq (%rax,%rcx,8), %rdi
callq 0x52d0
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x9690
addl 0xaf3e(%rip), %eax      # 0x187c8
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xd892
movq -0x40(%rbp), %rax
movl 0x40(%rax), %ecx
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x51(%rbp)
jb 0xd8b8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl %eax, %eax
cmpq $0x9, %rax
setb %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xd7ca
movl -0xc(%rbp), %eax
cmpq $0x9, %rax
jae 0xd93c
cmpl $0x0, 0xad35(%rip)      # 0x18608
je 0xd926
movl 0xb085(%rip), %eax      # 0x18960
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xd910
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movl 0x58(%rcx), %ecx
movl 0x60(%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xd924
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
jmp 0xd93a
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
jmp 0xd98d
movq -0x40(%rbp), %rax
movl 0x40(%rax), %eax
movl -0x10(%rbp), %ecx
addl 0xb018(%rip), %ecx      # 0x18964
cmpl %ecx, %eax
jae 0xd959
movl $0x1, -0x14(%rbp)
jmp 0xd98b
movq -0x40(%rbp), %rax
movl 0x40(%rax), %eax
movq 0xac99(%rip), %rcx      # 0x18600
cmpl 0xd4(%rcx), %eax
jle 0xd978
movl $0x2, -0x14(%rbp)
jmp 0xd989
movq -0x40(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x3, -0x14(%rbp)
jmp 0xd98b
jmp 0xd98d
jmp 0xd9c8
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x8940
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xd9c6
movq -0x28(%rbp), %rax
movq 0x1a0(%rax), %rdi
callq 0xc610
movq -0x28(%rbp), %rdi
callq 0xc2d0
movl $0x4, -0x14(%rbp)
jmp 0xd9c8
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0xf, %rax
jae 0xdafd
movl -0x14(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0xa4e5(%rip), %rcx      # 0x17ed0
shlq $0x5, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0xdaed
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa4ca(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0xdaed
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa4ac(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x40(%rbp), %rcx
cmpl 0x54(%rcx), %eax
jne 0xdaed
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa489(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl 0xaf11(%rip), %ecx      # 0x18968
orl $0x2, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movq -0x40(%rbp), %rcx
movl 0x50(%rcx), %ecx
movl 0xaefc(%rip), %edx      # 0x18968
orl $0x2, %edx
xorl $-0x1, %edx
andl %edx, %ecx
cmpl %ecx, %eax
jne 0xdaed
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa44c(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xdaa5
cmpl $0x3, -0x14(%rbp)
je 0xdaa5
cmpl $0x4, -0x14(%rbp)
jne 0xdac8
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa41f(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0xdac8
leaq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0xdae3
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xa3fc(%rip), %rax      # 0x17ed0
shlq $0x5, %rcx
addq %rcx, %rax
addq $0x18, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rdi
callq *%rax
jmp 0xdaef
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd9cf
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)