// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: ceilspritehline
static void ceilspritehline(int x2, int y)
{
	int x1, v, bx, by;

	//x = x1 + (x2-x1)t + (y1-y2)u  ~  x = 160v
	//y = y1 + (y2-y1)t + (x2-x1)u  ~  y = (scrx-160)v
	//z = z1 = z2                   ~  z = posz + (scry-horiz)v

	x1 = lastx[y]; if (x2 < x1) return;

	v = mulscale20(globalzd,horizlookup[y-globalhoriz+horizycent]);
	bx = mulscale14(globalx2*x1+globalx1,v) + globalxpanning;
	by = mulscale14(globaly2*x1+globaly1,v) + globalypanning;
	asm1 = mulscale14(globalx2,v);
	asm2 = mulscale14(globaly2,v);

	asm3 = (intptr_t)palookup[globalpal] + (getpalookup((int)mulscale28(klabs(v),globvis),globalshade)<<8);

	if ((globalorientation&2) == 0)
		mhline((void *)globalbufplc,bx,(x2-x1)<<16,0L,by,(void *)(ylookup[y]+x1+frameoffset));
	else
	{
		thline((void *)globalbufplc,bx,(x2-x1)<<16,0L,by,(void *)(ylookup[y]+x1+frameoffset));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x427e97(%rip), %rax    # 0x488b90
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x60d0c
jmp 0x60e70
movl 0x427c3a(%rip), %edi    # 0x48894c
movq 0x3f0d47(%rip), %rax    # 0x451a60
movl -0x8(%rbp), %ecx
subl 0x2578da(%rip), %ecx    # 0x2b85fc
addl 0x3f0d48(%rip), %ecx    # 0x451a70
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
callq 0x376c0
movl %eax, -0x10(%rbp)
movl 0x3ee864(%rip), %edi    # 0x44f5a0
imull -0xc(%rbp), %edi
addl 0x3ee852(%rip), %edi    # 0x44f598
movl -0x10(%rbp), %esi
callq 0x52680
addl 0x427bec(%rip), %eax    # 0x488940
movl %eax, -0x14(%rbp)
movl 0x3ee847(%rip), %edi    # 0x44f5a4
imull -0xc(%rbp), %edi
addl 0x3ee835(%rip), %edi    # 0x44f59c
movl -0x10(%rbp), %esi
callq 0x52680
addl 0x427bcf(%rip), %eax    # 0x488944
movl %eax, -0x18(%rbp)
movl 0x3ee822(%rip), %edi    # 0x44f5a0
movl -0x10(%rbp), %esi
callq 0x52680
movl %eax, 0x3f0c28(%rip)    # 0x4519b4
movl 0x3ee812(%rip), %edi    # 0x44f5a4
movl -0x10(%rbp), %esi
callq 0x52680
movl %eax, 0x3f0c18(%rip)    # 0x4519b8
movslq 0x3e9fbd(%rip), %rcx    # 0x44ad64
leaq 0x374892(%rip), %rax    # 0x3d5640
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %edi
callq 0x37610
movl %eax, %edi
movl 0x3ee7ca(%rip), %esi    # 0x44f590
callq 0x5ec30
movl %eax, %edi
movl 0x3ee7b9(%rip), %esi    # 0x44f58c
callq 0x5ec70
movl %eax, %ecx
movq -0x20(%rbp), %rax
shll $0x8, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x3f0bd2(%rip)    # 0x4519c0
movl 0x3e9f6c(%rip), %eax    # 0x44ad60
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x60e37
movq 0x3ee77d(%rip), %rdi    # 0x44f580
movl -0x14(%rbp), %esi
movl -0x4(%rbp), %edx
subl -0xc(%rbp), %edx
shll $0x10, %edx
movl -0x18(%rbp), %r8d
movslq -0x8(%rbp), %rcx
leaq 0x3f0c62(%rip), %rax    # 0x451a80
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movslq %eax, %r9
addq 0x3b16c2(%rip), %r9     # 0x4124f0
xorl %ecx, %ecx
callq 0xa7bb0
jmp 0x60e70
movq 0x3ee742(%rip), %rdi    # 0x44f580
movl -0x14(%rbp), %esi
movl -0x4(%rbp), %edx
subl -0xc(%rbp), %edx
shll $0x10, %edx
movl -0x18(%rbp), %r8d
movslq -0x8(%rbp), %rcx
leaq 0x3f0c27(%rip), %rax    # 0x451a80
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movslq %eax, %r9
addq 0x3b1687(%rip), %r9     # 0x4124f0
xorl %ecx, %ecx
callq 0xa7cc0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)