// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv6sprite
static int readv6sprite(int fil, struct spritetypev6 *spr)
{
	if (kread(fil, &spr->x, 4) != 4) return -1;
	if (kread(fil, &spr->y, 4) != 4) return -1;
	if (kread(fil, &spr->z, 4) != 4) return -1;
	if (kread(fil, &spr->cstat, 2) != 2) return -1;
	if (kread(fil, &spr->shade, 1) != 1) return -1;
	if (kread(fil, &spr->pal, 1) != 1) return -1;
	if (kread(fil, &spr->clipdist, 1) != 1) return -1;
	if (kread(fil, &spr->xrepeat, 1) != 1) return -1;
	if (kread(fil, &spr->yrepeat, 1) != 1) return -1;
	if (kread(fil, &spr->xoffset, 1) != 1) return -1;
	if (kread(fil, &spr->yoffset, 1) != 1) return -1;
	if (kread(fil, &spr->picnum, 2) != 2) return -1;
	if (kread(fil, &spr->ang, 2) != 2) return -1;
	if (kread(fil, &spr->xvel, 2) != 2) return -1;
	if (kread(fil, &spr->yvel, 2) != 2) return -1;
	if (kread(fil, &spr->zvel, 2) != 2) return -1;
	if (kread(fil, &spr->owner, 2) != 2) return -1;
	if (kread(fil, &spr->sectnum, 2) != 2) return -1;
	if (kread(fil, &spr->statnum, 2) != 2) return -1;
	if (kread(fil, &spr->lotag, 2) != 2) return -1;
	if (kread(fil, &spr->hitag, 2) != 2) return -1;
	if (kread(fil, &spr->extra, 2) != 2) return -1;

	spr->x = B_LITTLE32(spr->x);
	spr->y = B_LITTLE32(spr->y);
	spr->z = B_LITTLE32(spr->z);
	spr->cstat = B_LITTLE16(spr->cstat);
	spr->picnum = B_LITTLE16(spr->picnum);
	spr->ang = B_LITTLE16(spr->ang);
	spr->xvel = B_LITTLE16(spr->xvel);
	spr->yvel = B_LITTLE16(spr->yvel);
	spr->zvel = B_LITTLE16(spr->zvel);
	spr->owner = B_LITTLE16(spr->owner);
	spr->sectnum = B_LITTLE16(spr->sectnum);
	spr->statnum = B_LITTLE16(spr->statnum);
	spr->lotag = B_LITTLE16(spr->lotag);
	spr->hitag = B_LITTLE16(spr->hitag);
	spr->extra = B_LITTLE16(spr->extra);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x49471
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x49497
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x494bd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x494e3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x49509
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xf, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x4952f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x49555
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x11, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x4957b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x495a1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x495c7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x495ed
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x49613
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x49639
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1a, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4965f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1c, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x49685
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1e, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x496ab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x496d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x22, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x496f7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x24, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4971d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x26, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x49743
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x49769
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x2a, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4978f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4987e
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movw 0xc(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x10(%rbp), %rax
movw 0x16(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x10(%rbp), %rax
movw 0x18(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x18(%rax)
movq -0x10(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1a(%rax)
movq -0x10(%rbp), %rax
movw 0x1c(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movw 0x1e(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1e(%rax)
movq -0x10(%rbp), %rax
movw 0x20(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x20(%rax)
movq -0x10(%rbp), %rax
movw 0x22(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x22(%rax)
movq -0x10(%rbp), %rax
movw 0x24(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x24(%rax)
movq -0x10(%rbp), %rax
movw 0x26(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x26(%rax)
movq -0x10(%rbp), %rax
movw 0x28(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x28(%rax)
movq -0x10(%rbp), %rax
movw 0x2a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2a(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)