// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv4wall
static int readv4wall(int fil, struct walltypev4 *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->cstat, 1) != 1) return -1;
	if (kread(fil, &wall->shade, 1) != 1) 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->picnum, 2) != 2) return -1;
	if (kread(fil, &wall->overpicnum, 2) != 2) return -1;
	if (kread(fil, &wall->nextsector1, 2) != 2) return -1;
	if (kread(fil, &wall->nextwall1, 2) != 2) return -1;
	if (kread(fil, &wall->nextsector2, 2) != 2) return -1;
	if (kread(fil, &wall->nextwall2, 2) != 2) return -1;
	if (kread(fil, &wall->tag, 4) != 4) return -1;

	wall->x = B_LITTLE32(wall->x);
	wall->y = B_LITTLE32(wall->y);
	wall->point2 = B_LITTLE16(wall->point2);
	wall->picnum = B_LITTLE16(wall->picnum);
	wall->overpicnum = B_LITTLE16(wall->overpicnum);
	wall->nextsector1 = B_LITTLE16(wall->nextsector1);
	wall->nextwall1 = B_LITTLE16(wall->nextwall1);
	wall->nextsector2 = B_LITTLE16(wall->nextsector2);
	wall->nextwall2 = B_LITTLE16(wall->nextwall2);
	wall->tag = B_LITTLE32(wall->tag);

	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 0x47ba1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x47bc7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47bed
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xa, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47c13
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xb, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47c39
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47c5f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xd, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47c85
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xe, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47cab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xf, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47cd1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47cf7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x12, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47d1d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47d43
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47d69
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47d8f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1a, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47db5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1c, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x47ddb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47e7a
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 0x10(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movw 0x12(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x10(%rbp), %rax
movw 0x14(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x14(%rax)
movq -0x10(%rbp), %rax
movw 0x16(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x16(%rax)
movq -0x10(%rbp), %rax
movw 0x18(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x18(%rax)
movq -0x10(%rbp), %rax
movw 0x1a(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x1a(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)