// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x30, %rsp
movq 0x28(%rdi), %rsi
movq 0x8661(%rip), %rax      # 0x13468
testq %rax, %rax
je 0xae30
movq 0x78(%rax), %rbx
testq %rbx, %rbx
je 0xae27
cmpq %rsi, 0x1a8(%rbx)
je 0xae32
movq 0x190(%rbx), %rbx
jmp 0xae10
movq 0x90(%rax), %rax
jmp 0xae07
xorl %ebx, %ebx
testq %rbx, %rbx
je 0xaf81
movq 0x58(%rdi), %rax
testb $0x10, %al
jne 0xafc5
movl 0x168(%rbx), %ecx
testl %ecx, %ecx
je 0xafe2
movq 0x1a0(%rbx), %rdx
testb $0x1, %al
je 0xae6c
movl 0x30(%rdi), %esi
addl 0x28(%rdx), %esi
movl %esi, 0x108(%rbx)
testb $0x2, %al
je 0xae7c
movl 0x34(%rdi), %esi
addl 0x2c(%rdx), %esi
movl %esi, 0x10c(%rbx)
testb $0x4, %al
je 0xae89
movl 0x38(%rdi), %esi
movl %esi, 0x110(%rbx)
testb $0x8, %al
je 0xae96
movl 0x3c(%rdi), %esi
movl %esi, 0x114(%rbx)
testl %ecx, %ecx
je 0xaee0
movl 0x110(%rbx), %edi
movl 0x108(%rbx), %r9d
addl %edi, %r9d
movl 0x28(%rdx), %esi
movl 0x30(%rdx), %r8d
leal (%r8,%rsi), %r10d
cmpl %r10d, %r9d
jle 0xaee0
movl %r8d, %r9d
shrl $0x1f, %r9d
addl %r8d, %r9d
sarl %r9d
movl %edi, %r8d
shrl $0x1f, %r8d
addl %edi, %r8d
sarl %r8d
subl %r8d, %esi
addl %r9d, %esi
movl %esi, 0x108(%rbx)
testl %ecx, %ecx
je 0xaf1d
movl 0x114(%rbx), %esi
movl 0x10c(%rbx), %edi
addl %esi, %edi
movl 0x2c(%rdx), %ecx
movl 0x34(%rdx), %edx
leal (%rdx,%rcx), %r8d
cmpl %r8d, %edi
jle 0xaf1d
movl %edx, %edi
shrl $0x1f, %edi
addl %edx, %edi
sarl %edi
movl %esi, %edx
shrl $0x1f, %edx
addl %esi, %edx
sarl %edx
subl %edx, %ecx
addl %edi, %ecx
movl %ecx, 0x10c(%rbx)
testb $0x3, %al
sete %cl
testb $0xc, %al
setne %al
orb %cl, %al
jne 0xaf33
movq %rbx, %rdi
callq 0x767a
cmpl $0x0, 0x180(%rbx)
jne 0xaf52
movq 0x1a0(%rbx), %rax
movl 0x58(%rax), %ecx
movl 0x60(%rax,%rcx,4), %eax
testl %eax, 0x15c(%rbx)
je 0xafce
movq 0x852f(%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 0xafce
movl 0x30(%rdi), %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movl 0x34(%rdi), %eax
movl %eax, 0x4(%rcx)
movl 0x38(%rdi), %eax
movl %eax, 0x8(%rcx)
movl 0x3c(%rdi), %eax
movl %eax, 0xc(%rcx)
movl 0x40(%rdi), %eax
movl %eax, 0x10(%rcx)
movq 0x48(%rdi), %rax
movq %rax, 0x18(%rcx)
movl 0x50(%rdi), %eax
movl %eax, 0x20(%rcx)
movq 0x84d0(%rip), %rax      # 0x13488
movl 0x58(%rdi), %edx
movq %rax, %rdi
callq 0x50d0
jmp 0xafce
movl 0x40(%rdi), %eax
movl %eax, 0x150(%rbx)
movq 0x84b3(%rip), %rdi      # 0x13488
xorl %esi, %esi
callq 0x54c0
addq $0x30, %rsp
popq %rbx
retq
movq 0x8487(%rip), %rdx      # 0x13470
movl 0x5c(%rdx), %esi
movq 0xa0(%rdx,%rsi,8), %rdx
cmpq $0x0, 0x10(%rdx)
je 0xae55
movq %rbx, %rdi
callq 0x767a
jmp 0xafce