// File: /workspace/github_c_makefile_star2_O0/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
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 0x4b36b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b398
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b3c7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b3f6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b425
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movq -0x10(%rbp), %rax
movw 0xe(%rax), %ax
movw %ax, -0x16(%rbp)
movl -0x8(%rbp), %edi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x6a20
cmpq $0x2, %rax
je 0x4b454
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b483
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b4aa
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b4d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b500
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b527
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x17, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b54e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b575
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x19, %rsi
movl $0x1, %edx
callq 0x6a20
cmpq $0x1, %rax
je 0x4b59c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b5c8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b5f4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
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 0x4b620
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b627
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq