LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/debug.c
// Function: Callback
static void Callback(GLenum source, GLenum type, GLuint id, GLenum severity,
            GLsizei length, const GLchar *message, void *userParam)
    {
#define L ((lua_State*)userParam)
    /* Retrieve the callback */
    lua_getfield(L, LUA_REGISTRYINDEX, CALLBACK);
    /* push arguments */
    pushdebugsource(L, source);
    pushdebugtype(L, type);
    lua_pushinteger(L, id);
    pushdebugseverity(L, severity);
    lua_pushlstring(L, message, length);
    /* Execute the callback */
    lua_call(L, 5, 0);
#undef L
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movl %edi, %ebx
movq 0x40(%rsp), %r14
leaq 0x2bd1c(%rip), %rdx     # 0x3f41d
movq %r14, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x11080
movq %r14, %rdi
movl $0x58, %esi
movl %ebx, %edx
callq 0x11120
movq %r14, %rdi
movl $0x59, %esi
movl %r13d, %edx
callq 0x11120
movl %r12d, %esi
movq %r14, %rdi
callq 0x113c0
movq %r14, %rdi
movl $0x5a, %esi
movl %r15d, %edx
callq 0x11120
movslq %ebp, %rdx
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x11ab0
movq %r14, %rdi
movl $0x5, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11290
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawArrays
static int DrawArrays(lua_State *L)
/* draw_arrays(mode, first, count [, instancecount [, baseinstance]])
 */
    {
    GLsizei instancecount;
    GLuint baseinstance;
    GLenum mode = checkdrawmode(L, 1);
    GLint first = luaL_checkinteger(L, 2);
    GLsizei count = luaL_checkinteger(L, 3);
    if(lua_isnoneornil(L, 4))
        {
        glDrawArrays(mode, first, count);
        CheckError(L);
        return 0;
        }
    instancecount = luaL_checkinteger(L, 4);
    if(lua_isnoneornil(L, 5))
        {
        glDrawArraysInstanced(mode, first, count, instancecount);
        CheckError(L);
        return 0;
        }
    baseinstance = luaL_checkinteger(L, 5);
    glDrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11860
testl %eax, %eax
jle 0x13849
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11860
testl %eax, %eax
jle 0x13858
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x42fca(%rip), %r9      # 0x56800
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
jmp 0x1386c
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0x118f0
jmp 0x1386c
movq 0x42cd1(%rip), %rax     # 0x56530
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawArraysIndirect
static int DrawArraysIndirect(lua_State *L)
/* draw_arrays_indirect(mode, indirect)
 */
    {
    GLenum mode = checkdrawmode(L, 1);
    GLintptr indirect = luaL_checkinteger(L, 2);
    glDrawArraysIndirect(mode, (const void *)indirect);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x4333e(%rip), %rcx     # 0x56be8
movl %ebp, %edi
movq %rax, %rsi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawArrays
static int MultiDrawArrays(lua_State *L)
/* multi_draw_arrays(mode, first1, count1 [, first2, count2, ...]) */
    {
    GLsizei arg, i, drawcount;
    GLint *first;
    GLsizei *count;
    GLenum mode = checkdrawmode(L, 1);
    arg = 2;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    drawcount = arg - 2;
    if((arg<4) || (drawcount%2 != 0))
        return luaL_error(L, NARGS_ERROR);
    drawcount /= 2;
    first = (GLint*)Malloc2(L, drawcount*sizeof(GLint), (void**)&count, drawcount*sizeof(GLsizei));
    arg = 2;
    for(i=0; i < drawcount; i++)
        {
        first[i] = lua_tointeger(L, arg++);
        count[i] = lua_tointeger(L, arg++);
        }
    glMultiDrawArrays(mode, first, count, drawcount);
    Free(L, first); 
    Free(L, count); 
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movl $0x2, %r14d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x1391e
movl $0x2, %esi
leal 0x1(%rsi), %r14d
movq %rbx, %rdi
callq 0x11af0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11860
movl %r14d, %esi
testl %eax, %eax
jg 0x13900
cmpl $0x4, %r14d
setae %al
testb $0x1, %r14b
sete %cl
testb %cl, %al
je 0x139e7
movl %ebp, 0x14(%rsp)
addl $-0x2, %r14d
sarl %r14d
movslq %r14d, %r12
leaq (,%r12,4), %rcx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x11700
movq %rax, %r15
testl %r12d, %r12d
jle 0x1399e
movl %r14d, %r13d
addq %r13, %r13
xorl %r12d, %r12d
leaq 0x2(%r12), %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r15,%r12,2)
leal 0x1(%rbp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq 0x8(%rsp), %rcx
movl %eax, (%rcx,%r12,2)
movq %rbp, %r12
cmpq %rbp, %r13
jne 0x1396b
movq 0x42fab(%rip), %rax     # 0x56950
movq 0x8(%rsp), %rdx
movl 0x14(%rsp), %edi
movq %r15, %rsi
movl %r14d, %ecx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11370
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2bb90(%rip), %rsi     # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawArraysIndirect
static int MultiDrawArraysIndirect(lua_State *L)
/* multi_draw_arrays_indirect(mode, indirect, drawcount, stride)
 */
    {
    GLenum mode = checkdrawmode(L, 1);
    GLintptr indirect = luaL_checkinteger(L, 2);
    GLsizei drawcount = luaL_checkinteger(L, 3);
    GLsizei stride = luaL_checkinteger(L, 4);
    glMultiDrawArraysIndirect(mode, (const void *)indirect, drawcount, stride);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq 0x42943(%rip), %r8      # 0x56398
movl %ebp, %edi
movq %r14, %rsi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawArraysIndirectCount
static int MultiDrawArraysIndirectCount(lua_State *L) //GL_VERSION_4_6
    {
    GLenum mode = checkdrawmode(L, 1);
    GLintptr indirect = luaL_checkinteger(L, 2);
    GLintptr drawcount = luaL_checkinteger(L, 3);
    GLsizei maxdrawcount = luaL_checkinteger(L, 4);
    GLsizei stride = luaL_checkinteger(L, 5);
    glMultiDrawArraysIndirectCount(mode, (void*)indirect, drawcount, maxdrawcount, stride);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x42d01(%rip), %r9      # 0x567d8
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawElements
static int DrawElements(lua_State *L)
/* draw_elements(mode, count, type, indices [, instancecount [, baseinstance]])
 */
    {
    GLsizei instancecount;
    GLuint baseinstance;
    GLenum mode = checkdrawmode(L, 1);
    GLsizei count = luaL_checkinteger(L, 2);
    GLenum type = checkdrawtype(L, 3);
    GLintptr indices = luaL_checkinteger(L, 4);
    if(lua_isnoneornil(L, 5))
        {
        glDrawElements(mode, count, type, (const void*)indices);
        CheckError(L);
        return 0;
        }
    instancecount = luaL_checkinteger(L, 5);
    if(lua_isnoneornil(L, 6))
        {
        glDrawElementsInstanced(mode, count, type, (const void*)indices, instancecount);
        CheckError(L);
        return 0;
        }
    baseinstance = luaL_checkinteger(L, 6);
    glDrawElementsInstancedBaseInstance(mode, count, type, (const void*)indices, 
                            instancecount, baseinstance);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11860
testl %eax, %eax
jle 0x13bab
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11860
testl %eax, %eax
jle 0x13bbd
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq 0x42a5b(%rip), %r10     # 0x565f0
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x13bd4
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
callq 0x117c0
jmp 0x13bd4
movq 0x4286c(%rip), %rax     # 0x56430
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
movl %r13d, %r8d
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawElementsIndirect
static int DrawElementsIndirect(lua_State *L)
/* draw_elements_indirect(mode, type, indirect)
 */
    {
    GLenum mode = checkdrawmode(L, 1);
    GLenum type = checkdrawtype(L, 2);
    GLintptr indirect = luaL_checkinteger(L, 3);
    glDrawElementsIndirect(mode, type, (const void *)indirect);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x426b2(%rip), %rcx     # 0x562e0
movl %ebp, %edi
movl %r14d, %esi
movq %rax, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawElements
static int MultiDrawElements(lua_State *L)
/* multi_draw_elements(mode, type, count1, indices1 [, count2, indices2, ...]) 
 */
    {
    GLsizei *count, drawcount, i, arg;
    GLintptr *indices;
    GLenum mode = checkdrawmode(L, 1);
    GLenum type = checkdrawtype(L, 2);
    arg = 3;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    drawcount = arg - 3;
    if(((arg<4) || (drawcount%2) != 0))
        return luaL_error(L, NARGS_ERROR);
    drawcount /= 2;
    indices = (GLintptr*)Malloc2(L, drawcount*sizeof(GLintptr), 
                    (void**)&count, drawcount*sizeof(GLsizei));
    arg = 3;
    for(i=0; i<drawcount; i++)
        {
        indices[i] = lua_tointeger(L, arg++);
        count[i] = lua_tointeger(L, arg++);
        }
    glMultiDrawElements(mode, count, type, (const void**)indices, drawcount);
    Free(L, indices); 
    Free(L, count);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movl $0x3, %r12d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11860
testl %eax, %eax
jle 0x13cb8
movl $0x3, %esi
leal 0x1(%rsi), %r12d
movq %rbx, %rdi
callq 0x11af0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11860
movl %r12d, %esi
testl %eax, %eax
jg 0x13c9a
leal -0x3(%r12), %r15d
cmpl $0x4, %r12d
setae %al
testb $0x1, %r15b
sete %cl
testb %cl, %al
je 0x13d85
movl %ebp, 0x14(%rsp)
sarl %r15d
movslq %r15d, %r13
leaq (,%r13,8), %rsi
leaq (,%r13,4), %rcx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11700
movq %rax, %r12
testl %r13d, %r13d
jle 0x13d39
movl %r15d, %r13d
addq %r13, %r13
xorl %ebp, %ebp
leal 0x3(%rbp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, (%r12,%rbp,4)
leal 0x4(%rbp), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq 0x8(%rsp), %rcx
movl %eax, (%rcx,%rbp,2)
addq $0x2, %rbp
cmpq %rbp, %r13
jne 0x13d0a
movq 0x42d00(%rip), %rax     # 0x56a40
movq 0x8(%rsp), %rsi
movl %r14d, %edi
movl 0x14(%rsp), %edx
movq %r12, %rcx
movl %r15d, %r8d
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11370
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b7f2(%rip), %rsi     # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawElementsIndirect
static int MultiDrawElementsIndirect(lua_State *L)
/* draw_elements_indirect(mode, type, indirect, drawcount, stride)
 */
    {
    GLenum mode = checkdrawmode(L, 1);
    GLenum type = checkdrawtype(L, 2);
    GLintptr indirect = luaL_checkinteger(L, 3);
    GLsizei drawcount = luaL_checkinteger(L, 4);
    GLsizei stride = luaL_checkinteger(L, 5);
    glMultiDrawElementsIndirect(mode, type, (const void *)indirect, drawcount, stride);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x42c07(%rip), %r9      # 0x56a10
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: MultiDrawElementsIndirectCount
static int MultiDrawElementsIndirectCount(lua_State *L) //GL_VERSION_4_6
    {
    GLenum mode = checkdrawmode(L, 1);
    GLenum type = checkdrawtype(L, 2);
    GLintptr indirect = luaL_checkinteger(L, 3);
    GLintptr drawcount = luaL_checkinteger(L, 4);
    GLsizei maxdrawcount = luaL_checkinteger(L, 5);
    GLsizei stride = luaL_checkinteger(L, 6);
    glMultiDrawElementsIndirectCount(mode, type, (const void *)indirect, drawcount, maxdrawcount, stride);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq 0x429d3(%rip), %r10     # 0x56878
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawElementsBaseVertex
static int DrawElementsBaseVertex(lua_State *L)
/* draw_elements_base_vertex(mode,count, type, indices, basevertex [, instancecount, baseinstance]) 
 */
    {
    GLsizei instancecount;
    GLuint baseinstance;
    GLenum mode = checkdrawmode(L, 1);
    GLsizei count = luaL_checkinteger(L, 2);
    GLenum type = checkdrawtype(L, 3);
    GLintptr indices = luaL_checkinteger(L, 4);
    GLsizei basevertex = luaL_checkinteger(L, 5);
    if(lua_isnoneornil(L, 6))
        {
        glDrawElementsBaseVertex(mode, count, type, (void*)indices, basevertex);
        CheckError(L);
        return 0;
        }
    instancecount = luaL_checkinteger(L, 6);
    if(lua_isnoneornil(L, 7))
        {
        glDrawElementsInstancedBaseVertex(mode, count, type, (void*)indices,
                instancecount, basevertex);
        CheckError(L);
        return 0;
        }
    baseinstance = luaL_checkinteger(L, 7);
    glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, (void*)indices,
            instancecount, basevertex, baseinstance);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11860
testl %eax, %eax
jle 0x13f9c
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11860
testl %eax, %eax
jle 0x13fb5
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq 0x42e27(%rip), %r10     # 0x56da8
movl %eax, (%rsp)
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
movq 0x10(%rsp), %r8
movl %r13d, %r9d
callq *(%r10)
jmp 0x13fd1
movq 0x42d15(%rip), %rax     # 0x56cb8
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
movl %r13d, %r8d
callq *(%rax)
jmp 0x13fd1
movq 0x423b4(%rip), %rax     # 0x56370
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movq %r12, %rcx
movq 0x10(%rsp), %r8
movl %r13d, %r9d
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawRangeElements
static int DrawRangeElements(lua_State *L)
    {
    GLenum mode = checkdrawmode(L, 1);
    GLuint start = luaL_checkinteger(L, 2);
    GLuint end = luaL_checkinteger(L, 3);
    GLsizei count = luaL_checkinteger(L, 4);
    GLenum type = checkdrawtype(L, 5);
    GLintptr indices = luaL_checkinteger(L, 6);
    glDrawRangeElements(mode, start, end, count, type, (void*)indices);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x5, %edx
callq 0x11160
movl %eax, %r13d
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq 0x4273c(%rip), %r10     # 0x56958
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movq %rax, %r9
callq *(%r10)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: DrawRangeElementsBaseVertex
static int DrawRangeElementsBaseVertex(lua_State *L)
    {
    GLenum mode = checkdrawmode(L, 1);
    GLuint start = luaL_checkinteger(L, 2);
    GLuint end = luaL_checkinteger(L, 3);
    GLsizei count = luaL_checkinteger(L, 4);
    GLenum type = checkdrawtype(L, 5);
    GLintptr indices = luaL_checkinteger(L, 6);
    GLint basevertex = luaL_checkinteger(L, 7);
    glDrawRangeElementsBaseVertex(mode, start, end, count, type, (void*)indices, basevertex);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2c, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x2d, %esi
movl $0x5, %edx
callq 0x11160
movl %eax, %r13d
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq 0x427ba(%rip), %r10     # 0x56a90
movl %eax, (%rsp)
movl 0x14(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movq %rbp, %r9
callq *(%r10)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: PrimitiveRestartIndex
static int PrimitiveRestartIndex(lua_State *L)
    {
    GLuint index = luaL_checkinteger(L, 1);
    glPrimitiveRestartIndex(index);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq 0x42bc3(%rip), %rcx     # 0x56ee0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/draw.c
// Function: BeginConditionalRender
static int BeginConditionalRender(lua_State *L)
    {
    GLuint id = luaL_checkinteger(L, 1);
    GLenum mode = checkconditionalrendermode(L, 2);
    glBeginConditionalRender(id, mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2e, %esi
movl $0x2, %edx
callq 0x11160
movq 0x4289e(%rip), %rcx     # 0x56bf8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferParameter
static int FramebufferParameter(lua_State *L)
    {
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum pname = checkframebufferpname(L, 2);
    GLint param = luaL_checkinteger(L, 3);
    if(framebuffer==0)
        glFramebufferParameteri(target, pname, param);
    else
        glNamedFramebufferParameteri(framebuffer, pname, param);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x25, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x2b3a6
movq 0x2b87e(%rip), %rcx     # 0x56c20
movl %ebp, %edi
jmp 0x2b3b1
movq 0x2b55b(%rip), %rcx     # 0x56908
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: GetFramebufferParameter
static int GetFramebufferParameter(lua_State *L)
    {
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum pname = checkframebuffergpname(L, 2);
    switch(pname)
        {
        case GL_FRAMEBUFFER_DEFAULT_WIDTH:
        case GL_FRAMEBUFFER_DEFAULT_HEIGHT:
        case GL_FRAMEBUFFER_DEFAULT_LAYERS:
        case GL_FRAMEBUFFER_DEFAULT_SAMPLES:
        case GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS:
        case GL_SAMPLES:
        case GL_SAMPLE_BUFFERS:
                return GetInt(L, target, framebuffer, pname);
        case GL_DOUBLEBUFFER:
        case GL_STEREO:
                return GetBoolean(L, target, framebuffer, pname);
        case GL_IMPLEMENTATION_COLOR_READ_FORMAT:
                return GetEnum(L, target, framebuffer, pname, DOMAIN_FORMAT);
        case GL_IMPLEMENTATION_COLOR_READ_TYPE:
                return GetEnum(L, target, framebuffer, pname, DOMAIN_TYPE);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x27, %esi
movl $0x2, %edx
callq 0x11160
cmpl $0x8b9a, %eax           # imm = 0x8B9A
jle 0x2b431
leal -0x9310(%rax), %ecx
cmpl $0x5, %ecx
jb 0x2b447
cmpl $0x8b9b, %eax           # imm = 0x8B9B
jne 0x2b4a2
movl 0xc(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x8b9b, %ecx           # imm = 0x8B9B
movl $0x12, %r8d
jmp 0x2b49b
leal -0xc32(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2b462
leal -0x80a8(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2b480
movl 0xc(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x2bba6
movl $0x1, %r14d
jmp 0x2b4c2
movl 0xc(%rsp), %esi
movl $0x1, %r14d
movq %rbx, %rdi
movl %ebp, %edx
movl %eax, %ecx
movl $0x1, %r8d
callq 0x2bba6
jmp 0x2b4c2
cmpl $0x8b9a, %eax           # imm = 0x8B9A
jne 0x2b4a2
movl 0xc(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x8b9a, %ecx           # imm = 0x8B9A
movl $0x7, %r8d
callq 0x2bbfd
jmp 0x2b4bf
leaq 0x13ddc(%rip), %rsi     # 0x3f285
leaq 0x209ff(%rip), %rdx     # 0x4beaf
movq %rbx, %rdi
movl $0x65, %ecx
xorl %eax, %eax
callq 0x11ae0
movl %eax, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: CheckFramebufferStatus
static int CheckFramebufferStatus(lua_State *L)
    {
    GLuint framebuffer;
    GLenum status;
    GLuint target = checkframebuffertarget(L, 1);
    if(lua_isnoneornil(L, 2))
        status = glCheckFramebufferStatus(target);
    else 
        {
        framebuffer = luaL_checkinteger(L, 2);
        status = glCheckNamedFramebufferStatus(framebuffer, target);
        }
    CheckError(L);
    pushframebufferstatus(L, status);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x24, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x2b67c
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x2b73c(%rip), %rcx     # 0x56db0
movl %eax, %edi
movl %ebp, %esi
callq *(%rcx)
jmp 0x2b687
movq 0x2ac2d(%rip), %rax     # 0x562b0
movl %ebp, %edi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movq %rbx, %rdi
movl $0x26, %esi
movl %ebp, %edx
callq 0x11120
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferRenderbuffer
static int FramebufferRenderbuffer(lua_State *L)
    {
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum attachment = checkbuffer(L, 2);
    GLenum rbtarget = checkrenderbuffertarget(L, 3);
    GLuint renderbuffer = luaL_checkinteger(L, 4);
    if(framebuffer == 0)
        glFramebufferRenderbuffer(target, attachment, rbtarget, renderbuffer);
    else
        glNamedFramebufferRenderbuffer(framebuffer, attachment, rbtarget, renderbuffer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0xf, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x2b712
movq 0x2ac82(%rip), %r8      # 0x56390
movl %ebp, %edi
jmp 0x2b71d
movq 0x2ad2f(%rip), %r8      # 0x56448
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferTexture
static int FramebufferTexture(lua_State *L)
    {
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum attachment = checkbuffer(L, 2);
    GLuint texture = luaL_checkinteger(L, 3);
    GLint level = luaL_checkinteger(L, 4);
    if(framebuffer == 0)
        glFramebufferTexture(target, attachment, texture, level);
    else
        glNamedFramebufferTexture(framebuffer,attachment, texture, level);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x2b79e
movq 0x2b3b6(%rip), %r8      # 0x56b50
movl %ebp, %edi
jmp 0x2b7a9
movq 0x2ab5b(%rip), %r8      # 0x56300
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferTexture1D
static int FramebufferTexture1D(lua_State *L)
    {
    GLenum target = checkframebuffertarget(L, 1);
    GLenum attachment = checkbuffer(L, 2);
    GLenum textarget = checktexturetarget(L, 3);
    GLuint texture = luaL_checkinteger(L, 4);
    GLint level = luaL_checkinteger(L, 5);
    glFramebufferTexture1D(target, attachment, textarget, texture, level);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x24, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x13, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x2acb5(%rip), %r9      # 0x564e8
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferTexture2D
static int FramebufferTexture2D(lua_State *L)
    {
    GLenum target = checkframebuffertarget(L, 1);
    GLenum attachment = checkbuffer(L, 2);
    GLenum textarget = checktexturetarget(L, 3);
    GLuint texture = luaL_checkinteger(L, 4);
    GLint level = luaL_checkinteger(L, 5);
    glFramebufferTexture2D(target, attachment, textarget, texture, level);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x24, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x13, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x2aebf(%rip), %r9      # 0x56780
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferTexture3D
static int FramebufferTexture3D(lua_State *L)
    {
    GLenum target = checkframebuffertarget(L, 1);
    GLenum attachment = checkbuffer(L, 2);
    GLenum textarget = checktexturetarget(L, 3);
    GLuint texture = luaL_checkinteger(L, 4);
    GLint level = luaL_checkinteger(L, 5);
    GLint layer = luaL_checkinteger(L, 6);
    glFramebufferTexture3D(target, attachment, textarget, texture, level, layer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x24, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x13, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq 0x2b096(%rip), %r10     # 0x569f8
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: FramebufferTextureLayer
static int FramebufferTextureLayer(lua_State *L)
    {
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum attachment = checkbuffer(L, 2);
    GLuint texture = luaL_checkinteger(L, 3);
    GLint level = luaL_checkinteger(L, 4);
    GLint layer = luaL_checkinteger(L, 5);
    if(framebuffer == 0)
        glFramebufferTextureLayer(target, attachment, texture, level, layer);
    else
        glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4f, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x2ba05
movq 0x2af67(%rip), %r9      # 0x56968
movl %ebp, %edi
jmp 0x2ba10
movq 0x2acc4(%rip), %r9      # 0x566d0
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: InvalidateSubFramebuffer
static int InvalidateSubFramebuffer(lua_State *L)
/* invalidate_sub_framebuffer(target, x, y, w, h, attachm1 [, attachm2, ...]) 
 */
    {
    GLsizei count;
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLuint x = luaL_checkinteger(L, 2);
    GLuint y = luaL_checkinteger(L, 3);
    GLuint width = luaL_checkinteger(L, 4);
    GLuint height = luaL_checkinteger(L, 5);
    GLenum *attachments = CheckAttachments(L, 6, &count);
    if(framebuffer)
        glInvalidateNamedFramebufferSubData(framebuffer, count, attachments, x, y, width, height);
    else
        glInvalidateSubFramebuffer(target, count, attachments, x, y, width, height);
    Free(L, attachments);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r14
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x6, %esi
callq 0x2bce7
movq %rax, %r13
testl %ebp, %ebp
je 0x2bae4
movq 0x2aa48(%rip), %rax     # 0x56520
movl 0x8(%rsp), %esi
movl %r14d, (%rsp)
movl %ebp, %edi
jmp 0x2baf7
movq 0x2a875(%rip), %rax     # 0x56360
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl %r14d, (%rsp)
movq %r13, %rdx
movq 0x10(%rsp), %rcx
movl %r15d, %r8d
movl %r12d, %r9d
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: InvalidateFramebuffer
static int InvalidateFramebuffer(lua_State *L)
    {
    GLsizei count;
    GLenum target;
    GLuint framebuffer = checktargetorname(L, 1, &target, DOMAIN_FRAMEBUFFER_TARGET);
    GLenum *attachments = CheckAttachments(L, 2, &count);
    if(framebuffer)
        glInvalidateNamedFramebufferData(framebuffer, count, attachments);
    else
        glInvalidateFramebuffer(target, count, attachments);
    Free(L, attachments);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x24, %ecx
callq 0x11430
movl %eax, %ebp
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2bce7
movq %rax, %r14
testl %ebp, %ebp
je 0x2bb74
movq 0x2a98c(%rip), %rax     # 0x564f8
movl 0x8(%rsp), %esi
movl %ebp, %edi
jmp 0x2bb83
movq 0x2b09d(%rip), %rax     # 0x56c18
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/framebuffer.c
// Function: CheckAttachments
static GLenum *CheckAttachments(lua_State *L, int argfirst, GLsizei *count)
    {
    GLsizei i, arg = argfirst;
    GLenum *attachments;
    while(!lua_isnoneornil(L, arg))
        luaL_checkstring(L, arg++);
    if(arg == argfirst)
        checkbuffer(L, argfirst); /* raise an error */
    *count = arg - argfirst;
    attachments = (GLenum*)Malloc(L, (*count)*sizeof(GLenum));
    arg = argfirst;
    for(i = 0; i < *count; i++)
        attachments[i] = checkbuffer(L, arg++);
    return attachments;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x11860
movl %ebp, %r15d
testl %eax, %eax
jle 0x2bd28
movl %ebp, %esi
leal 0x1(%rsi), %r15d
movq %r14, %rdi
xorl %edx, %edx
callq 0x11450
movq %r14, %rdi
movl %r15d, %esi
callq 0x11860
movl %r15d, %esi
testl %eax, %eax
jg 0x2bd08
subl %ebp, %r15d
jne 0x2bd3c
movq %r14, %rdi
movl $0x4f, %esi
movl %ebp, %edx
callq 0x11160
movl %r15d, (%rbx)
movslq %r15d, %rsi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x11200
movq %rax, %r15
cmpl $0x0, (%rbx)
jle 0x2bd7c
movl %ebp, %r12d
xorl %r13d, %r13d
leal (%r12,%r13), %edx
movq %r14, %rdi
movl $0x4f, %esi
callq 0x11160
movl %eax, (%r15,%r13,4)
incq %r13
movslq (%rbx), %rax
cmpq %rax, %r13
jl 0x2bd5c
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/func.c
// Function: moongl_Malloc2
void* Malloc2(lua_State *L, size_t size, void **ptr2, size_t size2)
    {
    void *ptr;
    if((size==0) || (size2 == 0))
        { luaL_error(L, "malloc request with size = 0"); return NULL; }
    if((ptr = malloc(size)) == NULL)
        { luaL_error(L, "cannot allocate memory"); return NULL; }
    if((*ptr2 = malloc(size2)) == NULL)
        { Free(L, ptr); luaL_error(L, "cannot allocate memory"); return NULL; }
    return ptr;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
je 0x2bdfc
leaq 0x1da3e(%rip), %r14     # 0x49838
jmp 0x2be2f
movq %rdx, %r12
movq %rsi, %rdi
callq 0x11270
leaq 0x1da47(%rip), %r14     # 0x49855
testq %rax, %rax
je 0x2be2f
movq %rax, %r15
movq %r13, %rdi
callq 0x11270
movq %rax, (%r12)
testq %rax, %rax
jne 0x2be3f
movq %r15, %rdi
callq 0x114a0
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x11ae0
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/func.c
// Function: moongl_Malloc3
void* Malloc3(lua_State *L, size_t size, void **ptr2, size_t size2, void **ptr3, size_t size3)
    {
    void *ptr;
    if((size==0) || (size2 == 0) || (size3 == 0))
        { luaL_error(L, "malloc request with size = 0"); return NULL; }
    if((ptr = malloc(size)) == NULL)
        { luaL_error(L, "cannot allocate memory"); return NULL; }
    if((*ptr2 = malloc(size2)) == NULL)
        { 
        Free(L, ptr); 
        luaL_error(L, "cannot allocate memory"); return NULL; 
        }
    if((*ptr3 = malloc(size3)) == NULL)
        { 
        Free(L, ptr); 
        Free(L, *ptr2); 
        luaL_error(L, "cannot allocate memory"); return NULL; 
        }
    return ptr;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
testq %r9, %r9
sete %al
orb %cl, %al
je 0x2be8c
leaq 0x1d9ae(%rip), %r14     # 0x49838
jmp 0x2beeb
movq %r9, %rbp
movq %rdx, %r12
movq %r8, (%rsp)
movq %rsi, %rdi
callq 0x11270
leaq 0x1d9b0(%rip), %r14     # 0x49855
testq %rax, %rax
je 0x2beeb
movq %rax, %r15
movq %r13, %rdi
callq 0x11270
movq %rax, (%r12)
testq %rax, %rax
je 0x2bee3
movq %rbp, %rdi
callq 0x11270
movq (%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
jne 0x2befb
movq %r15, %rdi
callq 0x114a0
movq (%r12), %r15
testq %r15, %r15
je 0x2beeb
movq %r15, %rdi
callq 0x114a0
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x11ae0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/func.c
// Function: moongl_CheckErrorFree
int CheckErrorFree(lua_State *L, void *ptr)
/* On error, free ptr before raising the error */
    {
    int rc = glGetError();
    if(rc != 0) 
        {
        Free(L, ptr);
        return luaL_error(L, (char*)ErrorString(rc));
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x11250
testl %eax, %eax
je 0x2c03c
movl %eax, %ebp
testq %r14, %r14
je 0x2c022
movq %r14, %rdi
callq 0x114a0
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c043
movl %ebp, %eax
leaq 0x28c6a(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c04a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1d93e(%rip), %rsi     # 0x49988
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/func.c
// Function: moongl_CheckErrorFree2
int CheckErrorFree2(lua_State *L, void *ptr1, void *ptr2)
/* On error, free ptr1 and ptr2 before raising the error */
    {
    int rc = glGetError();
    if(rc != 0) 
        {
        Free(L, ptr1);
        Free(L, ptr2);
        return luaL_error(L, (char*)ErrorString(rc));
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x11250
testl %eax, %eax
je 0x2c0a7
movl %eax, %ebp
testq %r15, %r15
je 0x2c080
movq %r15, %rdi
callq 0x114a0
testq %r14, %r14
je 0x2c08d
movq %r14, %rdi
callq 0x114a0
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c0b4
movl %ebp, %eax
leaq 0x28bff(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c0bb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d8cd(%rip), %rsi     # 0x49988
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/func.c
// Function: moongl_CheckErrorFree3
int CheckErrorFree3(lua_State *L, void *ptr1, void *ptr2, void *ptr3)
    {
    int rc = glGetError();
    if(rc != 0) 
        {
        Free(L, ptr1);
        Free(L, ptr2);
        Free(L, ptr3);
        return luaL_error(L, (char*)ErrorString(rc));
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x11250
testl %eax, %eax
je 0x2c12f
movl %eax, %ebp
testq %r12, %r12
je 0x2c0fb
movq %r12, %rdi
callq 0x114a0
testq %r15, %r15
je 0x2c108
movq %r15, %rdi
callq 0x114a0
testq %r14, %r14
je 0x2c115
movq %r14, %rdi
callq 0x114a0
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c13a
movl %ebp, %eax
leaq 0x28b77(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c141
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d847(%rip), %rsi     # 0x49988
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/get.c
// Function: GetInt
static int GetInt(lua_State *L, GLenum pname)
    {
    GLint64 data;
    glGetInteger64v(pname, &data);
    CheckError(L);
    lua_pushinteger(L, data);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28e0d(%rip), %rax     # 0x56808
movq %rsp, %r14
movl %esi, %edi
movq %r14, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x113c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/get.c
// Function: GetIntOptIndex
static int GetIntOptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLint64 data;
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetInteger64i_v(pname, index, &data);
        }
    else
        glGetInteger64v(pname, &data);
    CheckError(L);
    lua_pushinteger(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x2da55
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x2927e(%rip), %rcx     # 0x56cc8
movq %rsp, %rdx
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x2da63
movq 0x28dac(%rip), %rax     # 0x56808
movq %rsp, %rsi
movl %ebp, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x113c0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/get.c
// Function: GetIntIndex
static int GetIntIndex(lua_State *L, GLenum pname)
    {
    GLint64 data;
    GLuint index = luaL_checkinteger(L, 2);
    glGetInteger64i_v(pname, index, &data);
    CheckError(L);
    lua_pushinteger(L, data);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x2, %esi
callq 0x11af0
movq 0x2922b(%rip), %rcx     # 0x56cc8
leaq 0x8(%rsp), %r15
movl %ebx, %edi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movq %r14, %rdi
callq 0x11880
movq (%r15), %rsi
movq %r14, %rdi
callq 0x113c0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq