LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: ScrollCallback
static void ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
    {
    BEGIN(Scroll);
    lua_pushnumber(L, xoffset);
    lua_pushnumber(L, yoffset);
    EXEC(2);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %r14
movq 0x14d7b(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14d7a(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x72ed
movq (%r15), %rdi
movslq 0x70(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x72ed
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
movsd (%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r15), %rdi
testl %eax, %eax
je 0x7313
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xaf5d(%rip), %rsi      # 0x12254
leaq 0xaf70(%rip), %rdx      # 0x1226e
movl $0x134, %ecx            # imm = 0x134
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: DropCallback
static void DropCallback(GLFWwindow *window, int count, const char** paths)
    {
    int i;
    BEGIN(Drop);
    for(i = 0; i<count; i++)
        lua_pushstring(L, paths[i]);
    EXEC(count);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq 0x14c9b(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14c99(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x73b1
movq (%r12), %rdi
movslq 0x74(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x73b1
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
xorl %r15d, %r15d
testl %ebp, %ebp
movl $0x0, %r13d
cmovgl %ebp, %r13d
movq (%r12), %rdi
cmpq %r15, %r13
je 0x73dd
movq (%r14,%r15,8), %rsi
callq 0x5690
incq %r15
jmp 0x739a
movq (%r12), %rdi
leaq 0xae98(%rip), %rsi      # 0x12254
leaq 0xaeab(%rip), %rdx      # 0x1226e
movl $0x140, %ecx            # imm = 0x140
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
incl %ebp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r12), %rdi
testl %eax, %eax
je 0x740b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/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 0x53e0
movl %eax, %edi
callq 0x5160
movq %rax, %r14
testq %rax, %rax
jne 0x7daf
leaq 0xa5f3(%rip), %rsi      # 0x12398
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55b0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x862b
movl %ebp, %edi
movq %rax, %rsi
callq 0x8644
testq %rax, %rax
je 0x8633
andl $0x0, (%rbx)
movl 0x44(%rax), %r14d
jmp 0x863c
movl $0x1, (%rbx)
jmp 0x863c
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8644
testq %rax, %rax
je 0x86d4
movl 0x44(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9ccf(%rip), %rsi      # 0x123aa
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_O2/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 0x8740
testq %rax, %rax
je 0x8722
movq 0x48(%rax), %rsi
movq %rbx, %rdi
callq 0x5690
pushq $0x1
popq %rax
popq %rbx
retq
leaq 0x9b2b(%rip), %rsi      # 0x12254
leaq 0x9c8d(%rip), %rdx      # 0x123bd
movq %rbx, %rdi
movl $0xc9, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 %rcx, 0x8(%rsp)
andl $0x0, (%rcx)
movq %rdi, %r12
andl $0x0, (%r8)
movl %edx, %esi
callq 0x5630
testl %eax, %eax
jle 0x88f5
movq %r12, %rdi
movl %ebp, %esi
callq 0x5630
cmpl $0x5, %eax
jne 0x88fe
movq %r12, %rdi
movl %ebp, %esi
callq 0x5650
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0x88f5
movslq %eax, %rsi
shlq $0x2, %rsi
movq %r12, %rdi
callq 0x5030
testq %rax, %rax
je 0x891a
movq %rax, %r13
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %r15
jge 0x8908
leaq 0x1(%r15), %rbx
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x5290
movq %r12, %rdi
movl 0x14(%rsp), %esi
pushq $-0x1
popq %rdx
movq %r14, %rcx
callq 0x5540
movl %eax, (%r13,%r15,4)
movq %r12, %rdi
pushq $-0x2
popq %rsi
callq 0x50d0
cmpl $0x0, (%r14)
movq %rbx, %r15
je 0x8897
movq %r12, %rdi
movq %r13, %rsi
callq 0x52f0
movq 0x8(%rsp), %rax
andl $0x0, (%rax)
jmp 0x8905
movl $0x1, (%r14)
jmp 0x8905
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
andl $0x0, (%rax)
movl $0xfffffffa, (%r14)     # imm = 0xFFFFFFFA
jmp 0x8905
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x5340
movq %rax, %r14
leaq 0x8789(%rip), %rsi      # 0x12ad3
movq %rax, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4de
leaq 0x99f8(%rip), %rsi      # 0x13d59
movq %r14, %rdi
callq 0x53c0
movl %ebp, %r15d
testl %eax, %eax
je 0xa4de
leaq 0x99b2(%rip), %rsi      # 0x13d2d
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4aa
leaq 0x8748(%rip), %rsi      # 0x12ada
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4ae
leaq 0x83c6(%rip), %rsi      # 0x1276f
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4b2
leaq 0x8535(%rip), %rsi      # 0x128f5
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4b6
leaq 0x870a(%rip), %rsi      # 0x12ae1
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4ba
leaq 0x840f(%rip), %rsi      # 0x127fd
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4be
leaq 0x86ec(%rip), %rsi      # 0x12af1
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4c2
leaq 0x86df(%rip), %rsi      # 0x12afb
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4c6
leaq 0x86d3(%rip), %rsi      # 0x12b06
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4ca
leaq 0x86c8(%rip), %rsi      # 0x12b12
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4ce
leaq 0x86c8(%rip), %rsi      # 0x12b25
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4d2
leaq 0x9f9d(%rip), %rsi      # 0x1440d
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4d6
leaq 0x86ab(%rip), %rsi      # 0x12b2e
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa4da
leaq 0x86a8(%rip), %rsi      # 0x12b3e
movq %r14, %rdi
callq 0x53c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xa4eb
pushq $0x11
jmp 0xa4dc
pushq $0x2
jmp 0xa4dc
pushq $0x3
jmp 0xa4dc
pushq $0x4
jmp 0xa4dc
pushq $0x5
jmp 0xa4dc
pushq $0x6
jmp 0xa4dc
pushq $0x7
jmp 0xa4dc
pushq $0x8
jmp 0xa4dc
pushq $0x9
jmp 0xa4dc
pushq $0xa
jmp 0xa4dc
pushq $0xb
jmp 0xa4dc
pushq $0xe
jmp 0xa4dc
pushq $0xf
jmp 0xa4dc
pushq $0x10
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5700
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x53e0
movq %rax, %r15
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x5450
movl %eax, %ebx
movq 0x102ce(%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_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r15
pushq $0x3
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x5450
movl %eax, %r14d
leal -0x20003(%r14), %eax
cmpl $0xa, %eax
ja 0xbf2a
movl $0x61d, %ecx            # imm = 0x61D
btl %eax, %ecx
jae 0xbf2a
movq 0x28(%r15), %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5070
movq 0x10103(%rip), %rcx     # 0x1bfe8
movq 0x320(%rcx), %rcx
testq %rcx, %rcx
je 0xbf04
movzbl %al, %edx
movq %r15, %rdi
movl %r14d, %esi
callq *%rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xbf50
leaq 0x7d8c(%rip), %rsi      # 0x13ca7
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x51e0
leaq 0x7d1c(%rip), %rsi      # 0x13c5a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
leaq 0x7d1a(%rip), %rsi      # 0x13c71
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rsi
callq 0x5630
pushq $0x2
popq %rsi
cmpl $0x4, %eax
jne 0xbfeb
movq %r14, %rdi
xorl %edx, %edx
callq 0x51e0
movq %rax, %r15
movq %rax, %rdi
callq 0x5220
leaq 0x7bf1(%rip), %rsi      # 0x13bb6
movq %r15, %rdi
movq %rax, %rdx
callq 0x50e0
testl %eax, %eax
je 0xbff8
leaq 0x7be6(%rip), %rdx      # 0x13bc1
pushq $0x2
popq %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5150
movq %r14, %rdi
callq 0x53e0
movq %rax, %rsi
jmp 0xbffb
pushq $-0x1
popq %rsi
movq 0xffe6(%rip), %rax      # 0x1bfe8
movl %ebx, %edi
callq *0x88(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
callq 0xc314
testq %rax, %rax
je 0xc312
movq %rax, %rbx
movq %rax, %rdi
callq 0xc331
movq %rbx, %rdi
popq %rbx
jmp 0x50b0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
leaq 0x1018f(%rip), %r14     # 0x1c890
xorl %ebx, %ebx
movq %r14, %rax
movq (%rax), %rax
testq %rax, %rax
je 0xc71c
cmpl $0x0, 0x20(%rax)
jg 0xc723
jns 0xc728
addq $0x8, %rax
jmp 0xc706
testq %rbx, %rbx
jne 0xc72b
jmp 0xc742
movq %rax, %rbx
jmp 0xc706
movq %rax, %rbx
movq %rbx, %rdi
callq 0xc331
movq %rbx, %rdi
callq 0x50b0
movq %r14, %rax
xorl %ebx, %ebx
jmp 0xc706
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r15
pushq $0x8
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x5450
movl %eax, %r14d
movq 0xf842(%rip), %rax      # 0x1bfe8
movq 0x28(%r15), %rdi
movl %r14d, %esi
callq *0x1b0(%rax)
leal -0x33002(%r14), %ecx
cmpl $0x4, %ecx
jae 0xc7d2
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xc7ea
pushq $0x9
popq %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x55e0
jmp 0xc7c9
leaq 0x5a63(%rip), %rsi      # 0x12254
leaq 0x76f4(%rip), %rdx      # 0x13eec
pushq $0x2f
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %rbx
pushq $0x8
popq %rsi
pushq $0x2
popq %rdx
movq %r15, %rdi
callq 0x5450
movl %eax, %r14d
leal -0x33002(%r14), %eax
cmpl $0x4, %eax
jae 0xc864
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x5070
movzbl %al, %edx
movq 0xf799(%rip), %rax      # 0x1bfe8
movq 0x28(%rbx), %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xc87f
pushq $0x9
popq %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x5450
movl %eax, %edx
jmp 0xc848
leaq 0x59ce(%rip), %rsi      # 0x12254
leaq 0x765f(%rip), %rdx      # 0x13eec
pushq $0x42
popq %rcx
movq %r15, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x5570
movq %rax, %r15
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %edx, %esi
callq 0x5450
movq 0xf6bc(%rip), %rcx      # 0x1bfe8
movq 0x28(%r15), %rdi
movl %eax, %esi
callq *0x1c8(%rcx)
cmpl $0x1, %eax
leaq 0x5a83(%rip), %rax      # 0x123c5
leaq 0x5a89(%rip), %rsi      # 0x123d2
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x5690
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xf67d(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0x1c0(%r14)
je 0xc99b
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5630
cmpl $0x4, %eax
jne 0xc9c1
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x5450
movl %eax, %edi
xorl %esi, %esi
jmp 0xc9e2
pushq $0x3
popq %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xca04
leaq 0x75de(%rip), %rsi      # 0x13f91
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x55b0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5750
testl %eax, %eax
je 0xca22
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x51d0
pushq $-0x1
popq %rdi
movl %eax, %esi
callq *0x1c0(%r14)
testq %rax, %rax
je 0xc9fb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
jmp 0xc9fd
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7555(%rip), %rsi      # 0x13f60
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x55b0
leaq 0x7589(%rip), %rdx      # 0x13fb2
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
callq 0x5450
movq 0xf59a(%rip), %rcx      # 0x1bfe8
movq 0x340(%rcx), %rcx
testq %rcx, %rcx
je 0xca6e
movl %eax, %edi
callq *%rcx
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5310
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xca90
leaq 0x7593(%rip), %rsi      # 0x14018
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x754c(%rip), %rsi      # 0x13fe3
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x5570
movq %rax, %r15
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5450
movq 0xf515(%rip), %rcx      # 0x1bfe8
movq 0x28(%r15), %rdi
movl %eax, %esi
callq *0x1d0(%rcx)
cmpl $0x1, %eax
leaq 0x58dc(%rip), %rax      # 0x123c5
leaq 0x58e2(%rip), %rsi      # 0x123d2
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x5690
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq 0xf4c9(%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
pushq $0x2
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5230
movsd %xmm0, (%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x5230
movaps %xmm0, %xmm1
movq 0xf453(%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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x53e0
movl %eax, 0x8(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x53e0
movl %eax, 0xc(%rsp)
pushq $0x3
popq %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x5340
movq %rax, 0x10(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x53e0
movq %rax, %r15
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x53e0
movq %rax, %r12
callq 0x5590
testq %rax, %rax
je 0xcc4f
movq %rax, %r14
movq 0xf3c9(%rip), %rax      # 0x1bfe8
leaq 0x8(%rsp), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq *0x1e8(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xcc47
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
jmp 0xcc62
movq %r14, %rdi
callq 0x5620
leaq 0x73e7(%rip), %rsi      # 0x1403d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55b0
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x5450
movl %eax, %ebp
callq 0x5590
testq %rax, %rax
je 0xccc6
movq %rax, %r14
movq 0xf34f(%rip), %rax      # 0x1bfe8
movl %ebp, %edi
callq *0x1f0(%rax)
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xccbe
movslq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x5310
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x5620
leaq 0x7370(%rip), %rsi      # 0x1403d
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x5250
movq 0xf2d4(%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_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xf2a2(%rip), %rax      # 0x1bfe8
callq *0x248(%rax)
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xf26b(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x250(%rax)
testq %rax, %rax
je 0xcdbe
movq %rax, %r14
movl 0xc(%rsp), %esi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jge 0xcdc0
cvtss2sd (%r14,%r15,4), %xmm0
movq %rbx, %rdi
callq 0x5460
incq %r15
jmp 0xcda1
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xf1fc(%rip), %rax      # 0x1bfe8
leaq 0xc(%rsp), %rsi
callq *0x258(%rax)
testq %rax, %rax
je 0xce42
movq %rax, %r14
movl 0xc(%rsp), %esi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
leaq 0x55ae(%rip), %r12      # 0x123c5
leaq 0x55b4(%rip), %r13      # 0x123d2
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jge 0xce44
cmpb $0x1, (%r14,%r15)
movq %r12, %rsi
je 0xce35
movq %r13, %rsi
movq %rbx, %rdi
callq 0x5690
incq %r15
jmp 0xce1e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
movq 0xf17b(%rip), %rcx      # 0x1bfe8
movq 0x348(%rcx), %rcx
testq %rcx, %rcx
je 0xceb9
decl %eax
leaq 0xc(%rsp), %rsi
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xcee3
movq %rax, %r14
movl 0xc(%rsp), %esi
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54a0
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jge 0xcee5
movzbl (%r14,%r15), %esi
movq %rbx, %rdi
callq 0x51a0
incq %r15
jmp 0xce9d
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xceef
leaq 0x71b8(%rip), %rsi      # 0x14088
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 0x715c(%rip), %rsi      # 0x14052
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x53e0
leal -0x1(%rax), %edi
movq 0xf0bd(%rip), %rax      # 0x1bfe8
callq *0x260(%rax)
testq %rax, %rax
leaq 0x7173(%rip), %rsi      # 0x140ae
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x5690
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x53e0
movq 0xf081(%rip), %rcx      # 0x1bfe8
movq 0x350(%rcx), %rcx
testq %rcx, %rcx
je 0xcf8b
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xcfb2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
jmp 0xcfb4
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xcfbd
leaq 0x7146(%rip), %rsi      # 0x140e8
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x55b0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x70ee(%rip), %rsi      # 0x140b2
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
movq 0xeff9(%rip), %rcx      # 0x1bfe8
movq 0x368(%rcx), %rcx
testq %rcx, %rcx
je 0xd010
decl %eax
movl %eax, %edi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd032
leaq 0x711f(%rip), %rsi      # 0x14146
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x70d5(%rip), %rsi      # 0x1410e
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x5340
movq 0xef87(%rip), %rcx      # 0x1bfe8
movq 0x370(%rcx), %rcx
testq %rcx, %rcx
je 0xd081
movq %rax, %rdi
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd0a3
leaq 0x7112(%rip), %rsi      # 0x141aa
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x70c4(%rip), %rsi      # 0x1416e
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x53e0
movq 0xef14(%rip), %rcx      # 0x1bfe8
movq 0x378(%rcx), %rcx
testq %rcx, %rcx
je 0xd0f8
decl %eax
movl %eax, %edi
callq *%rcx
testq %rax, %rax
je 0xd11f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
jmp 0xd121
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd12a
leaq 0x70fc(%rip), %rsi      # 0x1420b
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x55b0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x70a5(%rip), %rsi      # 0x141d6
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x53e0
movq 0xee86(%rip), %rcx      # 0x1bfe8
movq 0x380(%rcx), %rcx
testq %rcx, %rcx
je 0xd199
decl %eax
movq %rsp, %rsi
movl %eax, %edi
callq *%rcx
testl %eax, %eax
je 0xd1c1
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5100
pushq $0x2
popq %rax
jmp 0xd1c3
pushq $0x3
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd1cb
leaq 0x70b6(%rip), %rsi      # 0x14266
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 0x705e(%rip), %rsi      # 0x14230
pushq $0x3
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x5570
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5340
movq 0xedd7(%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_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x5570
movq 0xeda9(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x278(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xed48(%rip), %rax      # 0x1bfe8
movq 0x298(%rax), %rax
testq %rax, %rax
je 0xd2be
callq *%rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x3
popq %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd2e1
leaq 0x6fee(%rip), %rsi      # 0x142c4
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x6fa4(%rip), %rsi      # 0x1428c
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 0xecdb(%rip), %r14      # 0x1bfe8
movq 0x290(%r14), %rax
testq %rax, %rax
je 0xd385
callq *%rax
movq %rax, %xmm0
punpckldq 0x69a8(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x69b0(%rip), %xmm0     # 0x13ce0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
callq *0x298(%r14)
movq %rax, %xmm0
punpckldq 0x697b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x6983(%rip), %xmm0     # 0x13ce0
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
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
pushq $0x3
popq %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd3ae
leaq 0x6f83(%rip), %rsi      # 0x14320
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x55b0
leaq 0x6f37(%rip), %rsi      # 0x142ec
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O2/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 0xec0e(%rip), %rax      # 0x1bfe8
movq 0x290(%rax), %rax
testq %rax, %rax
je 0xd3f8
callq *%rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5310
pushq $0x1
popq %rax
popq %rbx
retq
pushq $0x3
popq %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd41b
leaq 0x6f10(%rip), %rsi      # 0x14320
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x6eca(%rip), %rsi      # 0x142ec
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xeb3d(%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 0x6ecc(%rip), %rsi      # 0x14392
movq %rbx, %rdi
callq 0x5690
leaq 0x6eaa(%rip), %rsi      # 0x1437f
movq %rbx, %rdi
callq 0x5690
pushq $-0x3
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5470
leaq 0x6e9c(%rip), %rsi      # 0x1438d
movq %rbx, %rdi
callq 0x5690
movq 0xeae8(%rip), %r13      # 0x1bfe8
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x10(%r13)
movl (%r15), %edx
movl (%r12), %ecx
movl (%r14), %r8d
leaq 0x6e6e(%rip), %rsi      # 0x1439b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
movl %ebp, %esi
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, 0xf338(%rip)      # 0x1c898
cmpl $0xc00fff, %eax         # imm = 0xC00FFF
jg 0xd586
leaq 0x6e3b(%rip), %rsi      # 0x143a9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5370
movq %rbx, %rdi
callq 0x5580
movl 0xf312(%rip), %eax      # 0x1c898
cmpl $0xc03000, %eax         # imm = 0xC03000
jl 0xd59b
movl $0x50001, %edi          # imm = 0x50001
xorl %esi, %esi
callq *0x2c8(%r13)
movq %rbx, %rdi
callq 0xd612
leaq 0xda(%rip), %rdi        # 0xd684
callq 0x11840
leaq 0xe2da(%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 0x5760
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
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xf284(%rip)      # 0x1c8a8
jne 0xd678
movq %rdi, %r14
movq 0xe9b8(%rip), %r15      # 0x1bfe8
callq *(%r15)
cmpl $0x1, %eax
jne 0xd64c
movq 0xe9b9(%rip), %rdi      # 0x1bff8
callq *0x20(%r15)
movb $0x1, 0xf25e(%rip)      # 0x1c8a8
jmp 0xd678
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq *0x2d0(%r15)
movq (%rbx), %rax
testq %rax, %rax
leaq 0x6d80(%rip), %rsi      # 0x143e8
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_O2/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 0xe94c(%rip), %rbx      # 0x1bfd8
cmpq $0x0, (%rbx)
je 0xd6d1
callq 0x5330
callq 0x5140
callq 0x5600
callq 0x50c0
cmpb $0x1, 0xf1fb(%rip)      # 0x1c8a8
jne 0xd6c0
movq 0xe932(%rip), %rax      # 0x1bfe8
callq *0x8(%rax)
movb $0x0, 0xf1e8(%rip)      # 0x1c8a8
movq (%rbx), %rdi
callq 0x5050
callq 0x52a0
andq $0x0, (%rbx)
popq %rbx
retq