// File: /workspace/github_c_makefile_star2_O0/ajpaulson[P]srogue11/state.c
// Function: rs_read_rooms
int rs_read_rooms(int inf, struct room *r, int count)
{
    int value = 0, n = 0;

    if (rs_read_int(inf,&value) != 0)
    {
        if (value > count)
        {
            printf("Incorrect number of rooms in block. %d > %d.",
                value,count);
            printf("Sorry, invalid save game format");
            format_error = TRUE;
        }
        else
            for(n = 0; n < value; n++)
            {
                rs_read_coord(inf,&r[n].r_pos);
                rs_read_coord(inf,&r[n].r_max);
                rs_read_coord(inf,&r[n].r_gold);
                rs_read_coord(inf,&r[n].r_exit[0]);
                rs_read_coord(inf,&r[n].r_exit[1]);
                rs_read_coord(inf,&r[n].r_exit[2]);
                rs_read_coord(inf,&r[n].r_exit[3]);
                rs_read_room_reference(inf,&r[n].r_ptr[0]);
                rs_read_room_reference(inf,&r[n].r_ptr[1]);
                rs_read_room_reference(inf,&r[n].r_ptr[2]);
                rs_read_room_reference(inf,&r[n].r_ptr[3]);
                rs_read_int(inf,&r[n].r_goldval);
                rs_read_int(inf,&r[n].r_flags);
                rs_read_int(inf,&r[n].r_nexits);
            }
    }

    return(READSTAT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x4(%rbp), %edi
leaq -0x18(%rbp), %rsi
callq 0x1c810
cmpl $0x0, %eax
je 0x1e2d1
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x1e11e
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
leaq 0xf467(%rip), %rdi      # 0x2d561
movb $0x0, %al
callq 0x61b0
leaq 0xf370(%rip), %rdi      # 0x2d478
movb $0x0, %al
callq 0x61b0
movl $0x1, 0x1e7df(%rip)     # 0x3c8f8
jmp 0x1e2cf
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1e2cd
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x10, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x18, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x18, %rsi
addq $0x8, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x18, %rsi
addq $0x10, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x18, %rsi
addq $0x18, %rsi
callq 0x1d3a0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x38, %rsi
callq 0x1de70
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x38, %rsi
addq $0x8, %rsi
callq 0x1de70
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x38, %rsi
addq $0x10, %rsi
callq 0x1de70
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x38, %rsi
addq $0x18, %rsi
callq 0x1de70
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x58, %rsi
callq 0x1c810
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x5c, %rsi
callq 0x1c810
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rsi
addq $0x60, %rsi
callq 0x1c810
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1e125
jmp 0x1e2cf
jmp 0x1e2d1
xorl %eax, %eax
cmpl $0x0, 0x1e61e(%rip)     # 0x3c8f8
movb %al, -0x1d(%rbp)
jne 0x1e2ec
cmpl $0x0, 0x1e60a(%rip)     # 0x3c8f0
sete %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)