LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/perfragment.c
// Function: BlendColor
static int BlendColor(lua_State *L)
    {
    GLfloat r = luaL_checknumber(L, 1);
    GLfloat g = luaL_checknumber(L, 2);
    GLfloat b = luaL_checknumber(L, 3);
    GLfloat a = luaL_checknumber(L, 4);
    glBlendColor(r, g, b, a);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm3
movq 0x26203(%rip), %rax     # 0x559d8
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0x4(%rsp), %xmm2
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/perfragment.c
// Function: LogicOp
static int LogicOp(lua_State *L)
    {
    GLenum opcode = checklogicop(L, 1);
    glLogicOp(opcode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %edi
callq 0x117f0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pipeline.c
// Function: GetProgramPipeline
static int GetProgramPipeline(lua_State *L)
    {
#define INTEGER return GetInteger(L, pipeline, pname);
    GLuint pipeline = luaL_checkinteger(L, 1);
    GLenum pname = checkpipelinepname(L, 2);
    switch(pname)
        {
        case GL_ACTIVE_PROGRAM: INTEGER
        case GL_VALIDATE_STATUS: INTEGER
        case GL_VERTEX_SHADER: INTEGER
        case GL_GEOMETRY_SHADER: INTEGER
        case GL_FRAGMENT_SHADER: INTEGER
        case GL_COMPUTE_SHADER: INTEGER
        case GL_TESS_CONTROL_SHADER: INTEGER
        case GL_TESS_EVALUATION_SHADER: INTEGER
        case GL_INFO_LOG_LENGTH: INTEGER
        default: return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
#undef INTEGER
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
cmpl $0x91b9, %eax           # imm = 0x91B9
je 0x2fc27
cmpl $0x8b30, %eax           # imm = 0x8B30
je 0x2fc5b
cmpl $0x8b31, %eax           # imm = 0x8B31
je 0x2fc4e
cmpl $0x8b83, %eax           # imm = 0x8B83
je 0x2fc00
cmpl $0x8b84, %eax           # imm = 0x8B84
je 0x2fc1a
cmpl $0x8dd9, %eax           # imm = 0x8DD9
je 0x2fc41
cmpl $0x8e87, %eax           # imm = 0x8E87
je 0x2fc34
cmpl $0x8e88, %eax           # imm = 0x8E88
je 0x2fc0d
cmpl $0x8259, %eax           # imm = 0x8259
jne 0x2fc76
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8259, %edx           # imm = 0x8259
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b83, %edx           # imm = 0x8B83
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8e88, %edx           # imm = 0x8E88
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b84, %edx           # imm = 0x8B84
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x91b9, %edx           # imm = 0x91B9
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8e87, %edx           # imm = 0x8E87
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8dd9, %edx           # imm = 0x8DD9
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b31, %edx           # imm = 0x8B31
jmp 0x2fc66
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b30, %edx           # imm = 0x8B30
callq 0x2fd2d
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xb608(%rip), %rsi      # 0x3b285
leaq 0x16eeb(%rip), %rdx     # 0x46b6f
pushq $0x75
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pipeline.c
// Function: GetProgramPipelineInfoLog
static int GetProgramPipelineInfoLog(lua_State *L)
    {
    char *buf;
    GLint bufsz;
    GLuint name = luaL_checkinteger(L, 1);

    glGetProgramPipelineiv(name, GL_INFO_LOG_LENGTH, &bufsz);
    CheckError(L);
    if(bufsz==0) return 0;
    buf = (char*)Malloc(L, bufsz * sizeof(char));
    glGetProgramPipelineInfoLog(name, bufsz, NULL, buf);
    CheckErrorFree(L, buf);
    lua_pushstring(L, buf);
    Free(L, buf);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
movq 0x256d1(%rip), %rax     # 0x55388
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x2fd1d
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x2590c(%rip), %rax     # 0x555f8
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x2fd1f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pipeline.c
// Function: GetInteger
static int GetInteger(lua_State *L, GLuint pipeline, GLenum pname)
    {
    GLint params; 
    glGetProgramPipelineiv(pipeline, pname, &params);
    CheckError(L);
    lua_pushinteger(L, params); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2564d(%rip), %rax     # 0x55388
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: ReadBuffer
static int ReadBuffer(lua_State *L)
/* read_buffer(src)
 * read_buffer(framebuffer, src)
 */
    {
    GLuint framebuffer;
    GLenum src;
    if(lua_isstring(L, 1))
        {
        src = checkbuffer(L, 1);
        glReadBuffer(src);
        }
    else
        {
        framebuffer = luaL_checkinteger(L, 1);
        src = checkbuffer(L, 2);
        glNamedFramebufferReadBuffer(framebuffer, src);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x110b0
testl %eax, %eax
je 0x2fd9c
pushq $0x4f
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %edi
callq 0x11210
jmp 0x2fdc6
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x4f
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movq 0x25819(%rip), %rcx     # 0x555d8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: ReadPixels
static int ReadPixels(lua_State *L)
    {
    GLint x = luaL_checkinteger(L, 1);
    GLint y = luaL_checkinteger(L, 2);
    GLsizei width = luaL_checkinteger(L, 3);
    GLsizei height = luaL_checkinteger(L, 4);
    GLenum format = checkformat(L, 5);
    GLenum type = checktype(L, 6);
    GLsizei bufsz = width*height*sizeoftype(L, type);
    void *data = Malloc(L, bufsz);
#if 0 /* #ifdef GL_VERSION_4_5 */
    glReadnPixels(x, y, width, height, format, type, bufsz, data);
#else
    glReadPixels(x, y, width, height, format, type, data);
#endif
    CheckErrorFree(L, data);
    lua_pushlstring(L, (char*)data, bufsz);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, 0x20(%rsp)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, 0x18(%rsp)
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %rbp
pushq $0x12
popq %rsi
pushq $0x5
popq %rdx
movq %r14, %rdi
callq 0x11150
movl %eax, 0x14(%rsp)
pushq $0x7
popq %rsi
pushq $0x6
popq %rdx
movq %r14, %rdi
callq 0x11150
movl %eax, %r15d
movq %r14, %rdi
movl %eax, %esi
callq 0x115f0
movl %r13d, %ecx
imull %ebp, %ecx
imull %ecx, %eax
movslq %eax, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %rbx
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl %r13d, %edx
movl %ebp, %ecx
movl 0x14(%rsp), %r8d
movl %r15d, %r9d
callq 0x113d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11540
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x11ab0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11360
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: ClampColor
static int ClampColor(lua_State *L)
    {
    GLenum clamp;
    GLenum target = checkclamptarget(L, 1);
    if(lua_isboolean(L, 2))
        clamp = lua_toboolean(L, 2) ? GL_TRUE : GL_FALSE;
    else
        clamp = checkclamp(L, 2);
    glClampColor(target, clamp);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x30
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11850
cmpl $0x1, %eax
jne 0x2fef7
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11700
xorl %esi, %esi
testl %eax, %eax
setne %sil
jmp 0x2ff07
pushq $0x31
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %esi
movq 0x25d2a(%rip), %rax     # 0x55c38
movl %ebp, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: CopyImageSubData
static int CopyImageSubData(lua_State *L)
    {
    int arg = 1;
    GLuint srcName = luaL_checkinteger(L, arg++);
    GLenum srcTarget = checkimagetarget(L, arg++);
    GLint srcLevel = luaL_checkinteger(L, arg++);
    GLint srcX = luaL_checkinteger(L, arg++);
    GLint srcY = luaL_checkinteger(L, arg++);
    GLint srcZ = luaL_checkinteger(L, arg++);
    GLuint dstName = luaL_checkinteger(L, arg++);
    GLenum dstTarget = checkimagetarget(L, arg++);
    GLint dstLevel = luaL_checkinteger(L, arg++);
    GLint dstX = luaL_checkinteger(L, arg++);
    GLint dstY = luaL_checkinteger(L, arg++);
    GLint dstZ = luaL_checkinteger(L, arg++);
    GLsizei srcWidth = luaL_checkinteger(L, arg++);
    GLsizei srcHeight = luaL_checkinteger(L, arg++);
    GLsizei srcDepth = luaL_checkinteger(L, arg++);
    glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, 
                        dstName, dstTarget, dstLevel, dstX, dstY, dstZ, 
                            srcWidth, srcHeight, srcDepth);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, 0x40(%rsp)
pushq $0x32
popq %rbp
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11150
movl %eax, 0x4(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x38(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x28(%rsp)
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x20(%rsp)
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x10(%rsp)
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x30(%rsp)
pushq $0x8
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11150
movq %rax, 0x18(%rsp)
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x8(%rsp)
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0xc
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %rbp
pushq $0xd
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0xf
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x2571b(%rip), %r10     # 0x558e0
subq $0x8, %rsp
movq 0x48(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x40(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r9
pushq %rax
pushq %r12
pushq %r15
pushq %rbp
pushq %r14
pushq %r13
pushq 0x40(%rsp)
pushq 0x58(%rsp)
pushq 0x78(%rsp)
callq *(%r10)
addq $0x50, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: PixelStore
static int PixelStore(lua_State *L)
    {
    GLenum pname = checkpixelstorepname(L, 1);
    switch(pname)
        {
        case GL_UNPACK_SWAP_BYTES: 
        case GL_UNPACK_LSB_FIRST: return StoreBoolean(L, pname, 2);
        case GL_UNPACK_ROW_LENGTH: 
        case GL_UNPACK_SKIP_ROWS: 
        case GL_UNPACK_SKIP_PIXELS: 
        case GL_UNPACK_ALIGNMENT:
        case GL_UNPACK_IMAGE_HEIGHT:
        case GL_UNPACK_SKIP_IMAGES: 
        case GL_UNPACK_COMPRESSED_BLOCK_WIDTH: 
        case GL_UNPACK_COMPRESSED_BLOCK_HEIGHT: 
        case GL_UNPACK_COMPRESSED_BLOCK_DEPTH: 
        case GL_UNPACK_COMPRESSED_BLOCK_SIZE: return StoreInt(L, pname, 2);
        case GL_PACK_SWAP_BYTES: 
        case GL_PACK_LSB_FIRST: return StoreBoolean(L, pname, 2);
        case GL_PACK_ROW_LENGTH: 
        case GL_PACK_SKIP_ROWS: 
        case GL_PACK_SKIP_PIXELS: 
        case GL_PACK_ALIGNMENT:
        case GL_PACK_IMAGE_HEIGHT: 
        case GL_PACK_SKIP_IMAGES: 
        case GL_PACK_COMPRESSED_BLOCK_WIDTH: 
        case GL_PACK_COMPRESSED_BLOCK_HEIGHT: 
        case GL_PACK_COMPRESSED_BLOCK_DEPTH: 
        case GL_PACK_COMPRESSED_BLOCK_SIZE:     return StoreInt(L, pname, 2);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x33
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
leal -0xcf0(%rax), %ecx
cmpl $0x15, %ecx
ja 0x30250
leaq 0x1693f(%rip), %rdx     # 0x46b7c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
jmp 0x30285
leal -0x9127(%rax), %ecx
cmpl $0x4, %ecx
jb 0x3027e
leal -0x912b(%rax), %ecx
cmpl $0x4, %ecx
jb 0x3027e
leal -0x806b(%rax), %ecx
cmpl $0x2, %ecx
jb 0x3027e
movl %eax, %ecx
addl $0xffff7f93, %ecx       # imm = 0xFFFF7F93
cmpl $0x2, %ecx
jae 0x3028e
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x302ac
xorl %eax, %eax
popq %rbx
retq
leaq 0xaff0(%rip), %rsi      # 0x3b285
leaq 0x1698d(%rip), %rdx     # 0x46c29
movq %rbx, %rdi
movl $0xc3, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/pixel.c
// Function: Storei_
static int Storei_(lua_State *L, GLenum pname, int arg, int boolean)
    {
    GLint param;
    if(boolean)
        param = checkboolean(L, arg);
    else
        param = luaL_checkinteger(L, arg);
    glPixelStorei(pname, param);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x2
popq %rsi
testl %edx, %edx
je 0x302c5
callq 0x11500
movzbl %al, %esi
jmp 0x302cd
callq 0x11af0
movq %rax, %rsi
movl %ebp, %edi
callq 0x116c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x11870
nop
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetProgramInterface
static int GetProgramInterface(lua_State *L)
    {
    GLuint prog = luaL_checkinteger(L, 1);
    GLenum itf = checkinterface(L, 2);
    GLenum pname = checkinterfacepname(L, 3);
    switch(pname)
        {
        case GL_ACTIVE_RESOURCES: return GetInt(L, prog, itf, pname);
        case GL_MAX_NAME_LENGTH: return GetInt(L, prog, itf, pname);
        case GL_MAX_NUM_ACTIVE_VARIABLES: return GetInt(L, prog, itf, pname);
        case GL_MAX_NUM_COMPATIBLE_SUBROUTINES: return GetInt(L, prog, itf, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x40
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x41
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
addl $0xffff6d0b, %eax       # imm = 0xFFFF6D0B
cmpl $0x3, %eax
ja 0x30383
leaq 0x16901(%rip), %rcx     # 0x46c34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x92f5, %ecx           # imm = 0x92F5
jmp 0x30376
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x92f7, %ecx           # imm = 0x92F7
jmp 0x30376
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x92f8, %ecx           # imm = 0x92F8
jmp 0x30376
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x92f6, %ecx           # imm = 0x92F6
callq 0x309a4
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xaefb(%rip), %rsi      # 0x3b285
leaq 0x169f9(%rip), %rdx     # 0x46d8a
pushq $0x3f
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetProgramResourceIndex
static int GetProgramResourceIndex(lua_State *L)
    {
    GLuint prog = luaL_checkinteger(L, 1);
    GLenum itf = checkinterface(L, 2);
    const char *name = luaL_checkstring(L, 3);
    GLuint index = glGetProgramResourceIndex(prog, itf, name);
    CheckError(L);
    if(index == GL_INVALID_INDEX)
        { lua_pushfstring(L, "invalid name '%s'", name); return lua_error(L); }
    lua_pushinteger(L, index);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
pushq $0x40
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x25562(%rip), %rax     # 0x55940
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x3040f
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x160eb(%rip), %rsi     # 0x46501
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11630
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetProgramResourceName
static int GetProgramResourceName(lua_State *L)
    {
    GLsizei length;
    char *name;
    GLuint prog = luaL_checkinteger(L, 1);
    GLenum itf = checkinterface(L, 2);
    GLuint index = luaL_checkinteger(L, 3);
    GLsizei bufsz = GetMaxNameLength(L, prog, itf);
    name = (char*)Malloc(L, bufsz*sizeof(char));
    glGetProgramResourceName(prog, itf, index, bufsz, &length, name);
    CheckErrorFree(L, name);
    lua_pushstring(L, name);
    Free(L, name);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
pushq $0x40
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl $0x92f6, %ecx           # imm = 0x92F6
callq 0x309dd
movslq %eax, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %rbx
movq 0x25afa(%rip), %rax     # 0x55f90
leaq 0x4(%rsp), %r8
movl %r15d, %edi
movl %ebp, %esi
movl %r12d, %edx
movl %r13d, %ecx
movq %rbx, %r9
callq *(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11540
movq %r14, %rdi
movq %rbx, %rsi
callq 0x110c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11360
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetProgramResourceLocation
static int GetProgramResourceLocation(lua_State *L)
    {
    GLuint prog = luaL_checkinteger(L, 1);
    GLenum itf = checkinterface(L, 2);
    const char *name = luaL_checkstring(L, 3);
    GLint loc = glGetProgramResourceLocation(prog, itf, name);
    CheckError(L);
    lua_pushinteger(L, loc);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x40
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11440
movq 0x25464(%rip), %rcx     # 0x55d48
movl %r15d, %edi
movl %ebp, %esi
movq %rax, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %r14, %rdi
callq 0x11870
movslq %ebp, %rsi
movq %r14, %rdi
callq 0x113b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetInt
static int GetInt(lua_State *L, GLuint prog, GLenum itf, GLenum pname)
    {
    GLint param;    
    glGetProgramInterfaceiv(prog, itf, pname, &param);
    CheckError(L);
    lua_pushinteger(L, param);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x253e6(%rip), %rax     # 0x55d98
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movq %r14, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetPropInt
static int GetPropInt(lua_State *L, GLuint prog, GLenum itf, GLuint index, GLenum prop)
    {
    GLsizei length;
    GLint param;
    glGetProgramResourceiv(prog, itf, index, 1, &prop, 1, &length, &param);
    CheckError(L);
    lua_pushinteger(L, param);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x14(%rsp), %rax
movl %r8d, (%rax)
movq 0x24ce1(%rip), %r10     # 0x55708
leaq 0xc(%rsp), %r14
leaq 0x10(%rsp), %r11
pushq $0x1
popq %r9
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movl %r9d, %ecx
movq %rax, %r8
pushq %r14
pushq %r11
callq *(%r10)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/proginterface.c
// Function: GetPropBoolean
static int GetPropBoolean(lua_State *L, GLuint prog, GLenum itf, GLuint index, GLenum prop)
    {
    GLsizei length;
    GLint param;
    glGetProgramResourceiv(prog, itf, index, 1, &prop, 1, &length, &param);
    CheckError(L);
    lua_pushboolean(L, param);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x14(%rsp), %rax
movl %r8d, (%rax)
movq 0x24c88(%rip), %r10     # 0x55708
leaq 0xc(%rsp), %r14
leaq 0x10(%rsp), %r11
pushq $0x1
popq %r9
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movl %r9d, %ecx
movq %rax, %r8
pushq %r14
pushq %r11
callq *(%r10)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
movl (%r14), %esi
movq %rbx, %rdi
callq 0x117e0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: CreateProgram
static int CreateProgram(lua_State *L)
    {
    GLuint ref;
    check_init_called(L);
    ref = glCreateProgram();
    CheckError(L);
    object_new(L, OTYPE_PROGRAM, ref);
    lua_pushinteger(L, ref);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x115d0
movq 0x24f29(%rip), %rax     # 0x55a38
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
pushq $0x7
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x11a90
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: CreateShaderProgram
static int CreateShaderProgram(lua_State *L)
    {
    GLenum type = checkshadertype(L, 1);
    const GLchar *string = luaL_checkstring(L, 2);
    GLuint program;
    check_init_called(L);
    program = glCreateShaderProgramv(type, 1, &string);
    CheckError(L);
    object_new(L, OTYPE_PROGRAM, program);
    lua_pushinteger(L, program);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
movl %ebx, %edx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11440
movq %rsp, %r15
movq %rax, (%r15)
movq %r14, %rdi
callq 0x115d0
movq 0x247ba(%rip), %rax     # 0x55330
movl %ebp, %edi
movl %ebx, %esi
movq %r15, %rdx
callq *(%rax)
movl %eax, %ebp
movq %r14, %rdi
callq 0x11870
pushq $0x7
popq %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x11a90
movl %ebp, %esi
movq %r14, %rdi
callq 0x113b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetProgramInfoLog
static int GetProgramInfoLog(lua_State *L)
    {
    char *buf;
    GLint bufsz;
    GLuint program = luaL_checkinteger(L, 1);

    glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufsz);
    CheckError(L);
    if(bufsz==0) return 0;
    buf = (char*)Malloc(L, bufsz*sizeof(char));
    glGetProgramInfoLog(program, bufsz, NULL, buf);
    CheckErrorFree(L, buf);
    lua_pushstring(L, buf);
    Free(L, buf);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
movq 0x24f54(%rip), %rax     # 0x55d50
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x30e62
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x24ab7(%rip), %rax     # 0x558e8
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x30e64
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetAttachedShaders
static int GetAttachedShaders(lua_State *L)
    {
    GLuint *shaders;
    GLsizei i, count;
    GLuint program = luaL_checkinteger(L, 1);

    glGetProgramiv(program, GL_ATTACHED_SHADERS, &count);
    CheckError(L);
    if(count==0) return 0;
    shaders = (GLuint*)Malloc(L, count*sizeof(GLuint));
    glGetAttachedShaders(program, count, NULL, shaders);
    CheckErrorFree(L, shaders);
    for(i=0; i<count; i++)
        lua_pushinteger(L, shaders[i]);
    Free(L, shaders);
    return count;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
movq 0x24ec1(%rip), %rax     # 0x55d50
leaq 0x4(%rsp), %r14
movl %r15d, %edi
movl $0x8b85, %esi           # imm = 0x8B85
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
testq %rsi, %rsi
je 0x30f0f
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r14
movq 0x24559(%rip), %rax     # 0x55420
movl 0x4(%rsp), %esi
xorl %r12d, %r12d
movl %r15d, %edi
xorl %edx, %edx
movq %r14, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
movslq 0x4(%rsp), %rax
cmpq %rax, %r12
jge 0x30efe
movl (%r14,%r12,4), %esi
movq %rbx, %rdi
callq 0x113b0
incq %r12
jmp 0x30ee3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl 0x4(%rsp), %eax
jmp 0x30f11
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: ProgramParameter
static int ProgramParameter(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum pname = checkprogramparameterpname(L, 2);
    GLint value = checkboolean(L, 3);
    glProgramParameteri(program, pname, value);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x51
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11500
movzbl %al, %edx
movq 0x24a85(%rip), %rax     # 0x55d10
movl %r14d, %edi
movl %ebp, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetProgramBinary
static int GetProgramBinary(lua_State *L)
/* get_program_binary(program)
 * -> format, binary  (or nil)
 */
    {
    GLsizei length;
    GLenum format;
    void *binary;
    GLuint program = luaL_checkinteger(L, 1);
    GLsizei bufsz = programGet(L, program, GL_PROGRAM_BINARY_LENGTH);
    if(bufsz==0)
        return 0;   
    binary = Malloc(L, bufsz);
    glGetProgramBinary(program, bufsz, &length, &format, binary);
    CheckErrorFree(L, binary);
    if(length==0)
        return 0;
    lua_pushinteger(L, format);
    lua_pushlstring(L, (char*)binary, length);
    Free(L, binary);
    return 2;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl %r15d, %esi
movl $0x8741, %edx           # imm = 0x8741
callq 0x11840
xorl %ebp, %ebp
testl %eax, %eax
je 0x31339
movl %eax, %r12d
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r14
movq 0x242e8(%rip), %rax     # 0x555d0
leaq 0x4(%rsp), %r13
movq %rsp, %rcx
movl %r15d, %edi
movl %r12d, %esi
movq %r13, %rdx
movq %r14, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
cmpl $0x0, (%r13)
je 0x31339
movl (%rsp), %esi
movq %rbx, %rdi
callq 0x113b0
movslq 0x4(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11ab0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: ProgramBinary
static int ProgramBinary(lua_State *L)
/* program_binary(program, format, binary)
 */
    {
    size_t length;
    GLuint program = luaL_checkinteger(L, 1);
    GLenum format = luaL_checkinteger(L, 2);
    const void *binary = luaL_checklstring(L, 3, &length);
    glProgramBinary(program, format, binary, (GLsizei)length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x11440
movq 0x2492a(%rip), %r8      # 0x55cb0
movl (%r12), %ecx
movl %r14d, %edi
movl %r15d, %esi
movq %rax, %rdx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetInteger
static int GetInteger(lua_State *L, GLuint program, GLenum pname)
    {
    GLint params; 
    glGetProgramiv(program, pname, &params);
    CheckError(L);
    lua_pushinteger(L, params); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x24996(%rip), %rax     # 0x55d50
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/program.c
// Function: GetBoolean
static int GetBoolean(lua_State *L, GLuint program, GLenum pname)
    {
    GLint params; 
    glGetProgramiv(program, pname, &params);
    CheckError(L);
    lua_pushboolean(L, params == GL_TRUE); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2495f(%rip), %rax     # 0x55d50
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %esi, %esi
cmpl $0x1, (%r14)
sete %sil
movq %rbx, %rdi
callq 0x117e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: CreateQueries
IS_FUNC(Query)

static int CreateQueries(lua_State *L)
    {
    GLsizei i;
    GLuint* names;
    GLenum target = checkquerytarget(L, 1);
    GLsizei n = luaL_optinteger(L, 2, 1);
    check_init_called(L);
    luaL_checkstack(L, n, NULL);
    names = (GLuint*)Malloc(L, n*sizeof(GLuint));
    glCreateQueries(target, n, names);
    CheckErrorFree(L, names);
    for(i = 0; i < n; i++)
        {
        object_new(L, OTYPE_QUERY, names[i]);
        lua_pushinteger(L, names[i]);
        }
    Free(L, names);
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x48
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x11b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x115d0
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11250
movslq %r14d, %r12
leaq (,%r12,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r15
movq 0x23e5d(%rip), %rax     # 0x55408
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
testl %r12d, %r12d
movl $0x0, %r12d
cmovgl %r14d, %r12d
pushq $0xb
popq %rbp
cmpq %r13, %r12
je 0x315f4
movl (%r15,%r13,4), %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11a90
movl (%r15,%r13,4), %esi
movq %rbx, %rdi
callq 0x113b0
incq %r13
jmp 0x315d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: BeginQuery
static int BeginQuery(lua_State *L)
    {
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    GLuint name = luaL_checkinteger(L, 2);
    if(lua_isnoneornil(L, 3))
        glBeginQuery(target, name);
    else
        {
        index = luaL_checkinteger(L, 3);
        glBeginQueryIndexed(target, index, name);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x48
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x316e6
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x23f9d(%rip), %rcx     # 0x55678
movl %ebp, %edi
movl %eax, %esi
movl %r14d, %edx
callq *(%rcx)
jmp 0x316f4
movq 0x2468b(%rip), %rax     # 0x55d78
movl %ebp, %edi
movl %r14d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: EndQuery
static int EndQuery(lua_State *L)
    {
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    if(lua_isnoneornil(L, 2))
        glEndQuery(target);
    else
        {
        index = luaL_checkinteger(L, 2);
        glEndQueryIndexed(target, index);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x48
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x3173f
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x24811(%rip), %rcx     # 0x55f48
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x3174a
movq 0x240ca(%rip), %rax     # 0x55810
movl %ebp, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: QueryCounter
static int QueryCounter(lua_State *L)
    {
    GLuint name = luaL_checkinteger(L, 1);
    GLenum target = GL_TIMESTAMP; /* checkquerytarget(L, 2); only TIMESTAMP */
    glQueryCounter(name, target);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq 0x245d2(%rip), %rcx     # 0x55d40
movl %eax, %edi
movl $0x8e28, %esi           # imm = 0x8E28
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: GetTimestamp
static int GetTimestamp(lua_State *L)
    {
    GLint64 data;
    glGetInteger64v(GL_TIMESTAMP, &data);
    CheckError(L);
    lua_pushinteger(L, data);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x24077(%rip), %rax     # 0x55808
movq %rsp, %r14
movl $0x8e28, %edi           # imm = 0x8E28
movq %r14, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/query.c
// Function: GetQuery
static int GetQuery(lua_State *L)
    {
    int indexed = 0;
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    GLenum pname = checkquerypname(L, 2);
    if(!lua_isnoneornil(L, 3))
        {
        indexed = 1;
        index = luaL_checkinteger(L, 3);
        }
    switch(pname)
        {
        case GL_CURRENT_QUERY:
        case GL_QUERY_COUNTER_BITS:
            return GetInt(L, target, pname, indexed == 1 ? &index : NULL);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x48
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x49
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r14d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x31825
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movl %r14d, %ecx
andl $-0x2, %ecx
cmpl $0x8864, %ecx           # imm = 0x8864
jne 0x31866
movq 0x2442c(%rip), %r8      # 0x55c40
leaq 0xc(%rsp), %rcx
movl %ebp, %edi
movl %eax, %esi
movl %r14d, %edx
callq *(%r8)
jmp 0x31845
movl %r14d, %eax
andl $-0x2, %eax
cmpl $0x8864, %eax           # imm = 0x8864
jne 0x31866
movq 0x24067(%rip), %rax     # 0x558a0
leaq 0xc(%rsp), %rdx
movl %ebp, %edi
movl %r14d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x9a18(%rip), %rsi      # 0x3b285
leaq 0x156f9(%rip), %rdx     # 0x46f6d
movq %rbx, %rdi
movl $0x84, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/raster.c
// Function: PointParameter
static int PointParameter(lua_State *L)
    {
    GLenum pname = checkpointpname(L, 1);
    switch(pname)
        {
        case GL_POINT_FADE_THRESHOLD_SIZE: glPointParameterf(pname, luaL_checknumber(L, 2));
                                            break;
        case GL_POINT_SPRITE_COORD_ORIGIN: glPointParameteri(pname, checkorigin(L, 2)); 
                                            break;
        default: 
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x65
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
cmpl $0x8ca0, %eax           # imm = 0x8CA0
je 0x31912
cmpl $0x8128, %eax           # imm = 0x8128
jne 0x31946
movq 0x23aca(%rip), %rax     # 0x553c0
movq (%rax), %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movl $0x8128, %edi           # imm = 0x8128
callq *%r14
jmp 0x31934
movq 0x23d3f(%rip), %rax     # 0x55658
movq (%rax), %r14
pushq $0xb
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl $0x8ca0, %edi           # imm = 0x8CA0
movl %eax, %esi
callq *%r14
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x9938(%rip), %rsi      # 0x3b285
leaq 0x156b0(%rip), %rdx     # 0x47004
pushq $0x26
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/raster.c
// Function: CullFace
static int CullFace(lua_State *L)
    {
    GLenum mode = checkcullfacemode(L, 1);
    glCullFace(mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x63
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %edi
callq 0x116a0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/raster.c
// Function: FrontFace
static int FrontFace(lua_State *L)
    {
    GLenum mode = checkfrontfacemode(L, 1);
    glFrontFace(mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x62
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %edi
callq 0x11170
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/raster.c
// Function: PolygonMode
static int PolygonMode(lua_State *L)
    {
    GLenum face = checkpolygonmodeface(L, 1);
    GLenum mode = checkpolygonmodemode(L, 2);
    glPolygonMode(face, mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x60
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x61
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %ebp, %edi
movl %eax, %esi
callq 0x11600
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/renderbuffer.c
// Function: RenderbufferStorageMultisample
static int RenderbufferStorageMultisample(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLsizei samples = luaL_checkinteger(L, arg++);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(renderbuffer==0)
        glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
    else
        glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rdx
pushq $0xf
popq %rcx
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x11
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %ebp, %ebp
je 0x31ea4
movq 0x23d70(%rip), %r9      # 0x55c10
movl %ebp, %edi
jmp 0x31eaf
movq 0x23c6d(%rip), %r9      # 0x55b18
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/renderbuffer.c
// Function: RenderbufferStorage
static int RenderbufferStorage(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(renderbuffer==0)
        glRenderbufferStorage(target, internalformat, width, height);
    else
        glNamedRenderbufferStorage(renderbuffer, internalformat, width, height);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %rdx
pushq $0xf
popq %rcx
callq 0x11420
movl %eax, %ebp
pushq $0x11
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r14d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %ebp, %ebp
je 0x31f2a
movq 0x2388a(%rip), %r8      # 0x557b0
movl %ebp, %edi
jmp 0x31f35
movq 0x23827(%rip), %r8      # 0x55758
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/renderbuffer.c
// Function: GetRenderbufferParameter
static int GetRenderbufferParameter(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLenum pname = checkrenderbufferpname(L, arg++);
    switch(pname)
        {   
        case GL_RENDERBUFFER_WIDTH:
        case GL_RENDERBUFFER_HEIGHT:
        case GL_RENDERBUFFER_SAMPLES:
        case GL_RENDERBUFFER_RED_SIZE: 
        case GL_RENDERBUFFER_GREEN_SIZE: 
        case GL_RENDERBUFFER_BLUE_SIZE: 
        case GL_RENDERBUFFER_ALPHA_SIZE: 
        case GL_RENDERBUFFER_DEPTH_SIZE:
        case GL_RENDERBUFFER_STENCIL_SIZE: return GetInt(L, target, renderbuffer, pname);
        case GL_RENDERBUFFER_INTERNAL_FORMAT: 
            return GetInternalFormat(L, target, renderbuffer, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
leaq 0x4(%rsp), %rdx
pushq $0xf
popq %rcx
movl %ebp, %esi
callq 0x11420
movl %eax, %r14d
pushq $0x10
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
leal -0x8d42(%rax), %ecx
cmpl $0x13, %ecx
ja 0x32026
movl $0xfc003, %edx          # imm = 0xFC003
btl %ecx, %edx
jae 0x31fe0
testl %r14d, %r14d
movl 0x4(%rsp), %edi
cmovnel %r14d, %edi
movq 0x23462(%rip), %rcx     # 0x55410
cmoveq 0x23eaa(%rip), %rcx     # 0x55e60
leaq 0x8(%rsp), %r14
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x2, %ecx
jne 0x32026
testl %r14d, %r14d
movl 0x4(%rsp), %edi
cmovnel %r14d, %edi
movq 0x23419(%rip), %rax     # 0x55410
cmoveq 0x23e61(%rip), %rax     # 0x55e60
leaq 0xc(%rsp), %r14
movl $0x8d44, %esi           # imm = 0x8D44
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r14), %edx
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x11110
jmp 0x3204c
cmpl $0x8cab, %eax           # imm = 0x8CAB
je 0x31f9c
leaq 0x924d(%rip), %rsi      # 0x3b285
leaq 0x1508e(%rip), %rdx     # 0x470cd
pushq $0x6a
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
movl %eax, %ebp
jmp 0x31fd5
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sampler.c
// Function: NewSampler
static int NewSampler(lua_State *L)
    {
    GLuint sampler;
    GLuint unit = luaL_optinteger(L, 1, 0);
    check_init_called(L);
    glGenSamplers(1, &sampler);
    CheckError(L);
    object_new(L, OTYPE_SAMPLER, sampler);
    glBindSampler(unit, sampler);
    CheckError(L);
    lua_pushinteger(L, sampler);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x11b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x115d0
movq 0x238f2(%rip), %rax     # 0x55978
leaq 0x4(%rsp), %r15
movl %ebp, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11a90
movq 0x23391(%rip), %rax     # 0x55440
movl (%r15), %esi
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %esi
movq %rbx, %rdi
callq 0x113b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq