// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/build.c
// Function: fixspritesectors
void fixspritesectors(void)
{
	int i, j, dax, day, daz;

	for(i=numsectors-1;i>=0;i--)
		if ((sector[i].wallnum <= 0) || (sector[i].wallptr >= numwalls))
			deletesector((short)i);

	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
		{
			dax = sprite[i].x;
			day = sprite[i].y;
			if (inside(dax,day,sprite[i].sectnum) != 1)
			{
				daz = ((tilesizy[sprite[i].picnum]*sprite[i].yrepeat)<<2);

				for(j=0;j<numsectors;j++)
					if (inside(dax,day,(short)j) == 1)
						if (sprite[i].z >= getceilzofslope(j,dax,day))
							if (sprite[i].z-daz <= getflorzofslope(j,dax,day))
							{
								changespritesect((short)i,(short)j);
								break;
							}
			}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x3f2a81(%rip), %rax    # 0x40cac0
movswl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x1a0a4
movslq -0x4(%rbp), %rcx
leaq 0x266567(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
cmpl $0x0, %eax
jle 0x1a08c
movslq -0x4(%rbp), %rcx
leaq 0x26654c(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
leaq 0x437943(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x1a097
movl -0x4(%rbp), %eax
movswl %ax, %edi
callq 0x29bf0
jmp 0x1a099
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1a048
movl $0x0, -0x4(%rbp)
cmpl $0x4000, -0x4(%rbp)     # imm = 0x4000
jge 0x1a24e
movslq -0x4(%rbp), %rcx
leaq 0x29f74d(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %eax
cmpl $0x400, %eax            # imm = 0x400
jge 0x1a23e
movslq -0x4(%rbp), %rcx
leaq 0x29f72c(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x29f715(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movslq -0x4(%rbp), %rcx
leaq 0x29f6f7(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x18(%rax), %edx
callq 0x4ee70
cmpl $0x1, %eax
je 0x1a23c
movslq -0x4(%rbp), %rcx
leaq 0x29f6d3(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswq 0xe(%rax), %rcx
leaq 0x4223f0(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
movslq -0x4(%rbp), %rdx
leaq 0x29f6b1(%rip), %rcx    # 0x2b9810
imulq $0x2c, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x15(%rcx), %ecx
imull %ecx, %eax
shll $0x2, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x3f293c(%rip), %rcx    # 0x40cac0
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x1a23a
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x8(%rbp), %eax
movswl %ax, %edx
callq 0x4ee70
cmpl $0x1, %eax
jne 0x1a22a
movslq -0x4(%rbp), %rcx
leaq 0x29f65c(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movswl %ax, %edi
callq 0x551d0
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jl 0x1a228
movslq -0x4(%rbp), %rcx
leaq 0x29f62a(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movswl %ax, %edi
callq 0x55060
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jg 0x1a226
movl -0x4(%rbp), %eax
movw %ax, %cx
movl -0x8(%rbp), %eax
movswl %cx, %edi
movswl %ax, %esi
callq 0x4f230
jmp 0x1a23a
jmp 0x1a228
jmp 0x1a22a
jmp 0x1a22c
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1a17a
jmp 0x1a23c
jmp 0x1a23e
jmp 0x1a240
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1a0ab
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)