LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: GetTransformFeedback
static int GetTransformFeedback(lua_State *L)
    {
    GLuint index;
    GLint param;
    GLint64 param64;
    GLuint xfb = luaL_checkinteger(L, 1);
    GLenum pname = checktransformpname(L, 2);
    switch(pname)
        {
        case GL_TRANSFORM_FEEDBACK_PAUSED:
        case GL_TRANSFORM_FEEDBACK_ACTIVE:
                    glGetTransformFeedbackiv(xfb, pname, &param);
                    CheckError(L);
                    lua_pushboolean(L, param);
                    return 1;
        case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
                    index = luaL_checkinteger(L, 3);
                    glGetTransformFeedbacki_v(xfb, pname, index, &param);
                    CheckError(L);
                    lua_pushinteger(L, param);
                    return 1;
        case GL_TRANSFORM_FEEDBACK_BUFFER_START:
        case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:
                    index = luaL_checkinteger(L, 3);
                    glGetTransformFeedbacki64_v(xfb, pname, index, &param64);
                    CheckError(L);
                    lua_pushinteger(L, param64);
                    return 1;
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0xd, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %r15d
leal -0x8c84(%r15), %eax
cmpl $0x2, %eax
jb 0x3a410
leal -0x8e23(%r15), %eax
cmpl $0x2, %eax
jae 0x3a445
movq 0x1c39e(%rip), %rax     # 0x56788
leaq 0xc(%rsp), %r12
movl %r14d, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r12), %esi
movq %rbx, %rdi
callq 0x117e0
jmp 0x3a48a
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x1bfa4(%rip), %r8      # 0x563c8
leaq 0x10(%rsp), %r12
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movq (%r12), %rsi
jmp 0x3a482
cmpl $0x8c8f, %r15d          # imm = 0x8C8F
jne 0x3a49b
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x1c8fe(%rip), %r8      # 0x56d60
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8c8f, %esi           # imm = 0x8C8F
movl %eax, %edx
movq %r15, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4de3(%rip), %rsi      # 0x3f285
leaq 0x11557(%rip), %rdx     # 0x4ba00
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: ProvokingVertex
static int ProvokingVertex(lua_State *L)
    {
    GLenum mode = checkprovokemode(L, 1);
    glProvokingVertex(mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0xa, %esi
movl $0x1, %edx
callq 0x11150
movq 0x1c8f3(%rip), %rcx     # 0x56dd0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: ClipControl
static int ClipControl(lua_State *L)
    {
    GLenum origin = checkorigin(L, 1);
    GLenum depth = checkdepth(L, 2);
    glClipControl(origin, depth);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xb, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0xc, %esi
movl $0x2, %edx
callq 0x11150
movq 0x1c6bb(%rip), %rcx     # 0x56bd8
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: DepthRange
static int DepthRange(lua_State *L)
    {
    GLuint index;
    GLdouble near = luaL_checknumber(L, 1);
    GLdouble far = luaL_checknumber(L, 2);
    if(lua_isnoneornil(L, 3))
        glDepthRange(near, far);
    else
        {
        index = luaL_checkinteger(L, 3);
        glDepthRangeIndexed(index, near, far);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11a80
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
testl %eax, %eax
jle 0x3a594
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x1c85d(%rip), %rcx     # 0x56de0
movl %eax, %edi
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
callq *(%rcx)
jmp 0x3a5a4
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x115e0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: DepthRangeArray
static int DepthRangeArray(lua_State *L)
    {
    GLdouble *v;
    GLsizei count, i, arg;
    GLuint first = luaL_checkinteger(L, 1);
    arg=2;
    while(!lua_isnoneornil(L, arg)) 
        luaL_checknumber(L, arg++);
    count = arg - 2;    
    if((count==0) || ((count % 2) != 0))
        return luaL_error(L, NARGS_ERROR);
    v = (GLdouble*)Malloc(L, count*sizeof(GLdouble));
    arg=2;
    for(i = 0; i < count; i++)
        v[i] = lua_tonumber(L, arg++);
    glDepthRangeArrayv(first, count/2, v);
    Free(L, v);
    CheckError(L);
    return 0;
    }

// 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, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x3a686
xorl %r12d, %r12d
xorl %r15d, %r15d
leal 0x2(%r15), %esi
leal 0x3(%r15), %ebp
movq %rbx, %rdi
callq 0x11a80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11850
incq %r15
addq $0x8, %r12
testl %eax, %eax
jg 0x3a5ea
testl %r15d, %r15d
je 0x3a686
leal 0x1(%r15), %eax
andl $0x1, %eax
je 0x3a686
movq %rbx, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rbp
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11780
movsd %xmm0, (%r12,%r13,8)
incq %r13
decq %rbp
jne 0x3a631
movq 0x1bff4(%rip), %rax     # 0x56648
shrl %r15d
movl %r14d, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ef1(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
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/transform.c
// Function: Viewport
static int Viewport(lua_State *L)
    {
    GLuint index;
    GLfloat  v[4];
    GLint x, y;
    GLsizei w, h;
    if(lua_isnoneornil(L, 5))
        {
        x = luaL_checkinteger(L, 1);
        y = luaL_checkinteger(L, 2);
        w = luaL_checkinteger(L, 3);
        h = luaL_checkinteger(L, 4);
        glViewport(x, y, w, h);
        }
    else
        {
        index = luaL_checkinteger(L, 5);
        v[0] = luaL_checknumber(L, 1);
        v[1] = luaL_checknumber(L, 2);
        v[2] = luaL_checknumber(L, 3);
        v[3] = luaL_checknumber(L, 4);
        glViewportIndexedfv(index, v);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0x5, %esi
callq 0x11850
movq %rbx, %rdi
testl %eax, %eax
jle 0x3a752
movl $0x5, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11a80
movapd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
movapd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11a80
movapd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11a80
movapd (%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x20(%rsp), %xmm0
unpcklpd 0x10(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
cvtpd2ps %xmm0, %xmm0
cvtpd2ps %xmm1, %xmm1
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
leaq 0x30(%rsp), %rsi
movapd %xmm0, (%rsi)
movq 0x1c765(%rip), %rax     # 0x56eb0
movl %r14d, %edi
callq *(%rax)
jmp 0x3a79c
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %eax, %ecx
callq 0x11a50
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: ViewportArray
static int ViewportArray(lua_State *L)
    {
    GLfloat *v;
    GLsizei count, i, arg;
    GLuint first = luaL_checkinteger(L, 1);
    arg=2;
    count=0;
    while(lua_isnumber(L,arg++)) count++;
    if((count==0) || ((count % 4) != 0))
        return luaL_error(L, NARGS_ERROR);
    v = (GLfloat*)Malloc(L, count*sizeof(GLfloat));
    i=0; arg=2;
    while(i<count)
        v[i++] = lua_tonumber(L, arg++);
    glViewportArrayv(first, count/4, v);
    Free(L, v);
    CheckError(L);
    return 0;
    }

// 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, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11390
testl %eax, %eax
je 0x3a801
xorl %r12d, %r12d
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11390
incq %r15
addq $0x4, %r12
testl %eax, %eax
jne 0x3a7e4
testb $0x3, %r15b
je 0x3a820
leaq 0x4d76(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rbp
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11780
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%r13,4)
incq %r13
decq %rbp
jne 0x3a834
movq 0x1bcfd(%rip), %rax     # 0x56558
shrl $0x2, %r15d
movl %r14d, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/uniform.c
// Function: UniformMatrix
static int UniformMatrix(lua_State *L)
/* uniform_matrix(location, type, dim, transpose, dim values) */
    {
    GLint location = luaL_checkinteger(L, 1);
    GLenum type = checkuniformtype(L, 2);
    GLenum dim = checkmatrixdimensions(L, 3);
    GLboolean transpose = checkboolean(L, 4);
    switch(type)
        {
#define arg_first 5
        case GL_FLOAT: return UniformMatrixv_f(L, location, 1, dim, transpose, arg_first);
        case GL_DOUBLE: return UniformMatrixv_d(L, location, 1, dim, transpose, arg_first);
        case NONGL_BOOLEAN:
        case GL_INT:
        case GL_UNSIGNED_INT:
            return luaL_error(L, "operation not supported for this type");
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
#undef arg_first
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x34, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %r15d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
cmpl $0x1405, %r15d          # imm = 0x1405
jg 0x3afe1
leal -0x1404(%r15), %eax
cmpl $0x2, %eax
jb 0x3afc6
testl %r15d, %r15d
jne 0x3b03f
leaq 0x10b18(%rip), %rsi     # 0x4bae5
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
cmpl $0x140a, %r15d          # imm = 0x140A
je 0x3b019
cmpl $0x1406, %r15d          # imm = 0x1406
jne 0x3b03f
movzbl %al, %r8d
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
movl %ebp, %ecx
movl $0x5, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3bb35
movzbl %al, %r8d
movq %rbx, %rdi
movl %r14d, %esi
movl $0x1, %edx
movl %ebp, %ecx
movl $0x5, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3bd23
leaq 0x423f(%rip), %rsi      # 0x3f285
leaq 0xf4ae(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0x16a, %ecx            # imm = 0x16A
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/uniform.c
// Function: UniformMatrixv
static int UniformMatrixv(lua_State *L)
/* uniform_matrixv(location, count, type, dim, transpose, dim values) */
    {
    GLint location = luaL_checkinteger(L, 1);
    GLsizei count = luaL_checkinteger(L, 2);
    GLenum type = checkuniformtype(L, 3);
    GLenum dim = checkmatrixdimensions(L, 4);
    GLboolean transpose = checkboolean(L, 5);
    if(count<=0)
        return luaL_error(L, "count should be positive");
    switch(type)
        {
#define arg_first 6
        case GL_FLOAT: return UniformMatrixv_f(L, location, count, dim, transpose, arg_first);
        case GL_DOUBLE: return UniformMatrixv_d(L, location, count, dim, transpose, arg_first);
        case NONGL_BOOLEAN:
        case GL_INT:
        case GL_UNSIGNED_INT:
            return luaL_error(L, "operation not supported for this type");
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
#undef arg_first
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
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 $0x34, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11500
testl %r15d, %r15d
jle 0x3b0ed
cmpl $0x1405, %r12d          # imm = 0x1405
jg 0x3b106
leal -0x1404(%r12), %eax
cmpl $0x2, %eax
jb 0x3b0e4
testl %r12d, %r12d
jne 0x3b15c
leaq 0x109fa(%rip), %rsi     # 0x4bae5
jmp 0x3b0f4
leaq 0x109d8(%rip), %rsi     # 0x4bacc
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
cmpl $0x140a, %r12d          # imm = 0x140A
je 0x3b13a
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x3b15c
movzbl %al, %r8d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movl $0x6, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3bb35
movzbl %al, %r8d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movl $0x6, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3bd23
leaq 0x4122(%rip), %rsi      # 0x3f285
leaq 0xf391(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0x153, %ecx            # imm = 0x153
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/uniform.c
// Function: ProgramUniformMatrix
static int ProgramUniformMatrix(lua_State *L)
/* program_uniform_matrix(program, location, type, dim, transpose, dim values) */
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    GLenum type = checkuniformtype(L, 3);
    GLenum dim = checkmatrixdimensions(L, 4);
    GLboolean transpose = checkboolean(L, 5);
    switch(type)
        {
#define arg_first 6
        case GL_FLOAT: 
            return ProgramUniformMatrixv_f(L, program, location, 1, dim, transpose, arg_first);
        case GL_DOUBLE: 
            return ProgramUniformMatrixv_d(L, program, location, 1, dim, transpose, arg_first);
        case NONGL_BOOLEAN:
        case GL_INT:
        case GL_UNSIGNED_INT:
            return luaL_error(L, "operation not supported for this type");
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
#undef arg_first
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
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 %rbx, %rdi
movl $0x34, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11500
cmpl $0x1405, %r12d          # imm = 0x1405
jg 0x3b91c
leal -0x1404(%r12), %eax
cmpl $0x2, %eax
jb 0x3b8ff
testl %r12d, %r12d
jne 0x3b97f
leaq 0x101df(%rip), %rsi     # 0x4bae5
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
cmpl $0x140a, %r12d          # imm = 0x140A
je 0x3b951
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x3b97f
movl $0x6, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
callq 0x3bf0d
jmp 0x3b972
movl $0x6, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
callq 0x3c10f
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38ff(%rip), %rsi      # 0x3f285
leaq 0xeb6e(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0x1d3, %ecx            # imm = 0x1D3
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/uniform.c
// Function: ProgramUniformMatrixv
static int ProgramUniformMatrixv(lua_State *L)
/* program_uniform_matrixv(program, location, count, type, dim, transpose, dim values) */
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    GLsizei count = luaL_checkinteger(L, 3);
    GLenum type = checkuniformtype(L, 4);
    GLenum dim = checkmatrixdimensions(L, 5);
    GLboolean transpose = checkboolean(L, 6);
    if(count<=0)
        return luaL_error(L, "count should be positive");
    switch(type)
        {
#define arg_first 7
        case GL_FLOAT: 
            return ProgramUniformMatrixv_f(L, program, location, count, dim, transpose, arg_first);
        case GL_DOUBLE: 
            return ProgramUniformMatrixv_d(L, program, location, count, dim, transpose, arg_first);
        case NONGL_BOOLEAN:
        case GL_INT:
        case GL_UNSIGNED_INT:
            return luaL_error(L, "operation not supported for this type");
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
#undef arg_first
        }
    return 0;
    }

// 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, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x34, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r13d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x5, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11500
testl %r12d, %r12d
jle 0x3ba45
cmpl $0x1405, %r13d          # imm = 0x1405
jg 0x3ba64
leal -0x1404(%r13), %eax
cmpl $0x2, %eax
jb 0x3ba3c
testl %r13d, %r13d
jne 0x3bac5
leaq 0x100a2(%rip), %rsi     # 0x4bae5
jmp 0x3ba4c
leaq 0x10080(%rip), %rsi     # 0x4bacc
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
cmpl $0x140a, %r13d          # imm = 0x140A
je 0x3ba97
cmpl $0x1406, %r13d          # imm = 0x1406
jne 0x3bac5
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x3bf0d
jmp 0x3bab6
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x3c10f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37b9(%rip), %rsi      # 0x3f285
leaq 0xea28(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0x1b9, %ecx            # imm = 0x1B9
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/uniform.c
// Function: CheckN
static int CheckN(lua_State *L, int first)
    {
    int arg = first;
    while(!lua_isnoneornil(L, arg)) arg++;
    if(arg == first) return luaL_error(L, NARGS_ERROR);
    return arg - first;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl $0x1, %ebp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11850
incl %r14d
decl %ebp
testl %eax, %eax
jg 0x3baff
testl %ebp, %ebp
je 0x3bb20
negl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3a57(%rip), %rsi      # 0x3f57e
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/utils.c
// Function: moongl_checkcolor
int checkcolor(lua_State *L, int arg, GLfloat dst[4])
    {
    int i;
    if(lua_type(L, arg) == LUA_TTABLE)
        {
        for(i=0; i<4; i++)
            {
            lua_rawgeti(L, arg, i+1);
            dst[i] = luaL_checknumber(L, -1);
            lua_pop(L, 1);
            }
        }
    else if(lua_type(L, arg) == LUA_TNUMBER)
        {
        dst[0] = luaL_checknumber(L, arg);
        dst[1] = luaL_checknumber(L, arg+1);
        dst[2] = luaL_checknumber(L, arg+2);
        dst[3] = luaL_checknumber(L, arg+3);
        }
    else
        return luaL_error(L, "color expected");
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
callq 0x11850
cmpl $0x5, %eax
jne 0x3c59f
movl $0x1, %r12d
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x11400
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbx,%r12,4)
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116b0
incq %r12
cmpq $0x5, %r12
jne 0x3c561
jmp 0x3c604
movq %r14, %rdi
movl %r15d, %esi
callq 0x11850
cmpl $0x3, %eax
jne 0x3c612
movq %r14, %rdi
movl %r15d, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx)
leal 0x1(%r15), %esi
movq %r14, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rbx)
leal 0x2(%r15), %esi
movq %r14, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rbx)
addl $0x3, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xf5af(%rip), %rsi      # 0x4bbc8
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/utils.c
// Function: moongl_checktargetorname
GLuint checktargetorname(lua_State *L, int arg, GLenum *dst, uint32_t domain)
/* The element at the index arg on the Lua stack may be an enum (string), or an integer.
 * In the first case the enum code is stored in 'code' and 0 is returned.
 * In the second case the integer value is returned.
 */
    {
    if(lua_isstring(L, arg))
        {
        *dst = enums_check(L, domain, arg);
        return 0;
        }
    return (GLuint)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x110b0
movq %r15, %rdi
testl %eax, %eax
je 0x3c69b
movl %r14d, %esi
movl %ebp, %edx
callq 0x11150
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x3c6a2
movl %ebp, %esi
callq 0x11af0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/utils.c
// Function: moongl_checkdataptr
const char *checkdataptr(lua_State *L, int arg, size_t *len)
    {
    *len = 0;
    char *data = NULL;
    if(!lua_istable(L, arg)) return NULL;
    lua_rawgeti(L, arg, 1);
    data = checklightuserdata(L, -1);
    lua_pop(L, 1);
    lua_rawgeti(L, arg, 2);
    *len = luaL_checkinteger(L, -1);
    lua_pop(L, 1);
    return data;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, (%rdx)
callq 0x11850
cmpl $0x5, %eax
jne 0x3c72a
movl $0x1, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11400
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11770
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116b0
movl $0x2, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11400
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11af0
movq %rax, (%r14)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116b0
movq %r15, %rax
jmp 0x3c72c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/utils.c
// Function: moongl_sizeoftype
size_t sizeoftype(lua_State *L, int type)
    {
    switch(type)
        {
        case GL_NONE: return 0;
        case GL_UNSIGNED_BYTE: return sizeof(GLbyte);
        case GL_BYTE:  return sizeof(GLubyte);
        case GL_UNSIGNED_SHORT:  return sizeof(GLushort);
        case GL_SHORT:  return sizeof(GLshort);
        case GL_UNSIGNED_INT: return sizeof(GLuint);
        case GL_INT:  return sizeof(GLint);
        case GL_FIXED: return sizeof(GLfixed);
        case GL_HALF_FLOAT:  return sizeof(GLhalf);
        case GL_FLOAT:  return sizeof(GLfloat);
        case GL_DOUBLE: return sizeof(GLdouble);
        case GL_UNSIGNED_BYTE_3_3_2:
        case GL_UNSIGNED_BYTE_2_3_3_REV:  return sizeof(GLubyte);
        case GL_UNSIGNED_SHORT_5_6_5:
        case GL_UNSIGNED_SHORT_5_6_5_REV:
        case GL_UNSIGNED_SHORT_4_4_4_4:
        case GL_UNSIGNED_SHORT_4_4_4_4_REV:
        case GL_UNSIGNED_SHORT_5_5_5_1:
        case GL_UNSIGNED_SHORT_1_5_5_5_REV: return sizeof(GLshort);
        case GL_UNSIGNED_INT_8_8_8_8: 
        case GL_UNSIGNED_INT_8_8_8_8_REV: 
        case GL_UNSIGNED_INT_10_10_10_2: 
        case GL_UNSIGNED_INT_2_10_10_10_REV:
        case GL_UNSIGNED_INT_24_8:
        case GL_UNSIGNED_INT_10F_11F_11F_REV:
        case GL_UNSIGNED_INT_5_9_9_9_REV: return sizeof(GLuint);
        case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: return 8; /* 2*32 bit, see 8.4.4.2 */
        case GL_INT_2_10_10_10_REV: return sizeof(GLint);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
cmpl $0x8034, %esi           # imm = 0x8034
jg 0x3c766
cmpl $0x8031, %esi           # imm = 0x8031
jg 0x3c7b3
leal -0x1400(%rsi), %eax
cmpl $0xc, %eax
ja 0x3c7f6
leaq 0xf3af(%rip), %rcx      # 0x4bb0c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x8366, %esi           # imm = 0x8366
jg 0x3c78e
leal -0x8363(%rsi), %eax
cmpl $0x4, %eax
jb 0x3c7be
leal -0x8035(%rsi), %eax
cmpl $0x2, %eax
jb 0x3c7e2
cmpl $0x8362, %esi           # imm = 0x8362
je 0x3c7f0
jmp 0x3c7fd
cmpl $0x8c3d, %esi           # imm = 0x8C3D
jg 0x3c7c4
leal -0x8367(%rsi), %eax
cmpl $0x2, %eax
jb 0x3c7e2
cmpl $0x84fa, %esi           # imm = 0x84FA
je 0x3c7e2
cmpl $0x8c3b, %esi           # imm = 0x8C3B
je 0x3c7e2
jmp 0x3c7fd
leal -0x8033(%rsi), %eax
cmpl $0x2, %eax
jae 0x3c7e8
movl $0x2, %eax
retq
cmpl $0x8c3e, %esi           # imm = 0x8C3E
je 0x3c7e2
cmpl $0x8d9f, %esi           # imm = 0x8D9F
je 0x3c7e2
cmpl $0x8dad, %esi           # imm = 0x8DAD
jne 0x3c7fd
movl $0x8, %eax
retq
movl $0x4, %eax
retq
cmpl $0x8032, %esi           # imm = 0x8032
jne 0x3c7fd
movl $0x1, %eax
retq
testl %esi, %esi
jne 0x3c7fd
movl %esi, %eax
retq
pushq %rax
leaq 0x2a80(%rip), %rsi      # 0x3f285
leaq 0xf3e2(%rip), %rdx      # 0x4bbee
movl $0xc1, %ecx
xorl %eax, %eax
callq 0x11ae0
cltq
addq $0x8, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: PatchParameter
static int PatchParameter(lua_State *L)
/* patch_parameter(pname, val1, ...) */
    {
    int arg, i, count;
    GLint value;
    GLfloat *values;
    GLenum pname = checkpatchpname(L, 1);
    switch(pname)
        {
        case GL_PATCH_VERTICES:
                value = luaL_checkinteger(L, 2);
                glPatchParameteri(pname, value);
                CheckError(L);
                return 0;
        case GL_PATCH_DEFAULT_OUTER_LEVEL:
        case GL_PATCH_DEFAULT_INNER_LEVEL:
                arg = 2;
                while(!lua_isnoneornil(L, arg))
                    luaL_checknumber(L, arg++);
                if(arg==2)
                    luaL_checknumber(L, 2); /* raises an error */
                count = arg - 2;
                values = (GLfloat*)Malloc(L, count*sizeof(GLfloat));
                arg = 2;
                for(i=0; i<count; i++)
                    values[i] = lua_tonumber(L, arg++);
                glPatchParameterfv(pname, values);
                Free(L, values);
                CheckError(L);
                return 0;
        default:
            return luaL_error(L,UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x45, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %r14d
leal -0x8e73(%r14), %eax
cmpl $0x2, %eax
jae 0x3c906
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x3c894
movl $0x2, %ebp
movl %ebp, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
callq 0x11a80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11850
testl %eax, %eax
jg 0x3c874
cmpl $0x2, %ebp
jne 0x3c8a6
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
movl $0x2, %ebp
movslq %ebp, %rax
leaq -0x8(,%rax,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r15
cmpl $0x3, %ebp
jl 0x3c8ea
addl $-0x2, %ebp
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11780
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3c8ca
movq 0x19e7f(%rip), %rax     # 0x56770
movl %r14d, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
jmp 0x3c92c
cmpl $0x8e72, %r14d          # imm = 0x8E72
jne 0x3c945
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x19a15(%rip), %rcx     # 0x56338
movl $0x8e72, %edi           # imm = 0x8E72
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2939(%rip), %rsi      # 0x3f285
leaq 0xf4c9(%rip), %rdx      # 0x4be1c
movq %rbx, %rdi
movl $0x1ee, %ecx            # imm = 0x1EE
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/vertex_array.c
// Function: EnableVertexAttribArray
UINT2_FUNC(VertexAttribDivisor)

static int EnableVertexAttribArray(lua_State *L)
/* enable_vertex_attrib_array(index)
 * enable_vertex_attrib_array(array, index)
 */
    {
    GLuint index, array;    
    if(lua_isinteger(L, 2))
        {
        array = luaL_checkinteger(L, 1);
        index = luaL_checkinteger(L, 2);
        glEnableVertexArrayAttrib(array, index);
        }
    else
        {
        index = luaL_checkinteger(L, 1);
        glEnableVertexAttribArray(index);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
callq 0x115b0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x3cf42
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x19b6f(%rip), %rcx     # 0x56aa8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x3cf4e
movq 0x1961f(%rip), %rax     # 0x56568
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: DisableVertexAttribArray
static int DisableVertexAttribArray(lua_State *L)
/* disable_vertex_attrib_array(index)
 * disable_vertex_attrib_array(array, index)
 */
    {
    GLuint index, array;    
    if(lua_isinteger(L, 2))
        {
        array = luaL_checkinteger(L, 1);
        index = luaL_checkinteger(L, 2);
        glDisableVertexArrayAttrib(array, index);
        }
    else
        {
        index = luaL_checkinteger(L, 1);
        glDisableVertexAttribArray(index);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
callq 0x115b0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x3cfa1
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x19f20(%rip), %rcx     # 0x56eb8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x3cfad
movq 0x19a38(%rip), %rax     # 0x569e0
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: VertexAttribPointer
static int VertexAttribPointer(lua_State *L)
/* vertex_attrib_pointer(index, size, type, normalized, stride, pointer) */
    {
    GLuint index = luaL_checkinteger(L, 1);
    GLint size = luaL_checkinteger(L, 2); /* no. of components */
    GLenum type = checktype(L, 3);
    GLboolean normalized = checkboolean(L, 4);
    GLsizei stride = luaL_checkinteger(L, 5);
    intptr_t pointer = luaL_checkinteger(L, 6);

    if(size == 0)
        size = GL_BGRA;

    switch(type)
        {
        case GL_BYTE:
        case GL_UNSIGNED_BYTE:
        case GL_SHORT:
        case GL_UNSIGNED_SHORT:
        case GL_INT:
        case GL_UNSIGNED_INT:
        case GL_FLOAT:
        case GL_HALF_FLOAT:
        case GL_INT_2_10_10_10_REV:
        case GL_UNSIGNED_INT_2_10_10_10_REV:
        case GL_UNSIGNED_INT_10F_11F_11F_REV:
        case GL_FIXED:
                glVertexAttribPointer(index, size, type, normalized, stride, (void*)pointer);
                break;
        case GL_DOUBLE:
                glVertexAttribLPointer(index, size, GL_DOUBLE, stride, (void*)pointer);
                break;
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// 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, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
testl %r13d, %r13d
movl $0x80e1, %esi           # imm = 0x80E1
cmovnel %r13d, %esi
cmpl $0x8367, %r12d          # imm = 0x8367
jg 0x3d087
leal -0x1400(%r12), %ecx
cmpl $0xc, %ecx
ja 0x3d0c3
movl $0x187f, %edx           # imm = 0x187F
btl %ecx, %edx
jae 0x3d0a4
movq 0x1944d(%rip), %r10     # 0x564a8
movzbl %bpl, %ecx
movl %r14d, %edi
movl %r12d, %edx
movl %r15d, %r8d
movq %rax, %r9
callq *(%r10)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x8368, %r12d          # imm = 0x8368
je 0x3d054
cmpl $0x8d9f, %r12d          # imm = 0x8D9F
je 0x3d054
cmpl $0x8c3b, %r12d          # imm = 0x8C3B
je 0x3d054
jmp 0x3d0c3
cmpl $0xa, %ecx
jne 0x3d0c3
movq 0x199f0(%rip), %r9      # 0x56aa0
movl %r14d, %edi
movl $0x140a, %edx           # imm = 0x140A
movl %r15d, %ecx
movq %rax, %r8
callq *(%r9)
jmp 0x3d06e
leaq 0x21bb(%rip), %rsi      # 0x3f285
leaq 0xed4b(%rip), %rdx      # 0x4be1c
movq %rbx, %rdi
movl $0x110, %ecx            # imm = 0x110
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/vertex_array.c
// Function: VertexAttribPointerI
static int VertexAttribPointerI(lua_State *L)
/* vertex_attrib_i_pointer(index, size, type, stride, pointer) */
    {
    GLuint index = luaL_checkinteger(L, 1);
    GLint size = luaL_checkinteger(L, 2); /* no. of components */
    GLenum type = checktype(L, 3);
    GLsizei stride = luaL_checkinteger(L, 4);
    intptr_t pointer = luaL_checkinteger(L, 5);

    switch(type)
        {
        case GL_BYTE:
        case GL_UNSIGNED_BYTE:
        case GL_SHORT:
        case GL_UNSIGNED_SHORT:
        case GL_INT:
        case GL_UNSIGNED_INT:
                glVertexAttribIPointer(index, size, type, stride, (void*)pointer);
                break;
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
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 $0x7, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
leal -0x1400(%r12), %ecx
cmpl $0x5, %ecx
ja 0x3d183
movq 0x1952b(%rip), %r9      # 0x56688
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movq %rax, %r8
callq *(%r9)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x20fb(%rip), %rsi      # 0x3f285
leaq 0xec8b(%rip), %rdx      # 0x4be1c
movq %rbx, %rdi
movl $0x12b, %ecx            # imm = 0x12B
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: BindVertexBuffer
static int BindVertexBuffer(lua_State *L)
/* bind_vertex_buffer(index, buffer, offset, stride)
 * bind_vertex_buffer(array, index, buffer, offset, stride)
 */
    {
    int arg, named=0;
    GLuint array, index, buffer;
    GLintptr offset;
    GLsizei stride;
    arg = 1;
    if(lua_isinteger(L, 5))
        {
        named = 1;
        array = luaL_checkinteger(L, arg++);
        }
    index = luaL_checkinteger(L, arg++);
    buffer = luaL_checkinteger(L, arg++);
    offset = luaL_checkinteger(L, arg++);
    stride = luaL_checkinteger(L, arg++);
    if(named)
        glVertexArrayVertexBuffer(array, index, buffer, offset, stride);
    else    
        glBindVertexBuffer(index, buffer, offset, stride);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x5, %esi
callq 0x115b0
movl %eax, %ebp
testl %eax, %eax
je 0x3d391
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movl $0x2, %r12d
jmp 0x3d39c
movl $0x1, %r12d
movq %rax, 0x8(%rsp)
leal 0x1(%r12), %r14d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
leal 0x2(%r12), %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11af0
movq %rax, %r13
addl $0x3, %r12d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x3d404
movq 0x19084(%rip), %r9      # 0x56470
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r13d, %edx
movq %r14, %rcx
movl %eax, %r8d
callq *(%r9)
jmp 0x3d41b
movq 0x1983d(%rip), %r8      # 0x56c48
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movq %r14, %rdx
movl %eax, %ecx
callq *(%r8)
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/vertex_array.c
// Function: VertexAttribBinding
static int VertexAttribBinding(lua_State *L)
    {
    int arg, named = 0;
    GLuint array, attribindex, bindingindex;
    arg = 1;
    if(lua_isinteger(L, 3))
        {
        named = 1;
        array = luaL_checkinteger(L, arg++);
        }
    attribindex = luaL_checkinteger(L, arg++);
    bindingindex = luaL_checkinteger(L, arg++);
    if(named)
        glVertexArrayAttribBinding(array, attribindex, bindingindex);
    else
        glVertexAttribBinding(attribindex, bindingindex);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x3, %esi
callq 0x115b0
movl %eax, %ebp
testl %eax, %eax
je 0x3d6ac
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movl $0x2, %esi
jmp 0x3d6b1
movl $0x1, %esi
leal 0x1(%rsi), %r12d
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x3d6e2
movq 0x1917a(%rip), %rcx     # 0x56850
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3d6f0
movq 0x18d6f(%rip), %rcx     # 0x56458
movl %r15d, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: VertexBindingDivisor
static int VertexBindingDivisor(lua_State *L)
/* vertex_binding_divisor(index, divisor)
 * vertex_binding_divisor(array, index, divisor)
 */
    {
    GLuint index, divisor, array;   
    if(lua_isinteger(L, 3))
        {
        array = luaL_checkinteger(L, 1);
        index = luaL_checkinteger(L, 2);
        divisor = luaL_checkinteger(L, 3);
        glVertexArrayBindingDivisor(array, index, divisor);
        }
    else
        {
        index = luaL_checkinteger(L, 1);
        divisor = luaL_checkinteger(L, 2);
        glVertexBindingDivisor(index, divisor);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3, %esi
callq 0x115b0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
testl %ebp, %ebp
je 0x3d75d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x18f17(%rip), %rcx     # 0x56668
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3d76c
movq 0x1921c(%rip), %rax     # 0x56980
movl %r14d, %edi
movl %r15d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: BindAttribLocation
static int BindAttribLocation(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    const GLchar *name = luaL_checkstring(L, 3);
    glBindAttribLocation(program, index, name);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
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 $0x3, %esi
xorl %edx, %edx
callq 0x11440
movq 0x192e4(%rip), %rcx     # 0x56dc0
movl %r14d, %edi
movl %r15d, %esi
movq %rax, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/vertex_array.c
// Function: GetActiveAttrib
static int GetActiveAttrib(lua_State *L)
/* name, type, size = get_active_attribute(program, index) */
    {
    GLint size;
    GLenum type;
    GLsizei length;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLsizei bufsz = programGet(L, program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH);
    GLchar *name = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetActiveAttrib(program, index, bufsz, &length, &size, &type, name);
    CheckErrorFree(L, name);
    if(length == 0)
        { Free(L, name); return 0; }
    lua_pushstring(L, name);
    Free(L, name);
    pushglsltype(L, type);
    lua_pushinteger(L, size);
    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, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl %r15d, %esi
movl $0x8b8a, %edx           # imm = 0x8B8A
callq 0x11840
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %r14
movq 0x18bf3(%rip), %rax     # 0x56740
movq %r14, (%rsp)
leaq 0x14(%rsp), %rbp
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
movl %r15d, %edi
movl %r12d, %esi
movl %r13d, %edx
movq %rbp, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
cmpl $0x0, (%rbp)
je 0x3dbba
movq %rbx, %rdi
movq %r14, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl 0xc(%rsp), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11110
movslq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x3, %eax
jmp 0x3dbc7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
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/vertex_array.c
// Function: GetAttribLocation
static int GetAttribLocation(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    const GLchar *name = luaL_checkstring(L, 2);
    GLint index = glGetAttribLocation(program, name);
    CheckError(L);
    lua_pushinteger(L, index);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11440
movq 0x18fd0(%rip), %rcx     # 0x56bd0
movl %r14d, %edi
movq %rax, %rsi
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/whole_framebuffer.c
// Function: ColorMask
static int ColorMask(lua_State *L)
    {
    GLuint buf;
    GLboolean r, g, b, a;
    if(lua_isinteger(L, 1))
        {
        buf = luaL_checkinteger(L, 1);
        r = checkboolean(L, 2);
        g = checkboolean(L, 3);
        b = checkboolean(L, 4);
        a = checkboolean(L, 5);
        glColorMaski(buf, r, g, b, a);
        }
    else
        {
        r = checkboolean(L, 1);
        g = checkboolean(L, 2);
        b = checkboolean(L, 3);
        a = checkboolean(L, 4);
        glColorMask(r, g, b, a);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x115b0
movq %rbx, %rdi
movl $0x1, %esi
testl %eax, %eax
je 0x3dcc2
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11500
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11500
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
movl %eax, %r12d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11500
movq 0x1918e(%rip), %r9      # 0x56e38
movzbl %bpl, %esi
movzbl %r15b, %edx
movzbl %r12b, %ecx
movzbl %al, %r8d
movl %r14d, %edi
callq *(%r9)
jmp 0x3dd0a
callq 0x11500
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11500
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11500
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
movzbl %bpl, %edi
movzbl %r14b, %esi
movzbl %r15b, %edx
movzbl %al, %ecx
callq 0x114e0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/whole_framebuffer.c
// Function: StencilMask
BOOLEAN_FUNC(DepthMask)

static int StencilMask(lua_State *L)
    {
    GLenum face;
    GLuint mask = luaL_checkinteger(L, 1);
    if(lua_isstring(L, 2))
        {
        face = checkface(L, 2);
        glStencilMaskSeparate(face, mask);
        }
    else
        glStencilMask(mask);
    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 $0x2, %esi
callq 0x110b0
testl %eax, %eax
je 0x3dd86
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x2, %edx
callq 0x11150
movq 0x186ab(%rip), %rcx     # 0x56428
movl %eax, %edi
movl %r14d, %esi
callq *(%rcx)
jmp 0x3dd8e
movl %r14d, %edi
callq 0x112e0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/whole_framebuffer.c
// Function: Clear
static int Clear(lua_State *L)
    {
    GLbitfield mask = CheckBufferBit(L, 1, 0);
    glClear(mask);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x19b45(%rip), %rcx     # 0x578f0
movl $0x1, %esi
xorl %edx, %edx
callq 0x11b50
movl %eax, %edi
callq 0x111e0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq