// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: configurerequest
void
configurerequest(XEvent *e) {
   Client *c;
   Monitor *m;
   XConfigureRequestEvent *ev = &e->xconfigurerequest;
   XWindowChanges wc;

   if((c = wintoclient(ev->window))) {
      if(ev->value_mask & CWBorderWidth)
         c->bw = ev->border_width;
      else if(c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
         m = c->mon;
         if(ev->value_mask & CWX)
            c->x = m->mx + ev->x;
         if(ev->value_mask & CWY)
            c->y = m->my + ev->y;
         if(ev->value_mask & CWWidth)
            c->w = ev->width;
         if(ev->value_mask & CWHeight)
            c->h = ev->height;
         if((c->x + c->w) > m->mx + m->mw && c->isfloating)
            c->x = m->mx + (m->mw / 2 - c->w / 2); /* center in x direction */
         if((c->y + c->h) > m->my + m->mh && c->isfloating)
            c->y = m->my + (m->mh / 2 - c->h / 2); /* center in y direction */
         if((ev->value_mask & (CWX|CWY)) && !(ev->value_mask & (CWWidth|CWHeight)))
            configure(c);
         if(ISVISIBLE(c))
            XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
      }
      else
         configure(c);
   }
   else {
      wc.x = ev->x;
      wc.y = ev->y;
      wc.width = ev->width;
      wc.height = ev->height;
      wc.border_width = ev->border_width;
      wc.sibling = ev->above;
      wc.stack_mode = ev->detail;
      XConfigureWindow(dpy, ev->window, ev->value_mask, &wc);
   }
   XSync(dpy, False);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movq 0x28(%rdi), %r15
movq %r15, %rdi
callq 0x757f
testq %rax, %rax
je 0xa9da
movq %rax, %rbx
movq 0x58(%r14), %rdi
testb $0x10, %dil
jne 0xaa10
movl 0x168(%rbx), %r8d
testl %r8d, %r8d
je 0xaa32
movq 0x1a0(%rbx), %r9
testb $0x1, %dil
je 0xa8be
movl 0x30(%r14), %eax
addl 0x28(%r9), %eax
movl %eax, 0x108(%rbx)
testb $0x2, %dil
je 0xa8d2
movl 0x34(%r14), %eax
addl 0x2c(%r9), %eax
movl %eax, 0x10c(%rbx)
testb $0x4, %dil
je 0xa8e2
movl 0x38(%r14), %eax
movl %eax, 0x110(%rbx)
testb $0x8, %dil
je 0xa8f2
movl 0x3c(%r14), %eax
movl %eax, 0x114(%rbx)
pushq $0x2
popq %r11
pushq $-0x2
popq %r10
testl %r8d, %r8d
je 0xa936
movl 0x110(%rbx), %ecx
movl 0x108(%rbx), %edx
addl %ecx, %edx
movl 0x28(%r9), %r14d
movl 0x30(%r9), %eax
leal (%rax,%r14), %esi
cmpl %esi, %edx
jle 0xa936
cltd
idivl %r11d
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %r10d
addl %eax, %r14d
addl %esi, %r14d
movl %r14d, 0x108(%rbx)
testl %r8d, %r8d
je 0xa972
movl 0x114(%rbx), %ecx
movl 0x10c(%rbx), %edx
addl %ecx, %edx
movl 0x2c(%r9), %r8d
movl 0x34(%r9), %eax
leal (%rax,%r8), %esi
cmpl %esi, %edx
jle 0xa972
cltd
idivl %r11d
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %r10d
addl %eax, %r8d
addl %esi, %r8d
movl %r8d, 0x10c(%rbx)
testb $0x3, %dil
sete %al
testb $0xc, %dil
setne %cl
orb %al, %cl
jne 0xa98c
movq %rbx, %rdi
callq 0x74ab
cmpl $0x0, 0x180(%rbx)
jne 0xa9ab
movq 0x1a0(%rbx), %rax
movl 0x58(%rax), %ecx
movl 0x60(%rax,%rcx,4), %eax
testl %eax, 0x15c(%rbx)
je 0xaa1a
movq 0x8ad6(%rip), %rdi      # 0x13488
movq 0x1a8(%rbx), %rsi
movl 0x108(%rbx), %edx
movl 0x10c(%rbx), %ecx
movl 0x110(%rbx), %r8d
movl 0x114(%rbx), %r9d
callq 0x53a0
jmp 0xaa1a
movups 0x30(%r14), %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movl 0x40(%r14), %eax
movl %eax, 0x10(%rcx)
movq 0x48(%r14), %rax
movq %rax, 0x18(%rcx)
movl 0x50(%r14), %eax
movl %eax, 0x20(%rcx)
movq 0x8a86(%rip), %rdi      # 0x13488
movl 0x58(%r14), %edx
movq %r15, %rsi
callq 0x50d0
jmp 0xaa1a
movl 0x40(%r14), %eax
movl %eax, 0x150(%rbx)
movq 0x8a67(%rip), %rdi      # 0x13488
xorl %esi, %esi
callq 0x54c0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8a37(%rip), %rax      # 0x13470
movl 0x5c(%rax), %ecx
movq 0xa0(%rax,%rcx,8), %rax
cmpq $0x0, 0x10(%rax)
je 0xa8a3
movq %rbx, %rdi
callq 0x74ab
jmp 0xaa1a