// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/id.c
// Function: moonglfw_id_new
static int key_new(void)
/* returns a free key or -1 if none are found (unlikely) */
    {
    static int keyfree = 0;
    int guard = keyfree-1;
    if((keyfree==-1)||(keyfree==0)||(keyfree==1))
        { keyfree=1; guard=-1; }
    while(1)
        {
        if(keyfree==guard) /* we made a complete round */
            return -1;
        if(keyfree==-1) keyfree=1;
        if(id_search(keyfree)==NULL) return keyfree++;
        keyfree++;
        }
    return -1;
    }

// Assembly:
movl 0x10336(%rip), %eax     # 0x1c870
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
ja 0xc553
movl $0x1, 0x10324(%rip)     # 0x1c870
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xc555
decl %eax
pushq %r14
pushq %rbx
pushq %rax
movl 0x10311(%rip), %edx     # 0x1c870
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl %eax, %edx
je 0xc5cd
movq 0x10303(%rip), %rcx     # 0x1c878
movl %edx, %r14d
cmpl $-0x1, %r14d
jne 0xc58e
movl $0x1, 0x102e8(%rip)     # 0x1c870
movl $0x1, %r14d
testq %rcx, %rcx
je 0xc5c3
movq %rcx, %rdx
cmpl %r14d, 0x20(%rdx)
jg 0xc5a2
jge 0xc5ac
addq $0x8, %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0xc596
jmp 0xc5c3
incl %r14d
movl %r14d, 0x102ba(%rip)    # 0x1c870
cmpl %eax, %r14d
jne 0xc578
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0xc5cd
leal 0x1(%r14), %eax
movl %eax, 0x102a3(%rip)     # 0x1c870
cmpl $-0x1, %r14d
je 0xc80d
movl $0x28, %edi
callq 0x54a0
testq %rax, %rax
je 0xc80d
movl %r14d, 0x20(%rax)
movq 0x10283(%rip), %rdx     # 0x1c878
testq %rdx, %rdx
je 0xc624
movq %rdx, %rcx
movl 0x20(%rdx), %esi
cmpl %esi, %r14d
jl 0xc60f
jle 0xc80a
leaq 0x8(%rcx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0xc5fa
xorl %edx, %edx
cmpl %esi, %r14d
setge %dl
shll $0x3, %edx
jmp 0xc62b
movl $0x8, %edx
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x1, 0x18(%rax)
testq %rcx, %rcx
je 0xc7f5
movq %rax, (%rcx,%rdx)
leaq 0x10228(%rip), %rdx     # 0x1c878
xorl %esi, %esi
movq %rax, %r8
cmpl $0x1, 0x18(%rcx)
jne 0xc7fc
movq 0x10(%rcx), %rdi
movq (%rdi), %r9
cmpq %r9, %rcx
je 0xc687
testq %r9, %r9
je 0xc677
cmpl $0x1, 0x18(%r9)
je 0xc697
movq (%rcx), %r9
cmpq %r8, %r9
je 0xc6c5
movq %rcx, %r9
movq %r8, %rcx
jmp 0xc705
movq 0x8(%rdi), %r9
testq %r9, %r9
je 0xc6ad
cmpl $0x1, 0x18(%r9)
jne 0xc6ad
movl %esi, 0x18(%r9)
movl %esi, 0x18(%rcx)
movl $0x1, 0x18(%rdi)
movq %rdi, %rcx
jmp 0xc7e3
movq 0x8(%rcx), %r9
cmpq %r8, %r9
je 0xc755
movq %rcx, %r9
movq %r8, %rcx
jmp 0xc794
movq 0x8(%r9), %r10
movq %r10, (%rcx)
testq %r10, %r10
je 0xc6d5
movq %rcx, 0x10(%r10)
movq 0x10(%rcx), %r11
movq %r11, 0x10(%r9)
movq %rdx, %r10
testq %r11, %r11
je 0xc6f7
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 0xc728
movq %rdi, 0x10(%r9)
movq 0x10(%rdi), %r10
movq %r10, 0x10(%r8)
movq %rdx, %r9
testq %r10, %r10
je 0xc74a
movq 0x10(%rdi), %r9
xorl %r10d, %r10d
cmpq (%r9), %rdi
setne %r10b
leaq (%r9,%r10,8), %r9
movq %r8, (%r9)
movq %rdi, (%r8)
jmp 0xc7df
movq (%r9), %r10
movq %r10, 0x8(%rcx)
testq %r10, %r10
je 0xc765
movq %rcx, 0x10(%r10)
movq 0x10(%rcx), %r11
movq %r11, 0x10(%r9)
movq %rdx, %r10
testq %r11, %r11
je 0xc787
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 0xc7b6
movq %rdi, 0x10(%r9)
movq 0x10(%rdi), %r10
movq %r10, 0x10(%r8)
movq %rdx, %r9
testq %r10, %r10
je 0xc7d8
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 0xc655
jmp 0xc7fc
movq %rax, 0x1007c(%rip)     # 0x1c878
movq 0x10075(%rip), %rcx     # 0x1c878
movl $0x0, 0x18(%rcx)
movl 0x20(%rax), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq