LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/callbacks.c
// Function: MonitorCallback
static void MonitorCallback(GLFWmonitor *monitor, int event)
    {
    BEGIN(Monitor);
    lua_pushinteger(L, MonitorId(monitor));
    lua_pushstring(L, event==GLFW_CONNECTED ? "connected" : "disconnected");
    EXEC(2);
    /* always call the default callback: */
    monitorCallback(monitor, event);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x14aea(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebp
movq (%r13), %rdi
movslq 0x14ea8(%rip), %rdx     # 0x1c3ac
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r13), %r15
cmpl $0x6, %eax
jne 0x753a
xorl %edi, %edi
callq 0x5180
movq $-0x1, %r12
testq %rax, %rax
je 0x7569
cmpq %r14, 0x28(%rax)
je 0x7565
movq %rax, %rdi
callq 0x51c0
jmp 0x7525
leaq 0xbd13(%rip), %rsi      # 0x13254
leaq 0xbd26(%rip), %rdx      # 0x1326e
movq %r15, %rdi
movl $0x55, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movslq 0x20(%rax), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x5310
movq (%r13), %rdi
cmpl $0x40001, %ebx          # imm = 0x40001
leaq 0xbd5a(%rip), %rax      # 0x132df
leaq 0xbd50(%rip), %rsi      # 0x132dc
cmoveq %rax, %rsi
callq 0x5680
movq (%r13), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r13), %rdi
testl %eax, %eax
je 0x75c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movl %ebp, %esi
callq 0x50d0
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5740
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/callbacks.c
// Function: JoystickCallback
static void JoystickCallback(int jid, int event)
    {
    BEGIN(Joystick);
    PushJoystick(L, jid);
    lua_pushstring(L, event==GLFW_CONNECTED ? "connected" : "disconnected");
    EXEC(2);
   /* always call the default callback: */
    joystickCallback(jid, event);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movq 0x149dd(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x14da1(%rip), %rdx     # 0x1c3b0
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x7679
incl %r14d
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
cmpl $0x40001, %ebp          # imm = 0x40001
leaq 0xbca3(%rip), %rax      # 0x132df
leaq 0xbc99(%rip), %rsi      # 0x132dc
cmoveq %rax, %rsi
callq 0x5680
movq (%r15), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r15), %rdi
testl %eax, %eax
je 0x769d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5570
leaq 0xbbd4(%rip), %rsi      # 0x13254
leaq 0xbbe7(%rip), %rdx      # 0x1326e
movl $0x69, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/cur.c
// Function: moonglfw_cur_check
cur_t* cur_check(lua_State *L, int arg)
    {
    int id = luaL_checkinteger(L, arg);
    cur_t *cur = cur_search(id);
    if(!cur)
        luaL_error(L, "invalid cursor id");
    return cur;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x53d0
movq 0x1450c(%rip), %r14     # 0x1c3c0
testq %r14, %r14
je 0x7eca
cmpl %eax, 0x20(%r14)
jg 0x7ec5
jge 0x7ecd
addq $0x8, %r14
movq (%r14), %r14
jmp 0x7eb4
xorl %r14d, %r14d
testq %r14, %r14
jne 0x7ee3
leaq 0xb4bf(%rip), %rsi      # 0x13398
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55a0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_test
int enums_test(lua_State *L, int domain, int arg, int *err)
    {
    rec_t *rec;
    const char *s = luaL_optstring(L, arg, NULL);

    if(!s)
        { *err = ERR_NOTPRESENT; return 0; }

    rec = str_search(domain, s);
    if(!rec)
        { *err = ERR_VALUE; return 0; }
    
    *err = ERR_SUCCESS;
    return rec->code;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
xorl %r14d, %r14d
movl %edx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
testq %rax, %rax
je 0x87a2
movl %ebp, %edi
movq %rax, %rsi
callq 0x87bb
testq %rax, %rax
je 0x87aa
movl $0x0, (%rbx)
movl 0x44(%rax), %r14d
jmp 0x87b3
movl $0x1, (%rbx)
jmp 0x87b3
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_check
int enums_check(lua_State *L, int domain, int arg)
    {
    rec_t *rec;
    const char *s = luaL_checkstring(L, arg);

    rec = str_search(domain, s);
    if(!rec)
        return luaL_argerror(L, arg, badvalue(L, s));
    
    return rec->code;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %esi
xorl %edx, %edx
callq 0x5340
movq %rax, %r15
movl %ebp, %edi
movq %rax, %rsi
callq 0x87bb
testq %rax, %rax
je 0x8858
movl 0x44(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xab4b(%rip), %rsi      # 0x133aa
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5370
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_push
int enums_push(lua_State *L, int domain, int code)
    {
    rec_t *rec = code_search(domain, code);

    if(!rec)
        return unexpected(L);

    lua_pushstring(L, rec->str);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
movl %edx, %esi
callq 0x88c6
testq %rax, %rax
je 0x88a8
movq 0x48(%rax), %rsi
movq %rbx, %rdi
callq 0x5680
movl $0x1, %eax
popq %rbx
retq
leaq 0xa9a5(%rip), %rsi      # 0x13254
leaq 0xab07(%rip), %rdx      # 0x133bd
movq %rbx, %rdi
movl $0xc9, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_checklist
int* enums_checklist(lua_State *L, int domain, int arg, int *count, int *err)
    {
    int* list;
    int i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_NOTPRESENT; return NULL; }

    list = (int*)MallocNoErr(L, sizeof(int) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        list[i] = enums_test(L, domain, -1, err);
        lua_pop(L, 1);
        if(*err)
            { Free(L, list); *count = 0; return NULL; }
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %edx, %ebp
movl %esi, 0x14(%rsp)
movq %rdi, %r15
xorl %eax, %eax
movq %rcx, 0x8(%rsp)
movl %eax, (%rcx)
movl %eax, (%r8)
movl %edx, %esi
callq 0x5620
testl %eax, %eax
jle 0x8a76
movq %r15, %rdi
movl %ebp, %esi
callq 0x5620
cmpl $0x5, %eax
jne 0x8a7f
movq %r15, %rdi
movl %ebp, %esi
callq 0x5640
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0x8a76
movslq %eax, %rsi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x5030
testq %rax, %rax
je 0x8a9b
movq %rax, %r13
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %r12
jge 0x8a89
leaq 0x1(%r12), %rbx
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x5290
movq %r15, %rdi
movl 0x14(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rcx
callq 0x5530
movl %eax, (%r13,%r12,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x50d0
cmpl $0x0, (%r14)
movq %rbx, %r12
je 0x8a10
movq %r15, %rdi
movq %r13, %rsi
callq 0x52f0
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
jmp 0x8a86
movl $0x1, (%r14)
jmp 0x8a86
movl $0xfffffffc, (%r14)     # imm = 0xFFFFFFFC
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl $0xfffffffa, (%r14)     # imm = 0xFFFFFFFA
jmp 0x8a86
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/enums.c
// Function: Enum
static int Enum(lua_State *L)
/* { strings } = glfw.enum('type') lists all the values for a given enum type */
    { 
    const char *s = luaL_checkstring(L, 1); 
#define CASE(xxx) if(strcmp(s, ""#xxx) == 0) return values##xxx(L)
    CASE(action);
    CASE(button);
    CASE(key);
    CASE(target);
    CASE(api);
    CASE(robustness);
    CASE(releasebehavior);
    CASE(profile);
    CASE(inputmode);
    CASE(cursormode);
    CASE(cursorshape);
    CASE(contextcreationapi);
//  CASE(gamepadbutton);
//  CASE(gamepadaxis);
    CASE(inithint);
    CASE(platform);
    CASE(waylandlibdecor);
    CASE(angleplatformtype);
#undef CASE
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x1, %esi
xorl %edx, %edx
callq 0x5340
movq %rax, %r14
leaq 0x9346(%rip), %rsi      # 0x13ad3
movq %rax, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa966
leaq 0xa5b5(%rip), %rsi      # 0x14d59
movq %r14, %rdi
callq 0x53b0
movl $0x1, %r15d
testl %eax, %eax
je 0xa966
leaq 0xa56c(%rip), %rsi      # 0x14d2d
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa900
leaq 0x9302(%rip), %rsi      # 0x13ada
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa908
leaq 0x8f80(%rip), %rsi      # 0x1376f
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa910
leaq 0x90ef(%rip), %rsi      # 0x138f5
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa918
leaq 0x92c4(%rip), %rsi      # 0x13ae1
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa920
leaq 0x8fc9(%rip), %rsi      # 0x137fd
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa928
leaq 0x92a6(%rip), %rsi      # 0x13af1
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa930
leaq 0x9299(%rip), %rsi      # 0x13afb
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa938
leaq 0x928d(%rip), %rsi      # 0x13b06
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa940
leaq 0x9282(%rip), %rsi      # 0x13b12
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa948
leaq 0x927e(%rip), %rsi      # 0x13b25
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa950
leaq 0xab4f(%rip), %rsi      # 0x1540d
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa958
leaq 0x9259(%rip), %rsi      # 0x13b2e
movq %r14, %rdi
callq 0x53b0
testl %eax, %eax
je 0xa960
leaq 0x9256(%rip), %rsi      # 0x13b3e
movq %r14, %rdi
callq 0x53b0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xa976
movl $0x11, %r15d
jmp 0xa966
movl $0x2, %r15d
jmp 0xa966
movl $0x3, %r15d
jmp 0xa966
movl $0x4, %r15d
jmp 0xa966
movl $0x5, %r15d
jmp 0xa966
movl $0x6, %r15d
jmp 0xa966
movl $0x7, %r15d
jmp 0xa966
movl $0x8, %r15d
jmp 0xa966
movl $0x9, %r15d
jmp 0xa966
movl $0xa, %r15d
jmp 0xa966
movl $0xb, %r15d
jmp 0xa966
movl $0xe, %r15d
jmp 0xa966
movl $0xf, %r15d
jmp 0xa966
movl $0x10, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x56f0
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/hint.c
// Function: VersionHint
static int VersionHint(lua_State *L) /* NONGLFW */
    {
    int major = luaL_checkinteger(L, 1);
    int minor = luaL_checkinteger(L, 2);
    int profile = checkprofile(L, 3);
    glfw.WindowHint(GLFW_CONTEXT_VERSION_MAJOR, major);
    glfw.WindowHint(GLFW_CONTEXT_VERSION_MINOR, minor);
    glfw.WindowHint(GLFW_OPENGL_PROFILE, profile);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53d0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %r15
movq %rbx, %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x5440
movl %eax, %ebx
movq 0xfdf7(%rip), %r12      # 0x1bfe8
movl $0x22002, %edi          # imm = 0x22002
movl %r14d, %esi
callq *0x88(%r12)
movl $0x22003, %edi          # imm = 0x22003
movl %r15d, %esi
callq *0x88(%r12)
movl $0x22008, %edi          # imm = 0x22008
movl %ebx, %esi
callq *0x88(%r12)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/hint.c
// Function: SetWindowAttrib
static int SetWindowAttrib(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int attrib = checktarget(L, 2);
    switch(attrib)
        {
        case GLFW_RESIZABLE:
        case GLFW_DECORATED:
        case GLFW_FLOATING:
        case GLFW_AUTO_ICONIFY:
        case GLFW_FOCUS_ON_SHOW:
        case GLFW_MOUSE_PASSTHROUGH:
            return SetBoolean(L, win->window, attrib);
        default:
            return luaL_error(L, "invalid attribute '%s'", lua_tostring(L, 2));
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movl $0x2, %edx
callq 0x5440
movl %eax, %r14d
leal -0x20003(%r14), %eax
cmpl $0xa, %eax
ja 0xc458
movl $0x61d, %ecx            # imm = 0x61D
btl %eax, %ecx
jae 0xc458
movq 0x28(%r15), %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5070
movq 0xfbda(%rip), %rcx      # 0x1bfe8
movq 0x320(%rcx), %rcx
testq %rcx, %rcx
je 0xc42d
movzbl %al, %edx
movq %r15, %rdi
movl %r14d, %esi
callq *%rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xc480
leaq 0x885e(%rip), %rsi      # 0x14ca7
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x51e0
leaq 0x87ec(%rip), %rsi      # 0x14c5a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
leaq 0x87ea(%rip), %rsi      # 0x14c71
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/hint.c
// Function: Integer
static int Integer(lua_State *L, int target)
    {
    int hint = GLFW_DONT_CARE;
    const char *s;
    if(lua_type(L, 2) == LUA_TSTRING)
        {
        s = lua_tostring(L, 2);
        if(strncmp(s, "don't care", strlen(s)) != 0)
            return luaL_argerror(L, 2, "expected integer or \"don't care\"");
        }
    else
        {
        hint = luaL_checkinteger(L, 2);
#if 0
        if(hint < -1)
            return luaL_argerror(L, 2, "invalid value");
#endif
        }
    glfw.WindowHint( target, hint);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x2, %esi
callq 0x5620
cmpl $0x4, %eax
jne 0xc505
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x51e0
movq %rax, %r15
movq %rax, %rdi
callq 0x5220
leaq 0x86d9(%rip), %rsi      # 0x14bb6
movq %r15, %rdi
movq %rax, %rdx
callq 0x50e0
testl %eax, %eax
je 0xc517
leaq 0x86ce(%rip), %rdx      # 0x14bc1
movq %r14, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x5150
movq %r14, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %rsi
jmp 0xc51c
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq 0xfac5(%rip), %rax      # 0x1bfe8
movl %ebx, %edi
callq *0x88(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/id.c
// Function: moonglfw_id_free
void id_free(int key)
    {
    id_t* id = id_search(key);
    if(id)
        {
        id_remove(id);
        free(id);
        }
    }

// Assembly:
pushq %rbx
movq 0x10059(%rip), %rbx     # 0x1c878
testq %rbx, %rbx
je 0xc834
cmpl %edi, 0x20(%rbx)
jg 0xc82f
jge 0xc836
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0xc81f
xorl %ebx, %ebx
testq %rbx, %rbx
je 0xc84c
movq %rbx, %rdi
callq 0xc84e
movq %rbx, %rdi
popq %rbx
jmp 0x50b0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/id.c
// Function: moonglfw_id_free_all
void id_free_all(void)
    {
    id_t *id;
    while((id = id_first(0)))
        {
        id_remove(id);
        free(id);
        }
    }

// Assembly:
pushq %rbx
movq 0xfc4d(%rip), %rax      # 0x1c878
xorl %ebx, %ebx
testq %rax, %rax
je 0xcc4b
cmpl $0x0, 0x20(%rax)
jle 0xcc3d
movq %rax, %rbx
jmp 0xcc43
jns 0xcc48
addq $0x8, %rax
movq (%rax), %rax
jmp 0xcc2d
movq %rax, %rbx
testq %rbx, %rbx
je 0xcc62
movq %rbx, %rdi
callq 0xc84e
movq %rbx, %rdi
callq 0x50b0
jmp 0xcc24
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/input.c
// Function: GetInputMode
static int GetInputMode(lua_State *L)
    {
    int val;
    win_t *win = checkwindow(L, 1);
    int mode = checkinputmode(L, 2);
    val = glfw.GetInputMode(win->window,mode);
    switch(mode)
        {
        case GLFW_CURSOR:   pushcursormode(L, val); return 1;
        case GLFW_STICKY_KEYS:
        case GLFW_STICKY_MOUSE_BUTTONS:
        case GLFW_LOCK_KEY_MODS:
        case GLFW_RAW_MOUSE_MOTION:
                            lua_pushboolean(L, val); return 1;
        default:
            return unexpected(L);
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r15
movq %rbx, %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x5440
movl %eax, %r14d
movq 0xf324(%rip), %rax      # 0x1bfe8
movq 0x28(%r15), %rdi
movl %r14d, %esi
callq *0x1b0(%rax)
leal -0x33002(%r14), %ecx
cmpl $0x4, %ecx
jae 0xcce9
movq %rbx, %rdi
movl %eax, %esi
callq 0x5470
jmp 0xcd01
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xcd0c
movq %rbx, %rdi
movl $0x9, %esi
movl %eax, %edx
callq 0x55d0
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6541(%rip), %rsi      # 0x13254
leaq 0x81d2(%rip), %rdx      # 0x14eec
movq %rbx, %rdi
movl $0x2f, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/input.c
// Function: SetInputMode
static int SetInputMode(lua_State *L)
    {
    int value;
    win_t *win = checkwindow(L, 1);
    int mode = checkinputmode(L, 2);
    switch(mode)
        {
        case GLFW_CURSOR:   value = checkcursormode(L, 3); break;
        case GLFW_STICKY_KEYS:
        case GLFW_STICKY_MOUSE_BUTTONS:
        case GLFW_LOCK_KEY_MODS:
        case GLFW_RAW_MOUSE_MOTION:
                            value = checkboolean(L, 3); break;
        default:
            return unexpected(L);
        }
    glfw.SetInputMode(win->window, mode, value);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %esi
callq 0x5560
movq %rax, %rbx
movq %r15, %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x5440
movl %eax, %r14d
leal -0x33002(%r14), %eax
cmpl $0x4, %eax
jae 0xcd76
movq %r15, %rdi
movl $0x3, %esi
callq 0x5070
movzbl %al, %edx
jmp 0xcd93
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xcdaf
movq %r15, %rdi
movl $0x9, %esi
movl $0x3, %edx
callq 0x5440
movl %eax, %edx
movq 0xf24e(%rip), %rax      # 0x1bfe8
movq 0x28(%rbx), %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x649e(%rip), %rsi      # 0x13254
leaq 0x812f(%rip), %rdx      # 0x14eec
movq %r15, %rdi
movl $0x42, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/input.c
// Function: GetKey
static int GetKey(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int key = checkkey(L, 2);
    int state = glfw.GetKey(win->window, key);
    lua_pushstring(L, state==GLFW_PRESS ? "press" : "release");
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x2, %edx
callq 0x5440
movq 0xf17a(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %eax, %esi
callq *0x1c8(%rcx)
cmpl $0x1, %eax
leaq 0x6541(%rip), %rax      # 0x133c5
leaq 0x6547(%rip), %rsi      # 0x133d2
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x5680
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf136(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0x1c0(%r14)
je 0xcee6
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5620
movq %rbx, %rdi
cmpl $0x4, %eax
jne 0xcf13
movl $0x2, %esi
movl $0x1, %edx
callq 0x5440
movl %eax, %edi
xorl %esi, %esi
jmp 0xcf37
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xcf5f
leaq 0x808f(%rip), %rsi      # 0x14f91
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55a0
movl $0x1, %esi
callq 0x5720
testl %eax, %eax
je 0xcf84
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x51d0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %eax, %esi
callq *0x1c0(%r14)
testq %rax, %rax
je 0xcf55
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5680
movl $0x1, %eax
jmp 0xcf57
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7ffa(%rip), %rsi      # 0x14f60
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55a0
leaq 0x8027(%rip), %rdx      # 0x14fb2
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
movl $0x1, %edx
callq 0x5440
movq 0xf02f(%rip), %rcx      # 0x1bfe8
movq 0x340(%rcx), %rcx
testq %rcx, %rcx
je 0xcfdb
movl %eax, %edi
callq *%rcx
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd002
leaq 0x8021(%rip), %rsi      # 0x15018
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x7fda(%rip), %rsi      # 0x14fe3
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x5440
movq 0xef9a(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %eax, %esi
callq *0x1d0(%rcx)
cmpl $0x1, %eax
leaq 0x6361(%rip), %rax      # 0x133c5
leaq 0x6367(%rip), %rsi      # 0x133d2
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x5680
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5560
movq 0xef47(%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 0x5450
movsd (%r15), %xmm0
movq %rbx, %rdi
callq 0x5450
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5560
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 0xeec9(%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_O1/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 0x53d0
movl %eax, (%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
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 0x53d0
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
callq 0x53d0
movq %rax, %r12
callq 0x5580
testq %rax, %rax
je 0xd1e2
movq %rax, %r14
movq 0xee39(%rip), %rax      # 0x1bfe8
movq %rsp, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq *0x1e8(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xd1da
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
jmp 0xd1f3
movq %r14, %rdi
callq 0x5610
leaq 0x7e54(%rip), %rsi      # 0x1503d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5440
movl %eax, %ebp
callq 0x5580
testq %rax, %rax
je 0xd25a
movq %rax, %r14
movq 0xedbd(%rip), %rax      # 0x1bfe8
movl %ebp, %edi
callq *0x1f0(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xd252
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x5610
leaq 0x7ddc(%rip), %rsi      # 0x1503d
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5250
movq 0xed26(%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_O1/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 0x53d0
leal -0x1(%rax), %edi
movq 0xecf6(%rip), %rax      # 0x1bfe8
callq *0x248(%rax)
movq %rbx, %rdi
movl %eax, %esi
callq 0x5470
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
leal -0x1(%rax), %edi
movq 0xecbf(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x250(%rax)
testq %rax, %rax
je 0xd375
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5490
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd377
xorl %r15d, %r15d
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r15,4), %xmm0
movq %rbx, %rdi
callq 0x5450
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd355
jmp 0xd377
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
leal -0x1(%rax), %edi
movq 0xec43(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x258(%rax)
testq %rax, %rax
je 0xd403
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5490
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd405
xorl %r15d, %r15d
leaq 0x5fed(%rip), %r12      # 0x133c5
leaq 0x5ff3(%rip), %r13      # 0x133d2
cmpb $0x1, (%r14,%r15)
movq %r12, %rsi
je 0xd3ec
movq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd3df
jmp 0xd405
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
movq 0xebb8(%rip), %rcx      # 0x1bfe8
movq 0x348(%rcx), %rcx
testq %rcx, %rcx
je 0xd484
decl %eax
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd4b3
movq %rax, %r14
movl 0xc(%rsp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5490
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xd4b5
xorl %r15d, %r15d
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
callq 0x51a0
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0xd468
jmp 0xd4b5
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd4bf
leaq 0x7be8(%rip), %rsi      # 0x15088
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7b8c(%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 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
leal -0x1(%rax), %edi
movq 0xeaea(%rip), %rax      # 0x1bfe8
callq *0x260(%rax)
testq %rax, %rax
leaq 0x7ba0(%rip), %rsi      # 0x150ae
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x5680
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
movq 0xeab2(%rip), %rcx      # 0x1bfe8
movq 0x350(%rcx), %rcx
testq %rcx, %rcx
je 0xd55f
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd586
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5680
movl $0x1, %eax
jmp 0xd588
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd58a
leaq 0x7b6d(%rip), %rsi      # 0x150e8
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
xorl %eax, %eax
popq %rbx
retq
leaq 0x7b21(%rip), %rsi      # 0x150b2
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
movq 0xea2a(%rip), %rcx      # 0x1bfe8
movq 0x368(%rcx), %rcx
testq %rcx, %rcx
je 0xd5e1
decl %eax
movl %eax, %edi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5470
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd608
leaq 0x7b49(%rip), %rsi      # 0x15146
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x7aff(%rip), %rsi      # 0x1510e
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0xe9aa(%rip), %rcx      # 0x1bfe8
movq 0x370(%rcx), %rcx
testq %rcx, %rcx
je 0xd660
movq %rax, %rdi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5470
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd687
leaq 0x7b2e(%rip), %rsi      # 0x151aa
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x7ae0(%rip), %rsi      # 0x1516e
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
movq 0xe92d(%rip), %rcx      # 0x1bfe8
movq 0x378(%rcx), %rcx
testq %rcx, %rcx
je 0xd6e4
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd70b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5680
movl $0x1, %eax
jmp 0xd70d
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd70f
leaq 0x7b0b(%rip), %rsi      # 0x1520b
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
xorl %eax, %eax
popq %rbx
retq
leaq 0x7ac0(%rip), %rsi      # 0x151d6
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x53d0
movq 0xe89f(%rip), %rcx      # 0x1bfe8
movq 0x380(%rcx), %rcx
testq %rcx, %rcx
je 0xd782
decl %eax
movq %rsp, %rsi
movl %eax, %edi
callq *%rcx
testl %eax, %eax
je 0xd7af
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5100
movl $0x2, %eax
jmp 0xd7b1
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd7b9
leaq 0x7ac8(%rip), %rsi      # 0x15266
movq %rbx, %rdi
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x55a0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x7a70(%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 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5340
movq 0xe7e0(%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_O1/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 0x5560
movq 0xe7b4(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x278(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5680
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe751(%rip), %rax      # 0x1bfe8
movq 0x298(%rax), %rax
testq %rax, %rax
je 0xd8b7
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 0x5690
testl %eax, %eax
je 0xd8de
leaq 0x79f1(%rip), %rsi      # 0x152c4
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x79a7(%rip), %rsi      # 0x1528c
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0xe6da(%rip), %r14      # 0x1bfe8
movq 0x290(%r14), %rax
testq %rax, %rax
je 0xd988
callq *%rax
movq %rax, %xmm0
punpckldq 0x73a7(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x73af(%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 0x737a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7382(%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 0x5450
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0xd9b5
leaq 0x797c(%rip), %rsi      # 0x15320
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x55a0
leaq 0x7930(%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 0x55a0
// File: /workspace/github_c_makefile_star2_O1/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 0xe603(%rip), %rax      # 0x1bfe8
movq 0x290(%rax), %rax
testq %rax, %rax
je 0xda05
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 0x5690
testl %eax, %eax
je 0xda2c
leaq 0x78ff(%rip), %rsi      # 0x15320
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x78b9(%rip), %rsi      # 0x152ec
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xe52a(%rip), %rax      # 0x1bfd8
movq %rdi, (%rax)
callq 0x5590
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
movq %rbx, %rdi
callq 0x5040
movq %rbx, %rdi
callq 0x5650
leaq 0x78b9(%rip), %rsi      # 0x15392
movq %rbx, %rdi
callq 0x5680
leaq 0x7897(%rip), %rsi      # 0x1537f
movq %rbx, %rdi
callq 0x5680
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5460
leaq 0x7889(%rip), %rsi      # 0x1538d
movq %rbx, %rdi
callq 0x5680
movq 0xe4d5(%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 0x785b(%rip), %rsi      # 0x1539b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x5460
movl (%r15), %edx
movl %edx, %eax
shll $0x16, %eax
movl (%r12), %ecx
movl %ecx, %esi
shll $0xc, %esi
orl %eax, %esi
movl (%r14), %r8d
orl %r8d, %esi
movl %esi, 0xed0a(%rip)      # 0x1c880
cmpl $0xc00fff, %esi         # imm = 0xC00FFF
jg 0xdb97
leaq 0x7824(%rip), %rsi      # 0x153a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
callq 0x5570
cmpl $0xc03000, 0xecdf(%rip) # imm = 0xC03000
jl 0xdbb1
movl $0x50001, %edi          # imm = 0x50001
xorl %esi, %esi
callq *0x2c8(%r13)
movq %rbx, %rdi
callq 0xdc29
leaq 0xdb(%rip), %rdi        # 0xdc9b
callq 0x12180
leaq 0xdcc4(%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 0x5730
movq %rbx, %rdi
callq 0x5410
movq %rbx, %rdi
callq 0x54f0
movq %rbx, %rdi
callq 0x5390
movq %rbx, %rdi
callq 0x50a0
movq %rbx, %rdi
callq 0x56b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0xec55(%rip)      # 0x1c890
jne 0xdc8f
movq %rdi, %r14
movq 0xe3a1(%rip), %r15      # 0x1bfe8
callq *(%r15)
cmpl $0x1, %eax
jne 0xdc63
movq 0xe3a2(%rip), %rdi      # 0x1bff8
callq *0x20(%r15)
movb $0x1, 0xec2f(%rip)      # 0x1c890
jmp 0xdc8f
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq *0x2d0(%r15)
movq (%rbx), %rax
testq %rax, %rax
leaq 0x7769(%rip), %rsi      # 0x153e8
cmovneq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x55a0
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe335(%rip), %rbx      # 0x1bfd8
cmpq $0x0, (%rbx)
je 0xdceb
callq 0x5330
callq 0x5140
callq 0x55f0
callq 0x50c0
cmpb $0x1, 0xebcc(%rip)      # 0x1c890
jne 0xdcd7
movq 0xe31b(%rip), %rax      # 0x1bfe8
callq *0x8(%rax)
movb $0x0, 0xebb9(%rip)      # 0x1c890
movq (%rbx), %rdi
callq 0x5050
callq 0x52a0
movq $0x0, (%rbx)
popq %rbx
retq