// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writev5wall
static int writev5wall(int fil, struct walltypev5 *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->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;
	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->nextsector1); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->nextwall1); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->nextsector2); if (Bwrite(fil, &ts, 2) != 2) return -1;
	ts = B_LITTLE16(wall->nextwall2); if (Bwrite(fil, &ts, 2) != 2) 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
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 0x4b78b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b7b8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movq -0x10(%rbp), %rax
movw 0x8(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4b7e7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movq -0x10(%rbp), %rax
movw 0xa(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4b816
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b845
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b86c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b89b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b8c2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b8e9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b910
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x15, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b937
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b966
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b995
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b9c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4b9f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4ba1f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4ba4b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
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 0x4ba77
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ba7e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)