// File: /workspace/github_c_makefile_star2_O1/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 0x5520
cmpl $-0x1, %eax
je 0x7a60
movl %eax, %ebx
movl $0x30, %edi
callq 0x54a0
testq %rax, %rax
je 0x7a59
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl %ebx, 0x20(%rax)
movq 0x14ba3(%rip), %rsi     # 0x1c3c0
movl $0x8, %edx
testq %rsi, %rsi
je 0x7871
movq %rsi, %rcx
cmpl %ebx, 0x20(%rcx)
jg 0x7839
jge 0x7a51
addq $0x8, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x782a
testq %rsi, %rsi
je 0x7871
movq %rsi, %rcx
movl 0x20(%rsi), %edi
movq %rsi, %rdx
cmpl %edi, %ebx
jl 0x785d
jle 0x7a62
leaq 0x8(%rcx), %rdx
movq (%rdx), %rsi
testq %rsi, %rsi
jne 0x7846
xorl %edx, %edx
cmpl %edi, %ebx
setge %dl
shll $0x3, %edx
jmp 0x7873
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x1, 0x18(%rax)
testq %rcx, %rcx
je 0x7a3a
movq %rax, (%rcx,%rdx)
leaq 0x14b2b(%rip), %rdx     # 0x1c3c0
xorl %esi, %esi
movq %rax, %r8
cmpl $0x1, 0x18(%rcx)
jne 0x7a41
movq 0x10(%rcx), %rdi
movq (%rdi), %r9
cmpq %r9, %rcx
je 0x78cc
testq %r9, %r9
je 0x78bc
cmpl $0x1, 0x18(%r9)
je 0x78dc
movq (%rcx), %r9
cmpq %r8, %r9
je 0x790a
movq %rcx, %r9
movq %r8, %rcx
jmp 0x794a
movq 0x8(%rdi), %r9
testq %r9, %r9
je 0x78f2
cmpl $0x1, 0x18(%r9)
jne 0x78f2
movl %esi, 0x18(%r9)
movl %esi, 0x18(%rcx)
movl $0x1, 0x18(%rdi)
movq %rdi, %rcx
jmp 0x7a28
movq 0x8(%rcx), %r9
cmpq %r8, %r9
je 0x799a
movq %rcx, %r9
movq %r8, %rcx
jmp 0x79d9
movq 0x8(%r9), %r10
movq %r10, (%rcx)
testq %r10, %r10
je 0x791a
movq %rcx, 0x10(%r10)
movq 0x10(%rcx), %r11
movq %r11, 0x10(%r9)
movq %rdx, %r10
testq %r11, %r11
je 0x793c
movq 0x10(%rcx), %r10
xorl %r11d, %r11d
cmpq (%r10), %rcx
setne %r11b
leaq (%r10,%r11,8), %r10
movq %r9, (%r10)
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 0x796d
movq %rdi, 0x10(%r9)
movq 0x10(%rdi), %r10
movq %r10, 0x10(%r8)
movq %rdx, %r9
testq %r10, %r10
je 0x798f
movq 0x10(%rdi), %r9
xorl %r10d, %r10d
cmpq (%r9), %rdi
setne %r10b
leaq (%r9,%r10,8), %r9
movq %r8, (%r9)
movq %rdi, (%r8)
jmp 0x7a24
movq (%r9), %r10
movq %r10, 0x8(%rcx)
testq %r10, %r10
je 0x79aa
movq %rcx, 0x10(%r10)
movq 0x10(%rcx), %r11
movq %r11, 0x10(%r9)
movq %rdx, %r10
testq %r11, %r11
je 0x79cc
movq 0x10(%rcx), %r10
xorl %r11d, %r11d
cmpq (%r10), %rcx
setne %r11b
leaq (%r10,%r11,8), %r10
movq %r9, (%r10)
movq %rcx, (%r9)
movq %r9, 0x10(%rcx)
movq %r8, %r9
movl $0x0, 0x18(%r9)
movl $0x1, 0x18(%rdi)
movq (%rdi), %r8
movq 0x8(%r8), %r9
movq %r9, (%rdi)
testq %r9, %r9
je 0x79fb
movq %rdi, 0x10(%r9)
movq 0x10(%rdi), %r10
movq %r10, 0x10(%r8)
movq %rdx, %r9
testq %r10, %r10
je 0x7a1d
movq 0x10(%rdi), %r9
xorl %r10d, %r10d
cmpq (%r9), %rdi
setne %r10b
leaq (%r9,%r10,8), %r9
movq %r8, (%r9)
movq %rdi, 0x8(%r8)
movq %r8, 0x10(%rdi)
movq %rcx, %r8
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x789a
jmp 0x7a41
movq %rax, 0x1497f(%rip)     # 0x1c3c0
movq 0x14978(%rip), %rcx     # 0x1c3c0
movl $0x0, 0x18(%rcx)
jmp 0x7a62
movq %rax, %rdi
callq 0x50b0
movl %ebx, %edi
callq 0x55b0
xorl %eax, %eax
popq %rbx
retq