// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/src/sirfilecache.c
// Function: sirfile_roll
bool _sirfile_open(sirfile* sf) {
    bool retval = _sir_validptr(sf) && _sir_validstr(sf->path);

    if (retval) {
        FILE* f  = NULL;
        retval = _sir_openfile(&f, sf->path, SIR_FOPENMODE, SIR_PATH_REL_TO_CWD);
        if (retval && NULL != f) {
            _sirfile_close(sf);

            sf->f  = f;
            sf->id = FNV32_1a((const uint8_t*)sf->path, strnlen(sf->path, SIR_MAXPATH));
        }
    }

    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
testq %rdi, %rdi
je 0x44c2
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x44c2
movq (%rbx), %rax
testq %rax, %rax
je 0x44c2
cmpb $0x0, (%rax)
je 0x44c2
cmpl $0x0, 0x18(%rbx)
je 0x44c2
movq %rsi, %r14
testq %rsi, %rsi
je 0x44a5
xorl %r15d, %r15d
leaq 0x10(%rsp), %rsi
movq %r15, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq %rbx, %rdi
callq 0x4541
testb %al, %al
je 0x451b
leaq 0x18(%rsp), %r15
movq $-0x1, (%r15)
movq %r15, %rdi
callq 0x22b0
movq (%r15), %rax
cmpq $-0x1, %rax
je 0x4518
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x60(%rsp), %r12
movq %r12, %rsi
callq 0x20b0
testq %rax, %rax
je 0x44da
leaq 0x5530(%rip), %rdx      # 0x98cd
leaq 0x20(%rsp), %rdi
movl $0x40, %esi
movq %rax, %rcx
callq 0x2320
testq %rax, %rax
je 0x4518
movl $0x1000, %edi           # imm = 0x1000
movl $0x1, %esi
callq 0x2220
movq %rax, (%r14)
testq %rax, %rax
je 0x44fb
xorl %eax, %eax
movl %eax, 0x63(%rsp)
movl %eax, 0x60(%rsp)
movq %rsp, %rax
movb $0x0, (%rax)
movl $0x1, %ebp
leaq 0x54bc(%rip), %r13      # 0x98ab
cmpl $0x1, %ebp
movq %r12, %r10
cmoveq %r13, %r10
movq 0x8(%rsp), %rax
movq %r13, %r11
testq %rax, %rax
je 0x4410
cmpb $0x0, (%rax)
cmoveq %r13, %rax
movq %rax, %r11
movq (%r14), %rdi
movq 0x10(%rsp), %r9
subq $0x8, %rsp
xorl %r15d, %r15d
movl $0x1000, %esi           # imm = 0x1000
movl $0x1, %edx
movq $-0x1, %rcx
leaq 0x54a6(%rip), %r8       # 0x98dd
xorl %eax, %eax
pushq %r11
pushq %r10
leaq 0x38(%rsp), %r10
pushq %r10
callq 0x2040
addq $0x20, %rsp
movq (%r14), %rdi
movq %rsp, %rsi
movl $0x1, %edx
callq 0x4f2c
testb %al, %al
je 0x451b
cmpb $0x1, (%rsp)
jne 0x4531
xorl %r15d, %r15d
movl $0x7, %esi
movl $0x7, %ecx
movq %r12, %rdi
movl $0x1, %edx
leaq 0x545c(%rip), %r8       # 0x98e7
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2040
incl %ebp
cmpl $0x3e9, %ebp            # imm = 0x3E9
jne 0x43ef
jmp 0x451b
leaq 0x5413(%rip), %rsi      # 0x98bf
leaq 0x535b(%rip), %rdx      # 0x980e
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0xc7, %ecx
callq 0x31c0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2080
movl (%rax), %edi
leaq 0x54e0(%rip), %rsi      # 0x99c8
leaq 0x54e8(%rip), %rdx      # 0x99d7
movl $0x196, %ecx            # imm = 0x196
callq 0x32bc
jmp 0x4518
leaq 0x53bd(%rip), %rsi      # 0x98bf
leaq 0x5305(%rip), %rdx      # 0x980e
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0xdf, %ecx
callq 0x31c0
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
callq 0x5490
leaq 0x8(%rsp), %rdi
callq 0x5490
jmp 0x44c5
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4784
movl %eax, %r15d
jmp 0x451b