// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, %eax
movq %rdx, %r14
movq %rsi, %rcx
movq %rdi, 0x20(%rsp)
movq %rsi, %rdx
shrq $0x20, %rdx
movl %r14d, %r13d
shrq $0x29, %rcx
andb $0x1, %cl
movq %rax, 0x28(%rsp)
shll %cl, %eax
movl %eax, 0x18(%rsp)
movl 0x13e0e(%rip), %ebx     # 0x20d2c
movl %ebx, %ecx
movl %r8d, 0x1c(%rsp)
imull %r8d, %ecx
movl 0x13df9(%rip), %ebp     # 0x20d28
movl %r9d, 0xc(%rsp)
imull %r9d, %ebp
movl %edx, %eax
notl %eax
testb $0x5, %al
movq %rdx, 0x10(%rsp)
jne 0xcf5f
movl 0x13c51(%rip), %eax     # 0x20b9c
orl 0x13c47(%rip), %eax     # 0x20b98
movl $0xb, %eax
cmovel %r13d, %eax
movl %eax, %r13d
jmp 0xcf83
testb $0x4, %dl
je 0xcf6d
cmpl $0x0, 0x13bf5(%rip)     # 0x20b60
jne 0xcf7d
testb $0x1, 0x10(%rsp)
je 0xcf83
cmpl $0x0, 0x13bb1(%rip)     # 0x20b2c
je 0xcf83
movl $0xb, %r13d
addl 0x13d9b(%rip), %ecx     # 0x20d24
movq %rcx, 0x30(%rsp)
addl 0x13d8c(%rip), %ebp     # 0x20d20
btl $0x18, %r13d
jb 0xcfab
movl %r13d, %r15d
shlq $0x4, %r15
addq 0x13b27(%rip), %r15     # 0x20ad0
jmp 0xcff9
leaq 0x40(%rsp), %rcx
movw $0xffff, 0x6(%rcx)      # imm = 0xFFFF
movl %r13d, %eax
shrl $0x8, %eax
movl $0xff00, %edx           # imm = 0xFF00
andl %edx, %eax
movw %ax, (%rcx)
andl %r13d, %edx
movw %dx, 0x2(%rcx)
movl %r13d, %eax
shll $0x8, %eax
movw %ax, 0x4(%rcx)
movq 0x13bea(%rip), %rdi     # 0x20bc8
movq 0x13c8b(%rip), %rsi     # 0x20c70
movq 0x13be4(%rip), %rdx     # 0x20bd0
leaq 0x78(%rsp), %r15
movq %r15, %r8
callq 0x67a0
movq %r14, %r12
shrq $0x20, %r12
btq $0x38, %r14
movq %rbx, 0x38(%rsp)
jb 0xd019
shlq $0x4, %r12
addq 0x13ab9(%rip), %r12     # 0x20ad0
jmp 0xd068
leaq 0x48(%rsp), %rcx
movw $0xffff, 0x6(%rcx)      # imm = 0xFFFF
movl $0xff00, %eax           # imm = 0xFF00
movl %r12d, %edx
andl %eax, %edx
movw %dx, 0x2(%rcx)
shrq $0x28, %r14
andl %eax, %r14d
movw %r14w, (%rcx)
shll $0x8, %r12d
movw %r12w, 0x4(%rcx)
movq 0x13b7b(%rip), %rdi     # 0x20bc8
movq 0x13c1c(%rip), %rsi     # 0x20c70
movq 0x13b75(%rip), %rdx     # 0x20bd0
leaq 0x68(%rsp), %r12
movq %r12, %r8
callq 0x67a0
movq 0x10(%rsp), %rax
movl %eax, %ebx
andl $0x3, %ebx
cmpl $0x1, %ebx
sete %al
cmpl $0x8, %r13d
setb %cl
andb %al, %cl
movq 0x13a48(%rip), %rax     # 0x20ad0
orl $0x8, %r13d
shlq $0x4, %r13
addq %rax, %r13
testb %cl, %cl
movq %r15, %r14
cmovneq %r13, %r14
testb $0x20, 0x13c91(%rip)    # 0x20d34
jne 0xd0b4
movq 0x30(%rsp), %r15
movq 0x10(%rsp), %r13
jmp 0xd1b6
movl 0x104f6(%rip), %edx     # 0x1d5b0
shlq $0x4, %rdx
addq %rax, %rdx
cmpq %rdx, %r14
je 0xd11c
testb %cl, %cl
cmovneq %r13, %r15
movl 0x8(%r15), %eax
notl %eax
leaq 0x40(%rsp), %rcx
movw %ax, (%rcx)
movzwl 0xa(%r15), %eax
notl %eax
movw %ax, 0x2(%rcx)
movl 0xc(%r15), %eax
notl %eax
movw %ax, 0x4(%rcx)
movzwl 0xe(%r15), %eax
movw %ax, 0x6(%rcx)
movq 0x13ac9(%rip), %rdi     # 0x20bc8
movq 0x13b6a(%rip), %rsi     # 0x20c70
movq 0x13ac3(%rip), %rdx     # 0x20bd0
leaq 0x50(%rsp), %r14
movq %r14, %r8
callq 0x67a0
jmp 0xd12c
movl 0x1048a(%rip), %ecx     # 0x1d5ac
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, %r14
movq 0x10(%rsp), %r13
movq 0x13998(%rip), %rax     # 0x20ad0
movl 0x1046e(%rip), %ecx     # 0x1d5ac
shlq $0x4, %rcx
addq %rax, %rcx
cmpq %rcx, %r12
movq 0x30(%rsp), %r15
je 0xd1a6
movl 0x8(%r12), %eax
notl %eax
leaq 0x48(%rsp), %rcx
movw %ax, (%rcx)
movzwl 0xa(%r12), %eax
notl %eax
movw %ax, 0x2(%rcx)
movl 0xc(%r12), %eax
notl %eax
movw %ax, 0x4(%rcx)
movzwl 0xe(%r12), %eax
movw %ax, 0x6(%rcx)
movq 0x13a42(%rip), %rdi     # 0x20bc8
movq 0x13ae3(%rip), %rsi     # 0x20c70
movq 0x13a3c(%rip), %rdx     # 0x20bd0
leaq 0x88(%rsp), %r12
movq %r12, %r8
callq 0x67a0
jmp 0xd1b6
movl 0x10404(%rip), %ecx     # 0x1d5b0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, %r12
cmpl $0x2, %ebx
jne 0xd20b
movzwl 0x8(%r14), %eax
shrl %eax
leaq 0x40(%rsp), %rcx
movw %ax, (%rcx)
movzwl 0xa(%r14), %eax
shrl %eax
movw %ax, 0x2(%rcx)
movzwl 0xc(%r14), %eax
shrl %eax
movw %ax, 0x4(%rcx)
movzwl 0xe(%r14), %eax
movw %ax, 0x6(%rcx)
movq 0x139d8(%rip), %rdi     # 0x20bc8
movq 0x13a79(%rip), %rsi     # 0x20c70
movq 0x139d2(%rip), %rdx     # 0x20bd0
leaq 0x50(%rsp), %r14
movq %r14, %r8
callq 0x67a0
movq 0x38(%rsp), %rbx
testb $0x20, %r13b
jne 0xd21e
movq %r14, %rcx
movq %r12, %r14
jmp 0xd248
movq %r12, %rcx
cmpq %r14, %r12
jne 0xd248
movq 0x138a3(%rip), %rax     # 0x20ad0
movl 0x1037c(%rip), %r14d    # 0x1d5b0
shlq $0x4, %r14
addq %rax, %r14
movl 0x1036b(%rip), %ecx     # 0x1d5ac
shlq $0x4, %rcx
addq %rax, %rcx
imull 0x18(%rsp), %ebx
movl 0x13ae1(%rip), %eax     # 0x20d34
btl $0xb, %eax
movq %r14, %r12
cmovaeq %rcx, %r12
testb $0x10, %r13b
cmoveq %rcx, %r12
testb $0x40, %r13b
cmovneq %r14, %r12
cmpl $0x0, 0x1c(%rsp)
jne 0xd2df
movl 0xc(%rsp), %edx
testl %edx, %edx
movl %ebp, %ecx
cmovel %edx, %ecx
movl 0x13a99(%rip), %r8d     # 0x20d20
movl 0x13a9a(%rip), %r9d     # 0x20d28
addl %ebp, %r9d
movl 0x13a7d(%rip), %esi     # 0x20d14
addl %r8d, %esi
movl $0x0, %edx
cmpl %esi, %r9d
jl 0xd2aa
movl 0x13a72(%rip), %edx     # 0x20d1c
movq 0x139b7(%rip), %rdi     # 0x20c68
testb $0x20, %al
leaq 0x102f6(%rip), %rax     # 0x1d5b0
leaq 0x102eb(%rip), %rsi     # 0x1d5ac
cmovneq %rax, %rsi
movl (%rsi), %esi
shlq $0x4, %rsi
addq 0x137fe(%rip), %rsi     # 0x20ad0
subl %ecx, %r9d
addl %edx, %r9d
xorl %edx, %edx
callq 0x6420
leal (%r15,%rbx), %edx
movl 0x13a3b(%rip), %eax     # 0x20d24
movl 0x13a21(%rip), %ecx     # 0x20d10
addl %eax, %ecx
cmpl %ecx, %edx
jl 0xd35b
movl 0xc(%rsp), %esi
testl %esi, %esi
movl %ebp, %ecx
cmovel %esi, %ecx
movl 0x13a11(%rip), %r8d     # 0x20d18
movl 0x13a1a(%rip), %r9d     # 0x20d28
addl %ebp, %r9d
addl 0x139fd(%rip), %eax     # 0x20d14
cmpl %eax, %r9d
jl 0xd323
movl 0x139f9(%rip), %r9d     # 0x20d1c
movq 0x1393e(%rip), %rdi     # 0x20c68
testb $0x20, 0x13a03(%rip)    # 0x20d34
leaq 0x10278(%rip), %rax     # 0x1d5b0
leaq 0x1026d(%rip), %rsi     # 0x1d5ac
cmovneq %rax, %rsi
movl (%rsi), %esi
shlq $0x4, %rsi
addq 0x13780(%rip), %rsi     # 0x20ad0
subl %edx, %r8d
subl %ecx, %r9d
callq 0x6420
cmpl $0x0, 0xc(%rsp)
jne 0xd3a3
movl 0x139bb(%rip), %r9d     # 0x20d24
movq 0x138f8(%rip), %rdi     # 0x20c68
testb $0x20, 0x139bd(%rip)    # 0x20d34
leaq 0x10232(%rip), %rax     # 0x1d5b0
leaq 0x10227(%rip), %rcx     # 0x1d5ac
cmovneq %rax, %rcx
movl (%rcx), %esi
shlq $0x4, %rsi
addq 0x1373a(%rip), %rsi     # 0x20ad0
movl %r15d, %edx
xorl %ecx, %ecx
movl %ebx, %r8d
callq 0x6420
movl 0x1397f(%rip), %ecx     # 0x20d28
addl %ebp, %ecx
movl 0x13963(%rip), %eax     # 0x20d14
addl 0x13969(%rip), %eax     # 0x20d20
cmpl %eax, %ecx
jl 0xd3fd
movl 0x1395a(%rip), %r9d     # 0x20d1c
movq 0x1389f(%rip), %rdi     # 0x20c68
testb $0x20, 0x13964(%rip)    # 0x20d34
leaq 0x101d9(%rip), %rax     # 0x1d5b0
leaq 0x101ce(%rip), %rdx     # 0x1d5ac
cmovneq %rax, %rdx
movl (%rdx), %esi
shlq $0x4, %rsi
addq 0x136e1(%rip), %rsi     # 0x20ad0
subl %ecx, %r9d
movl %r15d, %edx
movl %ebx, %r8d
callq 0x6420
movq 0x13864(%rip), %rdi     # 0x20c68
movl 0x1391d(%rip), %r9d     # 0x20d28
movq %r14, %rsi
movl %r15d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x6420
leaq 0x60(%rsp), %rcx
movl $0x0, (%rcx)
movzwl 0x138fb(%rip), %eax     # 0x20d28
movw %ax, 0x6(%rcx)
movw %bx, 0x4(%rcx)
movq 0x1382c(%rip), %rdi     # 0x20c68
movl %r15d, %esi
movl %ebp, %edx
movl $0x1, %r8d
callq 0x66b0
btl $0xb, %r13d
jb 0xd46e
movq 0x1380e(%rip), %rdi     # 0x20c68
movq %r12, %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x63d0
jmp 0xd49b
movl %ebx, %eax
cltd
movq 0x28(%rsp), %r10
idivl %r10d
movl 0x138a9(%rip), %ecx     # 0x20d28
movl %r15d, %edi
movl %ebp, %esi
movl %eax, %edx
movq %r12, %r8
movq %r14, %r9
pushq %r10
pushq 0x28(%rsp)
callq 0x108e9
addq $0x10, %rsp
testb $0x8, %r13b
je 0xd4e8
movl 0x13889(%rip), %eax     # 0x20d30
addl %ebp, %eax
cvtsi2ss %eax, %xmm0
cvtsi2ssl 0x13633(%rip), %xmm1 # 0x20ae8
movq 0x137ac(%rip), %rdi     # 0x20c68
mulss 0x1096c(%rip), %xmm1    # 0x1de30
addss %xmm0, %xmm1
addss 0x97c8(%rip), %xmm1     # 0x16c98
cvttss2si %xmm1, %ecx
movq %r12, %rsi
movl %r15d, %edx
movl %ebx, %r8d
movl $0x1, %r9d
callq 0x6420
testb %r13b, %r13b
jns 0xd53c
addl 0x1383d(%rip), %ebp     # 0x20d30
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movl 0x135e8(%rip), %eax     # 0x20ae8
addl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss 0x1091f(%rip), %xmm1    # 0x1de30
divss 0x9783(%rip), %xmm1     # 0x16c9c
movq 0x13748(%rip), %rdi     # 0x20c68
addss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movq %r12, %rsi
movl %r15d, %edx
movl %ebx, %r8d
movl $0x1, %r9d
callq 0x6420
movq 0x13725(%rip), %rdi     # 0x20c68
xorl %esi, %esi
callq 0x6670
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq