// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movl 0x10(%rbp), %eax
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 0x14a02(%rip), %eax     # 0x23750
movl -0x20(%rbp), %ecx
imull 0x14a04(%rip), %ecx     # 0x2375c
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl 0x149f1(%rip), %eax     # 0x23754
movl -0x24(%rbp), %ecx
imull 0x149eb(%rip), %ecx     # 0x23758
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
imull 0x149e0(%rip), %eax     # 0x2375c
movl %eax, -0x34(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xedb4
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xedb4
cmpl $0x0, 0x14872(%rip)     # 0x23610
jne 0xeda9
cmpl $0x0, 0x1486d(%rip)     # 0x23614
je 0xedb2
movl 0xc5fd(%rip), %eax      # 0x1b3ac
movl %eax, -0x8(%rbp)
jmp 0xede9
movzwl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xedc9
cmpl $0x0, 0x14811(%rip)     # 0x235d8
jne 0xedde
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xede7
cmpl $0x0, 0x147c8(%rip)     # 0x235a4
je 0xede7
movl 0xc5c8(%rip), %eax      # 0x1b3ac
movl %eax, -0x8(%rbp)
jmp 0xede9
movl -0x8(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0xee61
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 0x14807(%rip), %rdi     # 0x23640
movq 0x14870(%rip), %rsi     # 0x236b0
movq 0x14801(%rip), %rdx     # 0x23648
leaq -0x98(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0x67d0
leaq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xee76
movq 0x146e0(%rip), %rax     # 0x23548
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 0xeef4
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 0x1477a(%rip), %rdi     # 0x23640
movq 0x147e3(%rip), %rsi     # 0x236b0
movq 0x14774(%rip), %rdx     # 0x23648
leaq -0xa0(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x67d0
leaq -0x90(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xef09
movq 0x1464d(%rip), %rax     # 0x23548
movl -0x4(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl 0x14851(%rip), %eax     # 0x23760
andl $0x20, %eax
cmpl $0x0, %eax
je 0xf06f
movq -0x40(%rbp), %rax
movq 0x14622(%rip), %rcx     # 0x23548
movl 0xb910(%rip), %edx      # 0x1a83c
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0xef52
movq 0x14609(%rip), %rax     # 0x23548
movl 0xb8fb(%rip), %ecx      # 0x1a840
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0xefc4
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 0x146a2(%rip), %rdi     # 0x23640
movq 0x1470b(%rip), %rsi     # 0x236b0
movq 0x1469c(%rip), %rdx     # 0x23648
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x67d0
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq 0x14579(%rip), %rcx     # 0x23548
movl 0xb86b(%rip), %edx      # 0x1a840
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0xeffb
movq 0x14560(%rip), %rax     # 0x23548
movl 0xb84e(%rip), %ecx      # 0x1a83c
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0xf06d
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 0x145f9(%rip), %rdi     # 0x23640
movq 0x14662(%rip), %rsi     # 0x236b0
movq 0x145f3(%rip), %rdx     # 0x23648
leaq -0xa0(%rbp), %rcx
leaq -0x70(%rbp), %r8
callq 0x67d0
leaq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xf06f
movzwl -0xc(%rbp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0xf100
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 0x14566(%rip), %rdi     # 0x23640
movq 0x145cf(%rip), %rsi     # 0x236b0
movq 0x14560(%rip), %rdx     # 0x23648
leaq -0x98(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x67d0
leaq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xf124
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 0xf148
movl 0x1462a(%rip), %eax     # 0x23760
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xf148
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xf15c
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf324
cmpl $0x0, -0x20(%rbp)
jne 0xf207
cmpl $0x0, -0x24(%rbp)
jne 0xf185
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0xf18e
movl -0x30(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xb0(%rbp)
movl 0x145b4(%rip), %eax     # 0x23754
movl %eax, -0xac(%rbp)
movl -0x30(%rbp), %eax
addl 0x145a9(%rip), %eax     # 0x23758
movl %eax, -0xa8(%rbp)
movl -0x30(%rbp), %eax
addl 0x1459a(%rip), %eax     # 0x23758
movl 0x14590(%rip), %ecx     # 0x23754
addl 0x1457a(%rip), %ecx     # 0x23744
cmpl %ecx, %eax
jl 0xf1dc
movl 0x14578(%rip), %eax     # 0x2374c
movl %eax, -0xb4(%rbp)
jmp 0xf1e6
xorl %eax, %eax
movl %eax, -0xb4(%rbp)
jmp 0xf1e6
movl -0xac(%rbp), %edx
movl -0xb0(%rbp), %esi
movl -0xa8(%rbp), %ecx
movl -0xb4(%rbp), %eax
addl %eax, %ecx
xorl %edi, %edi
callq 0x11830
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl 0x1453d(%rip), %ecx     # 0x23750
addl 0x14527(%rip), %ecx     # 0x23740
cmpl %ecx, %eax
jl 0xf2b1
movl -0x2c(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xf23d
xorl %eax, %eax
movl %eax, -0xbc(%rbp)
jmp 0xf246
movl -0x30(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl 0x144f0(%rip), %eax     # 0x23748
movl %eax, -0xc0(%rbp)
movl -0x30(%rbp), %eax
addl 0x144f1(%rip), %eax     # 0x23758
movl 0x144e7(%rip), %ecx     # 0x23754
addl 0x144d1(%rip), %ecx     # 0x23744
cmpl %ecx, %eax
jl 0xf285
movl 0x144cf(%rip), %eax     # 0x2374c
movl %eax, -0xc8(%rbp)
jmp 0xf294
movl -0x30(%rbp), %eax
addl 0x144ca(%rip), %eax     # 0x23758
movl %eax, -0xc8(%rbp)
movl -0xc0(%rbp), %edx
movl -0xc4(%rbp), %esi
movl -0xb8(%rbp), %edi
movl -0xc8(%rbp), %ecx
callq 0x11830
cmpl $0x0, -0x24(%rbp)
jne 0xf2cd
movl -0x2c(%rbp), %edi
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0x1448a(%rip), %ecx     # 0x23750
xorl %esi, %esi
callq 0x11830
movl -0x30(%rbp), %eax
addl 0x14482(%rip), %eax     # 0x23758
movl 0x14478(%rip), %ecx     # 0x23754
addl 0x14462(%rip), %ecx     # 0x23744
cmpl %ecx, %eax
jl 0xf303
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
addl 0x14466(%rip), %esi     # 0x23758
movl -0x2c(%rbp), %edx
addl -0x34(%rbp), %edx
movl 0x1444e(%rip), %ecx     # 0x2374c
callq 0x11830
movq 0x1439e(%rip), %rdi     # 0x236a8
movq -0x48(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
movl 0x14439(%rip), %r9d     # 0x23758
callq 0x6430
movl 0x10(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xf410
movzwl -0xc(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xf374
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %edx
movl 0x14402(%rip), %ecx     # 0x23758
movq -0x40(%rbp), %r8
movq -0x48(%rbp), %r9
movq -0x18(%rbp), %r10
movl -0x1c(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x13b50
jmp 0xf38b
movq 0x1432d(%rip), %rdi     # 0x236a8
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 0xf3c0
movq 0x1430a(%rip), %rdi     # 0x236a8
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
addl 0x141b2(%rip), %ecx     # 0x23560
addl $0x1, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x6430
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xf40e
movq 0x142d3(%rip), %rdi     # 0x236a8
movq -0x40(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0x30(%rbp), %ecx
movl 0x14175(%rip), %eax     # 0x23560
shll %eax
movl $0x3, %r8d
cltd
idivl %r8d
movl -0xcc(%rbp), %edx
addl %eax, %ecx
movl -0x34(%rbp), %r8d
movl $0x1, %r9d
callq 0x6430
jmp 0xf410
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)