// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writev6wall
static int writev6wall(int fil, struct walltypev6 *wall)
{
	uint32_t tl;
	uint16_t ts;

	tl = B_LITTLE32(wall->x); if (Bwrite(fil, &tl, 4) != 4) return -1;
	tl = B_LITTLE32(wall->y); if (Bwrite(fil, &tl, 4) != 4) return -1;
	ts = B_LITTLE16(wall->point2); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->nextsector); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->nextwall); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->picnum); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->overpicnum); if (Bwrite(fil, &ts, 2) != 2) return -1;
	if (Bwrite(fil, &wall->shade, 1) != 1) return -1;
	if (Bwrite(fil, &wall->pal, 1) != 1) return -1;
	ts = B_LITTLE16(wall->cstat); if (Bwrite(fil, &ts, 2) != 2) return -1;
	if (Bwrite(fil, &wall->xrepeat, 1) != 1) return -1;
	if (Bwrite(fil, &wall->yrepeat, 1) != 1) return -1;
	if (Bwrite(fil, &wall->xpanning, 1) != 1) return -1;
	if (Bwrite(fil, &wall->ypanning, 1) != 1) return -1;
	ts = B_LITTLE16(wall->lotag); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->hitag); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->extra); if (Bwrite(fil, &ts, 2) != 2) return -1;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl (%rsi), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
callq 0x6af0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $0x4, %rax
jne 0x32ad2
movl 0x4(%r14), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x4, %rax
jne 0x32ad2
movzwl 0x8(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0xa(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0xc(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0xe(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0x10(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
leaq 0x12(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
leaq 0x13(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
movzwl 0x14(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
leaq 0x16(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
leaq 0x17(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
leaq 0x18(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
leaq 0x19(%r14), %rsi
movl $0x1, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x1, %rax
jne 0x32ad2
movzwl 0x1a(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0x1c(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
cmpq $0x2, %rax
jne 0x32ad2
movzwl 0x1e(%r14), %eax
leaq 0xa(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6af0
xorl %ebx, %ebx
cmpq $0x2, %rax
setne %bl
negl %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq