LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x2, %r15d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x3a55c
movl $0x2, %esi
leal 0x1(%rsi), %r15d
movq %rbx, %rdi
callq 0x11a80
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11860
movl %r15d, %esi
testl %eax, %eax
jg 0x3a53e
movl %r15d, %ebp
addl $-0x2, %ebp
setne %al
testb $0x1, %r15b
sete %cl
testb %cl, %al
je 0x3a5e1
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r12
cmpl $0x3, %r15d
jl 0x3a5aa
movl %ebp, %r15d
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11790
movsd %xmm0, (%r12,%r13,8)
incq %r13
cmpq %r13, %r15
jne 0x3a58e
movq 0x1c097(%rip), %rax     # 0x56648
sarl %ebp
movl %r14d, %edi
movl %ebp, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f96(%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_O1/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 $0x18, %rsp
movq %rdi, %rbx
movl $0x5, %esi
callq 0x11860
movq %rbx, %rdi
testl %eax, %eax
jle 0x3a69b
movl $0x5, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movq %rsp, %r15
movss %xmm0, (%r15)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r15)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%r15)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%r15)
movq 0x1c81f(%rip), %rax     # 0x56eb0
movl %r14d, %edi
movq %r15, %rsi
callq *(%rax)
jmp 0x3a6e5
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 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x113a0
testl %eax, %eax
je 0x3a741
movl $0x3, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x113a0
incl %ebp
testl %eax, %eax
jne 0x3a72c
addl $-0x3, %ebp
jmp 0x3a743
xorl %ebp, %ebp
testl %ebp, %ebp
setne %al
testb $0x3, %bpl
sete %cl
testb %cl, %al
je 0x3a7c4
movl %ebp, %r12d
leaq (,%r12,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r15
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11790
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3a76c
movq 0x1bdc5(%rip), %rax     # 0x56558
shrl $0x2, %ebp
movl %r14d, %edi
movl %ebp, %esi
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4db3(%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
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11510
cmpl $0x1405, %r15d          # imm = 0x1405
jg 0x3af35
leal -0x1404(%r15), %eax
cmpl $0x2, %eax
jb 0x3af1a
testl %r15d, %r15d
jne 0x3af93
leaq 0x10bc4(%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 0x3af6d
cmpl $0x1406, %r15d          # imm = 0x1406
jne 0x3af93
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 0x3ba89
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 0x3bc5d
leaq 0x42eb(%rip), %rsi      # 0x3f285
leaq 0xf55a(%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_O1/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 0x11160
movl %eax, %r12d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x4, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11510
testl %r15d, %r15d
jle 0x3b041
cmpl $0x1405, %r12d          # imm = 0x1405
jg 0x3b05a
leal -0x1404(%r12), %eax
cmpl $0x2, %eax
jb 0x3b038
testl %r12d, %r12d
jne 0x3b0b0
leaq 0x10aa6(%rip), %rsi     # 0x4bae5
jmp 0x3b048
leaq 0x10a84(%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 0x3b08e
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x3b0b0
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 0x3ba89
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 0x3bc5d
leaq 0x41ce(%rip), %rsi      # 0x3f285
leaq 0xf43d(%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_O1/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 0x11160
movl %eax, %r12d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x4, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11510
cmpl $0x1405, %r12d          # imm = 0x1405
jg 0x3b870
leal -0x1404(%r12), %eax
cmpl $0x2, %eax
jb 0x3b853
testl %r12d, %r12d
jne 0x3b8d3
leaq 0x1028b(%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 0x3b8a5
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x3b8d3
movl $0x6, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
callq 0x3be2d
jmp 0x3b8c6
movl $0x6, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
callq 0x3c00f
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39ab(%rip), %rsi      # 0x3f285
leaq 0xec1a(%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_O1/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 0x11160
movl %eax, %r13d
movq %rbx, %rdi
movl $0x35, %esi
movl $0x5, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11510
testl %r12d, %r12d
jle 0x3b999
cmpl $0x1405, %r13d          # imm = 0x1405
jg 0x3b9b8
leal -0x1404(%r13), %eax
cmpl $0x2, %eax
jb 0x3b990
testl %r13d, %r13d
jne 0x3ba19
leaq 0x1014e(%rip), %rsi     # 0x4bae5
jmp 0x3b9a0
leaq 0x1012c(%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 0x3b9eb
cmpl $0x1406, %r13d          # imm = 0x1406
jne 0x3ba19
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x3be2d
jmp 0x3ba0a
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x3c00f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3865(%rip), %rsi      # 0x3f285
leaq 0xead4(%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_O1/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 0x11860
incl %r14d
decl %ebp
testl %eax, %eax
jg 0x3ba53
testl %ebp, %ebp
je 0x3ba74
negl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3b03(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x11860
cmpl $0x5, %eax
jne 0x3c488
movl $0x1, %r12d
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x11410
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 0x116c0
incq %r12
cmpq $0x5, %r12
jne 0x3c44a
jmp 0x3c4ed
movq %r14, %rdi
movl %r15d, %esi
callq 0x11860
cmpl $0x3, %eax
jne 0x3c4fb
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 0xf6c6(%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_O1/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 0x3c584
movl %r14d, %esi
movl %ebp, %edx
callq 0x11160
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x3c58b
movl %ebp, %esi
callq 0x11af0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11860
cmpl $0x5, %eax
jne 0x3c613
movl $0x1, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11410
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11780
movq %rax, %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116c0
movl $0x2, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11410
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x11af0
movq %rax, (%r14)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116c0
movq %r15, %rax
jmp 0x3c615
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x3c64f
cmpl $0x8031, %esi           # imm = 0x8031
jg 0x3c69c
leal -0x1400(%rsi), %eax
cmpl $0xc, %eax
ja 0x3c6df
leaq 0xf4c6(%rip), %rcx      # 0x4bb0c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x8366, %esi           # imm = 0x8366
jg 0x3c677
leal -0x8363(%rsi), %eax
cmpl $0x4, %eax
jb 0x3c6a7
leal -0x8035(%rsi), %eax
cmpl $0x2, %eax
jb 0x3c6cb
cmpl $0x8362, %esi           # imm = 0x8362
je 0x3c6d9
jmp 0x3c6e6
cmpl $0x8c3d, %esi           # imm = 0x8C3D
jg 0x3c6ad
leal -0x8367(%rsi), %eax
cmpl $0x2, %eax
jb 0x3c6cb
cmpl $0x84fa, %esi           # imm = 0x84FA
je 0x3c6cb
cmpl $0x8c3b, %esi           # imm = 0x8C3B
je 0x3c6cb
jmp 0x3c6e6
leal -0x8033(%rsi), %eax
cmpl $0x2, %eax
jae 0x3c6d1
movl $0x2, %eax
retq
cmpl $0x8c3e, %esi           # imm = 0x8C3E
je 0x3c6cb
cmpl $0x8d9f, %esi           # imm = 0x8D9F
je 0x3c6cb
cmpl $0x8dad, %esi           # imm = 0x8DAD
jne 0x3c6e6
movl $0x8, %eax
retq
movl $0x4, %eax
retq
cmpl $0x8032, %esi           # imm = 0x8032
jne 0x3c6e6
movl $0x1, %eax
retq
testl %esi, %esi
jne 0x3c6e6
movl %esi, %eax
retq
pushq %rax
leaq 0x2b97(%rip), %rsi      # 0x3f285
leaq 0xf4f9(%rip), %rdx      # 0x4bbee
movl $0xc1, %ecx
xorl %eax, %eax
callq 0x11ae0
cltq
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11160
movl %eax, %r14d
leal -0x8e73(%r14), %eax
cmpl $0x2, %eax
jae 0x3c7ee
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x3c77c
movl $0x2, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
callq 0x11a80
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11860
movl %ebp, %esi
testl %eax, %eax
jg 0x3c761
cmpl $0x2, %ebp
jne 0x3c78e
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
movslq %ebp, %rax
leaq -0x8(,%rax,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r15
cmpl $0x3, %ebp
jl 0x3c7d2
addl $-0x2, %ebp
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11790
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3c7b2
movq 0x19f97(%rip), %rax     # 0x56770
movl %r14d, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11370
jmp 0x3c814
cmpl $0x8e72, %r14d          # imm = 0x8E72
jne 0x3c82d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x19b2d(%rip), %rcx     # 0x56338
movl $0x8e72, %edi           # imm = 0x8E72
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a51(%rip), %rsi      # 0x3f285
leaq 0xf5e1(%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_O1/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 0x115c0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x3ce32
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x19c7f(%rip), %rcx     # 0x56aa8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x3ce3e
movq 0x1972f(%rip), %rax     # 0x56568
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x115c0
movl %eax, %ebp
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x3ce91
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x1a030(%rip), %rcx     # 0x56eb8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x3ce9d
movq 0x19b48(%rip), %rax     # 0x569e0
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x11160
movl %eax, %r12d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11510
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 0x3cf77
leal -0x1400(%r12), %ecx
cmpl $0xc, %ecx
ja 0x3cfb3
movl $0x187f, %edx           # imm = 0x187F
btl %ecx, %edx
jae 0x3cf94
movq 0x1955d(%rip), %r10     # 0x564a8
movzbl %bpl, %ecx
movl %r14d, %edi
movl %r12d, %edx
movl %r15d, %r8d
movq %rax, %r9
callq *(%r10)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x8368, %r12d          # imm = 0x8368
je 0x3cf44
cmpl $0x8d9f, %r12d          # imm = 0x8D9F
je 0x3cf44
cmpl $0x8c3b, %r12d          # imm = 0x8C3B
je 0x3cf44
jmp 0x3cfb3
cmpl $0xa, %ecx
jne 0x3cfb3
movq 0x19b00(%rip), %r9      # 0x56aa0
movl %r14d, %edi
movl $0x140a, %edx           # imm = 0x140A
movl %r15d, %ecx
movq %rax, %r8
callq *(%r9)
jmp 0x3cf5e
leaq 0x22cb(%rip), %rsi      # 0x3f285
leaq 0xee5b(%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_O1/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 0x11160
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 0x3d073
movq 0x1963b(%rip), %r9      # 0x56688
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movq %rax, %r8
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x220b(%rip), %rsi      # 0x3f285
leaq 0xed9b(%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_O1/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 0x115c0
movl %eax, %ebp
testl %eax, %eax
je 0x3d281
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movl $0x2, %r12d
jmp 0x3d28c
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 0x3d2f4
movq 0x19194(%rip), %r9      # 0x56470
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r13d, %edx
movq %r14, %rcx
movl %eax, %r8d
callq *(%r9)
jmp 0x3d30b
movq 0x1994d(%rip), %r8      # 0x56c48
movq 0x10(%rsp), %rdi
movl %r13d, %esi
movq %r14, %rdx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x115c0
movl %eax, %ebp
testl %eax, %eax
je 0x3d578
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movl $0x2, %esi
jmp 0x3d57d
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 0x3d5ae
movq 0x192ae(%rip), %rcx     # 0x56850
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3d5bc
movq 0x18ea3(%rip), %rcx     # 0x56458
movl %r15d, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x115c0
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 0x3d629
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x1904b(%rip), %rcx     # 0x56668
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3d638
movq 0x19350(%rip), %rax     # 0x56980
movl %r14d, %edi
movl %r15d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x11450
movq 0x19418(%rip), %rcx     # 0x56dc0
movl %r14d, %edi
movl %r15d, %esi
movq %rax, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11850
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11200
movq %rax, %r14
movq 0x18d27(%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 0x11550
cmpl $0x0, (%rbp)
je 0x3da86
movq %rbx, %rdi
movq %r14, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11370
movl 0xc(%rsp), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11120
movslq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x3, %eax
jmp 0x3da93
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11370
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x11450
movq 0x19104(%rip), %rcx     # 0x56bd0
movl %r14d, %edi
movq %rax, %rsi
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x115c0
movq %rbx, %rdi
movl $0x1, %esi
testl %eax, %eax
je 0x3db8e
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11510
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11510
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11510
movl %eax, %r12d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11510
movq 0x192c2(%rip), %r9      # 0x56e38
movzbl %bpl, %esi
movzbl %r15b, %edx
movzbl %r12b, %ecx
movzbl %al, %r8d
movl %r14d, %edi
callq *(%r9)
jmp 0x3dbd6
callq 0x11510
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11510
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11510
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11510
movzbl %bpl, %edi
movzbl %r14b, %esi
movzbl %r15b, %edx
movzbl %al, %ecx
callq 0x114f0
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x3dc52
movq %rbx, %rdi
movl $0x1f, %esi
movl $0x2, %edx
callq 0x11160
movq 0x187df(%rip), %rcx     # 0x56428
movl %eax, %edi
movl %r14d, %esi
callq *(%rcx)
jmp 0x3dc5a
movl %r14d, %edi
callq 0x112f0
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x19c79(%rip), %rcx     # 0x578f0
movl $0x1, %esi
xorl %edx, %edx
callq 0x11b50
movl %eax, %edi
callq 0x111f0
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/whole_framebuffer.c
// Function: ClearColor
static int ClearColor(lua_State *L)
    {
    GLfloat color[4];
    checkcolor(L, 1, color);
    glClearColor(color[0], color[1], color[2], color[3]);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x11400
movss (%r14), %xmm0
movss 0x4(%r14), %xmm1
movss 0x8(%r14), %xmm2
movss 0xc(%r14), %xmm3
callq 0x11390
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/whole_framebuffer.c
// Function: DrawBuffers
static int DrawBuffers(lua_State *L)
    {
    int named, arg = 1;
    GLuint framebuffer = 0;
    GLsizei n;
    GLenum *bufs;
    if(lua_isinteger(L, arg))
        {
        named = 1;
        framebuffer = luaL_checkinteger(L, arg++);
        }
    else
        named = 0;
    bufs = CheckBufList(L, arg, &n);
    if(named)
        glNamedFramebufferDrawBuffers(framebuffer, n, bufs);
    else
        glDrawBuffers(n, bufs);
    Free(L, bufs);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %r12d
movl $0x1, %esi
callq 0x115c0
movl %eax, %ebp
testl %eax, %eax
je 0x3ddce
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movl $0x2, %r12d
jmp 0x3ddd7
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x3deaa
movl %ebp, 0x8(%rsp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11230
movq %rax, %r15
testl %r15d, %r15d
jne 0x3de12
movq %rbx, %rdi
movl $0x4f, %esi
movl %r12d, %edx
callq 0x11160
movslq %r15d, %rbp
leaq (,%rbp,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r13
testl %r15d, %r15d
jle 0x3df38
negq %rbp
movl $0x1, %r14d
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x11410
movq %rbx, %rdi
movl $0x4f, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leaq 0xc(%rsp), %rcx
callq 0x11420
movl %eax, -0x4(%r13,%r14,4)
cmpl $0x0, 0xc(%rsp)
je 0x3de88
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
movq %rbx, %rdi
movl $0x4f, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11160
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x116c0
leaq (%r14,%rbp), %rax
incq %rax
incq %r14
cmpq $0x1, %rax
jne 0x3de3a
jmp 0x3df38
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11860
movl %r12d, %r15d
testl %eax, %eax
jle 0x3dee1
movl %r12d, %r15d
movq %rbx, %rdi
movl $0x4f, %esi
movl %r15d, %edx
callq 0x11160
incl %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11860
testl %eax, %eax
jg 0x3debf
subl %r12d, %r15d
jne 0x3def6
movq %rbx, %rdi
movl $0x4f, %esi
movl %r12d, %edx
callq 0x11160
movslq %r15d, %r14
leaq (,%r14,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r13
testl %r14d, %r14d
jle 0x3df3c
movl %ebp, 0x8(%rsp)
movl %r12d, %r12d
xorl %ebp, %ebp
leal (%r12,%rbp), %edx
movq %rbx, %rdi
movl $0x4f, %esi
callq 0x11160
movl %eax, (%r13,%rbp,4)
incq %rbp
cmpq %rbp, %r14
jne 0x3df1a
movl 0x8(%rsp), %ebp
testl %ebp, %ebp
je 0x3df56
movq 0x18c19(%rip), %rax     # 0x56b60
movq 0x10(%rsp), %rdi
movl %r15d, %esi
movq %r13, %rdx
callq *(%rax)
jmp 0x3df65
movq 0x18e93(%rip), %rax     # 0x56df0
movl %r15d, %edi
movq %r13, %rsi
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq