// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv5sect
static int readv5sect(int fil, struct sectortypev5 *sect)
{
	if (kread(fil, &sect->wallptr, 2) != 2) return -1;
	if (kread(fil, &sect->wallnum, 2) != 2) return -1;
	if (kread(fil, &sect->ceilingpicnum, 2) != 2) return -1;
	if (kread(fil, &sect->floorpicnum, 2) != 2) return -1;
	if (kread(fil, &sect->ceilingheinum, 2) != 2) return -1;
	if (kread(fil, &sect->floorheinum, 2) != 2) return -1;
	if (kread(fil, &sect->ceilingz, 4) != 4) return -1;
	if (kread(fil, &sect->floorz, 4) != 4) return -1;
	if (kread(fil, &sect->ceilingshade, 1) != 1) return -1;
	if (kread(fil, &sect->floorshade, 1) != 1) return -1;
	if (kread(fil, &sect->ceilingxpanning, 1) != 1) return -1;
	if (kread(fil, &sect->floorxpanning, 1) != 1) return -1;
	if (kread(fil, &sect->ceilingypanning, 1) != 1) return -1;
	if (kread(fil, &sect->floorypanning, 1) != 1) return -1;
	if (kread(fil, &sect->ceilingstat, 1) != 1) return -1;
	if (kread(fil, &sect->floorstat, 1) != 1) return -1;
	if (kread(fil, &sect->ceilingpal, 1) != 1) return -1;
	if (kread(fil, &sect->floorpal, 1) != 1) return -1;
	if (kread(fil, &sect->visibility, 1) != 1) return -1;
	if (kread(fil, &sect->lotag, 2) != 2) return -1;
	if (kread(fil, &sect->hitag, 2) != 2) return -1;
	if (kread(fil, &sect->extra, 2) != 2) return -1;

	sect->wallptr = B_LITTLE16(sect->wallptr);
	sect->wallnum = B_LITTLE16(sect->wallnum);
	sect->ceilingpicnum = B_LITTLE16(sect->ceilingpicnum);
	sect->floorpicnum = B_LITTLE16(sect->floorpicnum);
	sect->ceilingheinum = B_LITTLE16(sect->ceilingheinum);
	sect->floorheinum = B_LITTLE16(sect->floorheinum);
	sect->ceilingz = B_LITTLE32(sect->ceilingz);
	sect->floorz = B_LITTLE32(sect->floorz);
	sect->lotag = B_LITTLE16(sect->lotag);
	sect->hitag = B_LITTLE16(sect->hitag);
	sect->extra = B_LITTLE16(sect->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 $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47381
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x2, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x473a7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x473cd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x6, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x473f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47419
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xa, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4743f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x47465
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x4, %edx
callq 0x302b0
cmpl $0x4, %eax
je 0x4748b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x14, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x474b1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x15, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x474d7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x16, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x474fd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x17, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47523
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47549
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x19, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x4756f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1a, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47595
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1b, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x475bb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1c, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x475e1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1d, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x47607
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x1e, %rsi
movl $0x1, %edx
callq 0x302b0
cmpl $0x1, %eax
je 0x4762d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47653
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x22, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x47679
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x24, %rsi
movl $0x2, %edx
callq 0x302b0
cmpl $0x2, %eax
je 0x4769f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x47750
movq -0x10(%rbp), %rax
movw (%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
movw 0x2(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movw 0x4(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movw 0x6(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x6(%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
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movw 0x20(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x20(%rax)
movq -0x10(%rbp), %rax
movw 0x22(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x22(%rax)
movq -0x10(%rbp), %rax
movw 0x24(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x24(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)