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

	/* 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];
	}

	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;

	if (dmode & DRAW_BG) {
		/* Intelligent cleaning up of the borders. */
		if (x == 0) {
			xclear(0, (y == 0)? 0 : winy, win.vborderpx,
				winy + win.ch +
				((winy + win.ch >= win.vborderpx + win.th)? win.h : 0));
		}
		if (winx + width >= win.hborderpx + win.tw) {
			xclear(winx + width, (y == 0)? 0 : winy, win.w,
				((winy + win.ch >= win.vborderpx + win.th)? win.h : (winy + win.ch)));
		}
		if (y == 0)
			xclear(winx, 0, winx + width, win.hborderpx);
		if (winy + win.ch >= win.vborderpx + 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);
	}

	if (dmode & DRAW_FG) {
		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 + 1,
					width, 1);
		}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %r10d
movq %rdx, %rbp
movq %rsi, %rcx
movq %rdi, 0x10(%rsp)
movq %rsi, %rbx
shrq $0x20, %rbx
movl %ebp, %eax
shrq $0x29, %rcx
andb $0x1, %cl
movq %r10, 0x18(%rsp)
movl %r10d, %r14d
shll %cl, %r14d
movl 0x1321d(%rip), %ecx     # 0x1f99c
movq %rcx, 0x28(%rsp)
movl %ecx, %edx
movl %r8d, 0xc(%rsp)
imull %r8d, %edx
movl 0x13202(%rip), %r15d    # 0x1f998
movl %r9d, 0x8(%rsp)
imull %r9d, %r15d
movl %ebx, %ecx
notl %ecx
testb $0x5, %cl
jne 0xc7be
movl 0x130a6(%rip), %ecx     # 0x1f854
orl 0x1309c(%rip), %ecx     # 0x1f850
movl $0xb, %ecx
cmovnel %ecx, %eax
jmp 0xc7df
testb $0x4, %bl
je 0xc7cc
cmpl $0x0, 0x1304e(%rip)     # 0x1f818
jne 0xc7da
testb $0x1, %bl
je 0xc7df
cmpl $0x0, 0x1300c(%rip)     # 0x1f7e4
je 0xc7df
movl $0xb, %eax
addl 0x131ab(%rip), %edx     # 0x1f990
movq %rdx, (%rsp)
addl 0x131a4(%rip), %r15d    # 0x1f994
btl $0x18, %eax
jb 0xc806
movl %eax, %r13d
shlq $0x4, %r13
addq 0x12f84(%rip), %r13     # 0x1f788
jmp 0xc84f
leaq 0x20(%rsp), %rcx
movw $0xffff, 0x6(%rcx)      # imm = 0xFFFF
movl %eax, %edx
shrl $0x8, %edx
movl $0xff00, %esi           # imm = 0xFF00
andl %esi, %edx
movw %dx, (%rcx)
andl %eax, %esi
movw %si, 0x2(%rcx)
shll $0x8, %eax
movw %ax, 0x4(%rcx)
movq 0x1304c(%rip), %rdi     # 0x1f880
movq 0x130b5(%rip), %rsi     # 0x1f8f0
movq 0x13046(%rip), %rdx     # 0x1f888
leaq 0x58(%rsp), %r13
movq %r13, %r8
callq 0x67d0
movq %rbp, %r12
shrq $0x20, %r12
btq $0x38, %rbp
jb 0xc86a
shlq $0x4, %r12
addq 0x12f20(%rip), %r12     # 0x1f788
jmp 0xc8b7
leaq 0x30(%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, %rbp
andl %eax, %ebp
movw %bp, (%rcx)
shll $0x8, %r12d
movw %r12w, 0x4(%rcx)
movq 0x12fe4(%rip), %rdi     # 0x1f880
movq 0x1304d(%rip), %rsi     # 0x1f8f0
movq 0x12fde(%rip), %rdx     # 0x1f888
leaq 0x48(%rsp), %r12
movq %r12, %r8
callq 0x67d0
testb $0x20, 0x130e2(%rip)    # 0x1f9a0
je 0xc9ba
movq 0x12ebd(%rip), %rax     # 0x1f788
movl 0xbd2b(%rip), %ecx      # 0x185fc
shlq $0x4, %rcx
addq %rax, %rcx
cmpq %rcx, %r13
je 0xc92d
movl 0x8(%r13), %eax
notl %eax
leaq 0x20(%rsp), %rcx
movw %ax, (%rcx)
movzwl 0xa(%r13), %eax
notl %eax
movw %ax, 0x2(%rcx)
movl 0xc(%r13), %eax
notl %eax
movw %ax, 0x4(%rcx)
movzwl 0xe(%r13), %eax
movw %ax, 0x6(%rcx)
movq 0x12f70(%rip), %rdi     # 0x1f880
movq 0x12fd9(%rip), %rsi     # 0x1f8f0
movq 0x12f6a(%rip), %rdx     # 0x1f888
leaq 0x38(%rsp), %r13
movq %r13, %r8
callq 0x67d0
jmp 0xc93d
movl 0xbccd(%rip), %ecx      # 0x18600
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, %r13
movq 0x12e44(%rip), %rax     # 0x1f788
movl 0xbcb6(%rip), %ecx      # 0x18600
shlq $0x4, %rcx
addq %rax, %rcx
cmpq %rcx, %r12
je 0xc9aa
movl 0x8(%r12), %eax
notl %eax
leaq 0x30(%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 0x12ef3(%rip), %rdi     # 0x1f880
movq 0x12f5c(%rip), %rsi     # 0x1f8f0
movq 0x12eed(%rip), %rdx     # 0x1f888
leaq 0x68(%rsp), %r12
movq %r12, %r8
callq 0x67d0
jmp 0xc9ba
movl 0xbc4c(%rip), %ecx      # 0x185fc
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, %r12
movl 0xb0(%rsp), %ebp
movl %ebx, %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0xca1b
movzwl 0x8(%r13), %eax
shrl %eax
leaq 0x20(%rsp), %rcx
movw %ax, (%rcx)
movzwl 0xa(%r13), %eax
shrl %eax
movw %ax, 0x2(%rcx)
movzwl 0xc(%r13), %eax
shrl %eax
movw %ax, 0x4(%rcx)
movzwl 0xe(%r13), %eax
movw %ax, 0x6(%rcx)
movq 0x12e80(%rip), %rdi     # 0x1f880
movq 0x12ee9(%rip), %rsi     # 0x1f8f0
movq 0x12e7a(%rip), %rdx     # 0x1f888
leaq 0x38(%rsp), %r13
movq %r13, %r8
callq 0x67d0
movq 0x28(%rsp), %rax
imull %r14d, %eax
movq %rax, %r14
testb $0x20, %bl
movq %r12, %rcx
cmoveq %r13, %rcx
cmoveq %r12, %r13
movl 0x12f65(%rip), %eax     # 0x1f9a0
btl $0xb, %eax
movq %r13, %r12
cmovaeq %rcx, %r12
testb $0x10, %bl
cmoveq %rcx, %r12
testb $0x40, %bl
cmovneq %r13, %r12
testb $0x1, %bpl
je 0xcc23
cmpl $0x0, 0xc(%rsp)
jne 0xcad0
movl 0x8(%rsp), %edx
testl %edx, %edx
movl %r15d, %ecx
cmovel %edx, %ecx
movl 0x12f1c(%rip), %r8d     # 0x1f994
movl 0x12f19(%rip), %r9d     # 0x1f998
addl %r15d, %r9d
movl 0x12efc(%rip), %esi     # 0x1f984
addl %r8d, %esi
movl $0x0, %edx
cmpl %esi, %r9d
jl 0xca9b
movl 0x12ef1(%rip), %edx     # 0x1f98c
movq 0x12e46(%rip), %rdi     # 0x1f8e8
testb $0x20, %al
leaq 0xbb51(%rip), %rax      # 0x185fc
leaq 0xbb4e(%rip), %rsi      # 0x18600
cmovneq %rax, %rsi
movl (%rsi), %esi
shlq $0x4, %rsi
addq 0x12cc5(%rip), %rsi     # 0x1f788
subl %ecx, %r9d
addl %edx, %r9d
xorl %edx, %edx
callq 0x6430
movq (%rsp), %r8
leal (%r8,%r14), %edx
movl 0x12ea2(%rip), %eax     # 0x1f980
addl 0x12eac(%rip), %eax     # 0x1f990
cmpl %eax, %edx
jl 0xcb59
movl 0x8(%rsp), %eax
testl %eax, %eax
movl %r15d, %ecx
cmovel %eax, %ecx
movl 0x12e8d(%rip), %r8d     # 0x1f988
movl 0x12e96(%rip), %r9d     # 0x1f998
addl %r15d, %r9d
movl 0x12e79(%rip), %eax     # 0x1f984
addl 0x12e83(%rip), %eax     # 0x1f994
cmpl %eax, %r9d
jl 0xcb1d
movl 0x12e6f(%rip), %r9d     # 0x1f98c
movq 0x12dc4(%rip), %rdi     # 0x1f8e8
testb $0x20, 0x12e75(%rip)    # 0x1f9a0
leaq 0xbaca(%rip), %rax      # 0x185fc
leaq 0xbac7(%rip), %rsi      # 0x18600
cmovneq %rax, %rsi
movl (%rsi), %esi
shlq $0x4, %rsi
addq 0x12c3e(%rip), %rsi     # 0x1f788
subl %edx, %r8d
subl %ecx, %r9d
callq 0x6430
movq (%rsp), %r8
cmpl $0x0, 0x8(%rsp)
jne 0xcba5
movl 0x12e29(%rip), %r9d     # 0x1f990
movq 0x12d7a(%rip), %rdi     # 0x1f8e8
testb $0x20, 0x12e2b(%rip)    # 0x1f9a0
leaq 0xba80(%rip), %rax      # 0x185fc
leaq 0xba7d(%rip), %rcx      # 0x18600
cmovneq %rax, %rcx
movl (%rcx), %esi
shlq $0x4, %rsi
addq 0x12bf4(%rip), %rsi     # 0x1f788
movl %r8d, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0x6430
movq (%rsp), %r8
movl 0x12ded(%rip), %ecx     # 0x1f998
addl %r15d, %ecx
movl 0x12dd0(%rip), %eax     # 0x1f984
addl 0x12dda(%rip), %eax     # 0x1f994
cmpl %eax, %ecx
jl 0xcc04
movl 0x12dc7(%rip), %r9d     # 0x1f98c
movq 0x12d1c(%rip), %rdi     # 0x1f8e8
testb $0x20, 0x12dcd(%rip)    # 0x1f9a0
leaq 0xba22(%rip), %rax      # 0x185fc
leaq 0xba1f(%rip), %rdx      # 0x18600
cmovneq %rax, %rdx
movl (%rdx), %esi
shlq $0x4, %rsi
addq 0x12b96(%rip), %rsi     # 0x1f788
subl %ecx, %r9d
movl %r8d, %edx
movl %r14d, %r8d
callq 0x6430
movq (%rsp), %r8
movq 0x12cdd(%rip), %rdi     # 0x1f8e8
movl 0x12d86(%rip), %r9d     # 0x1f998
movq %r13, %rsi
movl %r8d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0x6430
testb $0x2, %bpl
je 0xccec
btl $0xb, %ebx
jb 0xcc4e
movq 0x12cae(%rip), %rdi     # 0x1f8e8
movq %r12, %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x63d0
jmp 0xcc7e
movl %r14d, %eax
cltd
movq 0x18(%rsp), %r10
idivl %r10d
movl 0x12d38(%rip), %ecx     # 0x1f998
movq (%rsp), %rdi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %r8
movq %r13, %r9
pushq %r10
pushq 0x18(%rsp)
callq 0xfa9d
addq $0x10, %rsp
testb $0x8, %bl
je 0xccab
movq 0x12c5e(%rip), %rdi     # 0x1f8e8
movl 0x12b10(%rip), %eax     # 0x1f7a0
leal (%r15,%rax), %ecx
incl %ecx
movq %r12, %rsi
movq (%rsp), %rdx
movl %r14d, %r8d
movl $0x1, %r9d
callq 0x6430
testb %bl, %bl
jns 0xccec
movq 0x12c32(%rip), %rdi     # 0x1f8e8
movl 0x12ae4(%rip), %eax     # 0x1f7a0
addl %eax, %eax
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
addl %eax, %ecx
addl %r15d, %ecx
movq %r12, %rsi
movq (%rsp), %rdx
movl %r14d, %r8d
movl $0x1, %r9d
callq 0x6430
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq