// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: ceilspritescan
static void ceilspritescan(int x1, int x2)
{
	int x, y1, y2, twall, bwall;

	y1 = uwall[x1]; y2 = y1;
	for(x=x1;x<=x2;x++)
	{
		twall = uwall[x]-1; bwall = dwall[x];
		if (twall < bwall-1)
		{
			if (twall >= y2)
			{
				while (y1 < y2-1) ceilspritehline(x-1,++y1);
				y1 = twall;
			}
			else
			{
				while (y1 < twall) ceilspritehline(x-1,++y1);
				while (y1 > twall) lastx[y1--] = x;
			}
			while (y2 > bwall) ceilspritehline(x-1,--y2);
			while (y2 < bwall) lastx[y2++] = x;
		}
		else
		{
			while (y1 < y2-1) ceilspritehline(x-1,++y1);
			if (x == x2) break;
			y1 = uwall[x+1]; y2 = y1;
		}
	}
	while (y1 < y2-1) ceilspritehline(x2,++y1);
	faketimerhandler();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x53aa17(%rip), %rax    # 0x59a0e0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x5f843
movslq -0xc(%rbp), %rcx
leaq 0x53a9ed(%rip), %rax    # 0x59a0e0
movswl (%rax,%rcx,2), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x47d948(%rip), %rax    # 0x4dd050
movswl (%rax,%rcx,2), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5f7e7
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x5f755
jmp 0x5f72a
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5f74d
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
callq 0x60ce0
jmp 0x5f72a
movl -0x18(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x5f79e
jmp 0x5f757
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x5f775
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
callq 0x60ce0
jmp 0x5f757
jmp 0x5f777
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x5f79c
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
movslq %eax, %rcx
leaq 0x4293f9(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5f777
jmp 0x5f79e
jmp 0x5f7a0
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x5f7be
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x14(%rbp), %esi
addl $-0x1, %esi
movl %esi, -0x14(%rbp)
callq 0x60ce0
jmp 0x5f7a0
jmp 0x5f7c0
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x5f7e5
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %eax, %rcx
leaq 0x4293b0(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5f7c0
jmp 0x5f833
jmp 0x5f7e9
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5f80c
movl -0xc(%rbp), %edi
subl $0x1, %edi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
callq 0x60ce0
jmp 0x5f7e9
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x5f816
jmp 0x5f843
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x53a8ba(%rip), %rax    # 0x59a0e0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x5f835
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5f6dc
jmp 0x5f845
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5f865
movl -0x8(%rbp), %edi
movl -0x10(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
callq 0x60ce0
jmp 0x5f845
callq 0xc220
addq $0x20, %rsp
popq %rbp
retq