// File: /workspace/github_c_makefile_star2_O0/mrdotx[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 = borderpx + x * win.cw, winy = borderpx + 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) {
		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, borderpx,
			winy + win.ch +
			((winy + win.ch >= borderpx + win.th)? win.h : 0));
	}
	if (winx + width >= borderpx + win.tw) {
		xclear(winx + width, (y == 0)? 0 : winy, win.w,
			((winy + win.ch >= borderpx + win.th)? win.h : (winy + win.ch)));
	}
	if (y == 0)
		xclear(winx, 0, winx + width, borderpx);
	if (winy + win.ch >= borderpx + 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 + dc.font.ascent * chscale + 1,
				width, 1);
	}

	if (base.mode & ATTR_STRUCK) {
		XftDrawRect(xw.draw, fg, winx, winy + 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 0xbf39(%rip), %eax      # 0x1c034
movl -0x20(%rbp), %ecx
imull 0x118cf(%rip), %ecx     # 0x219d4
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl 0xbf24(%rip), %eax      # 0x1c034
movl -0x24(%rbp), %ecx
imull 0x118b6(%rip), %ecx     # 0x219d0
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
imull 0x118ab(%rip), %eax     # 0x219d4
movl %eax, -0x34(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10161
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10161
cmpl $0x0, 0x11735(%rip)     # 0x21880
jne 0x10156
cmpl $0x0, 0x11730(%rip)     # 0x21884
je 0x1015f
movl 0xc228(%rip), %eax      # 0x1c384
movl %eax, -0x8(%rbp)
jmp 0x10196
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10176
cmpl $0x0, 0x116d4(%rip)     # 0x21848
jne 0x1018b
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10194
cmpl $0x0, 0x1168b(%rip)     # 0x21814
je 0x10194
movl 0xc1f3(%rip), %eax      # 0x1c384
movl %eax, -0x8(%rbp)
jmp 0x10196
movl -0x8(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0x1020e
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 0x116ca(%rip), %rdi     # 0x218b0
movq 0x1173b(%rip), %rsi     # 0x21928
movq 0x116c4(%rip), %rdx     # 0x218b8
leaq -0x98(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0x6740
leaq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x10223
movq 0x115a3(%rip), %rax     # 0x217b8
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 0x102a1
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 0x1163d(%rip), %rdi     # 0x218b0
movq 0x116ae(%rip), %rsi     # 0x21928
movq 0x11637(%rip), %rdx     # 0x218b8
leaq -0xa0(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x6740
leaq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x102b6
movq 0x11510(%rip), %rax     # 0x217b8
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 0x102e9
xorl %eax, %eax
cmpl -0x8(%rbp), %eax
ja 0x102e9
cmpl $0x7, -0x8(%rbp)
ja 0x102e9
movq 0x114e2(%rip), %rax     # 0x217b8
movl -0x8(%rbp), %ecx
addl $0x8, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl 0x116e9(%rip), %eax     # 0x219d8
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1044f
movq -0x40(%rbp), %rax
movq 0x114b2(%rip), %rcx     # 0x217b8
movl 0xb4b4(%rip), %edx      # 0x1b7c0
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x10332
movq 0x11499(%rip), %rax     # 0x217b8
movl 0xb49f(%rip), %ecx      # 0x1b7c4
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x103a4
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 0x11532(%rip), %rdi     # 0x218b0
movq 0x115a3(%rip), %rsi     # 0x21928
movq 0x1152c(%rip), %rdx     # 0x218b8
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x6740
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq 0x11409(%rip), %rcx     # 0x217b8
movl 0xb40f(%rip), %edx      # 0x1b7c4
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x103db
movq 0x113f0(%rip), %rax     # 0x217b8
movl 0xb3f2(%rip), %ecx      # 0x1b7c0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x1044d
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 0x11489(%rip), %rdi     # 0x218b0
movq 0x114fa(%rip), %rsi     # 0x21928
movq 0x11483(%rip), %rdx     # 0x218b8
leaq -0xa0(%rbp), %rcx
leaq -0x70(%rbp), %r8
callq 0x6740
leaq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1044f
movzwl -0xc(%rbp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0x104e0
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 0x113f6(%rip), %rdi     # 0x218b0
movq 0x11467(%rip), %rsi     # 0x21928
movq 0x113f0(%rip), %rdx     # 0x218b8
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x6740
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x10504
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x10528
movl 0x114c2(%rip), %eax     # 0x219d8
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x10528
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1053c
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x105d8
cmpl $0x0, -0x24(%rbp)
jne 0x10556
xorl %eax, %eax
movl %eax, -0xac(%rbp)
jmp 0x1055f
movl -0x30(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl 0xbac3(%rip), %eax      # 0x1c034
movl %eax, -0xb4(%rbp)
movl -0x30(%rbp), %eax
addl 0x11450(%rip), %eax     # 0x219d0
movl %eax, -0xb0(%rbp)
movl -0x30(%rbp), %eax
addl 0x11441(%rip), %eax     # 0x219d0
movl 0xba9f(%rip), %ecx      # 0x1c034
addl 0x11429(%rip), %ecx     # 0x219c4
cmpl %ecx, %eax
jl 0x105ad
movl 0x11427(%rip), %eax     # 0x219cc
movl %eax, -0xbc(%rbp)
jmp 0x105b7
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0x105b7
movl -0xb4(%rbp), %edx
movl -0xb8(%rbp), %esi
movl -0xb0(%rbp), %ecx
movl -0xbc(%rbp), %eax
addl %eax, %ecx
xorl %edi, %edi
callq 0x12610
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl 0xba50(%rip), %ecx      # 0x1c034
addl 0x113d6(%rip), %ecx     # 0x219c0
cmpl %ecx, %eax
jl 0x10682
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0xc0(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x1060e
xorl %eax, %eax
movl %eax, -0xc4(%rbp)
jmp 0x10617
movl -0x30(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl 0x1139f(%rip), %eax     # 0x219c8
movl %eax, -0xc8(%rbp)
movl -0x30(%rbp), %eax
addl 0x11398(%rip), %eax     # 0x219d0
movl 0xb9f6(%rip), %ecx      # 0x1c034
addl 0x11380(%rip), %ecx     # 0x219c4
cmpl %ecx, %eax
jl 0x10656
movl 0x1137e(%rip), %eax     # 0x219cc
movl %eax, -0xd0(%rbp)
jmp 0x10665
movl -0x30(%rbp), %eax
addl 0x11371(%rip), %eax     # 0x219d0
movl %eax, -0xd0(%rbp)
movl -0xc8(%rbp), %edx
movl -0xcc(%rbp), %esi
movl -0xc0(%rbp), %edi
movl -0xd0(%rbp), %ecx
callq 0x12610
cmpl $0x0, -0x24(%rbp)
jne 0x1069e
movl -0x2c(%rbp), %edi
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0xb99d(%rip), %ecx      # 0x1c034
xorl %esi, %esi
callq 0x12610
movl -0x30(%rbp), %eax
addl 0x11329(%rip), %eax     # 0x219d0
movl 0xb987(%rip), %ecx      # 0x1c034
addl 0x11311(%rip), %ecx     # 0x219c4
cmpl %ecx, %eax
jl 0x106d4
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
addl 0x1130d(%rip), %esi     # 0x219d0
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0x112fd(%rip), %ecx     # 0x219cc
callq 0x12610
movq 0x11245(%rip), %rdi     # 0x21920
movq -0x48(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl 0x112e0(%rip), %r9d     # 0x219d0
callq 0x63f0
movw $0x0, -0xa8(%rbp)
movw $0x0, -0xa6(%rbp)
movl 0x112c3(%rip), %eax     # 0x219d0
movw %ax, -0xa2(%rbp)
movl -0x34(%rbp), %eax
movw %ax, -0xa4(%rbp)
movq 0x111fb(%rip), %rdi     # 0x21920
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
leaq -0xa8(%rbp), %rcx
movl $0x1, %r8d
callq 0x6660
movzwl -0xc(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1077e
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %edx
movl 0x11270(%rip), %ecx     # 0x219d0
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x18(%rbp), %r10
movl -0x1c(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x14ec0
jmp 0x10795
movq 0x1119b(%rip), %rdi     # 0x21920
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x63a0
movzwl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x107eb
movq 0x11178(%rip), %rdi     # 0x21920
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
cvtsi2ssl -0x30(%rbp), %xmm1
cvtsi2ssl 0x11014(%rip), %xmm0 # 0x217d0
movss 0xb878(%rip), %xmm2     # 0x1c03c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x6688(%rip), %xmm1     # 0x16e5c
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x63f0
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x10843
movq 0x11120(%rip), %rdi     # 0x21920
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
cvtsi2ssl -0x30(%rbp), %xmm0
movl 0x10fbe(%rip), %eax     # 0x217d0
shll %eax
cvtsi2ss %eax, %xmm1
mulss 0xb81c(%rip), %xmm1     # 0x1c03c
movss 0x6638(%rip), %xmm2     # 0x16e60
divss %xmm2, %xmm1
addss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x63f0
movq 0x110d6(%rip), %rdi     # 0x21920
xorl %eax, %eax
movl %eax, %esi
callq 0x6620
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)