// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv6wall
static int readv6wall(int fil, struct walltypev6 *wall)
{
	if (kread(fil, &wall->x, 4) != 4) return -1;
	if (kread(fil, &wall->y, 4) != 4) return -1;
	if (kread(fil, &wall->point2, 2) != 2) return -1;
	if (kread(fil, &wall->nextsector, 2) != 2) return -1;
	if (kread(fil, &wall->nextwall, 2) != 2) return -1;
	if (kread(fil, &wall->picnum, 2) != 2) return -1;
	if (kread(fil, &wall->overpicnum, 2) != 2) return -1;
	if (kread(fil, &wall->shade, 1) != 1) return -1;
	if (kread(fil, &wall->pal, 1) != 1) return -1;
	if (kread(fil, &wall->cstat, 2) != 2) return -1;
	if (kread(fil, &wall->xrepeat, 1) != 1) return -1;
	if (kread(fil, &wall->yrepeat, 1) != 1) return -1;
	if (kread(fil, &wall->xpanning, 1) != 1) return -1;
	if (kread(fil, &wall->ypanning, 1) != 1) return -1;
	if (kread(fil, &wall->lotag, 2) != 2) return -1;
	if (kread(fil, &wall->hitag, 2) != 2) return -1;
	if (kread(fil, &wall->extra, 2) != 2) return -1;

	wall->x = B_LITTLE32(wall->x);
	wall->y = B_LITTLE32(wall->y);
	wall->point2 = B_LITTLE16(wall->point2);
	wall->nextsector = B_LITTLE16(wall->nextsector);
	wall->nextwall = B_LITTLE16(wall->nextwall);
	wall->picnum = B_LITTLE16(wall->picnum);
	wall->overpicnum = B_LITTLE16(wall->overpicnum);
	wall->cstat = B_LITTLE16(wall->cstat);
	wall->lotag = B_LITTLE16(wall->lotag);
	wall->hitag = B_LITTLE16(wall->hitag);
	wall->extra = B_LITTLE16(wall->extra);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x485d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x485f7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4861d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xa, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48643
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48669
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4868f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x486b5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x486db
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x48701
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48727
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x4874d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x17, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x48773
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x48799
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x19, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x487bf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1a, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x487e5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1c, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4880b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1e, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x48831
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x488e2
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movw 0x8(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x10(%rbp), %rax
movw 0xa(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x10(%rbp), %rax
movw 0xc(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x10(%rbp), %rax
movw 0xe(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xe(%rax)
movq -0x10(%rbp), %rax
movw 0x10(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x10(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1a(%rax)
movq -0x10(%rbp), %rax
movw 0x1c(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movw 0x1e(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1e(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)