// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: drawtext
void
drawtext(const char *text, size_t col_index, Bool pad) {
   char buf[256];
   int i, p, x, y, h, len, olen;

   XRectangle r = { dc.x , dc.y, dc.w , dc.h };
   XSetForeground(dpy, dc.gc, dc.colors[col_index][ColBG]);
   XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);

   if(!text)
      return;

   olen = strlen(text);
   h    = pad ? (dc.font.ascent + dc.font.descent) : 0;
#ifndef XFT
   y    = dc.y + ((dc.h + dc.font.ascent - dc.font.descent) / 2);
#else
   y    = dc.y + dc.h - dc.font.height;
#endif
   x    = dc.x + (h / 2);

   /* shorten text if necessary */
   for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w; len--);
   if(!len)
      return;

   memcpy(buf, text, len);
   if(len < olen) {
      for(i = len - 1, p = 0; i; --i, ++p) {
         if(buf[i] & 0x80) { /* 10xxxxxx */
            if((buf[i] & 0x40) && (p >= 2)) { /* 11xxxxxx */
               buf[i] = '.';
               break;
            }
            buf[i] = '.';
         }
         else {
            buf[i] = '.';
            if(p == 2) break;
         }
      }
      ++p;
      if (p > 3)
         len -= p - 3;
   }

#ifdef XFT
   pango_layout_set_text(dc.plo, buf, len);
   pango_xft_render_layout(dc.xftdrawable, &dc.xftcolors[col_index][ColFG], dc.plo, x * PANGO_SCALE, y * PANGO_SCALE);
#else
   XSetForeground(dpy, dc.gc, dc.colors[col_index][ColFG]);
   if(dc.font.set)
      XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
   else
      XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl 0xee84(%rip), %eax      # 0x18680
movw %ax, -0x144(%rbp)
movl 0xee7b(%rip), %eax      # 0x18684
movw %ax, -0x142(%rbp)
movl 0xee72(%rip), %eax      # 0x18688
movw %ax, -0x140(%rbp)
movl 0xee69(%rip), %eax      # 0x1868c
movw %ax, -0x13e(%rbp)
movq 0xede7(%rip), %rdi      # 0x18618
movq 0xef80(%rip), %rsi      # 0x187b8
leaq 0xee41(%rip), %rax      # 0x18680
addq $0x10, %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdx
callq 0x5340
movq 0xedbd(%rip), %rdi      # 0x18618
movq 0xef4e(%rip), %rsi      # 0x187b0
movq 0xef4f(%rip), %rdx      # 0x187b8
leaq -0x144(%rbp), %rcx
movl $0x1, %r8d
callq 0x5320
cmpq $0x0, -0x8(%rbp)
jne 0x9887
jmp 0x9b89
movq -0x8(%rbp), %rdi
callq 0x52d0
movl %eax, -0x13c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x98b0
movl 0xef1e(%rip), %eax      # 0x187c0
addl 0xef1c(%rip), %eax      # 0x187c4
movl %eax, -0x148(%rbp)
jmp 0x98ba
xorl %eax, %eax
movl %eax, -0x148(%rbp)
jmp 0x98ba
movl -0x148(%rbp), %eax
movl %eax, -0x134(%rbp)
movl 0xedb8(%rip), %eax      # 0x18684
movl %eax, -0x150(%rbp)
movl 0xedb4(%rip), %eax      # 0x1868c
addl 0xeee2(%rip), %eax      # 0x187c0
subl 0xeee0(%rip), %eax      # 0x187c4
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x150(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x130(%rbp)
movl 0xed7e(%rip), %eax      # 0x18680
movl %eax, -0x14c(%rbp)
movl -0x134(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x14c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x12c(%rbp)
movslq -0x13c(%rbp), %rax
cmpq $0x100, %rax            # imm = 0x100
jae 0x9945
movslq -0x13c(%rbp), %rax
movq %rax, -0x158(%rbp)
jmp 0x9953
movl $0x100, %eax            # imm = 0x100
movq %rax, -0x158(%rbp)
jmp 0x9953
movq -0x158(%rbp), %rax
movl %eax, -0x138(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x138(%rbp)
movb %al, -0x159(%rbp)
je 0x998f
movq -0x8(%rbp), %rdi
movl -0x138(%rbp), %esi
callq 0x9690
cmpl 0xed02(%rip), %eax      # 0x18688
setg %al
movb %al, -0x159(%rbp)
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0x999b
jmp 0x99ae
jmp 0x999d
movl -0x138(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x138(%rbp)
jmp 0x9960
cmpl $0x0, -0x138(%rbp)
jne 0x99bc
jmp 0x9b89
leaq -0x120(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x138(%rbp), %rdx
callq 0x5770
movl -0x138(%rbp), %eax
cmpl -0x13c(%rbp), %eax
jge 0x9ad8
movl -0x138(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x124(%rbp)
movl $0x0, -0x128(%rbp)
cmpl $0x0, -0x124(%rbp)
je 0x9aa7
movslq -0x124(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x9a66
movslq -0x124(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x9a55
cmpl $0x2, -0x128(%rbp)
jl 0x9a55
movslq -0x124(%rbp), %rax
movb $0x2e, -0x120(%rbp,%rax)
jmp 0x9aa7
movslq -0x124(%rbp), %rax
movb $0x2e, -0x120(%rbp,%rax)
jmp 0x9a82
movslq -0x124(%rbp), %rax
movb $0x2e, -0x120(%rbp,%rax)
cmpl $0x2, -0x128(%rbp)
jne 0x9a80
jmp 0x9aa7
jmp 0x9a82
jmp 0x9a84
movl -0x124(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x124(%rbp)
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x99fe
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
cmpl $0x3, -0x128(%rbp)
jle 0x9ad6
movl -0x128(%rbp), %ecx
subl $0x3, %ecx
movl -0x138(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x138(%rbp)
jmp 0x9ad8
movq 0xeb39(%rip), %rdi      # 0x18618
movq 0xecd2(%rip), %rsi      # 0x187b8
leaq 0xeb93(%rip), %rax      # 0x18680
addq $0x10, %rax
imulq $0x18, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
callq 0x5340
cmpq $0x0, 0xecc6(%rip)      # 0x187d0
je 0x9b52
movq 0xeb05(%rip), %rdi      # 0x18618
movq 0xec96(%rip), %rsi      # 0x187b0
movq 0xecaf(%rip), %rdx      # 0x187d0
movq 0xec90(%rip), %rcx      # 0x187b8
movl -0x12c(%rbp), %r8d
movl -0x130(%rbp), %r9d
leaq -0x120(%rbp), %r10
movl -0x138(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x55a0
jmp 0x9b89
movq 0xeabf(%rip), %rdi      # 0x18618
movq 0xec50(%rip), %rsi      # 0x187b0
movq 0xec51(%rip), %rdx      # 0x187b8
movl -0x12c(%rbp), %ecx
movl -0x130(%rbp), %r8d
leaq -0x120(%rbp), %r9
movl -0x138(%rbp), %eax
movl %eax, (%rsp)
callq 0x5030
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)