// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writev6sprite
static int writev6sprite(int fil, struct spritetypev6 *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;
	ts = B_LITTLE16(spr->cstat); if (Bwrite(fil, &ts, 2) != 2) return -1;
	if (Bwrite(fil, &spr->shade, 1) != 1) return -1;
	if (Bwrite(fil, &spr->pal, 1) != 1) return -1;
	if (Bwrite(fil, &spr->clipdist, 1) != 1) return -1;
	if (Bwrite(fil, &spr->xrepeat, 1) != 1) return -1;
	if (Bwrite(fil, &spr->yrepeat, 1) != 1) return -1;
	if (Bwrite(fil, &spr->xoffset, 1) != 1) return -1;
	if (Bwrite(fil, &spr->yoffset, 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 0x4bc2b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bc58
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bc85
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movq -0x10(%rbp), %rax
movw 0xc(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4bcb4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bcdb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xf, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bd02
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bd29
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x11, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bd50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bd77
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bd9e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4bdc5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bdf4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4be23
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4be52
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4be81
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4beb0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bedf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bf0e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
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 0x4bf3d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movq -0x10(%rbp), %rax
movw 0x26(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4bf69
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movq -0x10(%rbp), %rax
movw 0x28(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4bf95
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movq -0x10(%rbp), %rax
movw 0x2a(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4bfc1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4bfc8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)