// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: updategeom
Bool
updategeom(void) {
   Bool dirty = False;

#ifdef XINERAMA
   if(XineramaIsActive(dpy)) {
      int i, j, n, nn, primarymon = 0, statusmon = 0;
      Client *c;
      Monitor *m;
      XineramaScreenInfo *info = XineramaQueryScreens(dpy, &nn);
      XineramaScreenInfo *unique = NULL;

      info = XineramaQueryScreens(dpy, &nn);
      for(n = 0, m = mons; m; m = m->next, n++);
      /* only consider unique geometries as separate screens */
      if(!(unique = (XineramaScreenInfo *)malloc(sizeof(XineramaScreenInfo) * nn)))
         die("fatal: could not malloc() %u bytes\n", sizeof(XineramaScreenInfo) * nn);
      for(i = 0, j = 0; i < nn; i++)
         if(isuniquegeom(unique, j, &info[i]))
            memcpy(&unique[j++], &info[i], sizeof(XineramaScreenInfo));
      XFree(info);
      nn = j;
      if(n <= nn) {
#ifdef PRIMARY_MONITOR
         primarymon = PRIMARY_MONITOR;
         if(PRIMARY_MONITOR > (nn - n)) primarymon = 0;
#endif
#ifdef STATUS_MONITOR
         statusmon = STATUS_MONITOR;
         if(STATUS_MONITOR  > (nn - n)) statusmon  = 0;
#endif
         for(i = 0; i < (nn - n); i++) { /* new monitors available */
            for(m = mons; m && m->next; m = m->next);
            if(m)
               m->next = createmon();
            else
               mons = createmon();
         }
         for(i = 0, m = mons; i < nn && m; m = m->next, i++)
            if(i >= n
                  || (unique[i].x_org != m->mx || unique[i].y_org != m->my
                     || unique[i].width != m->mw || unique[i].height != m->mh))
            {
               dirty = True;
               m->num = i;
               m->mx = m->wx = m->ox = unique[i].x_org  + edges[i].x; m->wx += margins[i].x;
               m->my = m->wy = m->oy = unique[i].y_org  + edges[i].y; m->wy += margins[i].y;
               m->mw = m->ww = m->ow = unique[i].width  - edges[i].w; m->ww -= margins[i].w;
               m->mh = m->wh = m->oh = unique[i].height - edges[i].h; m->wh -= margins[i].h;
               m->margin = &margins[i];
               m->edge   = &edges[i];

               m->bx = dwmbar[i].x += m->wx;
               m->by = dwmbar[i].y += m->my;
               m->bh = dwmbar[i].h += bh;
               m->bw = dwmbar[i].w += m->mw;

               if(i == primarymon) m->primary = 1; else m->primary = 0;
               if(i == statusmon)  m->status  = 1; else m->status  = 0;

               updatebarpos(m);
            }
      }
      else { /* less monitors available nn < n */
         for(i = nn; i < n; i++) {
            for(m = mons; m && m->next; m = m->next);
            while(m->clients) {
               dirty = True;
               c = m->clients;
               m->clients = c->next;
               detachstack(c);
               c->mon = mons;
               attach(c);
               attachstack(c);
            }
            if(m == selmon)
               selmon = mons;
            cleanupmon(m);
         }
      }
      free(unique);
   }
   else
#endif /* XINERAMA */
      /* default monitor setup */
   {
      if(!mons)
         mons = createmon();
      mons->primary = 1;
      mons->status  = 1;
      if(mons->mw != sw || mons->mh != sh) {
         dirty = True;
         mons->wx = mons->mx = mons->ox = edges[0].x; mons->wx += margins[0].x;
         mons->wy = mons->my = mons->oy = edges[0].y; mons->wy += margins[0].y;
         mons->mw = mons->ww = mons->ow = sw - edges[0].w; mons->ww -= margins[0].w;
         mons->mh = mons->wh = mons->oh = sh - edges[0].h; mons->wh -= margins[0].h;
         mons->margin = &margins[0];
         mons->edge   = &edges[0];

         mons->bx = dwmbar[0].x += mons->wx;
         mons->by = dwmbar[0].y += mons->wy;
         mons->bh = dwmbar[0].h += bh;
         mons->bw = dwmbar[0].w += mons->mw;

         updatebarpos(mons);
      }
   }
   if(dirty) {
      selmon = mons;
      selmon = wintomon(root);
   }
   return dirty;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpq $0x0, 0x11cd1(%rip)     # 0x185f8
jne 0x6935
callq 0x70c0
movq %rax, 0x11cc3(%rip)     # 0x185f8
movq 0x11cbc(%rip), %rax     # 0x185f8
movl $0x1, 0xb8(%rax)
movq 0x11cab(%rip), %rax     # 0x185f8
movl $0x1, 0xbc(%rax)
movq 0x11c9a(%rip), %rax     # 0x185f8
movl 0x30(%rax), %eax
cmpl 0x11e95(%rip), %eax     # 0x187fc
jne 0x697f
movq 0x11c88(%rip), %rax     # 0x185f8
movl 0x34(%rax), %eax
cmpl 0x11e87(%rip), %eax     # 0x18800
je 0x6b24
movl $0x1, -0x4(%rbp)
movl 0x11ea4(%rip), %ecx     # 0x18830
movq 0x11c65(%rip), %rax     # 0x185f8
movl %ecx, 0x48(%rax)
movq 0x11c5b(%rip), %rax     # 0x185f8
movl %ecx, 0x28(%rax)
movq 0x11c51(%rip), %rax     # 0x185f8
movl %ecx, 0x38(%rax)
movl 0x10a40(%rip), %ecx     # 0x173f0
movq 0x11c41(%rip), %rax     # 0x185f8
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
movl 0x11e71(%rip), %ecx     # 0x18834
movq 0x11c2e(%rip), %rax     # 0x185f8
movl %ecx, 0x4c(%rax)
movq 0x11c24(%rip), %rax     # 0x185f8
movl %ecx, 0x2c(%rax)
movq 0x11c1a(%rip), %rax     # 0x185f8
movl %ecx, 0x3c(%rax)
movl 0x10a0d(%rip), %ecx     # 0x173f4
movq 0x11c0a(%rip), %rax     # 0x185f8
addl 0x3c(%rax), %ecx
movl %ecx, 0x3c(%rax)
movl 0x11e02(%rip), %ecx     # 0x187fc
subl 0x11e38(%rip), %ecx     # 0x18838
movq 0x11bf1(%rip), %rax     # 0x185f8
movl %ecx, 0x50(%rax)
movq 0x11be7(%rip), %rax     # 0x185f8
movl %ecx, 0x40(%rax)
movq 0x11bdd(%rip), %rax     # 0x185f8
movl %ecx, 0x30(%rax)
movl 0x109d4(%rip), %edx     # 0x173f8
movq 0x11bcd(%rip), %rax     # 0x185f8
movl 0x40(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x40(%rax)
movl 0x11dc7(%rip), %ecx     # 0x18800
subl 0x11dfd(%rip), %ecx     # 0x1883c
movq 0x11bb2(%rip), %rax     # 0x185f8
movl %ecx, 0x54(%rax)
movq 0x11ba8(%rip), %rax     # 0x185f8
movl %ecx, 0x44(%rax)
movq 0x11b9e(%rip), %rax     # 0x185f8
movl %ecx, 0x34(%rax)
movl 0x10999(%rip), %edx     # 0x173fc
movq 0x11b8e(%rip), %rax     # 0x185f8
movl 0x44(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x44(%rax)
movq 0x11b7f(%rip), %rax     # 0x185f8
leaq 0x10970(%rip), %rcx     # 0x173f0
movq %rcx, 0xc0(%rax)
movq 0x11b6a(%rip), %rax     # 0x185f8
leaq 0x11d9b(%rip), %rcx     # 0x18830
movq %rcx, 0xc8(%rax)
movq 0x11b55(%rip), %rax     # 0x185f8
movl 0x38(%rax), %ecx
addl 0x10964(%rip), %ecx     # 0x17410
movl %ecx, 0x1095e(%rip)     # 0x17410
movq 0x11b3f(%rip), %rax     # 0x185f8
movl %ecx, 0x18(%rax)
movq 0x11b35(%rip), %rax     # 0x185f8
movl 0x3c(%rax), %ecx
addl 0x10948(%rip), %ecx     # 0x17414
movl %ecx, 0x10942(%rip)     # 0x17414
movq 0x11b1f(%rip), %rax     # 0x185f8
movl %ecx, 0x1c(%rax)
movl 0x11d22(%rip), %ecx     # 0x18804
addl 0x10934(%rip), %ecx     # 0x1741c
movl %ecx, 0x1092e(%rip)     # 0x1741c
movq 0x11b03(%rip), %rax     # 0x185f8
movl %ecx, 0x24(%rax)
movq 0x11af9(%rip), %rax     # 0x185f8
movl 0x30(%rax), %ecx
addl 0x10910(%rip), %ecx     # 0x17418
movl %ecx, 0x1090a(%rip)     # 0x17418
movq 0x11ae3(%rip), %rax     # 0x185f8
movl %ecx, 0x20(%rax)
movq 0x11ad9(%rip), %rdi     # 0x185f8
callq 0x71d0
cmpl $0x0, -0x4(%rbp)
je 0x6b4b
movq 0x11ac7(%rip), %rax     # 0x185f8
movq %rax, 0x11ac8(%rip)     # 0x18600
movq 0x11ca1(%rip), %rdi     # 0x187e0
callq 0x72c0
movq %rax, 0x11ab5(%rip)     # 0x18600
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)