// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
callq 0x5530
cmpl $-0x1, %eax
je 0x775e
movl %eax, %ebp
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x53b0
testq %rax, %rax
je 0x7757
movq %rax, %rbx
movl %ebp, 0x20(%rax)
movl %ebp, %edi
callq 0x5160
testq %rax, %rax
je 0x776a
movq %rbx, %rdi
callq 0x50b0
movl %ebp, %edi
callq 0x55c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x14c67(%rip), %rdx     # 0x1c3d8
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x7796
movq %rsi, %rdx
movq %rsi, %rax
cmpl 0x20(%rsi), %ebp
setl %cl
jl 0x7775
jle 0x7760
leaq 0x8(%rsi), %rdx
movq %rsi, %rax
jmp 0x7775
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x1, 0x18(%rbx)
notb %cl
movzbl %cl, %ecx
andl $0x1, %ecx
testq %rax, %rax
leaq (%rax,%rcx,8), %rdx
leaq 0x14c1b(%rip), %rcx     # 0x1c3d8
cmoveq %rcx, %rdx
movq %rbx, (%rdx)
movq %rbx, %rsi
testq %rax, %rax
je 0x7975
cmpl $0x1, 0x18(%rax)
jne 0x7975
movq 0x10(%rax), %rdx
movq (%rdx), %rdi
cmpq %rdi, %rax
je 0x780a
testq %rdi, %rdi
je 0x77f7
cmpl $0x1, 0x18(%rdi)
jne 0x77f7
andl $0x0, 0x18(%rdi)
jmp 0x781f
movq (%rax), %rdi
cmpq %rsi, %rdi
je 0x7846
movq %rax, %rdi
movq %rsi, %rax
jmp 0x78b5
movq 0x8(%rdx), %r8
testq %r8, %r8
je 0x7832
cmpl $0x1, 0x18(%r8)
jne 0x7832
andl $0x0, 0x18(%r8)
andl $0x0, 0x18(%rax)
movl $0x1, 0x18(%rdx)
movq %rdx, %rax
jmp 0x7969
movq 0x8(%rax), %r8
cmpq %rsi, %r8
je 0x7868
movq %rax, %r8
movq %rsi, %rax
jmp 0x7924
movq 0x8(%rdi), %r8
movq %r8, (%rax)
testq %r8, %r8
je 0x7891
movq %rax, 0x10(%r8)
movq 0x10(%rax), %r8
movq %r8, 0x10(%rdi)
movq %rcx, %r9
testq %r8, %r8
jne 0x7899
jmp 0x78a7
movq (%r8), %rdi
movq %rdi, 0x8(%rax)
testq %rdi, %rdi
je 0x78fe
movq %rax, 0x10(%rdi)
movq 0x10(%rax), %rdi
movq %rdi, 0x10(%r8)
movq %rcx, %r9
testq %rdi, %rdi
jne 0x7906
jmp 0x7914
movq %rdx, 0x10(%rdi)
movq 0x10(%rax), %r8
xorl %r9d, %r9d
cmpq (%r8), %rax
setne %r9b
leaq (%r8,%r9,8), %r9
movq %rdi, (%r9)
movq %rax, 0x8(%rdi)
movq %rdi, 0x10(%rax)
movq %rsi, %rdi
andl $0x0, 0x18(%rdi)
movl $0x1, 0x18(%rdx)
movq 0x8(%rdx), %rsi
movq (%rsi), %rdi
movq %rdi, 0x8(%rdx)
testq %rdi, %rdi
je 0x78d4
movq %rdx, 0x10(%rdi)
movq 0x10(%rdx), %rdi
movq %rdi, 0x10(%rsi)
movq %rcx, %r8
testq %rdi, %rdi
je 0x78f2
xorl %r8d, %r8d
cmpq (%rdi), %rdx
setne %r8b
leaq (%rdi,%r8,8), %r8
movq %rsi, (%r8)
movq %rdx, (%rsi)
movq %rsi, 0x10(%rdx)
jmp 0x7969
movq %rdx, 0x10(%r8)
movq 0x10(%rax), %rdi
xorl %r9d, %r9d
cmpq (%rdi), %rax
setne %r9b
leaq (%rdi,%r9,8), %r9
movq %r8, (%r9)
movq %rax, (%r8)
movq %r8, 0x10(%rax)
movq (%rdx), %rdi
movq %rsi, %r8
andl $0x0, 0x18(%r8)
movl $0x1, 0x18(%rdx)
movq 0x8(%rdi), %rsi
movq %rsi, (%rdx)
testq %rsi, %rsi
je 0x7940
movq %rdx, 0x10(%rsi)
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rdi)
movq %rcx, %r8
testq %rsi, %rsi
je 0x795e
xorl %r8d, %r8d
cmpq (%rsi), %rdx
setne %r8b
leaq (%rsi,%r8,8), %r8
movq %rdi, (%r8)
movq %rdx, 0x8(%rdi)
movq %rdi, 0x10(%rdx)
movq %rax, %rsi
movq 0x10(%rax), %rax
jmp 0x77c7
movq 0x14a5c(%rip), %rax     # 0x1c3d8
andl $0x0, 0x18(%rax)
jmp 0x7760