// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/win.c
// Function: moonglfw_win_new
win_t *win_new(void)
    {
    win_t *win;
    int id = id_new();
    if(id == -1)
        return NULL;
    if((win = (win_t*)malloc(sizeof(win_t))) == NULL) 
        { id_free(id); return NULL; }
    memset(win, 0, sizeof(win_t));
    win->id = id;
    if(win_search(win->id))
        { free(win); id_free(id); return NULL; }
    win->WindowPos = LUA_NOREF;
    win->WindowSize = LUA_NOREF;
    win->WindowClose = LUA_NOREF;
    win->WindowRefresh = LUA_NOREF;
    win->WindowFocus = LUA_NOREF;
    win->WindowIconify = LUA_NOREF;
    win->WindowMaximize = LUA_NOREF;
    win->WindowContentScale = LUA_NOREF;
    win->FramebufferSize = LUA_NOREF;
    win->Key = LUA_NOREF;
    win->Char = LUA_NOREF;
    win->CharMods = LUA_NOREF;
    win->MouseButton = LUA_NOREF;
    win->CursorPos = LUA_NOREF;
    win->CursorEnter = LUA_NOREF;
    win->Scroll = LUA_NOREF;
    win->Drop = LUA_NOREF;
    win_insert(win);
    return win;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x5530
cmpl $-0x1, %eax
je 0x1027e
movl %eax, %ebp
pushq $0x1
popq %rdi
pushq $0x78
popq %rsi
callq 0x53b0
testq %rax, %rax
je 0x10277
movq %rax, %rbx
movl %ebp, 0x20(%rax)
movl %ebp, %edi
callq 0x5430
testq %rax, %rax
je 0x1028a
movq %rbx, %rdi
callq 0x50b0
movl %ebp, %edi
callq 0x55c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movaps 0x511f(%rip), %xmm0     # 0x153b0
movups %xmm0, 0x34(%rbx)
movups %xmm0, 0x44(%rbx)
movups %xmm0, 0x54(%rbx)
movups %xmm0, 0x64(%rbx)
movl $0xfffffffe, 0x74(%rbx) # imm = 0xFFFFFFFE
leaq 0xc619(%rip), %rdx      # 0x1c8c8
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x102d4
movq %rsi, %rdx
movq %rsi, %rax
cmpl 0x20(%rsi), %ebp
setl %cl
jl 0x102b3
jle 0x10280
leaq 0x8(%rsi), %rdx
movq %rsi, %rax
jmp 0x102b3
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 0xc5cd(%rip), %rcx      # 0x1c8c8
cmoveq %rcx, %rdx
movq %rbx, (%rdx)
movq %rbx, %rsi
testq %rax, %rax
je 0x104b3
cmpl $0x1, 0x18(%rax)
jne 0x104b3
movq 0x10(%rax), %rdx
movq (%rdx), %rdi
cmpq %rdi, %rax
je 0x10348
testq %rdi, %rdi
je 0x10335
cmpl $0x1, 0x18(%rdi)
jne 0x10335
andl $0x0, 0x18(%rdi)
jmp 0x1035d
movq (%rax), %rdi
cmpq %rsi, %rdi
je 0x10384
movq %rax, %rdi
movq %rsi, %rax
jmp 0x103f3
movq 0x8(%rdx), %r8
testq %r8, %r8
je 0x10370
cmpl $0x1, 0x18(%r8)
jne 0x10370
andl $0x0, 0x18(%r8)
andl $0x0, 0x18(%rax)
movl $0x1, 0x18(%rdx)
movq %rdx, %rax
jmp 0x104a7
movq 0x8(%rax), %r8
cmpq %rsi, %r8
je 0x103a6
movq %rax, %r8
movq %rsi, %rax
jmp 0x10462
movq 0x8(%rdi), %r8
movq %r8, (%rax)
testq %r8, %r8
je 0x103cf
movq %rax, 0x10(%r8)
movq 0x10(%rax), %r8
movq %r8, 0x10(%rdi)
movq %rcx, %r9
testq %r8, %r8
jne 0x103d7
jmp 0x103e5
movq (%r8), %rdi
movq %rdi, 0x8(%rax)
testq %rdi, %rdi
je 0x1043c
movq %rax, 0x10(%rdi)
movq 0x10(%rax), %rdi
movq %rdi, 0x10(%r8)
movq %rcx, %r9
testq %rdi, %rdi
jne 0x10444
jmp 0x10452
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 0x10412
movq %rdx, 0x10(%rdi)
movq 0x10(%rdx), %rdi
movq %rdi, 0x10(%rsi)
movq %rcx, %r8
testq %rdi, %rdi
je 0x10430
xorl %r8d, %r8d
cmpq (%rdi), %rdx
setne %r8b
leaq (%rdi,%r8,8), %r8
movq %rsi, (%r8)
movq %rdx, (%rsi)
movq %rsi, 0x10(%rdx)
jmp 0x104a7
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 0x1047e
movq %rdx, 0x10(%rsi)
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rdi)
movq %rcx, %r8
testq %rsi, %rsi
je 0x1049c
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 0x10305
movq 0xc40e(%rip), %rax      # 0x1c8c8
andl $0x0, 0x18(%rax)
jmp 0x10280