// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/a-c.c
// Function: thline
void thline(void *bufplc, unsigned int bx, int cntup16, int junk, unsigned int by, void *p)
{
	unsigned char ch, *pp;
	(void)junk;

	gbuf = (unsigned char *)bufplc;
	gpal = (unsigned char *)asm3;
	pp = (unsigned char *)p;
	if (transmode)
	{
		for(cntup16>>=16;cntup16>0;cntup16--)
		{
			ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
			if (ch != 255) *pp = gtrans[(*pp)+(gpal[ch]<<8)];
			bx += asm1;
			by += asm2;
			pp++;
		}
	}
	else
	{
		for(cntup16>>=16;cntup16>0;cntup16--)
		{
			ch = gbuf[((bx>>(32-glogx))<<glogy)+(by>>(32-glogy))];
			if (ch != 255) *pp = gtrans[((*pp)<<8)+gpal[ch]];
			bx += asm1;
			by += asm2;
			pp++;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, 0x61a35c(%rip)    # 0x6c2040
leaq 0x3a9cd5(%rip), %rax    # 0x4519c0
movq (%rax), %rax
movq %rax, 0x61a36b(%rip)    # 0x6c2060
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x61a32c(%rip)    # 0x6c2030
je 0xa7dd2
movl -0x10(%rbp), %eax
sarl $0x10, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0xa7dcd
movq 0x61a31c(%rip), %rax    # 0x6c2040
movl -0xc(%rbp), %edx
movl $0x20, %ecx
subl 0x61a302(%rip), %ecx    # 0x6c2034
shrl %cl, %edx
movl 0x61a2fe(%rip), %ecx    # 0x6c2038
shll %cl, %edx
movl %edx, -0x34(%rbp)
movl -0x18(%rbp), %edx
movl $0x20, %ecx
subl 0x61a2eb(%rip), %ecx    # 0x6c2038
shrl %cl, %edx
movl -0x34(%rbp), %ecx
addl %edx, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0xff, %eax
je 0xa7d95
movq 0x61a2ba(%rip), %rax    # 0x6c2028
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
movq 0x61a2e4(%rip), %rdx    # 0x6c2060
movzbl -0x21(%rbp), %esi
movzbl (%rdx,%rsi), %edx
shll $0x8, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
leaq 0x3a9c18(%rip), %rax    # 0x4519b4
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x3a9c0d(%rip), %rax    # 0x4519b8
movl (%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa7d13
jmp 0xa7e97
movl -0x10(%rbp), %eax
sarl $0x10, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jle 0xa7e95
movq 0x61a254(%rip), %rax    # 0x6c2040
movl -0xc(%rbp), %edx
movl $0x20, %ecx
subl 0x61a23a(%rip), %ecx    # 0x6c2034
shrl %cl, %edx
movl 0x61a236(%rip), %ecx    # 0x6c2038
shll %cl, %edx
movl %edx, -0x38(%rbp)
movl -0x18(%rbp), %edx
movl $0x20, %ecx
subl 0x61a223(%rip), %ecx    # 0x6c2038
shrl %cl, %edx
movl -0x38(%rbp), %ecx
addl %edx, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0xff, %eax
je 0xa7e5d
movq 0x61a1f2(%rip), %rax    # 0x6c2028
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x8, %ecx
movq 0x61a219(%rip), %rdx    # 0x6c2060
movzbl -0x21(%rbp), %esi
movzbl (%rdx,%rsi), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
leaq 0x3a9b50(%rip), %rax    # 0x4519b4
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x3a9b45(%rip), %rax    # 0x4519b8
movl (%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa7ddb
jmp 0xa7e97
popq %rbp
retq
nopl (%rax)