// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/cur.c
// Function: moonglfw_cur_new
cur_t *cur_new(void)
    {
    cur_t *cur;
    int id = id_new();
    if(id == -1)
        return NULL;
    if((cur = (cur_t*)malloc(sizeof(cur_t))) == NULL) 
        { id_free(id); return NULL; }
    memset(cur, 0, sizeof(cur_t));
    cur->id = id;
    if(cur_search(cur->id))
        { free(cur); id_free(id); return NULL; }
    //cur->Zzz = LUA_NOREF;
    cur_insert(cur);
    return cur;
    }

// Assembly:
pushq %rbx
callq 0x5530
cmpl $-0x1, %eax
je 0x7a7d
movl %eax, %ebx
movl $0x1, %edi
movl $0x30, %esi
callq 0x53b0
testq %rax, %rax
je 0x7a76
movl %ebx, 0x20(%rax)
movq 0x14ba1(%rip), %rdx     # 0x1c3c8
testq %rdx, %rdx
je 0x7a46
movq %rdx, %rcx
cmpl %ebx, 0x20(%rcx)
jg 0x7842
jge 0x7a6e
addq $0x8, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x7833
movq %rdx, %rcx
movl 0x20(%rdx), %esi
cmpl %esi, %ebx
jl 0x785e
jle 0x7a7f
leaq 0x8(%rcx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x784a
xorl %edx, %edx
cmpl %esi, %ebx
setge %dl
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x1, 0x18(%rax)
movq %rax, (%rcx,%rdx,8)
leaq 0x14b3f(%rip), %rdx     # 0x1c3c8
xorl %esi, %esi
movq %rax, %r8
cmpl $0x1, 0x18(%rcx)
jne 0x7a3d
movq 0x10(%rcx), %rdi
movq (%rdi), %r9
cmpq %r9, %rcx
je 0x78c9
testq %r9, %r9
je 0x78b6
cmpl $0x1, 0x18(%r9)
jne 0x78b6
movl %esi, 0x18(%r9)
jmp 0x78dd
movq (%rcx), %r9
cmpq %r8, %r9
je 0x7903
movq %rcx, %r9
movq %r8, %rcx
jmp 0x7972
movq 0x8(%rdi), %r10
testq %r10, %r10
je 0x78ef
cmpl $0x1, 0x18(%r10)
jne 0x78ef
movl %esi, 0x18(%r10)
movl %esi, 0x18(%rcx)
movl $0x1, 0x18(%rdi)
movq %rdi, %rcx
jmp 0x7a2d
movq 0x8(%rcx), %r10
cmpq %r8, %r10
je 0x7925
movq %rcx, %r10
movq %r8, %rcx
jmp 0x79e5
movq 0x8(%r9), %r10
movq %r10, (%rcx)
testq %r10, %r10
je 0x794e
movq %rcx, 0x10(%r10)
movq 0x10(%rcx), %r10
movq %r10, 0x10(%r9)
movq %rdx, %r11
testq %r10, %r10
jne 0x7956
jmp 0x7964
movq (%r10), %r9
movq %r9, 0x8(%rcx)
testq %r9, %r9
je 0x79bf
movq %rcx, 0x10(%r9)
movq 0x10(%rcx), %r9
movq %r9, 0x10(%r10)
movq %rdx, %r11
testq %r9, %r9
jne 0x79c7
jmp 0x79d5
movq %rdi, 0x10(%r9)
movq 0x10(%rcx), %r10
xorl %r11d, %r11d
cmpq (%r10), %rcx
setne %r11b
leaq (%r10,%r11,8), %r11
movq %r9, (%r11)
movq %rcx, 0x8(%r9)
movq %r9, 0x10(%rcx)
movq %r8, %r9
movl $0x0, 0x18(%r9)
movl $0x1, 0x18(%rdi)
movq 0x8(%rdi), %r8
movq (%r8), %r9
movq %r9, 0x8(%rdi)
testq %r9, %r9
je 0x7995
movq %rdi, 0x10(%r9)
movq 0x10(%rdi), %r9
movq %r9, 0x10(%r8)
movq %rdx, %r10
testq %r9, %r9
je 0x79b3
xorl %r10d, %r10d
cmpq (%r9), %rdi
setne %r10b
leaq (%r9,%r10,8), %r10
movq %r8, (%r10)
movq %rdi, (%r8)
movq %r8, 0x10(%rdi)
jmp 0x7a2d
movq %rdi, 0x10(%r10)
movq 0x10(%rcx), %r9
xorl %r11d, %r11d
cmpq (%r9), %rcx
setne %r11b
leaq (%r9,%r11,8), %r11
movq %r10, (%r11)
movq %rcx, (%r10)
movq %r10, 0x10(%rcx)
movq (%rdi), %r9
movq %r8, %r10
movl $0x0, 0x18(%r10)
movl $0x1, 0x18(%rdi)
movq 0x8(%r9), %r8
movq %r8, (%rdi)
testq %r8, %r8
je 0x7a04
movq %rdi, 0x10(%r8)
movq 0x10(%rdi), %r8
movq %r8, 0x10(%r9)
movq %rdx, %r10
testq %r8, %r8
je 0x7a22
xorl %r10d, %r10d
cmpq (%r8), %rdi
setne %r10b
leaq (%r8,%r10,8), %r10
movq %r9, (%r10)
movq %rdi, 0x8(%r9)
movq %r9, 0x10(%rdi)
movq %rcx, %r8
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x788e
movq 0x14984(%rip), %rcx     # 0x1c3c8
jmp 0x7a65
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x1, 0x18(%rax)
movq %rax, 0x14966(%rip)     # 0x1c3c8
movq %rax, %rcx
movl $0x0, 0x18(%rcx)
jmp 0x7a7f
movq %rax, %rdi
callq 0x50b0
movl %ebx, %edi
callq 0x55c0
xorl %eax, %eax
popq %rbx
retq