LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sampler.c
// Function: GetEnum
static int GetEnum(lua_State *L, GLuint sampler, GLenum pname, uint32_t domain)
    {
    GLint param;
    glGetSamplerParameteriv(sampler, pname, &param);
    CheckError(L);
    enums_push(L, domain, param);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdi, %r14
movq 0x23581(%rip), %rax     # 0x55cf0
leaq 0xc(%rsp), %r15
movl %esi, %edi
movl %edx, %esi
movq %r15, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movl (%r15), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11110
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sampler.c
// Function: GetFloat
static int GetFloat(lua_State *L, GLuint sampler, GLenum pname)
    {
    GLfloat param;
    CheckError(L);
    glGetSamplerParameterfv(sampler, pname, &param);
    lua_pushnumber(L, param);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x11870
movq 0x22d22(%rip), %rax     # 0x554d8
leaq 0x4(%rsp), %r15
movl %ebp, %edi
movl %ebx, %esi
movq %r15, %rdx
callq *(%rax)
cvtss2sd (%r15), %xmm0
movq %r14, %rdi
callq 0x11370
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: CreateShader
static int CreateShader(lua_State *L)
    {
    GLenum type = checkshadertype(L, 1);
    GLuint ref;
    check_init_called(L);
    ref = glCreateShader(type);
    CheckError(L);
    object_new(L, OTYPE_SHADER, ref);
    lua_pushinteger(L, ref);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
movl %ebx, %edx
callq 0x11150
movl %eax, %ebp
movq %r14, %rdi
callq 0x115d0
movq 0x2321a(%rip), %rax     # 0x55a28
movl %ebp, %edi
callq *(%rax)
movl %eax, %ebp
movq %r14, %rdi
callq 0x11870
pushq $0x8
popq %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x11a90
movl %ebp, %esi
movq %r14, %rdi
callq 0x113b0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: ShaderSource
static int ShaderSource(lua_State *L)
/* shader_source(shader, string) */
    {
    size_t len;
    GLint length;
    GLuint shader = luaL_checkinteger(L, 1);
    const GLchar *string = luaL_checklstring(L, 2, &len);
    length = (GLint)len;
    glShaderSource(shader, 1, &string, &length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x11440
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movl (%r15), %eax
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
movq 0x23268(%rip), %rax     # 0x55ae8
movl %r14d, %edi
movl %ebp, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: CompileShader
static int CompileShader(lua_State *L)
    {
    char *buf;
    GLint ok, bufsz;
    GLuint name = luaL_checkinteger(L, 1);
    int check = lua_toboolean(L, 2);

    glCompileShader(name);
    CheckError(L);

    if(check)
        {
        glGetShaderiv(name, GL_COMPILE_STATUS, &ok);
        if(!ok)
            {
            glGetShaderiv(name, GL_INFO_LOG_LENGTH, &bufsz);
            CheckError(L);
            buf = (char*)Malloc(L, bufsz*sizeof(char));
            glGetShaderInfoLog(name, bufsz, NULL, buf);
            CheckErrorFree(L, buf);
            lua_pushfstring(L, "shader compile error: %s",buf);
            Free(L, buf);
            return lua_error(L);
            }
        }   
    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 0x11700
movl %eax, %r15d
movq 0x23025(%rip), %rax     # 0x558f0
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %ebp, %ebp
testl %r15d, %r15d
je 0x32976
movq 0x22a06(%rip), %r12     # 0x552f0
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r12)
cmpl $0x0, (%r15)
jne 0x32976
leaq 0x8(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r15, %rdx
callq *(%r12)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x2331b(%rip), %rax     # 0x55c50
movl (%r15), %esi
movl %r14d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11540
leaq 0x14963(%rip), %rsi     # 0x472b7
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x11160
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11630
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetShaderInfoLog
static int GetShaderInfoLog(lua_State *L)
    {
    char *buf;
    GLint bufsz;
    GLuint name = luaL_checkinteger(L, 1);

    glGetShaderiv(name, GL_INFO_LOG_LENGTH, &bufsz);
    CheckError(L);
    if(bufsz==0) return 0;
    buf = (char*)Malloc(L, bufsz*sizeof(char));
    glGetShaderInfoLog(name, bufsz, NULL, buf);
    CheckErrorFree(L, buf);
    lua_pushstring(L, buf);
    Free(L, buf);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
movq 0x225d3(%rip), %rax     # 0x552f0
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x32d83
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x22efe(%rip), %rax     # 0x55c50
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x32d85
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetShaderSource
static int GetShaderSource(lua_State *L)
    {
    char *buf;
    GLint bufsz;
    GLuint name = luaL_checkinteger(L, 1);

    glGetShaderiv(name, GL_SHADER_SOURCE_LENGTH, &bufsz);
    CheckError(L);
    if(bufsz==0) return 0;
    buf = (char*)Malloc(L, bufsz*sizeof(char));
    glGetShaderSource(name, bufsz, NULL, buf);
    CheckErrorFree(L, buf);
    lua_pushstring(L, buf);
    Free(L, buf);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
movq 0x2253e(%rip), %rax     # 0x552f0
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b88, %esi           # imm = 0x8B88
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x32e18
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x22eb1(%rip), %rax     # 0x55c98
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x32e1a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetShader
static int GetShader(lua_State *L)
    {
#define BOOLEAN return GetBoolean(L, shader, pname);
#define INTEGER return GetInteger(L, shader, pname);
    GLuint shader = luaL_checkinteger(L, 1);
    GLenum pname = checkshaderpname(L, 2);
    switch(pname)
        {
        case GL_SHADER_TYPE: return GetEnum(L, shader, pname, DOMAIN_SHADER_TYPE);
        case GL_DELETE_STATUS: BOOLEAN
        case GL_COMPILE_STATUS: BOOLEAN
        case GL_INFO_LOG_LENGTH: INTEGER
        case GL_SHADER_SOURCE_LENGTH: INTEGER
        case GL_SPIR_V_BINARY: BOOLEAN //GL_VERSION_4_6
        default: return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
#undef BOOLEAN
#undef INTEGER
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x3b
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
leal -0x8b80(%rax), %ecx
cmpl $0x8, %ecx
ja 0x32e7a
leaq 0x142fb(%rip), %rax     # 0x4715c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b80, %edx           # imm = 0x8B80
jmp 0x32f1b
cmpl $0x9552, %eax           # imm = 0x9552
je 0x32f10
cmpl $0x8b4f, %eax           # imm = 0x8B4F
jne 0x32ebe
movq 0x2245d(%rip), %rax     # 0x552f0
leaq 0xc(%rsp), %rbx
movl %r15d, %edi
movl $0x8b4f, %esi           # imm = 0x8B4F
movq %rbx, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11870
movl (%rbx), %edx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x11110
movl %eax, %ebx
jmp 0x32f20
leaq 0x83c0(%rip), %rsi      # 0x3b285
leaq 0x14459(%rip), %rdx     # 0x47325
movq %r14, %rdi
movl $0xe9, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b88, %edx           # imm = 0x8B88
jmp 0x32f09
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b81, %edx           # imm = 0x8B81
jmp 0x32f1b
movq %r14, %rdi
movl %r15d, %esi
movl $0x8b84, %edx           # imm = 0x8B84
callq 0x331bc
jmp 0x32f20
movq %r14, %rdi
movl %r15d, %esi
movl $0x9552, %edx           # imm = 0x9552
callq 0x3317e
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetShaderPrecisionFormat
static int GetShaderPrecisionFormat(lua_State *L)
/* get_shader_precision_format(shadertype, precisiontype)
 * -> range0, range1, precision
 */
    {
    GLint range[2];
    GLint precision;
    GLenum type = checkshadertype(L, 1);
    GLenum precisiontype = checkprecisionformat(L, 2);
    glGetShaderPrecisionFormat(type, precisiontype, range, &precision);
    CheckError(L);
    lua_pushinteger(L, range[0]);
    lua_pushinteger(L, range[1]);
    lua_pushinteger(L, precision);
    return 3;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x11150
movl %eax, %ebp
pushq $0x3c
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movq 0x22b66(%rip), %r8      # 0x55ac0
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movl %ebp, %edi
movl %eax, %esi
movq %r14, %rdx
movq %r15, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
movslq 0x4(%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
pushq $0x3
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: BindFragDataLocation
static int BindFragDataLocation(lua_State *L)
    {
    int indexed = 0;
    GLuint index;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint color = luaL_checkinteger(L, 2);
    const GLchar *name = luaL_checkstring(L, 3);
    if(lua_isinteger(L, 4))
        {
        indexed = 1;
        index = luaL_checkinteger(L, 4);
        }
    if(indexed)
        glBindFragDataLocationIndexed(program, color, index, name);
    else
        glBindFragDataLocation(program, color, name);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
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
xorl %edx, %edx
callq 0x11440
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x115b0
testl %eax, %eax
je 0x3300e
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x22872(%rip), %r8      # 0x55870
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
jmp 0x33020
movq 0x2294b(%rip), %rax     # 0x55960
movl %r14d, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetFragDataLocation
static int GetFragDataLocation(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    const GLchar *name = luaL_checkstring(L, 2);
    GLint loc = glGetFragDataLocation(program, name);
    CheckError(L);
    lua_pushinteger(L, loc);
    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 0x22e3f(%rip), %rcx     # 0x55ea0
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
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetFragDataIndex
static int GetFragDataIndex(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    const GLchar *name = luaL_checkstring(L, 2);
    GLint index = glGetFragDataIndex(program, name);
    CheckError(L);
    if(index == -1) // GL_INVALID_INDEX
        { lua_pushfstring(L, "invalid name '%s'", name); return lua_error(L); }
    lua_pushinteger(L, index);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x229d1(%rip), %rax     # 0x55a88
movl %r15d, %edi
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x330e7
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13413(%rip), %rsi     # 0x46501
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11630
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: DispatchComputeIndirect
UINT3_FUNC(DispatchCompute)

static int DispatchComputeIndirect(lua_State *L)
    {
    GLintptr indirect= luaL_checkinteger(L, 1);
    glDispatchComputeIndirect(indirect);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq 0x221d3(%rip), %rcx     # 0x55340
movq %rax, %rdi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetBoolean
static int GetBoolean(lua_State *L, GLuint shader, GLenum pname)
    {
    GLint params; 
    glGetShaderiv(shader, pname, &params);
    CheckError(L);
    lua_pushboolean(L, params == GL_TRUE); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x22164(%rip), %rax     # 0x552f0
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %esi, %esi
cmpl $0x1, (%r14)
sete %sil
movq %rbx, %rdi
callq 0x117e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/shader.c
// Function: GetInteger
static int GetInteger(lua_State *L, GLuint shader, GLenum pname)
    {
    GLint params; 
    glGetShaderiv(shader, pname, &params);
    CheckError(L);
    lua_pushinteger(L, params); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x22126(%rip), %rax     # 0x552f0
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: UniformBlockBinding
static int UniformBlockBinding(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLuint binding = luaL_checkinteger(L, 3);
    glUniformBlockBinding(program, index, binding);
    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
callq 0x11af0
movq 0x224a3(%rip), %rcx     # 0x556d8
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
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/subroutine.c
// Function: ShaderStorageBlockBinding
static int ShaderStorageBlockBinding(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLuint binding = luaL_checkinteger(L, 3);
    glShaderStorageBlockBinding(program, index, binding);
    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
callq 0x11af0
movq 0x222ce(%rip), %rcx     # 0x55550
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
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/subroutine.c
// Function: UniformSubroutines
static int UniformSubroutines(lua_State *L)
    {
    GLsizei count, arg, i;
    GLuint *indices;
    GLenum shadertype = checkshadertype(L, 1);
    arg = 2;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    if(arg == 2)
        return luaL_argerror(L, 2, "integer expected");
    count = arg - 2;
    indices = (GLuint*)Malloc(L, count*sizeof(GLint));
    arg = 2;
    for(i=0; i< count; i++)
        indices[i] = lua_tointeger(L, arg++);
    glUniformSubroutinesuiv(shadertype, count, indices);
    Free(L, indices);
    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 %rdx
movl %edx, %esi
callq 0x11150
movl %eax, %ebp
xorl %r15d, %r15d
xorl %r14d, %r14d
leaq 0x2(%r14), %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11850
testl %eax, %eax
jle 0x332e3
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11af0
incq %r14
addq $0x4, %r15
jmp 0x332bc
testl %r14d, %r14d
je 0x3334f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x111f0
movq %rax, %r15
xorl %r12d, %r12d
movq %r14, %r13
subq $0x1, %r13
jb 0x3331a
leaq 0x2(%r12), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r15,%r12,4)
incq %r12
jmp 0x332fc
movq 0x22847(%rip), %rax     # 0x55b68
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x131ce(%rip), %rdx     # 0x46524
pushq $0x2
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11930
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetActiveSubroutineUniform
static int GetActiveSubroutineUniform(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    GLuint index = luaL_checkinteger(L, 3);
    GLenum pname = checksubroutinepname(L, 4);
    
    switch(pname)
        {
        case GL_NUM_COMPATIBLE_SUBROUTINES:
            return GetInt(L, program, shadertype, index, pname);
        case GL_COMPATIBLE_SUBROUTINES:
            return GetCompatibleSubroutines(L, program, shadertype, index);
        case GL_UNIFORM_SIZE:
            return GetInt(L, program, shadertype, index, pname);
        case GL_UNIFORM_NAME_LENGTH:
            return GetInt(L, program, shadertype, index, pname);
        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
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11150
movl %eax, %r15d
pushq $0x3
popq %r13
movq %rbx, %rdi
movl %r13d, %esi
callq 0x11af0
movq %rax, %r12
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x11150
cmpl $0x8a38, %eax           # imm = 0x8A38
je 0x33496
cmpl $0x8a39, %eax           # imm = 0x8A39
je 0x333f5
cmpl $0x8e4b, %eax           # imm = 0x8E4B
je 0x3340c
cmpl $0x8e4a, %eax           # imm = 0x8E4A
jne 0x334be
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl $0x8e4a, %r8d           # imm = 0x8E4A
jmp 0x334a8
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl $0x8a39, %r8d           # imm = 0x8A39
jmp 0x334a8
movq 0x225dd(%rip), %rbp     # 0x559f0
leaq 0x4(%rsp), %r13
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movl $0x8e4a, %ecx           # imm = 0x8E4A
movq %r13, %r8
callq *(%rbp)
movq %rbx, %rdi
callq 0x11870
movslq (%r13), %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movl $0x8e4b, %ecx           # imm = 0x8E4B
movq %rax, %r8
callq *(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11540
xorl %r14d, %r14d
movslq 0x4(%rsp), %rax
cmpq %rax, %r14
jge 0x33485
movslq (%r13,%r14,4), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r14
jmp 0x33469
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
movl 0x4(%rsp), %ebp
jmp 0x334ad
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl $0x8a38, %r8d           # imm = 0x8A38
callq 0x338c3
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7dc0(%rip), %rsi      # 0x3b285
leaq 0x13f8b(%rip), %rdx     # 0x47457
pushq $0x79
popq %rcx
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_O2/stetre[P]moongl/src/subroutine.c
// Function: GetUniformSubroutine
static int GetUniformSubroutine(lua_State *L)
    {
    GLuint value;
    GLenum shadertype = checkshadertype(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    glGetUniformSubroutineuiv(shadertype, location, &value);
    CheckError(L);
    lua_pushinteger(L, value);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
movl %ebx, %edx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq 0x2286f(%rip), %rcx     # 0x55d80
leaq 0x4(%rsp), %r15
movl %ebp, %edi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movq %r14, %rdi
callq 0x11870
movl (%r15), %esi
movq %r14, %rdi
callq 0x113b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetSubroutineUniformLocation
static int GetSubroutineUniformLocation(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    const GLchar *name = luaL_checkstring(L, 3);
    GLint loc = glGetSubroutineUniformLocation(program, shadertype, name);
    CheckError(L);
    lua_pushinteger(L, loc);
    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 %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11440
movq 0x227bf(%rip), %rcx     # 0x55d38
movl %r15d, %edi
movl %ebp, %esi
movq %rax, %rdx
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
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetSubroutineIndex
static int GetSubroutineIndex(lua_State *L) 
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    const GLchar *name = luaL_checkstring(L, 3);
    GLuint index = glGetSubroutineIndex(program, shadertype, name);
    CheckError(L);
    if(index == GL_INVALID_INDEX)
        { lua_pushfstring(L, "invalid name '%s'", name); return lua_error(L); }
    lua_pushinteger(L, index);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x21ee6(%rip), %rax     # 0x554c8
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x33613
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12ee7(%rip), %rsi     # 0x46501
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11160
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11630
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetActiveSubroutineName
static int GetActiveSubroutineName(lua_State *L)
    {
    GLsizei length;
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    GLuint index = luaL_checkinteger(L, 3);
    GLsizei bufsz = GetProgramStage_(L, program, shadertype, 
                            GL_ACTIVE_SUBROUTINE_MAX_LENGTH);
    GLchar *name = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetActiveSubroutineName(program, shadertype, index, bufsz, &length, name);
    CheckErrorFree(L, name);
    lua_pushstring(L, name);    
    Free(L, name);  
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r12
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl $0x8e48, %ecx           # imm = 0x8E48
callq 0x338ff
movslq %eax, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %rbx
movq 0x22335(%rip), %rax     # 0x559d0
leaq 0x4(%rsp), %r8
movl %r15d, %edi
movl %ebp, %esi
movl %r12d, %edx
movl %r13d, %ecx
movq %rbx, %r9
callq *(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11540
movq %r14, %rdi
movq %rbx, %rsi
callq 0x110c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11360
pushq $0x1
popq %rax
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/subroutine.c
// Function: GetProgramStage
static int GetProgramStage(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum shadertype = checkshadertype(L, 2);
    GLenum pname = checkstagepname(L, 3);
    switch(pname)
        {
        case GL_ACTIVE_SUBROUTINES: 
                return GetStageInt(L,program,shadertype,pname);
        case GL_ACTIVE_SUBROUTINE_UNIFORMS: 
                return GetStageInt(L,program,shadertype,pname);
        case GL_ACTIVE_SUBROUTINE_MAX_LENGTH: 
                return GetStageInt(L,program,shadertype,pname);
        case GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS: 
                return GetStageInt(L,program,shadertype,pname);
        case GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH: 
                return GetStageInt(L,program,shadertype,pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %r15
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x11150
movl %eax, %ebp
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11150
cmpl $0x8e49, %eax           # imm = 0x8E49
je 0x3384b
cmpl $0x8de6, %eax           # imm = 0x8DE6
je 0x337f7
cmpl $0x8e47, %eax           # imm = 0x8E47
je 0x33815
cmpl $0x8e48, %eax           # imm = 0x8E48
je 0x33806
cmpl $0x8de5, %eax           # imm = 0x8DE5
jne 0x33824
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x8de5, %ecx           # imm = 0x8DE5
jmp 0x33858
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x8de6, %ecx           # imm = 0x8DE6
jmp 0x33858
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x8e48, %ecx           # imm = 0x8E48
jmp 0x33858
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x8e47, %ecx           # imm = 0x8E47
jmp 0x33858
leaq 0x7a5a(%rip), %rsi      # 0x3b285
leaq 0x13c25(%rip), %rdx     # 0x47457
movq %rbx, %rdi
movl $0xde, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x8e49, %ecx           # imm = 0x8E49
callq 0x33930
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: MemoryBarrier
static int MemoryBarrier(lua_State *L)
    {
    GLbitfield barriers = CheckBarrierBit(L, 1, 1);
    glMemoryBarrier(barriers);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x22f4a(%rip), %rcx     # 0x567c0
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x11b50
movq 0x21c49(%rip), %rcx     # 0x554d0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: MemoryBarrierByRegion
static int MemoryBarrierByRegion(lua_State *L)
    {
    GLbitfield barriers = CheckBarrierBit(L, 1, 1);
    glMemoryBarrierByRegion(barriers);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x22f1e(%rip), %rcx     # 0x567c0
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x11b50
movq 0x226a5(%rip), %rcx     # 0x55f58
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetInt
static int GetInt(lua_State *L, GLuint program, GLenum shadertype, GLuint index, GLenum pname)
    {
    GLint value;
    glGetActiveSubroutineUniformiv(program, shadertype, index, pname, &value);
    CheckError(L);
    lua_pushinteger(L, value);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2211f(%rip), %rax     # 0x559f0
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movl %r8d, %ecx
movq %r14, %r8
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/subroutine.c
// Function: GetStageInt
static int GetStageInt(lua_State *L, GLuint program, GLenum shadertype, GLenum pname)
    {
    GLint value;
    glGetProgramStageiv(program, shadertype, pname, &value);
    CheckError(L);
    lua_pushinteger(L, value);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x222ca(%rip), %rax     # 0x55c08
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movq %r14, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sync.c
// Function: IsSync
static int IsSync(lua_State *L)
    {
    int id = luaL_checkinteger(L, 1);
    node_t *node = node_search(id);
    if(node == NULL) 
        { lua_pushboolean(L, 0); return 1; }
    if(glIsSync(node->sync) == GL_FALSE)
        return luaL_error(L, UNEXPECTED_ERROR);
    CheckError(L);
    lua_pushboolean(L, 1);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movl %eax, %edi
callq 0x343b5
testq %rax, %rax
je 0x340bc
movq 0x21e8e(%rip), %rcx     # 0x55f30
movq 0x28(%rax), %rdi
callq *(%rcx)
testb %al, %al
je 0x340cb
movq %rbx, %rdi
callq 0x11870
pushq $0x1
popq %rsi
movq %rbx, %rdi
jmp 0x340c1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x117e0
pushq $0x1
popq %rax
popq %rbx
retq
leaq 0x71b3(%rip), %rsi      # 0x3b285
leaq 0x1348f(%rip), %rdx     # 0x47568
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sync.c
// Function: ClientWaitSync
static int ClientWaitSync(lua_State *L)
/* client_wait_sync(sync, timeout [, flag...]) */
    {
    GLenum status;
    node_t *node = CheckSync(L, 1);
    GLuint64 timeout = luaL_checknumber(L, 2); /* nanoseconds */
    GLbitfield flags = CheckFlag(L, 3, 0);
    status = glClientWaitSync(node->sync, flags, timeout);
    CheckError(L);
    pushsyncstatus(L, status);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x343d2
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11a80
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x133d6(%rip), %xmm0    # 0x474f0
cvttsd2si %xmm0, %r15
andq %rcx, %r15
orq %rax, %r15
leaq 0x22784(%rip), %rcx     # 0x568b0
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11b50
movq 0x21850(%rip), %rcx     # 0x55990
movq 0x28(%r14), %rdi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
pushq $0x3e
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x11110
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sync.c
// Function: WaitSync
static int WaitSync(lua_State *L)
/* wait_sync(sync) */
    {
    GLbitfield flags = 0;
    GLuint64 timeout = GL_TIMEOUT_IGNORED;
    node_t *node = CheckSync(L, 1);
    glWaitSync(node->sync, flags, timeout);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x343d2
movq 0x21b10(%rip), %rcx     # 0x55c90
movq 0x28(%rax), %rdi
pushq $-0x1
popq %rdx
xorl %esi, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/sync.c
// Function: CheckSync
static node_t *CheckSync(lua_State *L, int arg)
    {
    int id = luaL_checkinteger(L, arg);
    node_t *node = node_search(id);
    if(node == NULL) 
        { luaL_argerror(L, arg, "not a sync"); return NULL; }
    return node;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movl %eax, %edi
callq 0x343b5
movq %rax, %r14
testq %rax, %rax
jne 0x34402
leaq 0x13166(%rip), %rdx     # 0x4755d
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11930
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/teximage.c
// Function: TextureImageMultisample
static int TextureImageMultisample(lua_State *L)
/* texture_image_multisample(target, samples, intfmt, fslocs, width, depth [, height]) */
    {
    GLsizei depth;
    int arg = 1;
    GLenum target = checktexturetarget(L, arg++);
    GLsizei samples = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLboolean fslocs = checkboolean(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        glTexImage2DMultisample(target, samples, intfmt, width, height, fslocs);
        CheckError(L);
        return 0;
        }
    depth = luaL_checkinteger(L, arg++);
    glTexImage3DMultisample(target, samples, intfmt, width, height, depth, fslocs);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, 0x14(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x11
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, %r13d
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %rbp
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x34cfb
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x209dc(%rip), %r10     # 0x556b8
movzbl %r13b, %ecx
movl %ecx, (%rsp)
movl 0x14(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x34d18
movq 0x20626(%rip), %rax     # 0x55328
movzbl %r13b, %r9d
movl 0x14(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
callq *(%rax)
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/teximage.c
// Function: TextureStorage
static int TextureStorage(lua_State *L)
    {
    GLsizei height, depth;
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLsizei levels = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        if(texture==0)
            glTexStorage1D(target, levels, intfmt, width);
        else
            glTextureStorage1D(texture, levels, intfmt, width);
        CheckError(L);
        return 0;
        }
    height = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        if(texture==0)
            glTexStorage2D(target, levels, intfmt, width, height);
        else
            glTextureStorage2D(texture, levels, intfmt, width, height);
        CheckError(L);
        return 0;
        }
    depth = luaL_checkinteger(L, arg++);
    if(texture==0)
        glTexStorage3D(target, levels, intfmt, width, height, depth);
    else
        glTextureStorage3D(texture, levels, intfmt, width, height, depth);
    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
leaq 0x4(%rsp), %rdx
pushq $0x13
popq %rcx
callq 0x11420
movl %eax, %r12d
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x11
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x34dc6
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x34dd7
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %r12d, %r12d
je 0x34de8
movq 0x20dff(%rip), %r10     # 0x55bc0
movl %r12d, %edi
jmp 0x34df3
testl %r12d, %r12d
je 0x34e06
movq 0x208ae(%rip), %rax     # 0x55680
movl %r12d, %edi
jmp 0x34e11
testl %r12d, %r12d
je 0x34e1d
movq 0x21075(%rip), %rax     # 0x55e58
movl %r12d, %edi
jmp 0x34e28
movq 0x20d81(%rip), %r10     # 0x55b70
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x34e35
movq 0x20f83(%rip), %rax     # 0x55d90
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq *(%rax)
jmp 0x34e35
movq 0x20b04(%rip), %rax     # 0x55928
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %r13d, %r8d
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
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/teximage.c
// Function: TextureStorageMultisample
static int TextureStorageMultisample(lua_State *L)
/* texture_storage_multisample(target|texture, samples, intfmt, fslocs, width, height)
 * texture_storage_multisample(target|texture, samples, intfmt, fslocs, width, height, depth)
 */
    {
    GLsizei depth;
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLsizei samples = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLboolean fslocs = checkboolean(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        if(texture==0)
            glTexStorage2DMultisample(target,samples,intfmt,width,height,fslocs);
        else
            glTextureStorage2DMultisample(texture,samples,intfmt,width,height,fslocs);
        CheckError(L);
        return 0;
        }
    depth = luaL_checkinteger(L, arg++);
    if(texture==0)
        glTexStorage3DMultisample(target,samples,intfmt,width,height,depth,fslocs);
    else
        glTextureStorage3DMultisample(texture,samples,intfmt,width,height,depth,fslocs);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rdx
pushq $0x13
popq %rcx
callq 0x11420
movl %eax, %r15d
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x10(%rsp)
pushq $0x11
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11500
movl %eax, %r14d
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x34eee
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %r15d, %r15d
je 0x34f03
movq 0x20ade(%rip), %r10     # 0x559c0
movzbl %r14b, %ecx
movl %ecx, (%rsp)
movl %r15d, %edi
jmp 0x34f15
testl %r15d, %r15d
je 0x34f2a
movq 0x204b6(%rip), %rax     # 0x553b0
movzbl %r14b, %r9d
movl %r15d, %edi
jmp 0x34f39
movq 0x20dde(%rip), %r10     # 0x55ce8
movl 0xc(%rsp), %edi
movzbl %r14b, %ecx
movl %ecx, (%rsp)
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x34f48
movq 0x20b2f(%rip), %rax     # 0x55a60
movl 0xc(%rsp), %edi
movzbl %r14b, %r9d
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq *(%rax)
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/teximage.c
// Function: CopyTextureImage
static int CopyTextureImage(lua_State *L)
/* copy_texture_image(target, level, intfmt, x, y, width)
 * copy_texture_image(target, level, intfmt, x, y, width, height)
 */
    {
    GLsizei height;
    int arg = 1;
    GLenum target = checktexturetarget(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLint x = luaL_checkinteger(L, arg++);
    GLint y = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        glCopyTexImage1D(target, level, intfmt, x, y, width, border);
        CheckError(L);
        return 0;
        }
    height = luaL_checkinteger(L, arg++);
    glCopyTexImage2D(target, level, intfmt, x, y, width, height, border);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, 0x4(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x11
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %rbp
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x34ffe
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %ebp, %r9d
pushq $0x0
pushq %rax
callq 0x110a0
jmp 0x3501c
subq $0x8, %rsp
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %ebp, %r9d
pushq $0x0
callq 0x11670
popq %rax
popq %rcx
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/teximage.c
// Function: InvalidateTextureImage
static int InvalidateTextureImage(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    glInvalidateTexImage(texture, level);
    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 0x11af0
movq 0x2016d(%rip), %rcx     # 0x55378
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
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/teximage.c
// Function: InvalidateTextureSubImage
static int InvalidateTextureSubImage(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLint xoffset = luaL_checkinteger(L, arg++);
    GLint yoffset = luaL_checkinteger(L, arg++);
    GLint zoffset = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    GLsizei depth = luaL_checkinteger(L, arg++);
    glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
    CheckError(L);
    return 0;
    }

// 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, 0x10(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x8(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %rbp
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x204f6(%rip), %r10     # 0x557a0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r14d, %r9d
pushq %rax
pushq %r15
callq *(%r10)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq