LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x34
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r12d
pushq $0x35
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11500
testl %r15d, %r15d
jle 0x37e5e
leal -0x1404(%r12), %ecx
cmpl $0x2, %ecx
jb 0x37e67
testl %r12d, %r12d
je 0x37e67
cmpl $0x140a, %r12d          # imm = 0x140A
je 0x37e80
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x37ea0
movzbl %al, %r8d
pushq $0x6
popq %r9
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x38844
leaq 0xfc8f(%rip), %rsi      # 0x47af4
jmp 0x37e6e
leaq 0xfc9f(%rip), %rsi      # 0x47b0d
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movzbl %al, %r8d
pushq $0x6
popq %r9
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x389ef
leaq 0x33de(%rip), %rsi      # 0x3b285
leaq 0xe649(%rip), %rdx      # 0x464f7
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x34
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r12d
pushq $0x35
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11500
leal -0x1404(%r12), %ecx
cmpl $0x2, %ecx
jb 0x38664
testl %r12d, %r12d
je 0x38664
cmpl $0x140a, %r12d          # imm = 0x140A
je 0x38681
cmpl $0x1406, %r12d          # imm = 0x1406
jne 0x386ad
movl $0x6, (%rsp)
movzbl %al, %r9d
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %r8d
callq 0x38b96
jmp 0x386a0
leaq 0xf4a2(%rip), %rsi      # 0x47b0d
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movl $0x6, (%rsp)
movzbl %al, %r9d
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %ebp, %r8d
callq 0x38d50
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2bd1(%rip), %rsi      # 0x3b285
leaq 0xde3c(%rip), %rdx      # 0x464f7
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x34
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r13d
pushq $0x35
popq %rsi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11500
testl %r12d, %r12d
jle 0x38780
leal -0x1404(%r13), %ecx
cmpl $0x2, %ecx
jb 0x38789
testl %r13d, %r13d
je 0x38789
cmpl $0x140a, %r13d          # imm = 0x140A
je 0x387a8
cmpl $0x1406, %r13d          # imm = 0x1406
jne 0x387d6
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x38b96
jmp 0x387c7
leaq 0xf36d(%rip), %rsi      # 0x47af4
jmp 0x38790
leaq 0xf37d(%rip), %rsi      # 0x47b0d
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movl $0x7, (%rsp)
movzbl %al, %r9d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0x38d50
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2aa8(%rip), %rsi      # 0x3b285
leaq 0xdd13(%rip), %rdx      # 0x464f7
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_O2/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
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11850
incl %r14d
decl %ebp
testl %eax, %eax
jg 0x3880e
testl %ebp, %ebp
je 0x3882f
negl %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d48(%rip), %rsi      # 0x3b57e
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
callq 0x11850
cmpl $0x5, %eax
jne 0x39170
pushq $0x1
popq %r12
pushq $-0x1
popq %rbp
pushq $-0x2
popq %r13
cmpq $0x5, %r12
je 0x391d5
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x11400
movq %r14, %rdi
movl %ebp, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbx,%r12,4)
movq %r14, %rdi
movl %r13d, %esi
callq 0x116b0
incq %r12
jmp 0x39133
movq %r14, %rdi
movl %r15d, %esi
callq 0x11850
cmpl $0x3, %eax
jne 0x391e6
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 %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xea03(%rip), %rsi      # 0x47bf0
movq %r14, %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_O2/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 0x39272
movl %r14d, %esi
movl %ebp, %edx
callq 0x11150
movl %eax, (%rbx)
xorl %eax, %eax
jmp 0x39279
movl %ebp, %esi
callq 0x11af0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
andq $0x0, (%rdx)
callq 0x11850
cmpl $0x5, %eax
jne 0x392fe
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11400
pushq $-0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11770
movq %rax, %r12
pushq $-0x2
popq %r13
movq %rbx, %rdi
movl %r13d, %esi
callq 0x116b0
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11400
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11af0
movq %rax, (%r14)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x116b0
movq %r12, %rax
jmp 0x39300
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leal -0x1400(%rsi), %eax
cmpl $0xc, %eax
jbe 0x393b0
leal -0x8363(%rsi), %eax
cmpl $0x4, %eax
jb 0x393c4
leal -0x8033(%rsi), %eax
cmpl $0x2, %eax
jb 0x393c4
leal -0x8035(%rsi), %eax
cmpl $0x2, %eax
jb 0x393c0
leal -0x8367(%rsi), %eax
cmpl $0x2, %eax
jb 0x393c0
testl %esi, %esi
je 0x393d0
cmpl $0x8032, %esi           # imm = 0x8032
je 0x393c8
cmpl $0x8362, %esi           # imm = 0x8362
je 0x393c8
cmpl $0x84fa, %esi           # imm = 0x84FA
je 0x393c0
cmpl $0x8c3b, %esi           # imm = 0x8C3B
je 0x393c0
cmpl $0x8c3e, %esi           # imm = 0x8C3E
je 0x393c0
cmpl $0x8d9f, %esi           # imm = 0x8D9F
je 0x393c0
cmpl $0x8dad, %esi           # imm = 0x8DAD
je 0x393cc
pushq %rax
leaq 0x1eef(%rip), %rsi      # 0x3b285
leaq 0xe879(%rip), %rdx      # 0x47c16
movl $0xc1, %ecx
xorl %eax, %eax
callq 0x11ae0
cltq
addq $0x8, %rsp
retq
leaq 0xe77d(%rip), %rcx      # 0x47b34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x4
jmp 0x393ce
pushq $0x2
jmp 0x393ce
pushq $0x1
jmp 0x393ce
pushq $0x8
popq %rax
retq
movl %esi, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x45
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %r14d
leal -0x8e73(%r14), %eax
cmpl $0x2, %eax
jae 0x3949a
xorl %r15d, %r15d
xorl %r13d, %r13d
leaq 0x2(%r13), %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11850
testl %eax, %eax
jle 0x39439
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11a80
incq %r13
addq $0x4, %r15
jmp 0x39412
testl %r13d, %r13d
jne 0x39449
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11a80
movq %rbx, %rdi
movq %r15, %rsi
callq 0x111f0
movq %rax, %r15
xorl %r12d, %r12d
subq $0x1, %r13
jb 0x3947e
leaq 0x2(%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11780
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r12,4)
incq %r12
jmp 0x3945a
movq 0x1c2eb(%rip), %rax     # 0x55770
movl %r14d, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
jmp 0x394be
cmpl $0x8e72, %r14d          # imm = 0x8E72
jne 0x394d2
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x1be83(%rip), %rcx     # 0x55338
movl $0x8e72, %edi           # imm = 0x8E72
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1dac(%rip), %rsi      # 0x3b285
leaq 0xe964(%rip), %rdx      # 0x47e44
movq %rbx, %rdi
movl $0x1ee, %ecx            # imm = 0x1EE
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rsi
callq 0x115b0
movl %eax, %ebp
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x39aab
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x1c006(%rip), %rcx     # 0x55aa8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x39ab7
movq 0x1bab6(%rip), %rax     # 0x55568
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_O2/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
pushq $0x2
popq %rsi
callq 0x115b0
movl %eax, %ebp
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
testl %ebp, %ebp
je 0x39b04
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x1c3bd(%rip), %rcx     # 0x55eb8
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x39b10
movq 0x1bed5(%rip), %rax     # 0x559e0
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %ebp
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %r13d, %r13d
movl $0x80e1, %esi           # imm = 0x80E1
cmovnel %r13d, %esi
leal -0x1400(%r15), %ecx
cmpl $0xc, %ecx
ja 0x39bf1
movl $0x187f, %edx           # imm = 0x187F
btl %ecx, %edx
jae 0x39bd2
movq 0x1b902(%rip), %r10     # 0x554a8
movzbl %bpl, %ecx
movl %r14d, %edi
movl %r15d, %edx
movl %r12d, %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 $0xa, %ecx
jne 0x39bf1
movq 0x1bec2(%rip), %r9      # 0x55aa0
movl %r14d, %edi
movl $0x140a, %edx           # imm = 0x140A
movl %r12d, %ecx
movq %rax, %r8
callq *(%r9)
jmp 0x39bb9
cmpl $0x8368, %r15d          # imm = 0x8368
je 0x39b9f
cmpl $0x8d9f, %r15d          # imm = 0x8D9F
je 0x39b9f
cmpl $0x8c3b, %r15d          # imm = 0x8C3B
je 0x39b9f
leaq 0x1672(%rip), %rsi      # 0x3b285
leaq 0xe22a(%rip), %rdx      # 0x47e44
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r12d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
leal -0x1400(%r12), %ecx
cmpl $0x5, %ecx
ja 0x39cc0
movq 0x1b9ee(%rip), %r9      # 0x55688
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 0x15be(%rip), %rsi      # 0x3b285
leaq 0xe176(%rip), %rdx      # 0x47e44
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_O2/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
pushq $0x5
popq %rsi
callq 0x115b0
movl %eax, %ebp
testl %eax, %eax
je 0x39ebf
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x8(%rsp)
pushq $0x2
popq %r12
jmp 0x39ec8
pushq $0x1
popq %r12
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 0x39f30
movq 0x1b558(%rip), %r9      # 0x55470
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r13d, %edx
movq %r14, %rcx
movl %eax, %r8d
callq *(%r9)
jmp 0x39f47
movq 0x1bd11(%rip), %r8      # 0x55c48
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_O2/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
pushq $0x3
popq %rsi
callq 0x115b0
movl %eax, %ebp
testl %eax, %eax
je 0x3a1a6
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
jmp 0x3a1a9
pushq $0x1
popq %rsi
leal 0x1(%rsi), %r12d
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x3a1da
movq 0x1b682(%rip), %rcx     # 0x55850
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3a1e8
movq 0x1b277(%rip), %rcx     # 0x55458
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_O2/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
pushq $0x3
popq %rsi
callq 0x115b0
movl %eax, %ebp
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
testl %ebp, %ebp
je 0x3a24d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x1b427(%rip), %rcx     # 0x55668
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3a25c
movq 0x1b72c(%rip), %rax     # 0x55980
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq 0x1b801(%rip), %rcx     # 0x55dc0
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
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 0x1b114(%rip), %rax     # 0x55740
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 0x3a695
movq %rbx, %rdi
movq %r14, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl 0xc(%rsp), %edx
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x11110
movslq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
pushq $0x3
popq %rax
jmp 0x3a6a2
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_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11440
movq 0x1b4f4(%rip), %rcx     # 0x55bd0
movl %r15d, %edi
movq %rax, %rsi
callq *(%rcx)
movl %eax, %ebp
movq %r14, %rdi
callq 0x11870
movslq %ebp, %rsi
movq %r14, %rdi
callq 0x113b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x115b0
pushq $0x1
popq %rsi
movq %rbx, %rdi
testl %eax, %eax
je 0x3a796
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %r12d
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11500
movq 0x1b6ba(%rip), %r9      # 0x55e38
movzbl %bpl, %esi
movzbl %r15b, %edx
movzbl %r12b, %ecx
movzbl %al, %r8d
movl %r14d, %edi
callq *(%r9)
jmp 0x3a7d8
callq 0x11500
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %r14d
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
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_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x110b0
testl %eax, %eax
je 0x3a84a
pushq $0x1f
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movq 0x1abe7(%rip), %rcx     # 0x55428
movl %eax, %edi
movl %r14d, %esi
callq *(%rcx)
jmp 0x3a852
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_O2/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 0x1c081(%rip), %rcx     # 0x568f0
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x11b50
movl %eax, %edi
callq 0x111e0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x113f0
movss (%r14), %xmm0
movss 0x4(%r14), %xmm1
movss 0x8(%r14), %xmm2
movss 0xc(%r14), %xmm3
callq 0x11380
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x115b0
movl %eax, 0x8(%rsp)
testl %eax, %eax
je 0x3a9ac
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rbp
jmp 0x3a9b5
movq $0x0, 0x10(%rsp)
movl %ebp, %r15d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x3aa8b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11220
movq %rax, %r12
testl %r12d, %r12d
jne 0x3a9ec
pushq $0x4f
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x11150
movq %r15, 0x18(%rsp)
movslq %r12d, %r14
leaq (,%r14,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
negq %rax
movq %rax, 0x20(%rsp)
pushq $0x1
popq %r14
pushq $0x4f
popq %rbp
pushq $-0x1
popq %r15
movq 0x20(%rsp), %rax
addq %r14, %rax
cmpq $0x1, %rax
je 0x3ab01
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x11400
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
leaq 0xc(%rsp), %rcx
callq 0x11410
movl %eax, -0x4(%r13,%r14,4)
cmpl $0x0, 0xc(%rsp)
je 0x3aa7b
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x11150
movq %rbx, %rdi
pushq $-0x2
popq %rsi
callq 0x116b0
incq %r14
jmp 0x3aa23
xorl %r14d, %r14d
pushq $0x4f
popq %rbp
xorl %r12d, %r12d
leaq (%r15,%r12), %r13
movq %rbx, %rdi
movl %r13d, %esi
callq 0x11850
testl %eax, %eax
jle 0x3aabd
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x11150
incq %r12
addq $0x4, %r14
jmp 0x3aa94
testl %r12d, %r12d
jne 0x3aad0
pushq $0x4f
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x11150
movq %rbx, %rdi
movq %r14, %rsi
callq 0x111f0
movq %rax, %r13
xorl %r14d, %r14d
pushq $0x4f
popq %rbp
cmpq %r14, %r12
je 0x3ab01
leal (%r15,%r14), %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11150
movl %eax, (%r13,%r14,4)
incq %r14
jmp 0x3aae4
cmpl $0x0, 0x8(%rsp)
je 0x3ab1e
movq 0x1b051(%rip), %rax     # 0x55b60
movq 0x10(%rsp), %rdi
movl %r12d, %esi
movq %r13, %rdx
callq *(%rax)
jmp 0x3ab2d
movq 0x1b2cb(%rip), %rax     # 0x55df0
movl %r12d, %edi
movq %r13, %rsi
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/whole_framebuffer.c
// Function: ClearBufferfi
static int ClearBufferfi(lua_State *L)
/* clear_bufferfi(depth, stencil)
 */
    {
    int named, arg = 1;
    GLuint framebuffer;
    GLfloat depth;
    GLint stencil;
    if(lua_isinteger(L, 1))
        {
        named = 1;
        framebuffer = luaL_checkinteger(L, arg++);
        }
    else
        named = 0;
    depth = luaL_checknumber(L, arg++);
    stencil = luaL_checkinteger(L, arg++);
    if(named)
        {
#if 0
/*@@NOTE: The prototype for glClearNamedFramebufferfi() in glcorearb.h is/was wrong,
 *        (rfr: https://www.khronos.org/bugzilla/show_bug.cgi?id=1394 ),
 *        so this may not compile with OpenGL v4.5.
 *      In such a case, you can update the glcorearb.h file on your system with the
 *      correct version, or just disable this function by setting to 0 the above "#if 1".
 */
        glClearNamedFramebufferfi(framebuffer, GL_DEPTH_STENCIL, 0, depth, stencil);
#else
        (void)framebuffer;
        NOT_AVAILABLE;
#endif
        }
    else
        glClearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
movl %r14d, %esi
callq 0x115b0
movl %eax, %ebp
testl %eax, %eax
je 0x3ace9
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11af0
pushq $0x2
popq %r14
leal 0x1(%r14), %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11a80
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x3ad27
leaq 0x4ce(%rip), %rsi       # 0x3b1e1
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
cvtsd2ss (%rsp), %xmm0
movq 0x1adc5(%rip), %rcx     # 0x55af8
movl $0x84f9, %edi           # imm = 0x84F9
xorl %esi, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/arachsys[P]init/runfg.c
// Function: main
int main(int argc, char **argv) {
  int result = EXIT_FAILURE, status;
  pid_t child, command;

  if (argc < 2) {
    fprintf(stderr, "Usage: %s CMD [ARG]...\n", argv[0]);
    return 64;
  }

  if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
    err(EXIT_FAILURE, "prctl PR_SET_CHILD_SUBREAPER");

  switch (command = fork()) {
    case -1:
      err(EXIT_FAILURE, "fork");
    case 0:
      execvp(argv[1], argv + 1);
      err(EXIT_FAILURE, "exec %s", argv[1]);
  }

  while (1) {
    child = waitpid(-1, &status, 0);
    if (child < 0) {
      if (errno == ECHILD)
        return result;
      if (errno != EINTR)
        err(EXIT_FAILURE, "waitpid");
    } else if (child == command) {
      if (WIFEXITED(status))
        result = WEXITSTATUS(status);
      if (WIFSIGNALED(status))
        result = 128 + WTERMSIG(status);
      command = -1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x1, %edi
jle 0x1245
pushq $0x24
popq %rdi
pushq $0x1
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x1050
testl %eax, %eax
js 0x1276
callq 0x1090
cmpl $-0x1, %eax
je 0x127f
movl %eax, %r15d
testl %eax, %eax
je 0x1288
pushq $-0x1
popq %rbp
leaq 0x4(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1070
testl %eax, %eax
js 0x1227
cmpl %r15d, %eax
jne 0x11e7
movl 0x4(%rsp), %eax
movzbl %ah, %ecx
andl $0x7f, %eax
cmovel %ecx, %ebx
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
orl $0x80, %eax
cmpl $0x2000000, %ecx        # imm = 0x2000000
cmovgel %eax, %ebx
movl %ebp, %r15d
jmp 0x11e7
callq 0x1030
movl (%rax), %eax
cmpl $0x4, %eax
je 0x11e7
cmpl $0xa, %eax
jne 0x1265
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x2dac(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0xdab(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1040
pushq $0x40
popq %rbx
jmp 0x1238
leaq 0xdda(%rip), %rsi       # 0x2046
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1060
leaq 0xd9f(%rip), %rsi       # 0x201c
jmp 0x126c
leaq 0xdb3(%rip), %rsi       # 0x2039
jmp 0x126c
leaq 0x8(%r14), %rsi
movq 0x8(%r14), %rdi
callq 0x1080
movq 0x8(%r14), %rdx
leaq 0xd9e(%rip), %rsi       # 0x203e
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1060
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getDictionary
void getDictionary(dicentry **dic, int *num, char *path, char *name, unsigned int flags) {
	char tempname[256], *token = NULL;
	int i, j;
	if(flags & GAME_MGS2) *num = loaddic(dic, path, name, DIC_HASH_SINGLE_EXT | DIC_ADJUST_EXT_MGS2, StrCode24);
	if(flags & GAME_ZOE2) *num = loaddic(dic, path, name, DIC_HASH_FULL_NAME, StrCode32);
	if(flags & (GAME_MGS3|GAME_MGS4)) {
		*num = loaddic(dic, path, name, DIC_USE_EXTERNAL, StrCode24);
		for(i = 0; i < *num; i++) {
			strcpy(tempname, (*dic)[i].name);
			token = strtok(tempname, ".");
			token = strtok(NULL, ".");
			for(j = 0; j < 256; j++) {
				if(!strcmp(token, extList[(flags & GAME_MGS4) ? 1 : 0][j])) {
					(*dic)[i].extension = j;
					printf("set extension of entry %d to %08x\n", i, j);
					break;
				}
			}
			if(j > 255) printf("unknown extension %s\n", token);
		}
	}
	if(*num > 0) numdicentries += *num;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, (%rsp)
movq %rdi, 0x8(%rsp)
testb $0x1, %bl
je 0x56cc
leaq -0x359(%rip), %r8       # 0x535a
pushq $0xa
popq %rcx
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x53b8
movq (%rsp), %rcx
movl %eax, (%rcx)
testb $0x8, %bl
je 0x56f1
leaq -0x358(%rip), %r8       # 0x5380
pushq $0x1
popq %rcx
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x53b8
movq (%rsp), %rcx
movl %eax, (%rcx)
testb $0x6, %bl
je 0x57df
leaq -0x3a7(%rip), %r8       # 0x535a
pushq $0x4
popq %rcx
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x53b8
movq (%rsp), %rcx
movl %eax, (%rcx)
andl $0x4, %ebx
shll $0x9, %ebx
leaq 0x5a29(%rip), %r13      # 0xb150
xorl %ebp, %ebp
movslq %eax, %rcx
cmpq %rcx, %rbp
jge 0x57e5
movq 0x8(%rsp), %rax
movq (%rax), %rax
imulq $0x108, %rbp, %r15      # imm = 0x108
leaq (%rax,%r15), %rsi
addq $0x8, %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5050
movq %r14, %rdi
leaq 0x33f6(%rip), %r14      # 0x8b59
movq %r14, %rsi
callq 0x51e0
xorl %edi, %edi
movq %r14, %rsi
callq 0x51e0
movq %rax, %r12
xorl %r14d, %r14d
cmpq $0x100, %r14            # imm = 0x100
je 0x579e
leaq (%rbx,%r14,8), %rax
movq (%r13,%rax), %rsi
movq %r12, %rdi
callq 0x5140
testl %eax, %eax
je 0x57b1
incq %r14
jmp 0x577b
leaq 0x2dec(%rip), %rdi      # 0x8591
movq %r12, %rsi
xorl %eax, %eax
callq 0x50c0
jmp 0x57d1
movq 0x8(%rsp), %rax
movq (%rax), %rax
movl %r14d, 0x4(%rax,%r15)
leaq 0x2da9(%rip), %rdi      # 0x856e
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x50c0
incq %rbp
movq (%rsp), %rax
movl (%rax), %eax
jmp 0x5729
movq (%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x57ef
addl %eax, 0x6aa1(%rip)      # 0xc290
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getExtensionFromHash32
char *getExtensionFromHash32(uint32_t hash) {
	char *retstring = malloc(16);
	memset(retstring, 0, 16);
	unsigned int i, testhash;
	for(i = 0; i < ZOE2_NUM_EXT; i++) {
		testhash = StrCode32(extListZoe2[i]);
		if(testhash == hash) RETPRINT(extListZoe2[i])
	}
	if(strlen(retstring) < 3) sprintf(retstring, "%08x", hash);
	return retstring;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x5130
movq %rax, %r14
xorl %r15d, %r15d
leaq 0x68ff(%rip), %r12      # 0xc150
cmpq $0x1b, %r15
je 0x5874
movq (%r12,%r15,8), %rdi
callq 0x5380
incq %r15
cmpl %ebx, %eax
jne 0x5851
movq -0x8(%r12,%r15,8), %rsi
movq %r14, %rdi
callq 0x5050
movq %r14, %rdi
callq 0x50b0
cmpq $0x2, %rax
ja 0x5895
leaq 0x2d1e(%rip), %rsi      # 0x85a7
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5220
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq