LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x11420
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 0x2be73
movq %rax, %r13
testl %ebp, %ebp
je 0x2bc70
movq 0x2a8bc(%rip), %rax     # 0x56520
movl 0x8(%rsp), %esi
movl %r14d, (%rsp)
movl %ebp, %edi
jmp 0x2bc83
movq 0x2a6e9(%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 0x11360
movq %rbx, %rdi
callq 0x11870
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_O3/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 0x11420
movl %eax, %ebp
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2be73
movq %rax, %r14
testl %ebp, %ebp
je 0x2bd00
movq 0x2a800(%rip), %rax     # 0x564f8
movl 0x8(%rsp), %esi
movl %ebp, %edi
jmp 0x2bd0f
movq 0x2af11(%rip), %rax     # 0x56c18
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11850
movl %ebp, %r15d
testl %eax, %eax
jle 0x2bec0
xorl %r12d, %r12d
movl %ebp, %r15d
movl %r15d, %esi
leal 0x1(%rsi), %r15d
movq %r14, %rdi
xorl %edx, %edx
callq 0x11440
movq %r14, %rdi
movl %r15d, %esi
callq 0x11850
decl %r12d
testl %eax, %eax
jg 0x2be98
testl %r12d, %r12d
jne 0x2becf
movq %r14, %rdi
movl $0x4f, %esi
movl %ebp, %edx
callq 0x11150
subl %ebp, %r15d
movl %r15d, (%rbx)
movslq %r15d, %rsi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x111f0
movq %rax, %r15
cmpl $0x0, (%rbx)
jle 0x2bf12
movl %ebp, %r12d
xorl %r13d, %r13d
leal (%r12,%r13), %edx
movq %r14, %rdi
movl $0x4f, %esi
callq 0x11150
movl %eax, (%r15,%r13,4)
incq %r13
movslq (%rbx), %rax
cmpq %rax, %r13
jl 0x2bef2
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_O3/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 0x2bf90
leaq 0x1d8aa(%rip), %r14     # 0x49838
jmp 0x2bfc3
movq %rdx, %r12
movq %rsi, %rdi
callq 0x11260
leaq 0x1d8b3(%rip), %r14     # 0x49855
testq %rax, %rax
je 0x2bfc3
movq %rax, %r15
movq %r13, %rdi
callq 0x11260
movq %rax, (%r12)
testq %rax, %rax
jne 0x2bfd3
movq %r15, %rdi
callq 0x11490
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_O3/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 0x2c020
leaq 0x1d81a(%rip), %r14     # 0x49838
jmp 0x2c07f
movq %r9, %rbp
movq %rdx, %r12
movq %r8, (%rsp)
movq %rsi, %rdi
callq 0x11260
leaq 0x1d81c(%rip), %r14     # 0x49855
testq %rax, %rax
je 0x2c07f
movq %rax, %r15
movq %r13, %rdi
callq 0x11260
movq %rax, (%r12)
testq %rax, %rax
je 0x2c077
movq %rbp, %rdi
callq 0x11260
movq (%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
jne 0x2c08f
movq %r15, %rdi
callq 0x11490
movq (%r12), %r15
testq %r15, %r15
je 0x2c07f
movq %r15, %rdi
callq 0x11490
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_O3/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 0x11240
testl %eax, %eax
je 0x2c1b7
movl %eax, %ebp
testq %r14, %r14
je 0x2c19d
movq %r14, %rdi
callq 0x11490
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c1be
movl %ebp, %eax
leaq 0x28aef(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c1c5
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1d7c3(%rip), %rsi     # 0x49988
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/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 0x11240
testl %eax, %eax
je 0x2c222
movl %eax, %ebp
testq %r15, %r15
je 0x2c1fb
movq %r15, %rdi
callq 0x11490
testq %r14, %r14
je 0x2c208
movq %r14, %rdi
callq 0x11490
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c22f
movl %ebp, %eax
leaq 0x28a84(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c236
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d752(%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_O3/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 0x11240
testl %eax, %eax
je 0x2c2aa
movl %eax, %ebp
testq %r12, %r12
je 0x2c276
movq %r12, %rdi
callq 0x11490
testq %r15, %r15
je 0x2c283
movq %r15, %rdi
callq 0x11490
testq %r14, %r14
je 0x2c290
movq %r14, %rdi
callq 0x11490
addl $0xfffffb00, %ebp       # imm = 0xFFFFFB00
cmpl $0x6, %ebp
ja 0x2c2b5
movl %ebp, %eax
leaq 0x289fc(%rip), %rcx     # 0x54ca0
movq (%rcx,%rax,8), %rsi
jmp 0x2c2bc
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d6cc(%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_O3/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 0x28c91(%rip), %rax     # 0x56808
movq %rsp, %r14
movl %esi, %edi
movq %r14, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11850
testl %eax, %eax
jle 0x2dbd1
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x29102(%rip), %rcx     # 0x56cc8
movq %rsp, %rdx
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x2dbdf
movq 0x28c30(%rip), %rax     # 0x56808
movq %rsp, %rsi
movl %ebp, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x290af(%rip), %rcx     # 0x56cc8
leaq 0x8(%rsp), %r15
movl %ebx, %edi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movq %r14, %rdi
callq 0x11870
movq (%r15), %rsi
movq %r14, %rdi
callq 0x113b0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetFloat4
static int GetFloat4(lua_State *L, GLenum pname)
    {
    GLfloat data[4];
    glGetFloatv(pname, data);
    CheckError(L);
    lua_pushnumber(L, data[0]);
    lua_pushnumber(L, data[1]);
    lua_pushnumber(L, data[2]);
    lua_pushnumber(L, data[3]);
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movl %esi, %edi
movq %r14, %rsi
callq 0x11aa0
movq %rbx, %rdi
callq 0x11870
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetBoolean4OptIndex
static int GetBoolean4OptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLboolean data[4];
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetBooleani_v(pname, index, data);
        }
    else
        glGetBooleanv(pname, data);
    CheckError(L);
    lua_pushboolean(L, data[0]);
    lua_pushboolean(L, data[1]);
    lua_pushboolean(L, data[2]);
    lua_pushboolean(L, data[3]);
    return 4;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2dd1d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x28e03(%rip), %rcx     # 0x56b10
leaq 0xc(%rsp), %rdx
movl $0xc23, %edi            # imm = 0xC23
movl %eax, %esi
callq *(%rcx)
jmp 0x2dd2c
leaq 0xc(%rsp), %rsi
movl $0xc23, %edi            # imm = 0xC23
callq 0x11980
movq %rbx, %rdi
callq 0x11870
movzbl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0xd(%rsp), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0xe(%rsp), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0xf(%rsp), %esi
movq %rbx, %rdi
callq 0x117e0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetBooleanOptIndex
static int GetBooleanOptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLboolean data;
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetBooleani_v(pname, index, &data);
        }
    else
        glGetBooleanv(pname, &data);
    CheckError(L);
    lua_pushboolean(L, data);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2de17
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x28d09(%rip), %rcx     # 0x56b10
leaq 0xf(%rsp), %rdx
movl $0xbe2, %edi            # imm = 0xBE2
movl %eax, %esi
callq *(%rcx)
jmp 0x2de26
leaq 0xf(%rsp), %rsi
movl $0xbe2, %edi            # imm = 0xBE2
callq 0x11980
movq %rbx, %rdi
callq 0x11870
movzbl 0xf(%rsp), %esi
movq %rbx, %rdi
callq 0x117e0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetFloat4OptIndex
static int GetFloat4OptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLfloat data[4];
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetFloati_v(pname, index, data);
        }
    else
        glGetFloatv(pname, data);
    CheckError(L);
    lua_pushnumber(L, data[0]);
    lua_pushnumber(L, data[1]);
    lua_pushnumber(L, data[2]);
    lua_pushnumber(L, data[3]);
    return 4;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2de79
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x28d45(%rip), %rcx     # 0x56bb0
movq %rsp, %rdx
movl $0x8005, %edi           # imm = 0x8005
movl %eax, %esi
callq *(%rcx)
jmp 0x2de86
movq %rsp, %rsi
movl $0x8005, %edi           # imm = 0x8005
callq 0x11aa0
movq %rbx, %rdi
callq 0x11870
cvtss2sd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movq %rbx, %rdi
callq 0x11370
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetEnumOptIndex
static int GetEnumOptIndex(lua_State *L, GLenum pname, uint32_t domain) /* index is optional */
    {
    GLint data;
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetIntegeri_v(pname, index, &data);
        }
    else
        glGetIntegerv(pname, &data);
    CheckError(L);
    return enums_push(L, domain, data);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2df12
movq %r14, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x28563(%rip), %rcx     # 0x56468
leaq 0xc(%rsp), %rdx
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x2df1e
leaq 0xc(%rsp), %rsi
movl %ebp, %edi
callq 0x116d0
movq %r14, %rdi
callq 0x11870
movl 0xc(%rsp), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11110
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetFloat4Index
static int GetFloat4Index(lua_State *L, GLenum pname)
    {
    GLfloat data[4];
    GLuint index;
    index = luaL_checkinteger(L, 2);
    glGetFloati_v(pname, index, data);
    CheckError(L);
    lua_pushnumber(L, data[0]);
    lua_pushnumber(L, data[1]);
    lua_pushnumber(L, data[2]);
    lua_pushnumber(L, data[3]);
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11af0
movq 0x28c58(%rip), %rcx     # 0x56bb0
movq %rsp, %r14
movl $0xc10, %edi            # imm = 0xC10
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetBoolean4Index
static int GetBoolean4Index(lua_State *L, GLenum pname)
    {
    GLboolean data[4];
    GLuint index;
    index = luaL_checkinteger(L, 2);
    glGetBooleani_v(pname, index, data);
    CheckError(L);
    lua_pushboolean(L, data[0]);
    lua_pushboolean(L, data[1]);
    lua_pushboolean(L, data[2]);
    lua_pushboolean(L, data[3]);
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11af0
movq 0x28b41(%rip), %rcx     # 0x56b10
leaq 0x4(%rsp), %r14
movl $0xc11, %edi            # imm = 0xC11
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
movzbl (%r14), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0x2(%r14), %esi
movq %rbx, %rdi
callq 0x117e0
movzbl 0x3(%r14), %esi
movq %rbx, %rdi
callq 0x117e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetIntN
static int GetIntN(lua_State *L, GLenum pname, GLenum numpname)
    {
    GLint64 *data;
    GLsizei i, num = getSizei(L, numpname);
    if(num==0) return 0;
    data = (GLint64*)Malloc(L, num*sizeof(GLint64));
    glGetInteger64v(pname, data);
    CheckErrorFree(L, data);
    for(i = 0; i<num; i++)
        lua_pushinteger(L, data[i]);
    Free(L, data);
    return num;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x287ce(%rip), %r12     # 0x56808
leaq 0x8(%rsp), %r14
movl $0x87fe, %edi           # imm = 0x87FE
movq %r14, %rsi
callq *(%r12)
movq %rbx, %rdi
callq 0x11870
movq (%r14), %r14
testl %r14d, %r14d
je 0x2e0b5
movslq %r14d, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r15
movl $0x87ff, %edi           # imm = 0x87FF
movq %rax, %rsi
callq *(%r12)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
testl %r14d, %r14d
jle 0x2e0aa
movl %r14d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r15,%r13,8), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r13
cmpq %r13, %r12
jne 0x2e096
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetEnumN
static int GetEnumN(lua_State *L, GLenum pname, GLenum numpname, uint32_t domain)
    {
    GLint *val;
    GLsizei i, num = getSizei(L, numpname);
    if(num==0) return 0;
    val = (GLint*)Malloc(L, num*sizeof(GLint));
    glGetIntegerv(pname, val);
    CheckErrorFree(L, val);
    luaL_checkstack(L, num, NULL);
    for(i = 0; i<num; i++)
        enums_push(L, domain, val[i]);
    Free(L, val);
    return num;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0x28729(%rip), %rax     # 0x56808
movq %rsp, %r15
movl %edx, %edi
movq %r15, %rsi
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movq (%r15), %r15
testl %r15d, %r15d
je 0x2e15f
movslq %r15d, %rsi
shlq $0x2, %rsi
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movl %ebp, %edi
movq %rax, %rsi
callq 0x116d0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x11250
testl %r15d, %r15d
jle 0x2e154
movl %r15d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movl (%r12,%rbp,4), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11110
incq %rbp
cmpq %rbp, %r13
jne 0x2e13e
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetFloat2
static int GetFloat2(lua_State *L, GLenum pname)
    {
    GLfloat data[2];
    glGetFloatv(pname, data);
    CheckError(L);
    lua_pushnumber(L, data[0]);
    lua_pushnumber(L, data[1]);
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movl %esi, %edi
movq %r14, %rsi
callq 0x11aa0
movq %rbx, %rdi
callq 0x11870
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
xorps %xmm0, %xmm0
cvtss2sd 0x4(%r14), %xmm0
movq %rbx, %rdi
callq 0x11370
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetEnum2
static int GetEnum2(lua_State *L, GLenum pname, uint32_t domain)
    {
    GLint val[2];
    glGetIntegerv(pname, val);
    CheckError(L);
    enums_push(L, domain, val[0]);
    enums_push(L, domain, val[1]);
    return 2;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movl $0xb40, %edi            # imm = 0xB40
movq %r14, %rsi
callq 0x116d0
movq %rbx, %rdi
callq 0x11870
movl (%r14), %edx
movq %rbx, %rdi
movl $0x61, %esi
callq 0x11110
movl 0x4(%r14), %edx
movq %rbx, %rdi
movl $0x61, %esi
callq 0x11110
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetActiveTexture
static int GetActiveTexture(lua_State *L, GLenum pname)
    {
    GLint val;
    glGetIntegerv(pname, &val);
    CheckError(L);
    switch(val)
        {
#define CASE(n) case GL_TEXTURE##n: lua_pushinteger(L, n); break
        CASE(0); CASE(1); CASE(2); CASE(3); CASE(4); CASE(5);
        CASE(6); CASE(7); CASE(8); CASE(9); CASE(10); CASE(11);
        CASE(12); CASE(13); CASE(14); CASE(15); CASE(16); CASE(17);
        CASE(18); CASE(19); CASE(20); CASE(21); CASE(22); CASE(23);
        CASE(24); CASE(25); CASE(26); CASE(27); CASE(28); CASE(29);
        CASE(30); CASE(31);
#undef CASE
        default:
            luaL_error(L, UNEXPECTED_ERROR);
        }
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl $0x84e0, %edi           # imm = 0x84E0
movq %r14, %rsi
callq 0x116d0
movq %rbx, %rdi
callq 0x11870
movl $0xffff7b40, %eax       # imm = 0xFFFF7B40
addl (%r14), %eax
cmpl $0x1f, %eax
ja 0x2e326
leaq 0x1bf50(%rip), %rcx     # 0x4a184
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x2e370
movl $0x1b, %esi
jmp 0x2e36d
movl $0x10, %esi
jmp 0x2e36d
movl $0xe, %esi
jmp 0x2e36d
movl $0xb, %esi
jmp 0x2e36d
movl $0x4, %esi
jmp 0x2e36d
movl $0xc, %esi
jmp 0x2e36d
movl $0x9, %esi
jmp 0x2e36d
movl $0x19, %esi
jmp 0x2e36d
movl $0x18, %esi
jmp 0x2e36d
movl $0x2, %esi
jmp 0x2e36d
movl $0xf, %esi
jmp 0x2e36d
movl $0x3, %esi
jmp 0x2e36d
movl $0x7, %esi
jmp 0x2e36d
movl $0x1, %esi
jmp 0x2e36d
movl $0x1f, %esi
jmp 0x2e36d
movl $0x11, %esi
jmp 0x2e36d
movl $0x14, %esi
jmp 0x2e36d
movl $0x5, %esi
jmp 0x2e36d
movl $0x15, %esi
jmp 0x2e36d
movl $0xd, %esi
jmp 0x2e36d
movl $0x6, %esi
jmp 0x2e36d
movl $0x12, %esi
jmp 0x2e36d
movl $0xa, %esi
jmp 0x2e36d
movl $0x8, %esi
jmp 0x2e36d
movl $0x1e, %esi
jmp 0x2e36d
leaq 0x10f58(%rip), %rsi     # 0x3f285
leaq 0x1beea(%rip), %rdx     # 0x4a21e
movq %rbx, %rdi
movl $0x4d, %ecx
xorl %eax, %eax
callq 0x11ae0
jmp 0x2e375
movl $0x16, %esi
jmp 0x2e36d
movl $0x13, %esi
jmp 0x2e36d
movl $0x17, %esi
jmp 0x2e36d
movl $0x1c, %esi
jmp 0x2e36d
movl $0x1d, %esi
jmp 0x2e36d
movl $0x1a, %esi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/get.c
// Function: GetInt4OptIndex
static int GetInt4OptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLint64 data[4];
    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[0]);
    lua_pushinteger(L, data[1]);
    lua_pushinteger(L, data[2]);
    lua_pushinteger(L, data[3]);
    return 4;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2e3b5
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x28921(%rip), %rcx     # 0x56cc8
movq %rsp, %rdx
movl $0xba2, %edi            # imm = 0xBA2
movl %eax, %esi
callq *(%rcx)
jmp 0x2e3c6
movq 0x2844c(%rip), %rax     # 0x56808
movq %rsp, %rsi
movl $0xba2, %edi            # imm = 0xBA2
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getintformat.c
// Function: GetN
static int GetN(lua_State *L, GLenum target, GLenum internalformat, GLenum pname, GLenum numpname)
    {
    GLint64 *params;
    GLsizei i, num = GetNum(L, target, internalformat, numpname);
    if(num==0) return 0;
    params = (GLint64*)Malloc(L, num*sizeof(GLint64));
    glGetInternalformati64v(target, internalformat, pname, num*sizeof(GLint64), params);
    CheckErrorFree(L, params);
    for(i = 0; i<num; i++)
        lua_pushinteger(L, params[i]);
    Free(L, params);
    return num;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
movq 0x2820e(%rip), %rax     # 0x56948
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movl $0x9380, %edx           # imm = 0x9380
movl $0x4, %ecx
movq %r14, %r8
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %r14
testq %r14, %r14
je 0x2e7c3
leaq (,%r14,8), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %r15
movq 0x28299(%rip), %rax     # 0x56a18
movl %r12d, %edi
movl %ebp, %esi
movl $0x80a9, %edx           # imm = 0x80A9
movl %r13d, %ecx
movq %r15, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
testl %r14d, %r14d
jle 0x2e7b8
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r12
cmpq %r12, %r14
jne 0x2e7a4
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
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getstring.c
// Function: GetExtensions
static int GetExtensions(lua_State *L)
    {
    GLsizei i, count;
    const GLubyte *s;
    GLboolean byname = optboolean(L, 1, 0);

    count = getSizei(L, GL_NUM_EXTENSIONS);
    CheckError(L);

    lua_newtable(L);

    for(i=0; i<count; i++)
        {
        s = glGetStringi(GL_EXTENSIONS, i);
        CheckError(L);
        if(s == NULL)
            return luaL_error(L, UNEXPECTED_ERROR);
        if(byname)
            {
            lua_pushboolean(L, 1);
            lua_setfield(L, -2, (char*)s);
            }
        else
            {
            lua_pushstring(L, (char*)s);
            lua_rawseti(L, -2, i+1);
            }
        }

    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x112d0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x821d, %esi           # imm = 0x821D
callq 0x11a70
movl %eax, %r14d
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11320
testl %r14d, %r14d
jle 0x2ea2d
movl %r14d, %r12d
xorl %r14d, %r14d
movq 0x27fde(%rip), %r13     # 0x569a8
movl $0x1f03, %edi           # imm = 0x1F03
movl %r14d, %esi
callq *(%r13)
movq %rax, %r15
movq %rbx, %rdi
callq 0x11870
testq %r15, %r15
je 0x2ea41
movq %rbx, %rdi
testb %bpl, %bpl
je 0x2ea0d
movl $0x1, %esi
callq 0x117e0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x11890
incq %r14
jmp 0x2ea28
movq %r15, %rsi
callq 0x110c0
incq %r14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x11790
cmpq %r12, %r14
jne 0x2e9ca
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1083d(%rip), %rsi     # 0x3f285
leaq 0x1b97c(%rip), %rdx     # 0x4a3cb
movq %rbx, %rdi
movl $0x5d, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getstring.c
// Function: GetSpirVExtensions
static int GetSpirVExtensions(lua_State *L)
    {
    GLsizei i, count;
    const GLubyte *s;
    GLboolean byname = optboolean(L, 1, 0);

    count = getSizei(L, GL_NUM_SPIR_V_EXTENSIONS);
    CheckError(L);

    lua_newtable(L);

    for(i=0; i<count; i++)
        {
        s = glGetStringi(GL_SPIR_V_EXTENSIONS, i);
        CheckError(L);
        if(s == NULL)
            return luaL_error(L, UNEXPECTED_ERROR);
        if(byname)
            {
            lua_pushboolean(L, 1);
            lua_setfield(L, -2, (char*)s);
            }
        else
            {
            lua_pushstring(L, (char*)s);
            lua_rawseti(L, -2, i+1);
            }
        }

    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x112d0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x9554, %esi           # imm = 0x9554
callq 0x11a70
movl %eax, %r14d
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11320
testl %r14d, %r14d
jle 0x2eb21
movl %r14d, %r12d
xorl %r14d, %r14d
movq 0x27eea(%rip), %r13     # 0x569a8
movl $0x9553, %edi           # imm = 0x9553
movl %r14d, %esi
callq *(%r13)
movq %rax, %r15
movq %rbx, %rdi
callq 0x11870
testq %r15, %r15
je 0x2eb35
movq %rbx, %rdi
testb %bpl, %bpl
je 0x2eb01
movl $0x1, %esi
callq 0x117e0
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x11890
incq %r14
jmp 0x2eb1c
movq %r15, %rsi
callq 0x110c0
incq %r14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r14, %rdx
callq 0x11790
cmpq %r12, %r14
jne 0x2eabe
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10749(%rip), %rsi     # 0x3f285
leaq 0x1b888(%rip), %rdx     # 0x4a3cb
movq %rbx, %rdi
movl $0x7d, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetUniformLocation
static int GetUniformLocation(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    const GLchar *name = luaL_checkstring(L, 2);
    GLint loc = glGetUniformLocation(program, name);
    CheckError(L);
    if(loc==-1)
        return luaL_error(L, "invalid name '%s'", name);
    lua_pushinteger(L, loc);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x27866(%rip), %rax     # 0x56600
movl %r15d, %edi
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x2edcc
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b732(%rip), %rsi     # 0x4a505
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetActiveUniformName
static int GetActiveUniformName(lua_State *L)
    {
    GLsizei maxlen, length;
    GLchar *name;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);

    maxlen = ActiveUniformMaxLength(L, program);
    name = (GLchar*)Malloc(L, maxlen*sizeof(GLchar));
    glGetActiveUniformName(program, index, maxlen, &length, name);
    CheckErrorFree(L, name);
    if(length > 0) 
        lua_pushstring(L, name);
    Free(L, name);
    return (length > 0) ? 1 : luaL_error(L, "invalid index %d", index);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq 0x27f34(%rip), %rax     # 0x56d50
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b87, %esi           # imm = 0x8B87
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r12), %eax
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %r12
movq 0x27f16(%rip), %rax     # 0x56d68
movq %rsp, %rbp
movl %r15d, %edi
movl %r14d, %esi
movl %r13d, %edx
movq %rbp, %rcx
movq %r12, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11540
cmpl $0x0, (%rbp)
jle 0x2ee82
movq %rbx, %rdi
movq %r12, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11360
cmpl $0x0, (%rsp)
movl $0x1, %eax
jg 0x2eeac
leaq 0x1b678(%rip), %rsi     # 0x4a517
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x11ae0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetUniformIndices
static int GetUniformIndices(lua_State *L)
    {
    GLsizei i, count;
    const GLchar **names;
    GLuint *indices;
    GLuint program = luaL_checkinteger(L, 1);
    i = 2;
    while(!lua_isnoneornil(L, i)) luaL_checkstring(L, i++);
    if(i == 2)
        return luaL_argerror(L, 2, "string expected");
    count = i - 2;
    names = (const GLchar**)Malloc2(L, count*sizeof(GLchar*), (void**)&indices, count*sizeof(GLuint));
    for(i = 0; i < count; i++)
        names[i] = lua_tostring(L, i + 2);
    glGetUniformIndices(program, count, names, indices);
    CheckErrorFree2(L, names, indices);
    for(i = 0; i < count; i++)
        {
        if(indices[i] == GL_INVALID_INDEX)
            {
            lua_pushfstring(L, "invalid name '%s'", names[i]);
            Free(L, names);
            Free(L, indices);
            return lua_error(L);
            }
        }
    for(i = 0; i < count; i++)
        lua_pushinteger(L, indices[i]);
    Free(L, names);
    Free(L, indices);
    return count;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x2efca
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %r14d, %r14d
leal 0x2(%r14), %esi
leal 0x3(%r14), %ebp
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11850
incq %r14
addq $0x4, %r13
addq $0x8, %r15
testl %eax, %eax
jg 0x2eef4
testl %r14d, %r14d
je 0x2efca
movq %rsp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x116f0
movq %rax, %r15
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11940
movq %rax, (%r15,%r13,8)
incq %r13
cmpq %r13, %r14
jne 0x2ef3f
movq 0x27530(%rip), %rax     # 0x56490
movq (%rsp), %rcx
movl %r12d, %edi
movl %r14d, %esi
movq %r15, %rdx
callq *(%rax)
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x111d0
xorl %eax, %eax
movq (%rsp), %rcx
cmpl $-0x1, (%rcx,%rax,4)
je 0x2efec
incq %rax
cmpq %rax, %r14
jne 0x2ef84
xorl %r12d, %r12d
movq %r14, %r13
movq (%rsp), %rax
movl (%rax,%r12), %esi
movq %rbx, %rdi
callq 0x113b0
addq $0x4, %r12
decq %r13
jne 0x2ef98
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x11360
jmp 0x2f023
leaq 0x1002f(%rip), %rdx     # 0x3f000
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11930
movq (%r15,%rax,8), %rdx
leaq 0x1b50e(%rip), %rsi     # 0x4a505
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11160
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x11360
movq %rbx, %rdi
callq 0x11630
movl %eax, %r14d
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_O3/stetre[P]moongl/src/getuniform.c
// Function: GetActiveUniform
static int GetActiveUniform(lua_State *L)
/* name, type, size = get_active_uniform(program, index) */
    {
    GLsizei maxlen, length;
    GLchar *name;
    GLsizei size;
    GLenum type;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    maxlen = ActiveUniformMaxLength(L, program);
    name = (GLchar*)Malloc(L, maxlen*sizeof(GLchar));
    glGetActiveUniform(program, index, maxlen, &length, &size, &type, name);
    CheckErrorFree(L, name);
    if(length == 0)
        {
        Free(L, name);
        return luaL_error(L, "invalid index %d", index);
        }
    lua_pushstring(L, name);
    pushglsltype(L, type);
    lua_pushinteger(L, size);
    Free(L, name);
    return 3;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq 0x27ce6(%rip), %rax     # 0x56d50
leaq 0x14(%rsp), %r15
movl %r12d, %edi
movl $0x8b87, %esi           # imm = 0x8B87
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %eax
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %r15
movq 0x27af1(%rip), %rax     # 0x56b90
movq %r15, (%rsp)
leaq 0x14(%rsp), %rbp
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
movl %r12d, %edi
movl %r14d, %esi
movl %r13d, %edx
movq %rbp, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
cmpl $0x0, (%rbp)
je 0x2f10c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x110c0
movl 0xc(%rsp), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11110
movslq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movl $0x3, %eax
jmp 0x2f12b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
leaq 0x1b3f9(%rip), %rsi     # 0x4a517
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x11ae0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetUniformBlockIndex
static int GetUniformBlockIndex(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    const char *name = luaL_checkstring(L, 2);
    GLuint index = glGetUniformBlockIndex(program, 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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x279b2(%rip), %rax     # 0x56dc8
movl %r15d, %edi
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x2f447
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b0b7(%rip), %rsi     # 0x4a505
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_O3/stetre[P]moongl/src/getuniform.c
// Function: GetActiveUniformBlockName
static int GetActiveUniformBlockName(lua_State *L)
    {
    GLsizei length;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLsizei bufsz = GetAUB_NameLength(L, program, index);
    GLchar *name = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetActiveUniformBlockName(program, index, bufsz, &length, name);
    CheckErrorFree(L, name);
    lua_pushstring(L, name);
    Free(L, name);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq 0x27497(%rip), %rax     # 0x56938
leaq 0xc(%rsp), %r12
movl %r14d, %edi
movl %r15d, %esi
movl $0x8a41, %edx           # imm = 0x8A41
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r12), %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %r13
movq 0x26dfe(%rip), %rax     # 0x562d8
leaq 0x8(%rsp), %rcx
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movq %r13, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11540
movq %rbx, %rdi
movq %r13, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetActiveUniformBlock
static int GetActiveUniformBlock(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLenum pname = checkblockpname(L, 3);
    switch(pname)
        {
        case GL_UNIFORM_BLOCK_BINDING:
        case GL_UNIFORM_BLOCK_DATA_SIZE:
        case GL_UNIFORM_BLOCK_NAME_LENGTH:
        case GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS:
        case GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:
                        return GetAUB_Int(L, program, index, pname);
        case GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:
        case GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER:
        case GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER:
        case GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER:
        case GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:
        case GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER:
                        return GetAUB_Boolean(L, program, index, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4d, %esi
movl $0x3, %edx
callq 0x11150
cmpl $0x8a43, %eax           # imm = 0x8A43
jg 0x2f59b
leal -0x8a3f(%rax), %ecx
cmpl $0x5, %ecx
jae 0x2f5d5
movq 0x273c4(%rip), %r8      # 0x56938
movq %rsp, %r12
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x113b0
jmp 0x2f610
leal -0x8a44(%rax), %ecx
cmpl $0x3, %ecx
jb 0x2f5e2
cmpl $0x90ec, %eax           # imm = 0x90EC
je 0x2f5e2
leaq 0xfcd1(%rip), %rsi      # 0x3f285
leaq 0x1af3d(%rip), %rdx     # 0x4a4f8
movq %rbx, %rdi
movl $0x13f, %ecx            # imm = 0x13F
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11ae0
movl %eax, %ecx
addl $0xffff7b10, %ecx       # imm = 0xFFFF7B10
cmpl $0x2, %ecx
jae 0x2f5ad
movq 0x2734f(%rip), %r8      # 0x56938
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movl (%r12), %esi
movq %rbx, %rdi
callq 0x117e0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/getuniform.c
// Function: GetActiveAtomicCounterBuffer
static int GetActiveAtomicCounterBuffer(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLenum pname = checkacbpname(L, 3);
    switch(pname)
        {
        case GL_ATOMIC_COUNTER_BUFFER_BINDING:
        case GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE:
        case GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS:
        case GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES:
                            return GetACB_Int(L, program, index, pname);
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER:
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER:
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER:
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER:
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER:
        case GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER:
                            return GetACB_Boolean(L, program, index, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4e, %esi
movl $0x3, %edx
callq 0x11150
leal -0x92c1(%rax), %ecx
cmpl $0xa, %ecx
ja 0x2f6eb
movl $0x7c0, %edx            # imm = 0x7C0
btl %ecx, %edx
jae 0x2f6a4
movq 0x274b5(%rip), %r8      # 0x56b30
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movl (%r12), %esi
movq %rbx, %rdi
callq 0x117e0
jmp 0x2f6da
movl $0x39, %edx
btl %ecx, %edx
jae 0x2f6eb
movq 0x2747b(%rip), %r8      # 0x56b30
movq %rsp, %r12
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x90ed, %eax           # imm = 0x90ED
je 0x2f674
leaq 0xfb8c(%rip), %rsi      # 0x3f285
leaq 0x1adf8(%rip), %rdx     # 0x4a4f8
movq %rbx, %rdi
movl $0x189, %ecx            # imm = 0x189
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11ae0