// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: printext256
void printext256(int xpos, int ypos, short col, short backcol, const char *name, char fontsize)
{
	int stx, i, x, y;
	const unsigned char *letptr;
	unsigned char *ptr;
	const struct textfontspec *f;

#if USE_POLYMOST && USE_OPENGL
	if (!polymost_printext256(xpos,ypos,col,backcol,name,fontsize)) return;
#endif

	f = &textfonts[min((unsigned)fontsize, 2)];
	stx = xpos;

	for(i=0;name[i];i++)
	{
		letptr = &f->font[((int)(unsigned char)name[i])*f->cellh + f->cellyoff];
		ptr = (unsigned char *)(ylookup[ypos+f->charysiz-1]+stx+frameplace);
		for(y=f->charysiz-1;y>=0;y--)
		{
			for(x=f->charxsiz-1;x>=0;x--)
			{
				if (letptr[y]&pow2char[7-x-f->cellxoff])
					ptr[x] = (unsigned char)col;
				else if (backcol >= 0)
					ptr[x] = (unsigned char)backcol;
			}
			ptr -= bytesperline;
		}
		stx += f->charxsiz;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r9b, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movw %dx, -0xa(%rbp)
movw %cx, -0xc(%rbp)
movq %r8, -0x18(%rbp)
movb %al, -0x19(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movw -0xa(%rbp), %cx
movw -0xc(%rbp), %ax
movq -0x18(%rbp), %r8
movswl %cx, %edx
movswl %ax, %ecx
movsbl -0x19(%rbp), %r9d
callq 0x8a760
cmpl $0x0, %eax
jne 0x59a7c
jmp 0x59c04
movsbl -0x19(%rbp), %eax
cmpl $0x2, %eax
jae 0x59a8e
movsbl -0x19(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x59a98
movl $0x2, %eax
movl %eax, -0x4c(%rbp)
jmp 0x59a98
movl -0x4c(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x7508a(%rip), %rax     # 0xceb30
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x59c04
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movq -0x48(%rbp), %rdx
imull 0x10(%rdx), %ecx
movq -0x48(%rbp), %rdx
addl 0x18(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x8(%rbp), %eax
movq -0x48(%rbp), %rcx
addl 0xc(%rcx), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x3f7f6d(%rip), %rax    # 0x451a80
movl (%rax,%rcx,4), %eax
addl -0x20(%rbp), %eax
cltq
leaq 0x1610ee(%rip), %rcx    # 0x1bac10
addq (%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x59be9
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jl 0x59bbf
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl $0x7, %ecx
subl -0x28(%rbp), %ecx
movq -0x48(%rbp), %rdx
subl 0x14(%rdx), %ecx
movslq %ecx, %rdx
leaq 0x87118(%rip), %rcx     # 0xe0c90
movzbl (%rcx,%rdx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x59b96
movw -0xa(%rbp), %ax
movb %al, %dl
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x59bb2
movswl -0xc(%rbp), %eax
cmpl $0x0, %eax
jl 0x59bb0
movw -0xc(%rbp), %ax
movb %al, %dl
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x59bb2
jmp 0x59bb4
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x59b4d
leaq 0x16121e(%rip), %rax    # 0x1bade4
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x59b36
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x59abe
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)