// File: /workspace/github_c_makefile_star2_O3/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 0x44bf
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x44bf
movq (%rbx), %rax
testq %rax, %rax
je 0x44bf
cmpb $0x0, (%rax)
je 0x44bf
cmpl $0x0, 0x18(%rbx)
je 0x44bf
movq %rsi, %r14
testq %rsi, %rsi
je 0x44a2
xorl %r15d, %r15d
leaq 0x10(%rsp), %rsi
movq %r15, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
movq %rbx, %rdi
callq 0x453e
testb %al, %al
je 0x4518
leaq 0x18(%rsp), %r15
movq $-0x1, (%r15)
movq %r15, %rdi
callq 0x22b0
movq (%r15), %rax
cmpq $-0x1, %rax
je 0x4515
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 0x44d7
leaq 0x5533(%rip), %rdx      # 0x98cd
leaq 0x20(%rsp), %rdi
movl $0x40, %esi
movq %rax, %rcx
callq 0x2320
testq %rax, %rax
je 0x4515
movl $0x1000, %edi           # imm = 0x1000
movl $0x1, %esi
callq 0x2220
movq %rax, (%r14)
testq %rax, %rax
je 0x44f8
xorl %eax, %eax
movl %eax, 0x63(%rsp)
movl %eax, 0x60(%rsp)
movq %rsp, %rax
movb $0x0, (%rax)
movl $0x1, %ebp
leaq 0x54bf(%rip), %r13      # 0x98ab
cmpl $0x1, %ebp
movq %r12, %r10
cmoveq %r13, %r10
movq 0x8(%rsp), %rax
movq %r13, %r11
testq %rax, %rax
je 0x440d
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 0x54a9(%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 0x4ec0
testb %al, %al
je 0x4518
cmpb $0x0, (%rsp)
je 0x452e
xorl %r15d, %r15d
movl $0x7, %esi
movl $0x7, %ecx
movq %r12, %rdi
movl $0x1, %edx
leaq 0x545f(%rip), %r8       # 0x98e7
movl %ebp, %r9d
xorl %eax, %eax
callq 0x2040
incl %ebp
cmpl $0x3e9, %ebp            # imm = 0x3E9
jne 0x43ec
jmp 0x4518
leaq 0x5416(%rip), %rsi      # 0x98bf
leaq 0x535e(%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 0x54e3(%rip), %rsi      # 0x99c8
leaq 0x54eb(%rip), %rdx      # 0x99d7
movl $0x196, %ecx            # imm = 0x196
callq 0x32bc
jmp 0x4515
leaq 0x53c0(%rip), %rsi      # 0x98bf
leaq 0x5308(%rip), %rdx      # 0x980e
movl $0x800b0000, %edi       # imm = 0x800B0000
movl $0xdf, %ecx
callq 0x31c0
xorl %r15d, %r15d
leaq 0x10(%rsp), %rdi
callq 0x53e0
leaq 0x8(%rsp), %rdi
callq 0x53e0
jmp 0x44c2
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x475a
movl %eax, %r15d
jmp 0x4518