LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x5450
movq 0xee42(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %eax, %esi
callq *0x1d0(%rcx)
cmpl $0x1, %eax
leaq 0x6209(%rip), %rax      # 0x133c5
leaq 0x620f(%rip), %rsi      # 0x133d2
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x5690
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq 0xedef(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0x1d8(%rcx)
movsd (%r14), %xmm0
movq %rbx, %rdi
callq 0x5460
movsd (%r15), %xmm0
movq %rbx, %rdi
callq 0x5460
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5230
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5230
movaps %xmm0, %xmm1
movq 0xed71(%rip), %rax      # 0x1bfe8
movq 0x28(%r14), %rdi
movsd (%rsp), %xmm0
callq *0x1e0(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movl %eax, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53e0
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5340
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x53e0
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
callq 0x53e0
movq %rax, %r12
callq 0x5590
testq %rax, %rax
je 0xd33a
movq %rax, %r14
movq 0xece1(%rip), %rax      # 0x1bfe8
movq %rsp, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq *0x1e8(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xd332
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
jmp 0xd34b
movq %r14, %rdi
callq 0x5620
leaq 0x7cfc(%rip), %rsi      # 0x1503d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0xa, %esi
movl $0x1, %edx
callq 0x5450
movl %eax, %ebp
callq 0x5590
testq %rax, %rax
je 0xd3b2
movq %rax, %r14
movq 0xec65(%rip), %rax      # 0x1bfe8
movl %ebp, %edi
callq *0x1f0(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xd3aa
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x5620
leaq 0x7c84(%rip), %rsi      # 0x1503d
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5250
movq 0xebce(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movq 0x28(%rax), %rsi
callq *0x200(%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xeb9e(%rip), %rax      # 0x1bfe8
callq *0x248(%rax)
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xeb67(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x250(%rax)
testq %rax, %rax
je 0xd4cd
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd4cf
xorl %r15d, %r15d
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r15,4), %xmm0
movq %rbx, %rdi
callq 0x5460
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd4ad
jmp 0xd4cf
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xeaeb(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x258(%rax)
testq %rax, %rax
je 0xd55b
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd55d
xorl %r15d, %r15d
leaq 0x5e95(%rip), %r12      # 0x133c5
leaq 0x5e9b(%rip), %r13      # 0x133d2
cmpb $0x1, (%r14,%r15)
movq %r12, %rsi
je 0xd544
movq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd537
jmp 0xd55d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq 0xea60(%rip), %rcx      # 0x1bfe8
movq 0x348(%rcx), %rcx
testq %rcx, %rcx
je 0xd5dc
decl %eax
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd60b
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd60d
xorl %r15d, %r15d
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
callq 0x51a0
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd5c0
jmp 0xd60d
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd617
leaq 0x7a90(%rip), %rsi      # 0x15088
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7a34(%rip), %rsi      # 0x15052
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xe992(%rip), %rax      # 0x1bfe8
callq *0x260(%rax)
testq %rax, %rax
leaq 0x7a48(%rip), %rsi      # 0x150ae
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x5690
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq 0xe95a(%rip), %rcx      # 0x1bfe8
movq 0x350(%rcx), %rcx
testq %rcx, %rcx
je 0xd6b7
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd6de
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xd6e0
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd6e2
leaq 0x7a15(%rip), %rsi      # 0x150e8
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
leaq 0x79c9(%rip), %rsi      # 0x150b2
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq 0xe8d2(%rip), %rcx      # 0x1bfe8
movq 0x368(%rcx), %rcx
testq %rcx, %rcx
je 0xd739
decl %eax
movl %eax, %edi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd760
leaq 0x79f1(%rip), %rsi      # 0x15146
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x79a7(%rip), %rsi      # 0x1510e
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x5340
movq 0xe852(%rip), %rcx      # 0x1bfe8
movq 0x370(%rcx), %rcx
testq %rcx, %rcx
je 0xd7b8
movq %rax, %rdi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd7df
leaq 0x79d6(%rip), %rsi      # 0x151aa
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x7988(%rip), %rsi      # 0x1516e
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq 0xe7d5(%rip), %rcx      # 0x1bfe8
movq 0x378(%rcx), %rcx
testq %rcx, %rcx
je 0xd83c
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd863
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xd865
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd867
leaq 0x79b3(%rip), %rsi      # 0x1520b
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
leaq 0x7968(%rip), %rsi      # 0x151d6
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq 0xe747(%rip), %rcx      # 0x1bfe8
movq 0x380(%rcx), %rcx
testq %rcx, %rcx
je 0xd8da
decl %eax
movq %rsp, %rsi
movl %eax, %edi
callq *%rcx
testl %eax, %eax
je 0xd907
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5100
movl $0x2, %eax
jmp 0xd909
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd911
leaq 0x7970(%rip), %rsi      # 0x15266
movq %rbx, %rdi
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x55b0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x7918(%rip), %rsi      # 0x15230
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5340
movq 0xe688(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movq %rax, %rsi
callq *0x270(%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq 0xe65c(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x278(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0xe5f9(%rip), %rax      # 0x1bfe8
movq 0x298(%rax), %rax
testq %rax, %rax
je 0xda0f
callq *%rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xda36
leaq 0x7899(%rip), %rsi      # 0x152c4
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x784f(%rip), %rsi      # 0x1528c
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xe582(%rip), %r14      # 0x1bfe8
movq 0x290(%r14), %rax
testq %rax, %rax
je 0xdae0
callq *%rax
movq %rax, %xmm0
punpckldq 0x724f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7257(%rip), %xmm0     # 0x14ce0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
callq *0x298(%r14)
movq %rax, %xmm0
punpckldq 0x7222(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x722a(%rip), %xmm0     # 0x14ce0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd (%rsp), %xmm0
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x5460
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xdb0d
leaq 0x7824(%rip), %rsi      # 0x15320
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x55b0
leaq 0x77d8(%rip), %rsi      # 0x152ec
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0xe4ab(%rip), %rax      # 0x1bfe8
movq 0x290(%rax), %rax
testq %rax, %rax
je 0xdb5d
callq *%rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xdb84
leaq 0x77a7(%rip), %rsi      # 0x15320
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x7761(%rip), %rsi      # 0x152ec
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
nop
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xe3d2(%rip), %rax      # 0x1bfd8
movq %rdi, (%rax)
callq 0x55a0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
movq %rbx, %rdi
callq 0x5040
movq %rbx, %rdi
callq 0x5660
leaq 0x7761(%rip), %rsi      # 0x15392
movq %rbx, %rdi
callq 0x5690
leaq 0x773f(%rip), %rsi      # 0x1537f
movq %rbx, %rdi
callq 0x5690
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5470
leaq 0x7731(%rip), %rsi      # 0x1538d
movq %rbx, %rdi
callq 0x5690
movq 0xe37d(%rip), %r13      # 0x1bfe8
leaq 0xc(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x10(%r13)
movl (%r15), %edx
movl (%r12), %ecx
movl (%r14), %r8d
leaq 0x7703(%rip), %rsi      # 0x1539b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5470
movl (%r15), %edx
movl %edx, %esi
shll $0x16, %esi
movl (%r12), %ecx
movl %ecx, %eax
shll $0xc, %eax
orl %esi, %eax
movl (%r14), %r8d
orl %r8d, %eax
movl %eax, 0xebba(%rip)      # 0x1c888
cmpl $0xc00fff, %eax         # imm = 0xC00FFF
jg 0xdcf4
leaq 0x76cd(%rip), %rsi      # 0x153a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
callq 0x5580
movl 0xeb94(%rip), %eax      # 0x1c888
cmpl $0xc03000, %eax         # imm = 0xC03000
jl 0xdd09
movl $0x50001, %edi          # imm = 0x50001
xorl %esi, %esi
callq *0x2c8(%r13)
movq %rbx, %rdi
callq 0xdd81
leaq 0xdb(%rip), %rdi        # 0xddf3
callq 0x122d0
leaq 0xdb6c(%rip), %rsi      # 0x1b890
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5130
movq %rbx, %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x5740
movq %rbx, %rdi
callq 0x5420
movq %rbx, %rdi
callq 0x5500
movq %rbx, %rdi
callq 0x5390
movq %rbx, %rdi
callq 0x50a0
movq %rbx, %rdi
callq 0x56c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
cmpb $0x0, 0xeb05(%rip)      # 0x1c898
jne 0xdde7
movq %rdi, %r14
movq 0xe249(%rip), %r15      # 0x1bfe8
callq *(%r15)
cmpl $0x1, %eax
jne 0xddbb
movq 0xe24a(%rip), %rdi      # 0x1bff8
callq *0x20(%r15)
movb $0x1, 0xeadf(%rip)      # 0x1c898
jmp 0xdde7
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq *0x2d0(%r15)
movq (%rbx), %rax
testq %rax, %rax
leaq 0x7611(%rip), %rsi      # 0x153e8
cmovneq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x55b0
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0xe1dd(%rip), %rbx      # 0x1bfd8
cmpq $0x0, (%rbx)
je 0xde43
callq 0x5330
callq 0x5140
callq 0x5600
callq 0x50c0
cmpb $0x1, 0xea7c(%rip)      # 0x1c898
jne 0xde2f
movq 0xe1c3(%rip), %rax      # 0x1bfe8
callq *0x8(%rax)
movb $0x0, 0xea69(%rip)      # 0x1c898
movq (%rbx), %rdi
callq 0x5050
callq 0x52a0
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/main.c
// Function: InitHint
static int InitHint(lua_State *L)
    {
    int hint;
    if(Initialized)
        { glfw.Terminate(); Initialized = 0; }
    CheckPfn(L, InitHint, 3, 3, 0);
    hint = checkinithint(L, 1);
    switch(hint)
        {
        case GLFW_JOYSTICK_HAT_BUTTONS:
        case GLFW_COCOA_CHDIR_RESOURCES:
        case GLFW_COCOA_MENUBAR:
        case GLFW_X11_XCB_VULKAN_SURFACE: return Boolean(L, hint);
        case GLFW_ANGLE_PLATFORM_TYPE: ENUM(L, hint, checkangleplatformtype);
        case GLFW_PLATFORM: ENUM(L, hint, checkplatform);
        case GLFW_WAYLAND_LIBDECOR: ENUM(L, hint, checkwaylandlibdecor);
        default:
            return luaL_error(L, "invalid init hint '%s'", lua_tostring(L, 1));
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0xea44(%rip)      # 0x1c898
jne 0xde67
movq 0xe18b(%rip), %rax      # 0x1bfe8
callq *0x8(%rax)
movb $0x0, 0xea31(%rip)      # 0x1c898
movq 0xe17a(%rip), %r15      # 0x1bfe8
cmpq $0x0, 0x2c8(%r15)
je 0xdebf
movq %rbx, %rdi
movl $0xe, %esi
movl $0x1, %edx
callq 0x5450
movl %eax, %r14d
cmpl $0x51000, %eax          # imm = 0x51000
jle 0xdeee
leal -0x51001(%r14), %eax
cmpl $0x2, %eax
jb 0xdf29
cmpl $0x53001, %r14d         # imm = 0x53001
je 0xdf7c
cmpl $0x52001, %r14d         # imm = 0x52001
je 0xdf29
jmp 0xdf54
cmpl $0xc02fff, 0xe9bf(%rip) # imm = 0xC02FFF
jg 0xdf3e
leaq 0x7586(%rip), %rsi      # 0x15458
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
cmpl $0x50001, %r14d         # imm = 0x50001
je 0xdf29
cmpl $0x50002, %r14d         # imm = 0x50002
je 0xdf95
cmpl $0x50003, %r14d         # imm = 0x50003
jne 0xdf54
movq %rbx, %rdi
movl $0xf, %esi
movl $0x2, %edx
callq 0x5450
movl $0x50003, %edi          # imm = 0x50003
jmp 0xdfac
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5070
movzbl %al, %esi
movl %r14d, %edi
jmp 0xdfae
leaq 0x7542(%rip), %rsi      # 0x15487
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x51e0
leaq 0x753c(%rip), %rsi      # 0x154a6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %edx
callq 0x5450
movl $0x53001, %edi          # imm = 0x53001
jmp 0xdfac
movq %rbx, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x5450
movl $0x50002, %edi          # imm = 0x50002
movl %eax, %esi
callq *0x2c8(%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0xe020(%rip), %rax      # 0x1bfe8
movq 0x390(%rax), %rax
testq %rax, %rax
je 0xdfec
callq *%rax
movq %rbx, %rdi
movl $0xf, %esi
movl %eax, %edx
callq 0x55e0
movl $0x1, %eax
popq %rbx
retq
cmpl $0xc03fff, 0xe892(%rip) # imm = 0xC03FFF
jg 0xe017
leaq 0x74be(%rip), %rsi      # 0x154bd
movq %rbx, %rdi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x74d1(%rip), %rsi      # 0x154ef
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xdfb1(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0x398(%r14)
je 0xe073
movq %rbx, %rdi
movl $0xf, %esi
movl $0x1, %edx
callq 0x5450
movl %eax, %edi
callq *0x398(%r14)
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0xc03fff, 0xe80b(%rip) # imm = 0xC03FFF
jg 0xe0a4
leaq 0x748b(%rip), %rsi      # 0x15511
movq %rbx, %rdi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
leaq 0x749e(%rip), %rsi      # 0x15549
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x53e0
movq 0xdf58(%rip), %rbx      # 0x1c8a0
testq %rbx, %rbx
je 0xe95d
cmpl %eax, 0x20(%rbx)
jg 0xe958
jge 0xe970
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0xe948
leaq 0x6c0d(%rip), %rsi      # 0x15571
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x55b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %edi, %edi
callq 0x5180
testq %rax, %rax
je 0xe9a2
cmpq %r14, 0x28(%rax)
je 0xe9b0
movq %rax, %rdi
callq 0x51c0
jmp 0xe98d
callq 0x5380
testq %rax, %rax
je 0xe9bb
movq %r14, 0x28(%rax)
movl 0x20(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6bc2(%rip), %rsi      # 0x15584
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movq 0xd5e8(%rip), %rax      # 0x1bfe8
callq *0x30(%rax)
testq %rax, %rax
je 0xea25
movq %rbx, %rdi
movq %rax, %rsi
callq 0x53f0
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
jmp 0xea27
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xd5ac(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rdi
callq *0x28(%rax)
testq %rax, %rax
je 0xea7d
movq %rax, %r14
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xea7f
xorl %r15d, %r15d
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x53f0
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5310
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xea57
jmp 0xea7f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd542(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0x38(%rcx)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd4e9(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0x40(%rcx)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd498(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x48(%rcx)
testq %rax, %rax
leaq 0x654d(%rip), %rsi      # 0x150ae
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x5690
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd457(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %rsi
callq *0x58(%rcx)
testq %rax, %rax
je 0xebce
movq %rax, %r14
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xebd0
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x54c0
incq %r15
movslq 0xc(%rsp), %rax
addq $0x18, %r14
cmpq %rax, %r15
jl 0xebb0
jmp 0xebd0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %ebx
movl $0x1, %esi
callq 0x56e0
movq 0xd3f1(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x60(%rcx)
testq %rax, %rax
je 0xec10
movq %r14, %rdi
movq %rax, %rsi
callq 0x54c0
jmp 0xec12
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5230
cvtsd2ss %xmm0, %xmm0
movq 0xd3a0(%rip), %rax      # 0x1bfe8
movq 0x28(%r14), %rdi
callq *0x68(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd37a(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x70(%rcx)
testq %rax, %rax
je 0xec86
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x56b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/monitor.c
// Function: SetGammaRamp
static int SetGammaRamp(lua_State *L)
    {
    GLFWgammaramp ramp;
    mon_t *mon = checkmonitor(L, 1);
    checkgammaramp(L, 2, &ramp);
    glfw.SetGammaRamp(mon->monitor, &ramp);
    free(ramp.red);
    free(ramp.green);
    free(ramp.blue);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq %rax, %r14
movq %rsp, %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x5710
movq 0xd32b(%rip), %rax      # 0x1bfe8
movq 0x28(%r14), %rdi
movq %r15, %rsi
callq *0x78(%rax)
movq (%r15), %rdi
callq 0x50b0
movq 0x8(%r15), %rdi
callq 0x50b0
movq 0x10(%r15), %rdi
callq 0x50b0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitorWorkarea
static int GetMonitorWorkarea(lua_State *L)
    {
    int xpos, ypos, width, height;
    mon_t *mon = checkmonitor(L, 1);
    CheckPfn(L, GetMonitorWorkarea, 3, 3, 0);
    glfw.GetMonitorWorkarea(mon->monitor, &xpos, &ypos, &width, &height);
    lua_pushinteger(L, xpos);
    lua_pushinteger(L, ypos);
    lua_pushinteger(L, width);
    lua_pushinteger(L, height);
    return 4;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd2da(%rip), %rcx      # 0x1bfe8
movq 0x2d8(%rcx), %r9
testq %r9, %r9
je 0xed80
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rsp, %r13
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq *%r9
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r13), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x4, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xedb3
leaq 0x690f(%rip), %rsi      # 0x156ab
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55b0
leaq 0x68b8(%rip), %rsi      # 0x15672
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/monitor.c
// Function: GetMonitorContentScale
static int GetMonitorContentScale(lua_State *L)
    {
    float xscale, yscale;
    mon_t *mon = checkmonitor(L, 1);
    CheckPfn(L, GetMonitorContentScale, 3, 3, 0);
    glfw.GetMonitorContentScale(mon->monitor, &xscale, &yscale);
    lua_pushnumber(L, xscale);
    lua_pushnumber(L, yscale);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xd1ed(%rip), %rcx      # 0x1bfe8
movq 0x2e0(%rcx), %rcx
testq %rcx, %rcx
je 0xee49
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *%rcx
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x5460
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
movq %rbx, %rdi
callq 0x5460
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xee78
leaq 0x68ac(%rip), %rsi      # 0x15711
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
leaq 0x6855(%rip), %rsi      # 0x156d4
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetWin32Adapter
static int GetWin32Adapter(lua_State *L)
    {
    const char *what;
    mon_t *mon = checkmonitor(L, 1);
    CheckNativePfn(L, GetWin32Adapter);
    what = glfw.GetWin32Adapter(mon->monitor);
    if(!what) return 0;
    lua_pushstring(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xcecb(%rip), %rcx      # 0x1bfe8
movq 0x3d0(%rcx), %rcx
testq %rcx, %rcx
je 0xf146
movq 0x28(%rax), %rdi
callq *%rcx
testq %rax, %rax
je 0xf158
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xf15a
leaq 0x6829(%rip), %rsi      # 0x15976
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetWin32Monitor
static int GetWin32Monitor(lua_State *L)
    {
    const char *what;
    mon_t *mon = checkmonitor(L, 1);
    CheckNativePfn(L, GetWin32Monitor);
    what = glfw.GetWin32Monitor(mon->monitor);
    if(!what) return 0;
    lua_pushstring(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xce77(%rip), %rcx      # 0x1bfe8
movq 0x3d8(%rcx), %rcx
testq %rcx, %rcx
je 0xf19a
movq 0x28(%rax), %rdi
callq *%rcx
testq %rax, %rax
je 0xf1ac
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xf1ae
leaq 0x67fb(%rip), %rsi      # 0x1599c
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetWin32Window
static int GetWin32Window(lua_State *L)
    {
    void *what;
    win_t *win = checkwindow(L, 1);
    CheckNativePfn(L, GetWin32Window);
    what = glfw.GetWin32Window(win->window);
    if(!what) return 0;
    lua_pushlightuserdata(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq 0xce23(%rip), %rcx      # 0x1bfe8
movq 0x3e0(%rcx), %rcx
testq %rcx, %rcx
je 0xf1ee
movq 0x28(%rax), %rdi
callq *%rcx
testq %rax, %rax
je 0xf200
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54d0
movl $0x1, %eax
jmp 0xf202
leaq 0x67cd(%rip), %rsi      # 0x159c2
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetWGLContext
static int GetWGLContext(lua_State *L)
    {
    void *what;
    win_t *win = checkwindow(L, 1);
    CheckNativePfn(L, GetWGLContext);
    what = glfw.GetWGLContext(win->window);
    if(!what) return 0;
    lua_pushlightuserdata(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq 0xcdcf(%rip), %rcx      # 0x1bfe8
movq 0x3e8(%rcx), %rcx
testq %rcx, %rcx
je 0xf242
movq 0x28(%rax), %rdi
callq *%rcx
testq %rax, %rax
je 0xf254
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54d0
movl $0x1, %eax
jmp 0xf256
leaq 0x679e(%rip), %rsi      # 0x159e7
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetX11Display
static int GetX11Display(lua_State *L)
    {
    void *what;
    CheckNativePfn(L, GetX11Display);
    what = glfw.GetX11Display();
    if(!what) return 0;
    lua_pushlightuserdata(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xcd85(%rip), %rax      # 0x1bfe8
movq 0x3f0(%rax), %rax
testq %rax, %rax
je 0xf288
callq *%rax
testq %rax, %rax
je 0xf29a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x54d0
movl $0x1, %eax
jmp 0xf29c
leaq 0x677c(%rip), %rsi      # 0x15a0b
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetX11Adapter
static int GetX11Adapter(lua_State *L)
    {
    unsigned long what;
    mon_t *mon = checkmonitor(L, 1);
    CheckNativePfn(L, GetX11Adapter);
    what = glfw.GetX11Adapter(mon->monitor);
//  if(!what) return 0;
    lua_pushinteger(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xcd35(%rip), %rcx      # 0x1bfe8
movq 0x3f8(%rcx), %rcx
testq %rcx, %rcx
je 0xf2d7
movq 0x28(%rax), %rdi
callq *%rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
leaq 0x6751(%rip), %rsi      # 0x15a2f
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetX11Monitor
static int GetX11Monitor(lua_State *L)
    {
    unsigned long what;
    mon_t *mon = checkmonitor(L, 1);
    CheckNativePfn(L, GetX11Monitor);
    what = glfw.GetX11Monitor(mon->monitor);
//  if(!what) return 0;
    lua_pushinteger(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x56e0
movq 0xccea(%rip), %rcx      # 0x1bfe8
movq 0x400(%rcx), %rcx
testq %rcx, %rcx
je 0xf322
movq 0x28(%rax), %rdi
callq *%rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
leaq 0x672a(%rip), %rsi      # 0x15a53
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetX11Window
static int GetX11Window(lua_State *L)
    {
    unsigned long what;
    win_t *win = checkwindow(L, 1);
    CheckNativePfn(L, GetX11Window);
    what = glfw.GetX11Window(win->window);
//  if(!what) return 0;
    lua_pushinteger(L, what);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq 0xcc9f(%rip), %rcx      # 0x1bfe8
movq 0x408(%rcx), %rcx
testq %rcx, %rcx
je 0xf36d
movq 0x28(%rax), %rdi
callq *%rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
leaq 0x6703(%rip), %rsi      # 0x15a77
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: SetX11SelectionString
static int SetX11SelectionString(lua_State *L)
    {
    const char *s = luaL_checkstring(L, 1);
    CheckNativePfn(L, SetX11SelectionString);
    glfw.SetX11SelectionString(s);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x5340
movq 0xcc52(%rip), %rcx      # 0x1bfe8
movq 0x468(%rcx), %rcx
testq %rcx, %rcx
je 0xf3ab
movq %rax, %rdi
callq *%rcx
xorl %eax, %eax
popq %rbx
retq
leaq 0x66e8(%rip), %rsi      # 0x15a9a
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/native.c
// Function: GetX11SelectionString
static int GetX11SelectionString(lua_State *L)
    {
    const char *s;
    CheckNativePfn(L, GetX11SelectionString);
    s = glfw.GetX11SelectionString();
    if(!s) return 0;
    lua_pushstring(L, s);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xcc20(%rip), %rax      # 0x1bfe8
movq 0x470(%rax), %rax
testq %rax, %rax
je 0xf3ed
callq *%rax
testq %rax, %rax
je 0xf3ff
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xf401
leaq 0x66d2(%rip), %rsi      # 0x15ac6
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
xorl %eax, %eax
popq %rbx
retq