// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: initfont
void
initfont(const char *fontstr) {
#ifdef XFT
   PangoFontMetrics *metrics;

   dc.pgc = pango_xft_get_context(dpy, screen);
   dc.pfd = pango_font_description_from_string(fontstr);

   metrics = pango_context_get_metrics(dc.pgc, dc.pfd, pango_language_from_string(setlocale(LC_CTYPE, "")));
   dc.font.ascent = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE;
   dc.font.descent = pango_font_metrics_get_descent(metrics) / PANGO_SCALE;

   pango_font_metrics_unref(metrics);

   dc.plo = pango_layout_new(dc.pgc);
   pango_layout_set_font_description(dc.plo, dc.pfd);

   dc.font.height = dc.font.ascent + dc.font.descent;
#else
   char *def, **missing;
   int i, n;

   missing = NULL;
   dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
   if(missing) {
      while(n--)
         fprintf(stderr, "dwm: missing fontset: %s\n", missing[n]);
      XFreeStringList(missing);
   }
   if(dc.font.set) {
      XFontSetExtents *font_extents;
      XFontStruct **xfonts;
      char **font_names;

      dc.font.ascent = dc.font.descent = 0;
      font_extents = XExtentsOfFontSet(dc.font.set);
      n = XFontsOfFontSet(dc.font.set, &xfonts, &font_names);
      for(i = 0, dc.font.ascent = 0, dc.font.descent = 0; i < n; i++) {
         dc.font.ascent = MAX(dc.font.ascent, (*xfonts)->ascent);
         dc.font.descent = MAX(dc.font.descent,(*xfonts)->descent);
         xfonts++;
      }
   }
   else {
      if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
            && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
         die("error, cannot load font: '%s'\n", fontstr);
      dc.font.ascent = dc.font.xfont->ascent;
      dc.font.descent = dc.font.xfont->descent;
   }
   dc.font.height = dc.font.ascent + dc.font.descent;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x11eed(%rip), %rdi     # 0x18618
movq -0x8(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x5370
movq %rax, 0x12089(%rip)     # 0x187d0
cmpq $0x0, -0x18(%rbp)
je 0x678f
jmp 0x6750
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x20(%rbp)
cmpl $0x0, %eax
je 0x6786
movq 0x10881(%rip), %rax     # 0x16fe8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xbc6b(%rip), %rsi      # 0x123e8
movb $0x0, %al
callq 0x5740
jmp 0x6750
movq -0x18(%rbp), %rdi
callq 0x5590
cmpq $0x0, 0x12039(%rip)     # 0x187d0
je 0x6881
movl $0x0, 0x1201d(%rip)     # 0x187c4
movl $0x0, 0x1200f(%rip)     # 0x187c0
movq 0x12018(%rip), %rdi     # 0x187d0
callq 0x5120
movq %rax, -0x28(%rbp)
movq 0x12008(%rip), %rdi     # 0x187d0
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x5550
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, 0x11fd7(%rip)     # 0x187c0
movl $0x0, 0x11fd1(%rip)     # 0x187c4
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x687f
movl 0x11fbb(%rip), %eax     # 0x187c0
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x58(%rcx), %eax
jle 0x681c
movl 0x11fa9(%rip), %eax     # 0x187c0
movl %eax, -0x3c(%rbp)
jmp 0x6829
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x58(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, 0x11f8e(%rip)     # 0x187c0
movl 0x11f8c(%rip), %eax     # 0x187c4
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x5c(%rcx), %eax
jle 0x684f
movl 0x11f7a(%rip), %eax     # 0x187c4
movl %eax, -0x40(%rbp)
jmp 0x685c
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, 0x11f5f(%rip)     # 0x187c4
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x67f3
jmp 0x68f0
movq 0x11d90(%rip), %rdi     # 0x18618
movq -0x8(%rbp), %rsi
callq 0x5540
movq %rax, 0x11f40(%rip)     # 0x187d8
cmpq $0x0, %rax
jne 0x68d0
movq 0x11d73(%rip), %rdi     # 0x18618
leaq 0xbb56(%rip), %rsi      # 0x12402
callq 0x5540
movq %rax, 0x11f20(%rip)     # 0x187d8
cmpq $0x0, %rax
jne 0x68d0
movq -0x8(%rbp), %rsi
leaq 0xbb3f(%rip), %rdi      # 0x12408
movb $0x0, %al
callq 0x5ab0
movq 0x11f01(%rip), %rax     # 0x187d8
movl 0x58(%rax), %eax
movl %eax, 0x11ee0(%rip)     # 0x187c0
movq 0x11ef1(%rip), %rax     # 0x187d8
movl 0x5c(%rax), %eax
movl %eax, 0x11ed4(%rip)     # 0x187c4
movl 0x11eca(%rip), %eax     # 0x187c0
addl 0x11ec8(%rip), %eax     # 0x187c4
movl %eax, 0x11ec6(%rip)     # 0x187c8
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)