LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/query.c
// Function: QueryCounter
static int QueryCounter(lua_State *L)
    {
    GLuint name = luaL_checkinteger(L, 1);
    GLenum target = GL_TIMESTAMP; /* checkquerytarget(L, 2); only TIMESTAMP */
    glQueryCounter(name, target);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq 0x22b6e(%rip), %rcx     # 0x56d40
movl %eax, %edi
movl $0x8e28, %esi           # imm = 0x8E28
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/query.c
// Function: GetTimestamp
static int GetTimestamp(lua_State *L)
    {
    GLint64 data;
    glGetInteger64v(GL_TIMESTAMP, &data);
    CheckError(L);
    lua_pushinteger(L, data);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x22613(%rip), %rax     # 0x56808
movq %rsp, %r14
movl $0x8e28, %edi           # imm = 0x8E28
movq %r14, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/query.c
// Function: GetQuery
static int GetQuery(lua_State *L)
    {
    int indexed = 0;
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    GLenum pname = checkquerypname(L, 2);
    if(!lua_isnoneornil(L, 3))
        {
        indexed = 1;
        index = luaL_checkinteger(L, 3);
        }
    switch(pname)
        {
        case GL_CURRENT_QUERY:
        case GL_QUERY_COUNTER_BITS:
            return GetInt(L, target, pname, indexed == 1 ? &index : NULL);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x48, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x49, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11860
movl %eax, %r15d
testl %eax, %eax
jle 0x34275
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
jmp 0x34275
movl %r14d, %ecx
andl $-0x2, %ecx
cmpl $0x8864, %ecx           # imm = 0x8864
jne 0x342a0
testl %r15d, %r15d
jle 0x342c7
movq 0x229b1(%rip), %r8      # 0x56c40
leaq 0x4(%rsp), %rcx
movl %ebp, %edi
movl %eax, %esi
movl %r14d, %edx
callq *(%r8)
jmp 0x342da
leaq 0xafde(%rip), %rsi      # 0x3f285
leaq 0x16c97(%rip), %rdx     # 0x4af45
movq %rbx, %rdi
movl $0x84, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq 0x225d2(%rip), %rax     # 0x568a0
leaq 0x4(%rsp), %rdx
movl %ebp, %edi
movl %r14d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/raster.c
// Function: PointParameter
static int PointParameter(lua_State *L)
    {
    GLenum pname = checkpointpname(L, 1);
    switch(pname)
        {
        case GL_POINT_FADE_THRESHOLD_SIZE: glPointParameterf(pname, luaL_checknumber(L, 2));
                                            break;
        case GL_POINT_SPRITE_COORD_ORIGIN: glPointParameteri(pname, checkorigin(L, 2)); 
                                            break;
        default: 
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x65, %esi
movl $0x1, %edx
callq 0x11160
cmpl $0x8ca0, %eax           # imm = 0x8CA0
je 0x3438e
cmpl $0x8128, %eax           # imm = 0x8128
jne 0x343c6
movq 0x22050(%rip), %rax     # 0x563c0
movq (%rax), %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movl $0x8128, %edi           # imm = 0x8128
callq *%r14
jmp 0x343b4
movq 0x222c3(%rip), %rax     # 0x56658
movq (%rax), %r14
movq %rbx, %rdi
movl $0xb, %esi
movl $0x2, %edx
callq 0x11160
movl $0x8ca0, %edi           # imm = 0x8CA0
movl %eax, %esi
callq *%r14
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xaeb8(%rip), %rsi      # 0x3f285
leaq 0x16c08(%rip), %rdx     # 0x4afdc
movq %rbx, %rdi
movl $0x26, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/raster.c
// Function: CullFace
static int CullFace(lua_State *L)
    {
    GLenum mode = checkcullfacemode(L, 1);
    glCullFace(mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x63, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %edi
callq 0x116b0
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/raster.c
// Function: FrontFace
static int FrontFace(lua_State *L)
    {
    GLenum mode = checkfrontfacemode(L, 1);
    glFrontFace(mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x62, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %edi
callq 0x11180
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/raster.c
// Function: PolygonMode
static int PolygonMode(lua_State *L)
    {
    GLenum face = checkpolygonmodeface(L, 1);
    GLenum mode = checkpolygonmodemode(L, 2);
    glPolygonMode(face, mode);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x60, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x61, %esi
movl $0x2, %edx
callq 0x11160
movl %ebp, %edi
movl %eax, %esi
callq 0x11610
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/renderbuffer.c
// Function: RenderbufferStorageMultisample
static int RenderbufferStorageMultisample(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLsizei samples = luaL_checkinteger(L, arg++);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(renderbuffer==0)
        glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
    else
        glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0xf, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x34962
movq 0x222b2(%rip), %r9      # 0x56c10
movl %ebp, %edi
jmp 0x3496d
movq 0x221af(%rip), %r9      # 0x56b18
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/renderbuffer.c
// Function: RenderbufferStorage
static int RenderbufferStorage(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(renderbuffer==0)
        glRenderbufferStorage(target, internalformat, width, height);
    else
        glNamedRenderbufferStorage(renderbuffer, internalformat, width, height);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0xf, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x349f4
movq 0x21dc0(%rip), %r8      # 0x567b0
movl %ebp, %edi
jmp 0x349ff
movq 0x21d5d(%rip), %r8      # 0x56758
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/renderbuffer.c
// Function: GetRenderbufferParameter
static int GetRenderbufferParameter(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint renderbuffer = checktargetorname(L, arg++, &target, DOMAIN_RENDERBUFFER_TARGET);
    GLenum pname = checkrenderbufferpname(L, arg++);
    switch(pname)
        {   
        case GL_RENDERBUFFER_WIDTH:
        case GL_RENDERBUFFER_HEIGHT:
        case GL_RENDERBUFFER_SAMPLES:
        case GL_RENDERBUFFER_RED_SIZE: 
        case GL_RENDERBUFFER_GREEN_SIZE: 
        case GL_RENDERBUFFER_BLUE_SIZE: 
        case GL_RENDERBUFFER_ALPHA_SIZE: 
        case GL_RENDERBUFFER_DEPTH_SIZE:
        case GL_RENDERBUFFER_STENCIL_SIZE: return GetInt(L, target, renderbuffer, pname);
        case GL_RENDERBUFFER_INTERNAL_FORMAT: 
            return GetInternalFormat(L, target, renderbuffer, pname);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0xf, %ecx
callq 0x11430
movl %eax, %ebp
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %edx
callq 0x11160
leal -0x8d42(%rax), %ecx
cmpl $0x13, %ecx
ja 0x34af6
movl $0xfc003, %edx          # imm = 0xFC003
btl %ecx, %edx
jae 0x34ab0
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x21995(%rip), %rcx     # 0x56410
cmoveq 0x223dd(%rip), %rcx     # 0x56e60
leaq 0x8(%rsp), %r14
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x2, %ecx
jne 0x34af6
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x2194b(%rip), %rax     # 0x56410
cmoveq 0x22393(%rip), %rax     # 0x56e60
leaq 0xc(%rsp), %r14
movl $0x8d44, %esi           # imm = 0x8D44
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r14), %edx
movq %rbx, %rdi
movl $0x11, %esi
callq 0x11120
jmp 0x34aa7
cmpl $0x8cab, %eax           # imm = 0x8CAB
je 0x34a6b
leaq 0xa77d(%rip), %rsi      # 0x3f285
leaq 0x16596(%rip), %rdx     # 0x4b0a5
movq %rbx, %rdi
movl $0x6a, %ecx
xorl %eax, %eax
callq 0x11ae0
jmp 0x34aa7
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/sampler.c
// Function: NewSampler
static int NewSampler(lua_State *L)
    {
    GLuint sampler;
    GLuint unit = luaL_optinteger(L, 1, 0);
    check_init_called(L);
    glGenSamplers(1, &sampler);
    CheckError(L);
    object_new(L, OTYPE_SAMPLER, sampler);
    glBindSampler(unit, sampler);
    CheckError(L);
    lua_pushinteger(L, sampler);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x11b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x115e0
movq 0x21e20(%rip), %rax     # 0x56978
leaq 0xc(%rsp), %r15
movl $0x1, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11a90
movq 0x218ba(%rip), %rax     # 0x56440
movl (%r15), %esi
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %esi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
callq 0x115e0
movq 0x215c8(%rip), %rax     # 0x56a28
movl %ebp, %edi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movq %rbx, %rdi
movl $0x8, %esi
movl %ebp, %edx
callq 0x11a90
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x11450
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movl (%r15), %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movq 0x2160e(%rip), %rax     # 0x56ae8
movl %r14d, %edi
movl $0x1, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11710
movl %eax, %r15d
movq 0x213c5(%rip), %rax     # 0x568f0
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %ebp, %ebp
testl %r15d, %r15d
je 0x355d6
movq 0x20da6(%rip), %r12     # 0x562f0
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r12)
cmpl $0x0, (%r15)
jne 0x355d6
leaq 0x8(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r15, %rdx
callq *(%r12)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r12
movq 0x216bb(%rip), %rax     # 0x56c50
movl (%r15), %esi
movl %r14d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11550
leaq 0x15cdb(%rip), %rsi     # 0x4b28f
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x11170
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11640
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_O1/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
movl $0x1, %ebx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq 0x2095a(%rip), %rax     # 0x562f0
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11880
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x359fc
movq %r14, %rdi
callq 0x11200
movq %rax, %r12
movq 0x21285(%rip), %rax     # 0x56c50
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11550
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11370
jmp 0x359fe
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %ebx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq 0x208c0(%rip), %rax     # 0x562f0
leaq 0x4(%rsp), %r12
movl %r15d, %edi
movl $0x8b88, %esi           # imm = 0x8B88
movq %r12, %rdx
callq *(%rax)
movq %r14, %rdi
callq 0x11880
movslq (%r12), %rsi
testq %rsi, %rsi
je 0x35a96
movq %r14, %rdi
callq 0x11200
movq %rax, %r12
movq 0x21233(%rip), %rax     # 0x56c98
movl 0x4(%rsp), %esi
movl %r15d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x11550
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11370
jmp 0x35a98
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3b, %esi
movl $0x2, %edx
callq 0x11160
leal -0x8b80(%rax), %ecx
cmpl $0x8, %ecx
ja 0x35afc
leaq 0x15651(%rip), %rax     # 0x4b134
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b80, %edx           # imm = 0x8B80
jmp 0x35bc6
cmpl $0x9552, %eax           # imm = 0x9552
je 0x35bbb
cmpl $0x8b4f, %eax           # imm = 0x8B4F
jne 0x35b44
movq 0x207db(%rip), %rax     # 0x562f0
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b4f, %esi           # imm = 0x8B4F
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11120
jmp 0x35bd0
leaq 0x973a(%rip), %rsi      # 0x3f285
leaq 0x157ab(%rip), %rdx     # 0x4b2fd
movq %rbx, %rdi
movl $0xe9, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
movq 0x2077f(%rip), %rax     # 0x562f0
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8b88, %esi           # imm = 0x8B88
jmp 0x35ba1
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b81, %edx           # imm = 0x8B81
jmp 0x35bc6
movq 0x2075c(%rip), %rax     # 0x562f0
leaq 0x8(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
jmp 0x35bcb
movq %rbx, %rdi
movl %r14d, %esi
movl $0x9552, %edx           # imm = 0x9552
callq 0x35e50
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3c, %esi
movl $0x2, %edx
callq 0x11160
movq 0x20eaf(%rip), %r8      # 0x56ac0
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 0x11880
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113c0
movslq 0x4(%r14), %rsi
movq %rbx, %rdi
callq 0x113c0
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x3, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11450
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x115c0
movl %eax, %ebp
testl %eax, %eax
je 0x35cbe
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
jmp 0x35cbe
testl %ebp, %ebp
je 0x35cd9
movq 0x20ba7(%rip), %r8      # 0x56870
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
jmp 0x35ceb
movq 0x20c80(%rip), %rax     # 0x56960
movl %r14d, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11450
movq 0x21178(%rip), %rcx     # 0x56ea0
movl %r14d, %edi
movq %rax, %rsi
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11450
movq %rax, %r14
movq 0x20d09(%rip), %rax     # 0x56a88
movl %r15d, %edi
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
cmpl $-0x1, %ebp
je 0x35db1
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1474d(%rip), %rsi     # 0x4a505
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11170
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11640
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq 0x20501(%rip), %rcx     # 0x56340
movq %rax, %rdi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x20492(%rip), %rax     # 0x562f0
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %esi, %esi
cmpl $0x1, (%r14)
sete %sil
movq %rbx, %rdi
callq 0x117f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x20801(%rip), %rcx     # 0x566d8
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x20626(%rip), %rcx     # 0x56550
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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
movl $0x1, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movl $0x2, %r14d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11860
testl %eax, %eax
jle 0x35f9d
movl $0x2, %esi
leal 0x1(%rsi), %r14d
movq %rbx, %rdi
callq 0x11af0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11860
movl %r14d, %esi
testl %eax, %eax
jg 0x35f7f
cmpl $0x2, %r14d
jne 0x35fc5
leaq 0x1457e(%rip), %rdx     # 0x4a528
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11940
leal -0x2(%r14), %r15d
movslq %r14d, %rax
leaq -0x8(,%rax,4), %rsi
movq %rbx, %rdi
callq 0x11200
movq %rax, %r12
cmpl $0x3, %r14d
jl 0x36005
movl %r15d, %r14d
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r12,%r13,4)
incq %r13
cmpq %r13, %r14
jne 0x35feb
movq 0x20b5c(%rip), %rax     # 0x56b68
movl %ebp, %edi
movl %r15d, %esi
movq %r12, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11370
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x20b63(%rip), %rcx     # 0x56d80
leaq 0xc(%rsp), %r14
movl %ebp, %edi
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
movl (%r14), %esi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11450
movq 0x20aae(%rip), %rcx     # 0x56d38
movl %r14d, %edi
movl %ebp, %esi
movq %rax, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11450
movq %rax, %r14
movq 0x201d1(%rip), %rax     # 0x564c8
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
cmpl $-0x1, %ebp
je 0x3632a
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x141d4(%rip), %rsi     # 0x4a505
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11170
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11640
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq 0x20872(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e48, %edx           # imm = 0x8E48
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r12), %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11200
movq %rax, %r13
movq 0x20602(%rip), %rax     # 0x569d0
movq %rsp, %r8
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl %r12d, %ecx
movq %r13, %r9
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11550
movq %rbx, %rdi
movq %r13, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/subroutine.c
// Function: GetActiveSubroutineUniformName
static int GetActiveSubroutineUniformName(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_UNIFORM_MAX_LENGTH);
    GLchar *name = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetActiveSubroutineUniformName(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, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq 0x207ac(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r12
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e49, %edx           # imm = 0x8E49
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movl (%r12), %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11200
movq %rax, %r13
movq 0x202e4(%rip), %rax     # 0x56778
movq %rsp, %r8
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl %r12d, %ecx
movq %r13, %r9
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11550
movq %rbx, %rdi
movq %r13, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11370
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x11160
cmpl $0x8e46, %eax           # imm = 0x8E46
jle 0x36551
cmpl $0x8e47, %eax           # imm = 0x8E47
je 0x3657b
cmpl $0x8e48, %eax           # imm = 0x8E48
je 0x36593
cmpl $0x8e49, %eax           # imm = 0x8E49
jne 0x365e9
movq 0x206c8(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e49, %edx           # imm = 0x8E49
jmp 0x365c1
cmpl $0x8de5, %eax           # imm = 0x8DE5
je 0x365ab
cmpl $0x8de6, %eax           # imm = 0x8DE6
jne 0x365e9
movq 0x2069e(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8de6, %edx           # imm = 0x8DE6
jmp 0x365c1
movq 0x20686(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e47, %edx           # imm = 0x8E47
jmp 0x365c1
movq 0x2066e(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e48, %edx           # imm = 0x8E48
jmp 0x365c1
movq 0x20656(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8de5, %edx           # imm = 0x8DE5
movq %r15, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c95(%rip), %rsi      # 0x3f285
leaq 0x14e38(%rip), %rdx     # 0x4b42f
movq %rbx, %rdi
movl $0xde, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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 0x211a5(%rip), %rcx     # 0x577c0
movl $0x1, %esi
movl $0x1, %edx
callq 0x11b50
movq 0x1fe9f(%rip), %rcx     # 0x564d0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x21174(%rip), %rcx     # 0x577c0
movl $0x1, %esi
movl $0x1, %edx
callq 0x11b50
movq 0x208f6(%rip), %rcx     # 0x56f58
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq 0x20b62(%rip), %rcx     # 0x57980
testq %rcx, %rcx
je 0x36e33
cmpl %eax, 0x20(%rcx)
jg 0x36e2e
jge 0x36e35
addq $0x8, %rcx
movq (%rcx), %rcx
jmp 0x36e1e
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x36e5d
movq 0x200ef(%rip), %rax     # 0x56f30
movq 0x28(%rcx), %rdi
callq *(%rax)
testb %al, %al
je 0x36e6e
movq %rbx, %rdi
callq 0x11880
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x36e62
movq %rbx, %rdi
xorl %esi, %esi
callq 0x117f0
movl $0x1, %eax
popq %rbx
retq
leaq 0x8410(%rip), %rsi      # 0x3f285
leaq 0x146c4(%rip), %rdx     # 0x4b540
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O1/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 0x3717f
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x14609(%rip), %xmm0    # 0x4b4c8
cvttsd2si %xmm0, %r15
andq %rcx, %r15
orq %rax, %r15
leaq 0x209df(%rip), %rcx     # 0x578b0
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11b50
movq 0x1faa9(%rip), %rcx     # 0x56990
movq 0x28(%r14), %rdi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11880
movq %rbx, %rdi
movl $0x3e, %esi
movl %ebp, %edx
callq 0x11120
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3717f
movq 0x1fd65(%rip), %rcx     # 0x56c90
movq 0x28(%rax), %rdi
xorl %esi, %esi
movq $-0x1, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %rcx
movq 0x207e9(%rip), %rax     # 0x57980
testq %rax, %rax
je 0x371ac
cmpl %ecx, 0x20(%rax)
jg 0x371a7
jge 0x371ae
addq $0x8, %rax
movq (%rax), %rax
jmp 0x37197
xorl %eax, %eax
testq %rax, %rax
jne 0x371c9
leaq 0x1437b(%rip), %rdx     # 0x4b535
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11940
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x13, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11510
movl %eax, %r13d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11860
testl %eax, %eax
jle 0x37b62
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq 0x1eb75(%rip), %r10     # 0x566b8
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 0x37b7f
movq 0x1e7bf(%rip), %rax     # 0x56328
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 0x11880
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/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
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x13, %ecx
callq 0x11430
movl %eax, %r12d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11860
testl %eax, %eax
jle 0x37c41
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11860
testl %eax, %eax
jle 0x37c52
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
testl %r12d, %r12d
je 0x37c63
movq 0x1ef84(%rip), %r10     # 0x56bc0
movl %r12d, %edi
jmp 0x37c6e
testl %r12d, %r12d
je 0x37c81
movq 0x1ea33(%rip), %rax     # 0x56680
movl %r12d, %edi
jmp 0x37c8c
testl %r12d, %r12d
je 0x37c98
movq 0x1f1fa(%rip), %rax     # 0x56e58
movl %r12d, %edi
jmp 0x37ca3
movq 0x1ef06(%rip), %r10     # 0x56b70
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x37cb0
movq 0x1f108(%rip), %rax     # 0x56d90
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq *(%rax)
jmp 0x37cb0
movq 0x1ec89(%rip), %rax     # 0x56928
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
movl %r13d, %r8d
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq