// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: nk_file_load
NK_LIB char*
nk_file_load(const char* path, nk_size* siz, struct nk_allocator *alloc)
{
    char *buf;
    FILE *fd;
    long ret;

    NK_ASSERT(path);
    NK_ASSERT(siz);
    NK_ASSERT(alloc);
    if (!path || !siz || !alloc)
        return 0;

    fd = fopen(path, "rb");
    if (!fd) return 0;
    fseek(fd, 0, SEEK_END);
    ret = ftell(fd);
    if (ret < 0) {
        fclose(fd);
        return 0;
    }
    *siz = (nk_size)ret;
    fseek(fd, 0, SEEK_SET);
    buf = (char*)alloc->alloc(alloc->userdata,0, *siz);
    NK_ASSERT(buf);
    if (!buf) {
        fclose(fd);
        return 0;
    }
    *siz = (nk_size)fread(buf, 1,*siz, fd);
    fclose(fd);
    return buf;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x481de
movq 0x7ce3e(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x691e4(%rip), %rsi     # 0xb13a0
leaq 0x691fb(%rip), %rdx     # 0xb13be
movl $0x1d4d, %ecx           # imm = 0x1D4D
movb $0x0, %al
callq 0x13ec0
movq 0x7ce1a(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x481e0
jmp 0x481e2
cmpq $0x0, 0x20(%rsp)
jne 0x4821d
movq 0x7cdff(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x691a5(%rip), %rsi     # 0xb13a0
leaq 0x691bc(%rip), %rdx     # 0xb13be
movl $0x1d4e, %ecx           # imm = 0x1D4E
movb $0x0, %al
callq 0x13ec0
movq 0x7cddb(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x4821f
jmp 0x48221
cmpq $0x0, 0x18(%rsp)
jne 0x4825c
movq 0x7cdc0(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x69166(%rip), %rsi     # 0xb13a0
leaq 0x6917d(%rip), %rdx     # 0xb13be
movl $0x1d4f, %ecx           # imm = 0x1D4F
movb $0x0, %al
callq 0x13ec0
movq 0x7cd9c(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x4825e
cmpq $0x0, 0x28(%rsp)
je 0x48276
cmpq $0x0, 0x20(%rsp)
je 0x48276
cmpq $0x0, 0x18(%rsp)
jne 0x48284
movq $0x0, 0x30(%rsp)
jmp 0x483c5
movq 0x28(%rsp), %rdi
leaq 0x69d08(%rip), %rsi     # 0xb1f98
callq 0x14cf0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x482b0
movq $0x0, 0x30(%rsp)
jmp 0x483c5
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x147f0
movq 0x8(%rsp), %rdi
callq 0x140f0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jge 0x482f0
movq 0x8(%rsp), %rdi
callq 0x13770
movq $0x0, 0x30(%rsp)
jmp 0x483c5
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x147f0
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rdx
movq (%rdx), %rdx
movq (%rcx), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x4836b
movq 0x7ccb1(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
leaq 0x69057(%rip), %rsi     # 0xb13a0
leaq 0x6906e(%rip), %rdx     # 0xb13be
movl $0x1d5e, %ecx           # imm = 0x1D5E
movb $0x0, %al
callq 0x13ec0
movq 0x7cc8d(%rip), %rax     # 0xc4ff0
movq (%rax), %rdi
callq 0x149a0
jmp 0x4836d
cmpq $0x0, 0x10(%rsp)
jne 0x4838a
movq 0x8(%rsp), %rdi
callq 0x13770
movq $0x0, 0x30(%rsp)
jmp 0x483c5
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rsp), %rcx
movl $0x1, %esi
callq 0x13510
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rdi
callq 0x13770
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop