// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv4sprite
static int readv4sprite(int fil, struct spritetypev4 *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, 1) != 1) return -1;
	if (kread(fil, &spr->shade, 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->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->tag, 4) != 4) return -1;
	if (kread(fil, &spr->extra, 4) != 4) return -1;

	spr->x = B_LITTLE32(spr->x);
	spr->y = B_LITTLE32(spr->y);
	spr->z = B_LITTLE32(spr->z);
	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->tag = B_LITTLE32(spr->tag);
	spr->extra = B_LITTLE32(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 0x48921
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x48947
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x4896d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x48993
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xd, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x489b9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x489df
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xf, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x48a05
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48a2b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48a51
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48a77
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48a9d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48ac3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1a, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48ae9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1c, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48b0f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1e, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48b35
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x48b5b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x24, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x48b81
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48c4c
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 0x10(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movw 0x12(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x10(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%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
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)