LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/program.c
// Function: ProgramParameter
static int ProgramParameter(lua_State *L)
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLenum pname = checkprogramparameterpname(L, 2);
    GLint value = checkboolean(L, 3);
    glProgramParameteri(program, pname, value);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x51, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11500
movzbl %al, %edx
movq 0x22f4f(%rip), %rax     # 0x56d10
movl %r14d, %edi
movl %ebp, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/program.c
// Function: GetProgramBinary
static int GetProgramBinary(lua_State *L)
/* get_program_binary(program)
 * -> format, binary  (or nil)
 */
    {
    GLsizei length;
    GLenum format;
    void *binary;
    GLuint program = luaL_checkinteger(L, 1);
    GLsizei bufsz = programGet(L, program, GL_PROGRAM_BINARY_LENGTH);
    if(bufsz==0)
        return 0;   
    binary = Malloc(L, bufsz);
    glGetProgramBinary(program, bufsz, &length, &format, binary);
    CheckErrorFree(L, binary);
    if(length==0)
        return 0;
    lua_pushinteger(L, format);
    lua_pushlstring(L, (char*)binary, length);
    Free(L, binary);
    return 2;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq 0x22f54(%rip), %rax     # 0x56d50
leaq 0x14(%rsp), %r14
movl %r15d, %edi
movl $0x8741, %esi           # imm = 0x8741
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %r12
xorl %ebp, %ebp
testq %r12, %r12
je 0x33e8b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %r14
movq 0x2279b(%rip), %rax     # 0x565d0
leaq 0x10(%rsp), %r13
leaq 0xc(%rsp), %rcx
movl %r15d, %edi
movl %r12d, %esi
movq %r13, %rdx
movq %r14, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
cmpl $0x0, (%r13)
je 0x33e8b
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x113b0
movslq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11ab0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl $0x2, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/program.c
// Function: ProgramBinary
static int ProgramBinary(lua_State *L)
/* program_binary(program, format, binary)
 */
    {
    size_t length;
    GLuint program = luaL_checkinteger(L, 1);
    GLenum format = luaL_checkinteger(L, 2);
    const void *binary = luaL_checklstring(L, 3, &length);
    glProgramBinary(program, format, binary, (GLsizei)length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rsp, %r12
movq %rbx, %rdi
movl $0x3, %esi
movq %r12, %rdx
callq 0x11440
movq 0x22dd2(%rip), %r8      # 0x56cb0
movl (%r12), %ecx
movl %r14d, %edi
movl %r15d, %esi
movq %rax, %rdx
callq *(%r8)
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_O3/stetre[P]moongl/src/program.c
// Function: GetBoolean
static int GetBoolean(lua_State *L, GLuint program, GLenum pname)
    {
    GLint params; 
    glGetProgramiv(program, pname, &params);
    CheckError(L);
    lua_pushboolean(L, params == GL_TRUE); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x22e3e(%rip), %rax     # 0x56d50
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
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/query.c
// Function: CreateQueries
IS_FUNC(Query)

static int CreateQueries(lua_State *L)
    {
    GLsizei i;
    GLuint* names;
    GLenum target = checkquerytarget(L, 1);
    GLsizei n = luaL_optinteger(L, 2, 1);
    check_init_called(L);
    luaL_checkstack(L, n, NULL);
    names = (GLuint*)Malloc(L, n*sizeof(GLuint));
    glCreateQueries(target, n, names);
    CheckErrorFree(L, names);
    for(i = 0; i < n; i++)
        {
        object_new(L, OTYPE_QUERY, names[i]);
        lua_pushinteger(L, names[i]);
        }
    Free(L, names);
    return n;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x48, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movl $0x1, %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x115d0
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11250
movslq %r14d, %r12
leaq (,%r12,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r15
movq 0x22380(%rip), %rax     # 0x56408
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
testl %r12d, %r12d
jle 0x340d4
movl %r14d, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movl (%r15,%r13,4), %edx
movq %rbx, %rdi
movl $0xb, %esi
callq 0x11a90
movl (%r15,%r13,4), %esi
movq %rbx, %rdi
callq 0x113b0
incq %r13
cmpq %r13, %r12
jne 0x340af
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11360
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/query.c
// Function: BeginQuery
static int BeginQuery(lua_State *L)
    {
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    GLuint name = luaL_checkinteger(L, 2);
    if(lua_isnoneornil(L, 3))
        glBeginQuery(target, name);
    else
        {
        index = luaL_checkinteger(L, 3);
        glBeginQueryIndexed(target, index, name);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x48, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
testl %eax, %eax
jle 0x341d8
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x224ab(%rip), %rcx     # 0x56678
movl %ebp, %edi
movl %eax, %esi
movl %r14d, %edx
callq *(%rcx)
jmp 0x341e6
movq 0x22b99(%rip), %rax     # 0x56d78
movl %ebp, %edi
movl %r14d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/query.c
// Function: EndQuery
static int EndQuery(lua_State *L)
    {
    GLenum index;
    GLenum target = checkquerytarget(L, 1);
    if(lua_isnoneornil(L, 2))
        glEndQuery(target);
    else
        {
        index = luaL_checkinteger(L, 2);
        glEndQueryIndexed(target, index);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x48, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x34239
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x22d17(%rip), %rcx     # 0x56f48
movl %ebp, %edi
movl %eax, %esi
callq *(%rcx)
jmp 0x34244
movq 0x225d0(%rip), %rax     # 0x56810
movl %ebp, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/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 0x22ad6(%rip), %rcx     # 0x56d40
movl %eax, %edi
movl $0x8e28, %esi           # imm = 0x8E28
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2257b(%rip), %rax     # 0x56808
movq %rsp, %r14
movl $0x8e28, %edi           # imm = 0x8E28
movq %r14, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x48, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x49, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %r14d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
testl %eax, %eax
jle 0x3432f
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movl %r14d, %ecx
andl $-0x2, %ecx
cmpl $0x8864, %ecx           # imm = 0x8864
jne 0x34372
movq 0x22922(%rip), %r8      # 0x56c40
leaq 0xc(%rsp), %rcx
movl %ebp, %edi
movl %eax, %esi
movl %r14d, %edx
callq *(%r8)
jmp 0x3434f
movl %r14d, %eax
andl $-0x2, %eax
cmpl $0x8864, %eax           # imm = 0x8864
jne 0x34372
movq 0x2255d(%rip), %rax     # 0x568a0
leaq 0xc(%rsp), %rdx
movl %ebp, %edi
movl %r14d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xaf0c(%rip), %rsi      # 0x3f285
leaq 0x16bc5(%rip), %rdx     # 0x4af45
movq %rbx, %rdi
movl $0x84, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
cmpl $0x8ca0, %eax           # imm = 0x8CA0
je 0x34426
cmpl $0x8128, %eax           # imm = 0x8128
jne 0x3445e
movq 0x21fb8(%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 0x3444c
movq 0x2222b(%rip), %rax     # 0x56658
movq (%rax), %r14
movq %rbx, %rdi
movl $0xb, %esi
movl $0x2, %edx
callq 0x11150
movl $0x8ca0, %edi           # imm = 0x8CA0
movl %eax, %esi
callq *%r14
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xae20(%rip), %rsi      # 0x3f285
leaq 0x16b70(%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_O3/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 0x11150
movl %eax, %edi
callq 0x116a0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %edi
callq 0x11170
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x61, %esi
movl $0x2, %edx
callq 0x11150
movl %ebp, %edi
movl %eax, %esi
callq 0x11600
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/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 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11150
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 0x349fa
movq 0x2221a(%rip), %r9      # 0x56c10
movl %ebp, %edi
jmp 0x34a05
movq 0x22117(%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 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11150
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 0x34a8c
movq 0x21d28(%rip), %r8      # 0x567b0
movl %ebp, %edi
jmp 0x34a97
movq 0x21cc5(%rip), %r8      # 0x56758
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/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 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x10, %esi
movl $0x2, %edx
callq 0x11150
leal -0x8d42(%rax), %ecx
cmpl $0x13, %ecx
ja 0x34b8e
movl $0xfc003, %edx          # imm = 0xFC003
btl %ecx, %edx
jae 0x34b48
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x218fd(%rip), %rcx     # 0x56410
cmoveq 0x22345(%rip), %rcx     # 0x56e60
leaq 0x8(%rsp), %r14
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x2, %ecx
jne 0x34b8e
testl %ebp, %ebp
movl 0x4(%rsp), %edi
cmovnel %ebp, %edi
movq 0x218b3(%rip), %rax     # 0x56410
cmoveq 0x222fb(%rip), %rax     # 0x56e60
leaq 0xc(%rsp), %r14
movl $0x8d44, %esi           # imm = 0x8D44
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r14), %edx
movq %rbx, %rdi
movl $0x11, %esi
callq 0x11110
jmp 0x34b3f
cmpl $0x8cab, %eax           # imm = 0x8CAB
je 0x34b03
leaq 0xa6e5(%rip), %rsi      # 0x3f285
leaq 0x164fe(%rip), %rdx     # 0x4b0a5
movq %rbx, %rdi
movl $0x6a, %ecx
xorl %eax, %eax
callq 0x11ae0
jmp 0x34b3f
// File: /workspace/github_c_makefile_star2_O3/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 0x115d0
movq 0x21d88(%rip), %rax     # 0x56978
leaq 0xc(%rsp), %r15
movl $0x1, %edi
movq %r15, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11a90
movq 0x21822(%rip), %rax     # 0x56440
movl (%r15), %esi
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %esi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
callq 0x115d0
movq 0x21530(%rip), %rax     # 0x56a28
movl %ebp, %edi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movl $0x8, %esi
movl %ebp, %edx
callq 0x11a90
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11440
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movl (%r15), %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movq 0x21576(%rip), %rax     # 0x56ae8
movl %r14d, %edi
movl $0x1, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11700
movl %eax, %r15d
movq 0x2132d(%rip), %rax     # 0x568f0
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %ebp, %ebp
testl %r15d, %r15d
je 0x3566e
movq 0x20d0e(%rip), %r12     # 0x562f0
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r12)
cmpl $0x0, (%r15)
jne 0x3566e
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 0x21623(%rip), %rax     # 0x56c50
movl (%r15), %esi
movl %r14d, %edi
xorl %edx, %edx
movq %r12, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11540
leaq 0x15c43(%rip), %rsi     # 0x4b28f
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_O3/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 0x208c2(%rip), %rax     # 0x562f0
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 0x35a94
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x211ed(%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 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x35a96
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x20828(%rip), %rax     # 0x562f0
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 0x35b2e
movq %r14, %rdi
callq 0x111f0
movq %rax, %r12
movq 0x2119b(%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 0x11540
movq %r14, %rdi
movq %r12, %rsi
callq 0x110c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x11360
jmp 0x35b30
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
leal -0x8b80(%rax), %ecx
cmpl $0x8, %ecx
ja 0x35b94
leaq 0x155b9(%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 0x35c5e
cmpl $0x9552, %eax           # imm = 0x9552
je 0x35c53
cmpl $0x8b4f, %eax           # imm = 0x8B4F
jne 0x35bdc
movq 0x20743(%rip), %rax     # 0x562f0
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl $0x8b4f, %esi           # imm = 0x8B4F
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11110
jmp 0x35c68
leaq 0x96a2(%rip), %rsi      # 0x3f285
leaq 0x15713(%rip), %rdx     # 0x4b2fd
movq %rbx, %rdi
movl $0xe9, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
movq 0x206e7(%rip), %rax     # 0x562f0
leaq 0xc(%rsp), %r15
movl %r14d, %edi
movl $0x8b88, %esi           # imm = 0x8B88
jmp 0x35c39
movq %rbx, %rdi
movl %r14d, %esi
movl $0x8b81, %edx           # imm = 0x8B81
jmp 0x35c5e
movq 0x206c4(%rip), %rax     # 0x562f0
leaq 0x8(%rsp), %r15
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
jmp 0x35c63
movq %rbx, %rdi
movl %r14d, %esi
movl $0x9552, %edx           # imm = 0x9552
callq 0x35ee3
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3c, %esi
movl $0x2, %edx
callq 0x11150
movq 0x20e17(%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 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
movl $0x3, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11440
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x115b0
testl %eax, %eax
je 0x35d69
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq 0x20b17(%rip), %r8      # 0x56870
movl %r14d, %edi
movl %r15d, %esi
movl %eax, %edx
movq %r12, %rcx
callq *(%r8)
jmp 0x35d7b
movq 0x20bf0(%rip), %rax     # 0x56960
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_O3/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 0x11440
movq 0x210e5(%rip), %rcx     # 0x56ea0
movl %r14d, %edi
movq %rax, %rsi
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11440
movq %rax, %r14
movq 0x20c76(%rip), %rax     # 0x56a88
movl %r15d, %edi
movq %r14, %rsi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x35e44
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x146ba(%rip), %rsi     # 0x4a505
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_O3/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 0x2046e(%rip), %rcx     # 0x56340
movq %rax, %rdi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x203ff(%rip), %rax     # 0x562f0
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
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x2076d(%rip), %rcx     # 0x566d8
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_O3/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 0x20592(%rip), %rcx     # 0x56550
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_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x360a1
xorl %r15d, %r15d
xorl %r14d, %r14d
leal 0x2(%r14), %esi
leal 0x3(%r14), %r12d
movq %rbx, %rdi
callq 0x11af0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11850
incq %r14
addq $0x4, %r15
testl %eax, %eax
jg 0x36012
testl %r14d, %r14d
je 0x360a1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x111f0
movq %rax, %r15
xorl %r12d, %r12d
movq %r14, %r13
leal 0x2(%r12), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r15,%r12,4)
incq %r12
decq %r13
jne 0x36051
movq 0x20af5(%rip), %rax     # 0x56b68
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 0x14480(%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 0x11930
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x20ada(%rip), %rcx     # 0x56d80
leaq 0xc(%rsp), %r14
movl %ebp, %edi
movl %eax, %esi
movq %r14, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
movl (%r14), %esi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11440
movq 0x20a25(%rip), %rcx     # 0x56d38
movl %r14d, %edi
movl %ebp, %esi
movq %rax, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11440
movq %rax, %r14
movq 0x20148(%rip), %rax     # 0x564c8
movl %r15d, %edi
movl %ebp, %esi
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
cmpl $-0x1, %ebp
je 0x363b3
movl %ebp, %esi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1414b(%rip), %rsi     # 0x4a505
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_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq 0x207e9(%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 0x11870
movl (%r12), %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x111f0
movq %rax, %r13
movq 0x20579(%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 0x11540
movq %rbx, %rdi
movq %r13, %rsi
callq 0x110c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
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_O3/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 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x11150
cmpl $0x8e46, %eax           # imm = 0x8E46
jle 0x365da
cmpl $0x8e47, %eax           # imm = 0x8E47
je 0x36604
cmpl $0x8e48, %eax           # imm = 0x8E48
je 0x3661c
cmpl $0x8e49, %eax           # imm = 0x8E49
jne 0x36672
movq 0x2063f(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e49, %edx           # imm = 0x8E49
jmp 0x3664a
cmpl $0x8de5, %eax           # imm = 0x8DE5
je 0x36634
cmpl $0x8de6, %eax           # imm = 0x8DE6
jne 0x36672
movq 0x20615(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8de6, %edx           # imm = 0x8DE6
jmp 0x3664a
movq 0x205fd(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e47, %edx           # imm = 0x8E47
jmp 0x3664a
movq 0x205e5(%rip), %rax     # 0x56c08
leaq 0x4(%rsp), %r15
movl %r14d, %edi
movl %ebp, %esi
movl $0x8e48, %edx           # imm = 0x8E48
jmp 0x3664a
movq 0x205cd(%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 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8c0c(%rip), %rsi      # 0x3f285
leaq 0x14daf(%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_O3/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 0x2111c(%rip), %rcx     # 0x577c0
movl $0x1, %esi
movl $0x1, %edx
callq 0x11b50
movq 0x1fe16(%rip), %rcx     # 0x564d0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/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 0x210eb(%rip), %rcx     # 0x577c0
movl $0x1, %esi
movl $0x1, %edx
callq 0x11b50
movq 0x2086d(%rip), %rcx     # 0x56f58
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x20aaa(%rip), %rcx     # 0x57980
testq %rcx, %rcx
je 0x36eeb
cmpl %eax, 0x20(%rcx)
jg 0x36ee6
jge 0x36efc
addq $0x8, %rcx
movq (%rcx), %rcx
jmp 0x36ed6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x117e0
movl $0x1, %eax
popq %rbx
retq
movq 0x2002d(%rip), %rax     # 0x56f30
movq 0x28(%rcx), %rdi
callq *(%rax)
testb %al, %al
je 0x36f1f
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x36ef0
leaq 0x835f(%rip), %rsi      # 0x3f285
leaq 0x14613(%rip), %rdx     # 0x4b540
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x11ae0
// File: /workspace/github_c_makefile_star2_O3/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 0x37230
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11a80
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x14558(%rip), %xmm0    # 0x4b4c8
cvttsd2si %xmm0, %r15
andq %rcx, %r15
orq %rax, %r15
leaq 0x2092e(%rip), %rcx     # 0x578b0
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11b50
movq 0x1f9f8(%rip), %rcx     # 0x56990
movq 0x28(%r14), %rdi
movl %eax, %esi
movq %r15, %rdx
callq *(%rcx)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movq %rbx, %rdi
movl $0x3e, %esi
movl %ebp, %edx
callq 0x11110
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq