// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writev5sprite
static int writev5sprite(int fil, struct spritetypev5 *spr)
{
	uint32_t tl;
	uint16_t ts;

	tl = B_LITTLE32(spr->x); if (Bwrite(fil, &tl, 4) != 4) return -1;
	tl = B_LITTLE32(spr->y); if (Bwrite(fil, &tl, 4) != 4) return -1;
	tl = B_LITTLE32(spr->z); if (Bwrite(fil, &tl, 4) != 4) return -1;
	if (Bwrite(fil, &spr->cstat, 1) != 1) return -1;
	if (Bwrite(fil, &spr->shade, 1) != 1) return -1;
	if (Bwrite(fil, &spr->xrepeat, 1) != 1) return -1;
	if (Bwrite(fil, &spr->yrepeat, 1) != 1) return -1;
	ts = B_LITTLE16(spr->picnum); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->ang); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->xvel); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->yvel); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->zvel); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->owner); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->sectnum); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->statnum); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->lotag); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->hitag); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(spr->extra); if (Bwrite(fil, &ts, 2) != 2) return -1;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x6a20
cmpq $0x4, %rax
je 0x4c14b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x6a20
cmpq $0x4, %rax
je 0x4c178
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x6a20
cmpq $0x4, %rax
je 0x4c1a5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4c1cc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xd, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4c1f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4c21a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xf, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4c241
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x10(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c270
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x12(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c29f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x14(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c2ce
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x16(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c2fd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x18(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c32c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x1a(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c35b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x1c(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c38a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x1e(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c3b9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c3e5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x22(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c411
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movq -0x10(%rbp), %rax
movw 0x24(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4c43d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c444
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)