// File: /workspace/github_c_makefile_star2_O0/mcaimi[P]st/x.c
// Function: xdrawglyphfontspecs
void
xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y)
{
  int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1);
  int winx = win.dynborder_w + x * win.cw, winy = win.dynborder_h + y * win.ch,
      width = charlen * win.cw;
  Color *fg, *bg, *temp, revfg, revbg, truefg, truebg;
  XRenderColor colfg, colbg;
  XRectangle r;

  /* Fallback on color display for attributes not supported by the font */
  if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) {
    if (dc.ibfont.badslant || dc.ibfont.badweight)
      base.fg = defaultattr;
  } else if ((base.mode & ATTR_ITALIC && dc.ifont.badslant) ||
      (base.mode & ATTR_BOLD && dc.bfont.badweight)) {
    base.fg = defaultattr;
  }

  if (IS_TRUECOL(base.fg)) {
    colfg.alpha = 0xffff;
    colfg.red = TRUERED(base.fg);
    colfg.green = TRUEGREEN(base.fg);
    colfg.blue = TRUEBLUE(base.fg);
    XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &truefg);
    fg = &truefg;
  } else {
    fg = &dc.col[base.fg];
  }

  if (IS_TRUECOL(base.bg)) {
    colbg.alpha = 0xffff;
    colbg.green = TRUEGREEN(base.bg);
    colbg.red = TRUERED(base.bg);
    colbg.blue = TRUEBLUE(base.bg);
    XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &truebg);
    bg = &truebg;
  } else {
    bg = &dc.col[base.bg];
  }

  /* Change basic system colors [0-7] to bright system colors [8-15] */
  if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7))
    fg = &dc.col[base.fg + 8];

  if (IS_SET(MODE_REVERSE)) {
    if (fg == &dc.col[defaultfg]) {
      fg = &dc.col[defaultbg];
    } else {
      colfg.red = ~fg->color.red;
      colfg.green = ~fg->color.green;
      colfg.blue = ~fg->color.blue;
      colfg.alpha = fg->color.alpha;
      XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg,
          &revfg);
      fg = &revfg;
    }

    if (bg == &dc.col[defaultbg]) {
      bg = &dc.col[defaultfg];
    } else {
      colbg.red = ~bg->color.red;
      colbg.green = ~bg->color.green;
      colbg.blue = ~bg->color.blue;
      colbg.alpha = bg->color.alpha;
      XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg,
          &revbg);
      bg = &revbg;
    }
  }

  if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) {
    colfg.red = fg->color.red / 2;
    colfg.green = fg->color.green / 2;
    colfg.blue = fg->color.blue / 2;
    colfg.alpha = fg->color.alpha;
    XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg);
    fg = &revfg;
  }

  if (base.mode & ATTR_REVERSE) {
    if (bg == fg) {
      bg = &dc.col[defaultfg];
      fg = &dc.col[defaultbg];
    } else {
      temp = fg;
      fg = bg;
      bg = temp;
    }
  }

  if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)
    fg = bg;

  if (base.mode & ATTR_INVISIBLE)
    fg = bg;

  /* Intelligent cleaning up of the borders. */
  if (x == 0) {
    xclear(0, (y == 0)? 0 : winy, win.dynborder_h,
      winy + win.ch +
      ((winy + win.ch >= win.dynborder_h + win.th)? win.h : 0));
  }
  if (winx + width >= win.dynborder_w + win.tw) {
    xclear(winx + width, (y == 0)? 0 : winy, win.w,
      ((winy + win.ch >= win.dynborder_w + win.th)? win.h : (winy + win.ch)));
  }
  if (y == 0)
    xclear(winx, 0, winx + width, win.dynborder_w);
  if (winy + win.ch >= win.dynborder_h + win.th)
    xclear(winx, winy + win.ch, winx + width, win.h);

  /* Clean up the region we want to draw to. */
  XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);

  /* Set the clip region because Xft is sometimes dirty. */
  r.x = 0;
  r.y = 0;
  r.height = win.ch;
  r.width = width;
  XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1);

  if (base.mode & ATTR_BOXDRAW) {
    drawboxes(winx, winy, width / len, win.ch, fg, bg, specs, len);
  } else {
    /* Render the glyphs. */
    XftDrawGlyphFontSpec(xw.draw, fg, specs, len);
  }

  /* Render underline and strikethrough. */
  if (base.mode & ATTR_UNDERLINE) {
    XftDrawRect(xw.draw, fg, winx, winy + win.cyo + dc.font.ascent * chscale + 1,
        width, 1);
  }

  if (base.mode & ATTR_STRUCK) {
    XftDrawRect(xw.draw, fg, winx, winy + win.cyo + 2 * dc.font.ascent * chscale / 3,
        width, 1);
  }

  /* Reset clip to none. */
  XftDrawSetClip(xw.draw, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl -0x1c(%rbp), %eax
movzwl -0xc(%rbp), %esi
andl $0x200, %esi            # imm = 0x200
movl $0x1, %ecx
movl $0x2, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
imull %ecx, %eax
movl %eax, -0x28(%rbp)
movl 0x151c5(%rip), %eax     # 0x24ae0
movl -0x20(%rbp), %ecx
imull 0x151c3(%rip), %ecx     # 0x24ae8
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl 0x151ac(%rip), %eax     # 0x24adc
movl -0x24(%rbp), %ecx
imull 0x151aa(%rip), %ecx     # 0x24ae4
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
imull 0x1519f(%rip), %eax     # 0x24ae8
movl %eax, -0x34(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xf981
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf981
cmpl $0x0, 0x14fed(%rip)     # 0x24958
jne 0xf976
cmpl $0x0, 0x14fe8(%rip)     # 0x2495c
je 0xf97f
movl 0x10c00(%rip), %eax     # 0x2057c
movl %eax, -0x8(%rbp)
jmp 0xf9b6
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xf996
cmpl $0x0, 0x14f8c(%rip)     # 0x24920
jne 0xf9ab
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf9b4
cmpl $0x0, 0x14f43(%rip)     # 0x248ec
je 0xf9b4
movl 0x10bcb(%rip), %eax     # 0x2057c
movl %eax, -0x8(%rbp)
jmp 0xf9b6
movl -0x8(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0xfa2e
movw $0xffff, -0x92(%rbp)    # imm = 0xFFFF
movl -0x8(%rbp), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
shrl $0x8, %eax
movw %ax, -0x98(%rbp)
movl -0x8(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x96(%rbp)
movl -0x8(%rbp), %eax
andl $0xff, %eax
shll $0x8, %eax
movw %ax, -0x94(%rbp)
movq 0x14f82(%rip), %rdi     # 0x24988
movq 0x15023(%rip), %rsi     # 0x24a30
movq 0x14f7c(%rip), %rdx     # 0x24990
leaq -0x98(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0x67b0
leaq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xfa43
movq 0x14e5b(%rip), %rax     # 0x24890
movl -0x8(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x4(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0xfac1
movw $0xffff, -0x9a(%rbp)    # imm = 0xFFFF
movl -0x4(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x9e(%rbp)
movl -0x4(%rbp), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
shrl $0x8, %eax
movw %ax, -0xa0(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
shll $0x8, %eax
movw %ax, -0x9c(%rbp)
movq 0x14ef5(%rip), %rdi     # 0x24988
movq 0x14f96(%rip), %rsi     # 0x24a30
movq 0x14eef(%rip), %rdx     # 0x24990
leaq -0xa0(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x67b0
leaq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xfad6
movq 0x14dc8(%rip), %rax     # 0x24890
movl -0x4(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0xfb09
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
ja 0xfb09
cmpl $0x7, -0x8(%rbp)
ja 0xfb09
movq 0x14d9a(%rip), %rax     # 0x24890
movl -0x8(%rbp), %ecx
addl $0x8, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl 0x14fe1(%rip), %eax     # 0x24af0
andl $0x20, %eax
cmpl $0x0, %eax
je 0xfc6f
movq -0x40(%rbp), %rax
movq 0x14d6a(%rip), %rcx     # 0x24890
movl 0xfcb4(%rip), %edx      # 0x1f7e0
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0xfb52
movq 0x14d51(%rip), %rax     # 0x24890
movl 0xfc97(%rip), %ecx      # 0x1f7dc
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0xfbc4
movq -0x40(%rbp), %rax
movzwl 0x8(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0x98(%rbp)
movq -0x40(%rbp), %rax
movzwl 0xa(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0x96(%rbp)
movq -0x40(%rbp), %rax
movzwl 0xc(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0x94(%rbp)
movq -0x40(%rbp), %rax
movw 0xe(%rax), %ax
movw %ax, -0x92(%rbp)
movq 0x14dea(%rip), %rdi     # 0x24988
movq 0x14e8b(%rip), %rsi     # 0x24a30
movq 0x14de4(%rip), %rdx     # 0x24990
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x67b0
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq 0x14cc1(%rip), %rcx     # 0x24890
movl 0xfc07(%rip), %edx      # 0x1f7dc
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0xfbfb
movq 0x14ca8(%rip), %rax     # 0x24890
movl 0xfbf2(%rip), %ecx      # 0x1f7e0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0xfc6d
movq -0x48(%rbp), %rax
movzwl 0x8(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
movzwl 0xa(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0x9e(%rbp)
movq -0x48(%rbp), %rax
movzwl 0xc(%rax), %eax
xorl $-0x1, %eax
movw %ax, -0x9c(%rbp)
movq -0x48(%rbp), %rax
movw 0xe(%rax), %ax
movw %ax, -0x9a(%rbp)
movq 0x14d41(%rip), %rdi     # 0x24988
movq 0x14de2(%rip), %rsi     # 0x24a30
movq 0x14d3b(%rip), %rdx     # 0x24990
leaq -0xa0(%rbp), %rcx
leaq -0x70(%rbp), %r8
callq 0x67b0
leaq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xfc6f
movzwl -0xc(%rbp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0xfd00
movq -0x40(%rbp), %rax
movzwl 0x8(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x98(%rbp)
movq -0x40(%rbp), %rax
movzwl 0xa(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x96(%rbp)
movq -0x40(%rbp), %rax
movzwl 0xc(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, -0x94(%rbp)
movq -0x40(%rbp), %rax
movw 0xe(%rax), %ax
movw %ax, -0x92(%rbp)
movq 0x14cae(%rip), %rdi     # 0x24988
movq 0x14d4f(%rip), %rsi     # 0x24a30
movq 0x14ca8(%rip), %rdx     # 0x24990
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x67b0
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xfd62
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0xfd48
movq 0x14b73(%rip), %rax     # 0x24890
movl 0xfabd(%rip), %ecx      # 0x1f7e0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq 0x14b5b(%rip), %rax     # 0x24890
movl 0xfaa1(%rip), %ecx      # 0x1f7dc
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0xfd60
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xfd62
movzwl -0xc(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xfd86
movl 0x14d7c(%rip), %eax     # 0x24af0
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xfd86
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xfd9a
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xfe36
cmpl $0x0, -0x24(%rbp)
jne 0xfdb4
xorl %eax, %eax
movl %eax, -0xac(%rbp)
jmp 0xfdbd
movl -0x30(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl 0x14d0d(%rip), %eax     # 0x24adc
movl %eax, -0xb4(%rbp)
movl -0x30(%rbp), %eax
addl 0x14d06(%rip), %eax     # 0x24ae4
movl %eax, -0xb0(%rbp)
movl -0x30(%rbp), %eax
addl 0x14cf7(%rip), %eax     # 0x24ae4
movl 0x14ce9(%rip), %ecx     # 0x24adc
addl 0x14cd7(%rip), %ecx     # 0x24ad0
cmpl %ecx, %eax
jl 0xfe0b
movl 0x14cd5(%rip), %eax     # 0x24ad8
movl %eax, -0xbc(%rbp)
jmp 0xfe15
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0xfe15
movl -0xb4(%rbp), %edx
movl -0xb8(%rbp), %esi
movl -0xb0(%rbp), %ecx
movl -0xbc(%rbp), %eax
addl %eax, %ecx
xorl %edi, %edi
callq 0x129e0
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl 0x14c9e(%rip), %ecx     # 0x24ae0
addl 0x14c84(%rip), %ecx     # 0x24acc
cmpl %ecx, %eax
jl 0xfee0
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0xc0(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xfe6c
xorl %eax, %eax
movl %eax, -0xc4(%rbp)
jmp 0xfe75
movl -0x30(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl 0x14c4d(%rip), %eax     # 0x24ad4
movl %eax, -0xc8(%rbp)
movl -0x30(%rbp), %eax
addl 0x14c4e(%rip), %eax     # 0x24ae4
movl 0x14c44(%rip), %ecx     # 0x24ae0
addl 0x14c2e(%rip), %ecx     # 0x24ad0
cmpl %ecx, %eax
jl 0xfeb4
movl 0x14c2c(%rip), %eax     # 0x24ad8
movl %eax, -0xd0(%rbp)
jmp 0xfec3
movl -0x30(%rbp), %eax
addl 0x14c27(%rip), %eax     # 0x24ae4
movl %eax, -0xd0(%rbp)
movl -0xc8(%rbp), %edx
movl -0xcc(%rbp), %esi
movl -0xc0(%rbp), %edi
movl -0xd0(%rbp), %ecx
callq 0x129e0
cmpl $0x0, -0x24(%rbp)
jne 0xfefc
movl -0x2c(%rbp), %edi
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0x14beb(%rip), %ecx     # 0x24ae0
xorl %esi, %esi
callq 0x129e0
movl -0x30(%rbp), %eax
addl 0x14bdf(%rip), %eax     # 0x24ae4
movl 0x14bd1(%rip), %ecx     # 0x24adc
addl 0x14bbf(%rip), %ecx     # 0x24ad0
cmpl %ecx, %eax
jl 0xff32
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
addl 0x14bc3(%rip), %esi     # 0x24ae4
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0x14bab(%rip), %ecx     # 0x24ad8
callq 0x129e0
movq 0x14aef(%rip), %rdi     # 0x24a28
movq -0x48(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl 0x14b96(%rip), %r9d     # 0x24ae4
callq 0x6420
movw $0x0, -0xa8(%rbp)
movw $0x0, -0xa6(%rbp)
movl 0x14b79(%rip), %eax     # 0x24ae4
movw %ax, -0xa2(%rbp)
movl -0x34(%rbp), %eax
movw %ax, -0xa4(%rbp)
movq 0x14aa5(%rip), %rdi     # 0x24a28
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
leaq -0xa8(%rbp), %rcx
movl $0x1, %r8d
callq 0x66c0
movzwl -0xc(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xffdc
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %edx
movl 0x14b26(%rip), %ecx     # 0x24ae4
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x18(%rbp), %r10
movl -0x1c(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x15000
jmp 0xfff3
movq 0x14a45(%rip), %rdi     # 0x24a28
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x63d0
movzwl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10051
movq 0x14a22(%rip), %rdi     # 0x24a28
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %eax
addl 0x14ad6(%rip), %eax     # 0x24aec
cvtsi2ss %eax, %xmm1
cvtsi2ssl 0x14886(%rip), %xmm0 # 0x248a8
movss 0x10036(%rip), %xmm2    # 0x20060
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0xaec2(%rip), %xmm1     # 0x1aefc
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x6420
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x100b1
movq 0x149c2(%rip), %rdi     # 0x24a28
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %eax
addl 0x14a76(%rip), %eax     # 0x24aec
cvtsi2ss %eax, %xmm0
movl 0x14828(%rip), %eax     # 0x248a8
shll %eax
cvtsi2ss %eax, %xmm1
mulss 0xffd2(%rip), %xmm1     # 0x20060
movss 0xae6a(%rip), %xmm2     # 0x1af00
divss %xmm2, %xmm1
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x6420
movq 0x14970(%rip), %rdi     # 0x24a28
xorl %eax, %eax
movl %eax, %esi
callq 0x6680
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)