LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetKeyName
static int GetKeyName(lua_State *L)
    {
    int key, scancode;
    const char *name = NULL;
    CheckPfn(L, GetKeyName, 3, 2, 0);
    if(lua_type(L, 1) == LUA_TSTRING)
        {
        key = checkkey(L, 1);
        name = glfw.GetKeyName(key, 0);
        }
    else if(lua_isinteger(L, 1))
        {
        scancode = lua_tointeger(L, 1);
        name = glfw.GetKeyName(GLFW_KEY_UNKNOWN, scancode);
        }
    else
        return luaL_argerror(L, 1, "expected key (a string) or scancode (an integer)");

    if(!name)
        return 0;
    lua_pushstring(L, name);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x1152f(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x1c0(%rax)
jne 0x12b1e
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x12b02
movq 0x18(%rsp), %rdi
leaq 0xb41b(%rip), %rsi      # 0x1df00
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x12bfb
movq 0x18(%rsp), %rdi
leaq 0xb423(%rip), %rsi      # 0x1df31
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x12bfb
jmp 0x12b20
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x5610
cmpl $0x4, %eax
jne 0x12b69
movq 0x18(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x5430
movl %eax, 0x14(%rsp)
movq 0x11495(%rip), %rax     # 0x23fe8
movq 0x1c0(%rax), %rax
movl 0x14(%rsp), %edi
xorl %esi, %esi
callq *%rax
movq %rax, 0x8(%rsp)
jmp 0x12bd2
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x5730
cmpl $0x0, %eax
je 0x12bb4
movq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x51c0
movl %eax, 0x10(%rsp)
movq 0x1144d(%rip), %rax     # 0x23fe8
movq 0x1c0(%rax), %rax
movl 0x10(%rsp), %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq *%rax
movq %rax, 0x8(%rsp)
jmp 0x12bd0
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0xb38d(%rip), %rdx      # 0x1df52
callq 0x5140
movl %eax, 0x24(%rsp)
jmp 0x12bfb
jmp 0x12bd2
cmpq $0x0, 0x8(%rsp)
jne 0x12be4
movl $0x0, 0x24(%rsp)
jmp 0x12bfb
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x5670
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetKeyScancode
static int GetKeyScancode(lua_State *L)
    {
    int key = checkkey(L, 1);
    CheckPfn(L, GetKeyScancode, 3, 3, 0);
    lua_pushinteger(L, glfw.GetKeyScancode(key));
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x5430
movl %eax, 0x14(%rsp)
movq 0x113b0(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x340(%rax)
jne 0x12c91
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x12c78
movq 0x18(%rsp), %rdi
leaq 0xb322(%rip), %rsi      # 0x1df83
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x12cc6
movq 0x18(%rsp), %rdi
leaq 0xb334(%rip), %rsi      # 0x1dfb8
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x12cc6
jmp 0x12c93
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x11344(%rip), %rax     # 0x23fe8
movq 0x340(%rax), %rax
movl 0x14(%rsp), %edi
callq *%rax
movq 0x8(%rsp), %rdi
movslq %eax, %rsi
callq 0x5300
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetMouseButton
static int GetMouseButton(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int button = checkbutton(L, 2);
    int state = glfw.GetMouseButton(win->window, button);
    lua_pushstring(L, state==GLFW_PRESS ? "press" : "release");
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x5430
movl %eax, 0x4(%rsp)
movq 0x112dc(%rip), %rax     # 0x23fe8
movq 0x1d0(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
movl 0x4(%rsp), %esi
callq *%rax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
movl (%rsp), %ecx
leaq 0x969e(%rip), %rsi      # 0x1c3d2
leaq 0x968a(%rip), %rax      # 0x1c3c5
cmpl $0x1, %ecx
cmoveq %rax, %rsi
callq 0x5670
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetCursorPos
static int GetCursorPos(lua_State *L)
    {
    double xpos, ypos;
    win_t *win = checkwindow(L, 1);
    glfw.GetCursorPos(win->window, &xpos, &ypos);
    lua_pushnumber(L, xpos);
    lua_pushnumber(L, ypos);
    return 2;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x8(%rsp)
movq 0x11264(%rip), %rax     # 0x23fe8
movq 0x1d8(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq *%rax
movq 0x20(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x5440
movq 0x20(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x5440
movl $0x2, %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: SetCursorPos
static int SetCursorPos(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    double xpos = luaL_checknumber(L, 2);
    double ypos = luaL_checknumber(L, 3);
    glfw.SetCursorPos(win->window, xpos, ypos);
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x5220
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x5220
movsd %xmm0, 0x8(%rsp)
movq 0x111ca(%rip), %rax     # 0x23fe8
movq 0x1e0(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x28(%rcx), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq *%rax
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: CreateCursor
static int CreateCursor(lua_State *L)
/* create_cursor(image_width, image_height, image_pixels, xhot, yhot)
 * -> cursor handle
 */
    {
    size_t len;
    int xhot, yhot;
    GLFWimage image;
    cur_t *cur;
    image.width = luaL_checkinteger(L, 1);
    image.height = luaL_checkinteger(L, 2);
    image.pixels = (unsigned char*)luaL_checklstring(L, 3, &len); /* yeah, it's const... */
    xhot = luaL_checkinteger(L, 4);
    yhot = luaL_checkinteger(L, 5);

    cur = cur_new();
    if(!cur)
        return luaL_error(L, "cannot create cursor");
    
    cur->cursor = glfw.CreateCursor(&image, xhot, yhot);
    if(!cur->cursor)
        {
        cur_free(cur);
        return luaL_error(L, "cannot create cursor");
        }
    lua_pushinteger(L, cur->id);
    return 1;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x53c0
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl $0x3, %esi
leaq 0x20(%rsp), %rdx
callq 0x5330
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x53c0
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movl $0x5, %esi
callq 0x53c0
movl %eax, 0x18(%rsp)
callq 0x5570
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x12ee7
movq 0x28(%rsp), %rdi
leaq 0xb103(%rip), %rsi      # 0x1dfdd
movb $0x0, %al
callq 0x5590
movl %eax, 0x34(%rsp)
jmp 0x12f56
movq 0x110fa(%rip), %rax     # 0x23fe8
movq 0x1e8(%rax), %rax
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
leaq 0x8(%rsp), %rdi
callq *%rax
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x28(%rax)
movq (%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x12f3c
movq (%rsp), %rdi
callq 0x5600
movq 0x28(%rsp), %rdi
leaq 0xb0ae(%rip), %rsi      # 0x1dfdd
movb $0x0, %al
callq 0x5590
movl %eax, 0x34(%rsp)
jmp 0x12f56
movq 0x28(%rsp), %rdi
movq (%rsp), %rax
movslq 0x20(%rax), %rsi
callq 0x5300
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: CreateStandardCursor
static int CreateStandardCursor(lua_State *L)
    {
    int shape = checkcursorshape(L, 1);
    cur_t *cur = cur_new();
    if(!cur)
        return luaL_error(L, "cannot create cursor");
    
    cur->cursor = glfw.CreateStandardCursor(shape);
    if(!cur->cursor)
        {
        cur_free(cur);
        return luaL_error(L, "cannot create cursor");
        }
    lua_pushinteger(L, cur->id);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0xa, %esi
movl $0x1, %edx
callq 0x5430
movl %eax, 0x14(%rsp)
callq 0x5570
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x12fac
movq 0x18(%rsp), %rdi
leaq 0xb03e(%rip), %rsi      # 0x1dfdd
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13016
movq 0x11035(%rip), %rax     # 0x23fe8
movq 0x1f0(%rax), %rax
movl 0x14(%rsp), %edi
callq *%rax
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x12ffb
movq 0x8(%rsp), %rdi
callq 0x5600
movq 0x18(%rsp), %rdi
leaq 0xafef(%rip), %rsi      # 0x1dfdd
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13016
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movslq 0x20(%rax), %rsi
callq 0x5300
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: SetCursor
static int SetCursor(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    cur_t *cur = checkcursor(L, 2);
    glfw.SetCursor(win->window, cur->cursor);
    return 0;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x5240
movq %rax, (%rsp)
movq 0x10f61(%rip), %rax     # 0x23fe8
movq 0x200(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
movq (%rsp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: JoystickPresent
static int JoystickPresent(lua_State *L)
    {
    int jid = CheckJoystick(L, 1);
    int val = glfw.JoystickPresent(jid);
    lua_pushboolean(L, val);
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x10f11(%rip), %rax     # 0x23fe8
movq 0x248(%rax), %rax
movl 0xc(%rsp), %edi
callq *%rax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl 0x8(%rsp), %esi
callq 0x5460
movl $0x1, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetJoystickAxes
static int GetJoystickAxes(lua_State *L)
    {
    int i, count;
    int jid = CheckJoystick(L, 1);
    const float *axis = glfw.GetJoystickAxes(jid, &count);
    if(!axis)
        return 0;
    luaL_checkstack(L, count, NULL);
    for(i=0; i< count; i++)
        lua_pushnumber(L, axis[i]);
    return count;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x10ec1(%rip), %rax     # 0x23fe8
movq 0x250(%rax), %rax
movl 0xc(%rsp), %edi
leaq 0x10(%rsp), %rsi
callq *%rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x1314e
movl $0x0, 0x24(%rsp)
jmp 0x131a3
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5480
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x1319b
movq 0x18(%rsp), %rdi
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x5440
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x13168
movl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetJoystickButtons
static int GetJoystickButtons(lua_State *L)
    {
    int i, count;
    int jid = CheckJoystick(L, 1);
    const unsigned char *state = glfw.GetJoystickButtons(jid, &count);
    if(!state)
        return 0;
    luaL_checkstack(L, count, NULL);
    for(i=0; i< count; i++)
        lua_pushstring(L, state[i]==GLFW_PRESS ? "press" : "release");
    return count;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x10e11(%rip), %rax     # 0x23fe8
movq 0x258(%rax), %rax
movl 0xc(%rsp), %edi
leaq 0x10(%rsp), %rsi
callq *%rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x131fe
movl $0x0, 0x24(%rsp)
jmp 0x13263
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5480
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x1325b
movq 0x18(%rsp), %rdi
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movzbl (%rax,%rcx), %ecx
leaq 0x9197(%rip), %rsi      # 0x1c3d2
leaq 0x9183(%rip), %rax      # 0x1c3c5
cmpl $0x1, %ecx
cmoveq %rax, %rsi
callq 0x5670
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x13218
movl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetJoystickHats
static int GetJoystickHats(lua_State *L)
    {
    int i, count;
    int jid = CheckJoystick(L, 1);
    CheckPfn(L, GetJoystickHats, 3, 3, 0);
    const unsigned char *hat = glfw.GetJoystickHats(jid, &count);
    if(!hat)
        return 0;
    luaL_checkstack(L, count, NULL);
    for(i=0; i< count; i++)
        pushhat(L, hat[i]);
    return count;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x10d51(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x348(%rax)
jne 0x132f6
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x132da
movq 0x18(%rsp), %rdi
leaq 0xad32(%rip), %rsi      # 0x1dff2
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13376
movq 0x18(%rsp), %rdi
leaq 0xad42(%rip), %rsi      # 0x1e028
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13376
jmp 0x132f8
movq 0x10ce9(%rip), %rax     # 0x23fe8
movq 0x348(%rax), %rax
movl 0xc(%rsp), %edi
leaq 0x10(%rsp), %rsi
callq *%rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x13326
movl $0x0, 0x24(%rsp)
jmp 0x13376
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5480
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x1336e
movq 0x18(%rsp), %rdi
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x5190
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x13340
movl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetJoystickName
static int GetJoystickName(lua_State *L)
    {
    int jid = CheckJoystick(L, 1);
    const char *name = glfw.GetJoystickName(jid);
    lua_pushstring(L, name ? name : "???");
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0x1c(%rsp)
movq 0x10c41(%rip), %rax     # 0x23fe8
movq 0x260(%rax), %rax
movl 0x1c(%rsp), %edi
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x133d6
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
jmp 0x133e3
leaq 0xac71(%rip), %rax      # 0x1e04e
movq %rax, (%rsp)
jmp 0x133e3
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5670
movl $0x1, %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetJoystickGUID
static int GetJoystickGUID(lua_State *L)
    {
    int jid = CheckJoystick(L, 1);
    const char *guid;
    CheckPfn(L, GetJoystickGUID, 3, 3, 0);
    guid = glfw.GetJoystickGUID(jid);
    if(!guid) return 0;
    lua_pushstring(L, guid);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0x14(%rsp)
movq 0x10bc1(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x350(%rax)
jne 0x13480
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x13467
movq 0x18(%rsp), %rdi
leaq 0xac02(%rip), %rsi      # 0x1e052
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x134c4
movq 0x18(%rsp), %rdi
leaq 0xac15(%rip), %rsi      # 0x1e088
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x134c4
jmp 0x13482
movq 0x10b5f(%rip), %rax     # 0x23fe8
movq 0x350(%rax), %rax
movl 0x14(%rsp), %edi
callq *%rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x134ad
movl $0x0, 0x24(%rsp)
jmp 0x134c4
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x5670
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: JoystickIsGamepad
static int JoystickIsGamepad(lua_State *L)
    {
    int jid = CheckJoystick(L, 1);
    CheckPfn(L, JoystickIsGamepad, 3, 3, 0);
    lua_pushboolean(L, glfw.JoystickIsGamepad(jid));
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0x14(%rsp)
movq 0x10af1(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x368(%rax)
jne 0x13550
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x13537
movq 0x18(%rsp), %rdi
leaq 0xab8e(%rip), %rsi      # 0x1e0ae
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13584
movq 0x18(%rsp), %rdi
leaq 0xaba3(%rip), %rsi      # 0x1e0e6
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13584
jmp 0x13552
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10a85(%rip), %rax     # 0x23fe8
movq 0x368(%rax), %rax
movl 0x14(%rsp), %edi
callq *%rax
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x5460
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: UpdateGamepadMappings
static int UpdateGamepadMappings(lua_State *L)
    {
    int rc;
    const char *s = luaL_checkstring(L, 1);
    CheckPfn(L, UpdateGamepadMappings, 3, 3, 0);
    rc = glfw.UpdateGamepadMappings(s);
    lua_pushboolean(L, rc);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5330
movq %rax, 0x8(%rsp)
movq 0x10a30(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x370(%rax)
jne 0x13611
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x135f8
movq 0x18(%rsp), %rdi
leaq 0xab2d(%rip), %rsi      # 0x1e10e
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13642
movq 0x18(%rsp), %rdi
leaq 0xab46(%rip), %rsi      # 0x1e14a
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13642
jmp 0x13613
movq 0x109ce(%rip), %rax     # 0x23fe8
movq 0x370(%rax), %rax
movq 0x8(%rsp), %rdi
callq *%rax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x5460
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetGamepadName
static int GetGamepadName(lua_State *L)
    {
    const char* name;
    int jid = CheckJoystick(L, 1);
    CheckPfn(L, GetGamepadName, 3, 3, 0);
    name = glfw.GetGamepadName(jid);
    if(!name) return 0;
    lua_pushstring(L, name);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0xc(%rsp)
movq 0x10971(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x378(%rax)
jne 0x136d0
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x136b7
movq 0x18(%rsp), %rdi
leaq 0xaad6(%rip), %rsi      # 0x1e176
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13714
movq 0x18(%rsp), %rdi
leaq 0xaae8(%rip), %rsi      # 0x1e1ab
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x13714
jmp 0x136d2
movq 0x1090f(%rip), %rax     # 0x23fe8
movq 0x378(%rax), %rax
movl 0xc(%rsp), %edi
callq *%rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x136fd
movl $0x0, 0x24(%rsp)
jmp 0x13714
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x5670
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetGamepadState
static int GetGamepadState(lua_State *L)
    {
    GLFWgamepadstate state;
    int rc;
    int jid = CheckJoystick(L, 1);
    CheckPfn(L, GetGamepadState, 3, 3, 0);
    rc = glfw.GetGamepadState(jid, &state);
    if(!rc) return 0;
    pushgamepadbuttons(L, &state);
    pushgamepadaxes(L, &state);
    return 2;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0x53c0
subq $0x1, %rax
movl %eax, 0x8(%rsp)
movq 0x108a1(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x380(%rax)
jne 0x137a0
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
jne 0x13787
movq 0x38(%rsp), %rdi
leaq 0xaa60(%rip), %rsi      # 0x1e1d0
movl $0x3, %ecx
xorl %r8d, %r8d
movl %ecx, %edx
movb $0x0, %al
callq 0x5590
movl %eax, 0x44(%rsp)
jmp 0x137f6
movq 0x38(%rsp), %rdi
leaq 0xaa73(%rip), %rsi      # 0x1e206
movb $0x0, %al
callq 0x5590
movl %eax, 0x44(%rsp)
jmp 0x137f6
jmp 0x137a2
movq 0x1083f(%rip), %rax     # 0x23fe8
movq 0x380(%rax), %rax
movl 0x8(%rsp), %edi
leaq 0x10(%rsp), %rsi
callq *%rax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x137d0
movl $0x0, 0x44(%rsp)
jmp 0x137f6
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x51f0
movq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5100
movl $0x2, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: SetClipboardString
static int SetClipboardString(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    const char* string = luaL_checkstring(L, 2);
    glfw.SetClipboardString(win->window, string);
    return 0;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x5330
movq %rax, (%rsp)
movq 0x107ad(%rip), %rax     # 0x23fe8
movq 0x270(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
movq (%rsp), %rsi
callq *%rax
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetClipboardString
static int GetClipboardString(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    const char* string = glfw.GetClipboardString(win->window);
    lua_pushstring(L, string);
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x5550
movq %rax, 0x8(%rsp)
movq 0x10764(%rip), %rax     # 0x23fe8
movq 0x278(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5670
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetTimerFrequency
static int GetTimerFrequency(lua_State *L)
    {
    uint64_t hz;
    CheckPfn(L, GetTimerFrequency, 3, 2, 0);
    hz = glfw.GetTimerFrequency();
    lua_pushinteger(L, hz);
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x10698(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x298(%rax)
jne 0x139af
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x13996
movq 0x8(%rsp), %rdi
leaq 0xa8b0(%rip), %rsi      # 0x1e22c
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x139d8
movq 0x8(%rsp), %rdi
leaq 0xa8c2(%rip), %rsi      # 0x1e264
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x139d8
jmp 0x139b1
movq 0x10630(%rip), %rax     # 0x23fe8
callq *0x298(%rax)
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5300
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetTimerSeconds
static int GetTimerSeconds(lua_State *L) /* NONGLFW */
    {
    double seconds;
    CheckPfn(L, GetTimerValue, 3, 2, 0);
    seconds = (double)glfw.GetTimerValue()/(double)glfw.GetTimerFrequency();
    lua_pushnumber(L, seconds);
    return 1;
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x105e8(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x290(%rax)
jne 0x13a65
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x13a49
movq 0x48(%rsp), %rdi
leaq 0xa860(%rip), %rsi      # 0x1e28c
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x54(%rsp)
jmp 0x13b0e
movq 0x48(%rsp), %rdi
leaq 0xa86b(%rip), %rsi      # 0x1e2c0
movb $0x0, %al
callq 0x5590
movl %eax, 0x54(%rsp)
jmp 0x13b0e
jmp 0x13a67
movq 0x1057a(%rip), %rax     # 0x23fe8
movq %rax, 0x8(%rsp)
movq 0x290(%rax), %rax
callq *%rax
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, %xmm0
movaps 0xa1e0(%rip), %xmm1     # 0x1dc70
movaps %xmm1, 0x10(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xa1df(%rip), %xmm1     # 0x1dc80
movaps %xmm1, 0x20(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x298(%rax), %rax
callq *%rax
movaps 0x10(%rsp), %xmm3
movaps 0x20(%rsp), %xmm2
movsd 0x38(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movsd 0x40(%rsp), %xmm0
callq 0x5440
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/input.c
// Function: GetTimerValue
static int GetTimerValue(lua_State *L)
    {
    uint64_t tics;
    CheckPfn(L, GetTimerValue, 3, 2, 0);
    tics = glfw.GetTimerValue();
    lua_pushinteger(L, tics);
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x104b8(%rip), %rax     # 0x23fe8
cmpq $0x0, 0x290(%rax)
jne 0x13b8f
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x13b76
movq 0x8(%rsp), %rdi
leaq 0xa730(%rip), %rsi      # 0x1e28c
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x13bb8
movq 0x8(%rsp), %rdi
leaq 0xa73e(%rip), %rsi      # 0x1e2c0
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x13bb8
jmp 0x13b91
movq 0x10450(%rip), %rax     # 0x23fe8
callq *0x290(%rax)
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5300
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: luaopen_moonglfw
int luaopen_moonglfw(lua_State *L)
/* Lua calls this function to load the module */
    {
    moonglfw_L = L;

    moonglfw_utils_init(L);

    lua_newtable(L); /* the glfw table */
    moonglfw_open_enums(L);
    moonglfw_open_getproc(L);
    AddVersions(L);

    /* Do not include hats in glfwGetJoystickButtons() if version >= 3.3.0 */
    if(checkminversion(3, 3, 0))
        glfw.InitHint(GLFW_JOYSTICK_HAT_BUTTONS, GLFW_FALSE);

    Init(L);
    atexit(AtExit);

    /* add glfw functions: */
    luaL_setfuncs(L, Functions, 0);
    moonglfw_open_window(L);
    moonglfw_open_hint(L);
    moonglfw_open_monitor(L);
    moonglfw_open_callbacks(L);
    moonglfw_open_input(L);
    moonglfw_open_context(L);
    moonglfw_open_vulkan(L);
    moonglfw_open_native(L);

    return 1;
    }

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rcx
movq 0x10358(%rip), %rax     # 0x23fd8
movq %rcx, (%rax)
movq (%rsp), %rdi
callq 0x5580
movq (%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5200
movq (%rsp), %rdi
callq 0x5040
movq (%rsp), %rdi
callq 0x5640
movq (%rsp), %rdi
callq 0x13d60
movl $0x3, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x5680
cmpl $0x0, %eax
je 0x13cdb
movl $0x50001, %edi          # imm = 0x50001
xorl %esi, %esi
movq 0x10313(%rip), %rax     # 0x23fe8
callq *0x2c8(%rax)
movq (%rsp), %rdi
callq 0x13e60
leaq 0x215(%rip), %rdi       # 0x13f00
callq 0x1bf20
movq (%rsp), %rdi
leaq 0xfb95(%rip), %rsi      # 0x23890
xorl %edx, %edx
callq 0x5120
movq (%rsp), %rdi
callq 0x5160
movq (%rsp), %rdi
callq 0x51a0
movq (%rsp), %rdi
callq 0x5740
movq (%rsp), %rdi
callq 0x5400
movq (%rsp), %rdi
callq 0x54e0
movq (%rsp), %rdi
callq 0x5380
movq (%rsp), %rdi
callq 0x50a0
movq (%rsp), %rdi
callq 0x56a0
movl $0x1, %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: AddVersions
static void AddVersions(lua_State *L)
/* Add version strings to the glfw table */
    {
    int major, minor, rev;
    lua_pushstring(L, "_VERSION");
    lua_pushstring(L, "MoonGLFW "MOONGLFW_VERSION);
    lua_settable(L, -3);

    lua_pushstring(L, "_GLFW_VERSION");
    glfw.GetVersion(&major, &minor, &rev);
    lua_pushfstring(L, "GLFW %d.%d.%d", major, minor, rev);
#if 0
    lua_pushfstring(L, "GLFW %d.%d.%d release %d",
            GLFW_VERSION_MAJOR, GLFW_VERSION_MINOR, GLFW_VERSION_REVISION, GLFW_RELEASE);
#endif
    lua_settable(L, -3);

    Version = MAKE_VERSION(major, minor, rev);
    if(!checkminversion(3, 1, 0))
        {
        lua_pushfstring(L, "MoonGLFW requires GLFW version >= 3.1 (found version %d.%d.%d)",
                            major, minor, rev);
        lua_error(L);
        }
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xa5bd(%rip), %rsi      # 0x1e332
callq 0x5670
movq 0x10(%rsp), %rdi
leaq 0xa599(%rip), %rsi      # 0x1e31f
callq 0x5670
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5450
movq 0x10(%rsp), %rdi
leaq 0xa587(%rip), %rsi      # 0x1e32d
callq 0x5670
leaq 0xc(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
movq 0x10227(%rip), %rax     # 0x23fe8
callq *0x10(%rax)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
movl 0x4(%rsp), %r8d
leaq 0xa55e(%rip), %rsi      # 0x1e33b
movb $0x0, %al
callq 0x5360
movq 0x10(%rsp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5450
movl 0xc(%rsp), %eax
shll $0x16, %eax
movl 0x8(%rsp), %ecx
shll $0xc, %ecx
orl %ecx, %eax
orl 0x4(%rsp), %eax
movl %eax, 0x10a7b(%rip)     # 0x24888
movl $0x3, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x13e4d
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
movl 0x4(%rsp), %r8d
leaq 0xa50d(%rip), %rsi      # 0x1e349
movb $0x0, %al
callq 0x5360
movq 0x10(%rsp), %rdi
callq 0x5560
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: Init
static int Init(lua_State *L)
    {
    if(Initialized) return 0;
    if(glfw.Init() != GL_TRUE)
        {
        const char *descr;
        glfw.GetError(&descr);
        if(descr) return luaL_error(L, descr);
        return luaL_error(L, "glfwInit() failed");
        }
    glfw.SetErrorCallback(errorCallback);
    Initialized = 1;
    return 0;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
cmpl $0x0, 0x10a28(%rip)     # 0x24898
je 0x13e7c
movl $0x0, 0x14(%rsp)
jmp 0x13ef3
movq 0x10165(%rip), %rax     # 0x23fe8
callq *(%rax)
cmpl $0x1, %eax
je 0x13ed0
movq %rsp, %rdi
movq 0x10154(%rip), %rax     # 0x23fe8
callq *0x2d0(%rax)
cmpq $0x0, (%rsp)
je 0x13eb7
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x13ef3
movq 0x8(%rsp), %rdi
leaq 0xa4c5(%rip), %rsi      # 0x1e388
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x13ef3
movq 0x10121(%rip), %rdi     # 0x23ff8
movq 0x1010a(%rip), %rax     # 0x23fe8
callq *0x20(%rax)
movl $0x1, 0x109ad(%rip)     # 0x24898
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: AtExit
static void AtExit(void)
    {
    if(moonglfw_L)
        {
        cur_free_all();
        mon_free_all();
        win_free_all();
        id_free_all();
        if(Initialized)
            { glfw.Terminate(); Initialized = 0; }
        enums_free_all(moonglfw_L);
        moonglfw_atexit_getproc();
        moonglfw_L = NULL;
        }
    }

// Assembly:
pushq %rax
movq 0x100d0(%rip), %rax     # 0x23fd8
cmpq $0x0, (%rax)
je 0x13f61
callq 0x5320
callq 0x5130
callq 0x55e0
callq 0x50c0
cmpl $0x0, 0x1096f(%rip)     # 0x24898
je 0x13f3f
movq 0x100b6(%rip), %rax     # 0x23fe8
callq *0x8(%rax)
movl $0x0, 0x10959(%rip)     # 0x24898
movq 0x10092(%rip), %rax     # 0x23fd8
movq (%rax), %rdi
callq 0x5050
callq 0x5290
movq 0x1007e(%rip), %rax     # 0x23fd8
movq $0x0, (%rax)
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: GetPlatform
static int GetPlatform(lua_State *L)
    {
    int platform;
    CheckPfn(L, GetPlatform, 3, 4, 0);
    platform = glfw.GetPlatform();
    pushplatform(L, platform);
    return 1;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0xfe48(%rip), %rax      # 0x23fe8
cmpq $0x0, 0x390(%rax)
jne 0x141ff
movl $0x3, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x141e6
movq 0x8(%rsp), %rdi
leaq 0xa291(%rip), %rsi      # 0x1e45d
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x1422d
movq 0x8(%rsp), %rdi
leaq 0xa29d(%rip), %rsi      # 0x1e48f
movb $0x0, %al
callq 0x5590
movl %eax, 0x14(%rsp)
jmp 0x1422d
jmp 0x14201
movq 0xfde0(%rip), %rax      # 0x23fe8
callq *0x390(%rax)
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movl $0xf, %esi
callq 0x55c0
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: PlatformSupported
static int PlatformSupported(lua_State *L)
    {
    int platform;
    CheckPfn(L, PlatformSupported, 3, 4, 0);
    platform = checkplatform(L, 1);
    lua_pushboolean(L, glfw.PlatformSupported(platform));
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0xfd98(%rip), %rax      # 0x23fe8
cmpq $0x0, 0x398(%rax)
jne 0x142af
movl $0x3, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x5680
cmpl $0x0, %eax
jne 0x14296
movq 0x18(%rsp), %rdi
leaq 0xa235(%rip), %rsi      # 0x1e4b1
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x142fb
movq 0x18(%rsp), %rdi
leaq 0xa247(%rip), %rsi      # 0x1e4e9
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x142fb
jmp 0x142b1
movq 0x18(%rsp), %rdi
movl $0xf, %esi
movl $0x1, %edx
callq 0x5430
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xfd0e(%rip), %rax      # 0x23fe8
movq 0x398(%rax), %rax
movl 0x14(%rsp), %edi
callq *%rax
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x5460
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/main.c
// Function: GetVersion
static int GetVersion(lua_State *L) 
    {
    int major, minor, rev;
    glfw.GetVersion(&major, &minor, &rev);
    lua_pushinteger(L, major);
    lua_pushinteger(L, minor);
    lua_pushinteger(L, rev);
    return 3;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0xc(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
movq 0xfcb9(%rip), %rax      # 0x23fe8
callq *0x10(%rax)
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x5300
movq 0x10(%rsp), %rdi
movslq 0x8(%rsp), %rsi
callq 0x5300
movq 0x10(%rsp), %rdi
movslq 0x4(%rsp), %rsi
callq 0x5300
movl $0x3, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/mon.c
// Function: moonglfw_mon_new
mon_t *mon_new(void)
    {
    mon_t *mon;
    int id = id_new();
    if(id == -1)
        return NULL;
    if((mon = (mon_t*)malloc(sizeof(mon_t))) == NULL) 
        { id_free(id); return NULL; }
    memset(mon, 0, sizeof(mon_t));
    mon->id = id;
    if(mon_search(mon->id))
        { free(mon); id_free(id); return NULL; }
    //mon->Monitor = LUA_NOREF;
    mon_insert(mon);
    return mon;
    }

// Assembly:
subq $0x18, %rsp
callq 0x5510
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
jne 0x14742
movq $0x0, 0x10(%rsp)
jmp 0x147cd
movl $0x30, %edi
callq 0x5490
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x1476b
movl 0x4(%rsp), %edi
callq 0x55a0
movq $0x0, 0x10(%rsp)
jmp 0x147cd
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x52f0
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x8(%rsp), %rax
movl 0x20(%rax), %edi
callq 0x5060
cmpq $0x0, %rax
je 0x147b9
movq 0x8(%rsp), %rdi
callq 0x50b0
movl 0x4(%rsp), %edi
callq 0x55a0
movq $0x0, 0x10(%rsp)
jmp 0x147cd
movq 0x8(%rsp), %rdi
callq 0x147e0
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/mon.c
// Function: moonglfw_mon_free
void mon_free(mon_t* mon)
    {
    if(mon_search(mon->id) == mon)
        {
        /* release callback references */
        //CALLBACK_UNREF(mon->Monitor);
        mon_remove(mon);
        }
    id_free(mon->id);
    free(mon);
    }

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movl 0x20(%rax), %edi
callq 0x5060
cmpq (%rsp), %rax
jne 0x14820
movq (%rsp), %rdi
callq 0x14840
movq (%rsp), %rax
movl 0x20(%rax), %edi
callq 0x55a0
movq (%rsp), %rdi
callq 0x50b0
popq %rax
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/mon.c
// Function: moonglfw_mon_check
mon_t* mon_check(lua_State *L, int arg)
    {
    int id = luaL_checkinteger(L, arg);
    mon_t *mon = mon_search(id);
    if(!mon)
        luaL_error(L, "invalid monitor id");
    return mon;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x53c0
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %edi
callq 0x5060
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x148c6
movq 0x10(%rsp), %rdi
leaq 0x9c52(%rip), %rsi      # 0x1e511
movb $0x0, %al
callq 0x5590
movq (%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: moonglfw_monitorAdd
int monitorAdd(lua_State *L, GLFWmonitor *monitor)
    {
    mon_t *mon = mon_first(0);
    while(mon)
        {
        if(mon->monitor == monitor) /* already in */
            return mon->id;
        mon = mon_next(mon);
        }
    /* not found */
    mon = mon_new();
    if(!mon)
        return luaL_error(L, "cannot create monitor entry");
    mon->monitor = monitor;
    return mon->id;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
xorl %edi, %edi
callq 0x5170
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x15a01
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x159f0
movq 0x8(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x15a46
movq 0x8(%rsp), %rdi
callq 0x51b0
movq %rax, 0x8(%rsp)
jmp 0x159ca
callq 0x5370
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x15a2c
movq 0x18(%rsp), %rdi
leaq 0x8b05(%rip), %rsi      # 0x1e524
movb $0x0, %al
callq 0x5590
movl %eax, 0x24(%rsp)
jmp 0x15a46
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
movl 0x20(%rax), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetPrimaryMonitor
static int GetPrimaryMonitor(lua_State *L)
    {
    int id;
    GLFWmonitor* monitor = glfw.GetPrimaryMonitor();
    if(!monitor)
        return 0;
    id = monitorAdd(L, monitor);
    lua_pushinteger(L, id);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0xe548(%rip), %rax      # 0x23fe8
callq *0x30(%rax)
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x15aba
movl $0x0, 0x24(%rsp)
jmp 0x15ae4
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x53d0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x5300
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitors
static int GetMonitors(lua_State *L)
    {
    int i, id, count;
    GLFWmonitor** monitor;
    /* no mon_free_all(); */
    monitor = glfw.GetMonitors(&count);
    if(!monitor)
        return 0;
    for(i=0; i<count; i++)
        {
        id = monitorAdd(L, monitor[i]);
        lua_pushinteger(L, id);
        }
    return count;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
leaq 0xc(%rsp), %rdi
movq 0xe4e3(%rip), %rax      # 0x23fe8
callq *0x28(%rax)
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x15b1d
movl $0x0, 0x24(%rsp)
jmp 0x15b6e
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x15b66
movq 0x18(%rsp), %rdi
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x53d0
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movslq 0x10(%rsp), %rsi
callq 0x5300
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x15b25
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitorPos
static int GetMonitorPos(lua_State *L)
    {
    int xpos, ypos;
    mon_t *mon = checkmonitor(L, 1);
    glfw.GetMonitorPos(mon->monitor, &xpos, &ypos);
    lua_pushinteger(L, xpos);
    lua_pushinteger(L, ypos);
    return 2;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, (%rsp)
movq 0xe445(%rip), %rax      # 0x23fe8
movq 0x38(%rax), %rax
movq (%rsp), %rcx
movq 0x28(%rcx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq *%rax
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x5300
movq 0x10(%rsp), %rdi
movslq 0x8(%rsp), %rsi
callq 0x5300
movl $0x2, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitorPhysicalSize
static int GetMonitorPhysicalSize(lua_State *L)
    {
    int widthmm, heightmm;
    mon_t *mon = checkmonitor(L, 1);
    glfw.GetMonitorPhysicalSize(mon->monitor, &widthmm, &heightmm);
    lua_pushinteger(L, widthmm);
    lua_pushinteger(L, heightmm);
    return 2;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, (%rsp)
movq 0xe3d5(%rip), %rax      # 0x23fe8
movq 0x40(%rax), %rax
movq (%rsp), %rcx
movq 0x28(%rcx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq *%rax
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x5300
movq 0x10(%rsp), %rdi
movslq 0x8(%rsp), %rsi
callq 0x5300
movl $0x2, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitorName
static int GetMonitorName(lua_State *L)
    {
    mon_t *mon = checkmonitor(L, 1);
    const char* name = glfw.GetMonitorName(mon->monitor);
    lua_pushstring(L, name ? name : "???");
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, 0x18(%rsp)
movq 0xe364(%rip), %rax      # 0x23fe8
movq 0x48(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x15cb5
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
jmp 0x15cc2
leaq 0x8392(%rip), %rax      # 0x1e04e
movq %rax, (%rsp)
jmp 0x15cc2
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x5670
movl $0x1, %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetVideoModes
static int GetVideoModes(lua_State *L)
    {
    int i, count;
    mon_t *mon = checkmonitor(L, 1);
    const GLFWvidmode *mode = glfw.GetVideoModes(mon->monitor, &count);
    if(!mode) 
        return 0;
    for(i=0; i<count; i++)
        pushvidmode(L, &mode[i]);
    return count;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, 0x8(%rsp)
movq 0xe2e4(%rip), %rax      # 0x23fe8
movq 0x58(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
leaq 0x10(%rsp), %rsi
callq *%rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x15d2d
movl $0x0, 0x24(%rsp)
jmp 0x15d6e
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x15d66
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
movslq 0x14(%rsp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rsi
callq 0x54a0
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x15d35
movl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetVideoMode
static int GetVideoMode(lua_State *L)
    {
    mon_t *mon = checkmonitor(L, 1);
    const GLFWvidmode *mode = glfw.GetVideoMode(mon->monitor);
    if(!mode) 
        return 0;
    pushvidmode(L, mode);
    return 1;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, 0x10(%rsp)
movq 0xe244(%rip), %rax      # 0x23fe8
movq 0x60(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x15dca
movl $0x0, 0x24(%rsp)
jmp 0x15de1
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x54a0
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: SetGamma
static int SetGamma(lua_State *L)
    {
    mon_t *mon = checkmonitor(L, 1);
    float gamma = luaL_checknumber(L, 2);
    glfw.SetGamma(mon->monitor, gamma);
    return 0;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x5220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movq 0xe1bb(%rip), %rax      # 0x23fe8
movq 0x68(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
movss 0x4(%rsp), %xmm0
callq *%rax
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglfw/src/monitor.c
// Function: GetGammaRamp
static int GetGammaRamp(lua_State *L)
    {
    mon_t *mon = checkmonitor(L, 1);
    const GLFWgammaramp *ramp = glfw.GetGammaRamp(mon->monitor);
    if(!ramp) 
        return 0;
    return pushgammaramp(L, ramp);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x56c0
movq %rax, 0x10(%rsp)
movq 0xe174(%rip), %rax      # 0x23fe8
movq 0x70(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x15e9a
movl $0x0, 0x24(%rsp)
jmp 0x15ead
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x5690
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)