LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x37230
movq 0x1fcb4(%rip), %rcx     # 0x56c90
movq 0x28(%rax), %rdi
xorl %esi, %esi
movq $-0x1, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x20738(%rip), %rax     # 0x57980
testq %rax, %rax
je 0x3725d
cmpl %ecx, 0x20(%rax)
jg 0x37258
jge 0x37273
addq $0x8, %rax
movq (%rax), %rax
jmp 0x37248
leaq 0x142d1(%rip), %rdx     # 0x4b535
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11930
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x11150
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 0x11150
movl %eax, %r15d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
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 0x11850
testl %eax, %eax
jle 0x37c0e
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq 0x1eac9(%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 0x37c2b
movq 0x1e713(%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 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x11420
movl %eax, %r12d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11850
testl %eax, %eax
jle 0x37ced
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11850
testl %eax, %eax
jle 0x37cfe
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
testl %r12d, %r12d
je 0x37d0f
movq 0x1eed8(%rip), %r10     # 0x56bc0
movl %r12d, %edi
jmp 0x37d1a
testl %r12d, %r12d
je 0x37d2d
movq 0x1e987(%rip), %rax     # 0x56680
movl %r12d, %edi
jmp 0x37d38
testl %r12d, %r12d
je 0x37d44
movq 0x1f14e(%rip), %rax     # 0x56e58
movl %r12d, %edi
jmp 0x37d4f
movq 0x1ee5a(%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 0x37d5c
movq 0x1f05c(%rip), %rax     # 0x56d90
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq *(%rax)
jmp 0x37d5c
movq 0x1ebdd(%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 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: TextureStorageMultisample
static int TextureStorageMultisample(lua_State *L)
/* texture_storage_multisample(target|texture, samples, intfmt, fslocs, width, height)
 * texture_storage_multisample(target|texture, samples, intfmt, fslocs, width, height, depth)
 */
    {
    GLsizei depth;
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLsizei samples = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLboolean fslocs = checkboolean(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        if(texture==0)
            glTexStorage2DMultisample(target,samples,intfmt,width,height,fslocs);
        else
            glTextureStorage2DMultisample(texture,samples,intfmt,width,height,fslocs);
        CheckError(L);
        return 0;
        }
    depth = luaL_checkinteger(L, arg++);
    if(texture==0)
        glTexStorage3DMultisample(target,samples,intfmt,width,height,depth,fslocs);
    else
        glTextureStorage3DMultisample(texture,samples,intfmt,width,height,depth,fslocs);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x13, %ecx
callq 0x11420
movl %eax, %r15d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x11, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
movl %eax, %r14d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11850
testl %eax, %eax
jle 0x37e29
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
testl %r15d, %r15d
je 0x37e3e
movq 0x1eba3(%rip), %r10     # 0x569c0
movzbl %r14b, %ecx
movl %ecx, (%rsp)
movl %r15d, %edi
jmp 0x37e50
testl %r15d, %r15d
je 0x37e65
movq 0x1e57b(%rip), %rax     # 0x563b0
movzbl %r14b, %r9d
movl %r15d, %edi
jmp 0x37e74
movq 0x1eea3(%rip), %r10     # 0x56ce8
movl 0xc(%rsp), %edi
movzbl %r14b, %ecx
movl %ecx, (%rsp)
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %eax, %r9d
callq *(%r10)
jmp 0x37e83
movq 0x1ebf4(%rip), %rax     # 0x56a60
movl 0xc(%rsp), %edi
movzbl %r14b, %r9d
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: CopyTextureImage
static int CopyTextureImage(lua_State *L)
/* copy_texture_image(target, level, intfmt, x, y, width)
 * copy_texture_image(target, level, intfmt, x, y, width, height)
 */
    {
    GLsizei height;
    int arg = 1;
    GLenum target = checktexturetarget(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLint x = luaL_checkinteger(L, arg++);
    GLint y = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    if(lua_isnoneornil(L, arg))
        {
        glCopyTexImage1D(target, level, intfmt, x, y, width, border);
        CheckError(L);
        return 0;
        }
    height = luaL_checkinteger(L, arg++);
    glCopyTexImage2D(target, level, intfmt, x, y, width, height, border);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x13, %esi
movl $0x1, %edx
callq 0x11150
movl %eax, 0x4(%rsp)
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
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11850
testl %eax, %eax
jle 0x37f4d
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %ebp, %r9d
pushq $0x0
pushq %rax
callq 0x110a0
jmp 0x37f6b
subq $0x8, %rsp
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %ebp, %r9d
pushq $0x0
callq 0x11670
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: InvalidateTextureImage
static int InvalidateTextureImage(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    glInvalidateTexImage(texture, level);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq 0x1e202(%rip), %rcx     # 0x56378
movl %r14d, %edi
movl %eax, %esi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: InvalidateTextureSubImage
static int InvalidateTextureSubImage(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLint xoffset = luaL_checkinteger(L, arg++);
    GLint yoffset = luaL_checkinteger(L, arg++);
    GLint zoffset = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    GLsizei depth = luaL_checkinteger(L, arg++);
    glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x8, %esi
callq 0x11af0
movq 0x1e57b(%rip), %r10     # 0x567a0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r14d, %r9d
pushq %rax
pushq %r15
callq *(%r10)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: ClearTextureImage
static int ClearTextureImage(lua_State *L)
    {
    int arg = 1;
    const void* data;
    size_t len;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        { data = 0; arg++; }
    else if(lua_isstring(L, arg))
        data = (void*)luaL_checkstring(L, arg++);
    else if(lua_istable(L, arg))
        data = (void*)checkdataptr(L, arg++, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    glClearTexImage(texture, level, format, type, data);
    CheckError(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 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11850
testl %eax, %eax
jle 0x382e6
movq %rbx, %rdi
movl $0x5, %esi
callq 0x110b0
movq %rbx, %rdi
movl $0x5, %esi
testl %eax, %eax
je 0x382eb
xorl %edx, %edx
callq 0x11440
jmp 0x38307
xorl %r8d, %r8d
jmp 0x3830a
callq 0x11850
cmpl $0x5, %eax
jne 0x38335
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11b20
movq %rax, %r8
movq 0x1e227(%rip), %rax     # 0x56538
movl %r14d, %edi
movl %r15d, %esi
movl %ebp, %edx
movl %r12d, %ecx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6ebc(%rip), %rdx      # 0x3f1f8
movq %rbx, %rdi
movl $0x5, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11930
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: ClearTextureSubImage
static int ClearTextureSubImage(lua_State *L)
    {
    int arg = 1;
    const void* data;
    size_t len;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        { data = 0; arg++; }
    else if(lua_isstring(L, arg))
        data = (void*)luaL_checkstring(L, arg++);
    else if(lua_istable(L, arg))
        data = (void*)checkdataptr(L, arg++, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    GLint xoffset = luaL_checkinteger(L, arg++);
    GLint yoffset = luaL_checkinteger(L, arg++);
    GLint zoffset = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    GLsizei depth = luaL_checkinteger(L, arg++);
    glClearTexSubImage(texture, level,xoffset,yoffset,zoffset,width,height,depth,format,type,data);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r15d
movq %rbx, %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r13d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11850
testl %eax, %eax
jle 0x383f4
movq %rbx, %rdi
movl $0x5, %esi
callq 0x110b0
testl %eax, %eax
je 0x38413
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbx, %rdi
movl $0x5, %esi
xorl %edx, %edx
callq 0x11440
jmp 0x3844f
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
jmp 0x38454
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11850
cmpl $0x5, %eax
jne 0x38500
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11b20
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x8, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x9, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0xa, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0xb, %esi
callq 0x11af0
movq 0x1e270(%rip), %r10     # 0x56728
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %r14d, %edx
movl %r15d, %ecx
movl %r12d, %r8d
movl %r13d, %r9d
pushq 0x10(%rsp)
pushq 0x20(%rsp)
pushq 0x38(%rsp)
pushq %rax
pushq %rbp
callq *(%r10)
addq $0x30, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6cf1(%rip), %rdx      # 0x3f1f8
movq %rbx, %rdi
movl $0x5, %esi
addq $0x38, %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/teximage.c
// Function: TexBuffer
static int TexBuffer(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLuint buffer = luaL_checkinteger(L, arg++);
    if(texture==0)
        glTexBuffer(target, intfmt, buffer);
    else
        glTextureBuffer(texture, intfmt, buffer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x13, %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
testl %ebp, %ebp
je 0x38574
movq 0x1e1a8(%rip), %rcx     # 0x56718
movl %ebp, %edi
jmp 0x3857f
movq 0x1e2dd(%rip), %rcx     # 0x56858
movl 0xc(%rsp), %edi
movl %r14d, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: TexBufferRange
static int TexBufferRange(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLuint buffer = luaL_checkinteger(L, arg++);
    GLintptr offset = luaL_checkinteger(L, arg++);
    GLsizei size = luaL_checkinteger(L, arg++);
    if(texture==0)
        glTexBufferRange(target, intfmt, buffer, offset, size);
    else
        glTextureBufferRange(texture, intfmt, buffer, offset, size);
    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 $0x13, %ecx
callq 0x11420
movl %eax, %r14d
movq %rbx, %rdi
movl $0x11, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %ebp
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
testl %r14d, %r14d
je 0x38614
movq 0x1e8f4(%rip), %r9      # 0x56f00
movslq %eax, %r8
movl %r14d, %edi
jmp 0x38622
movq 0x1e07d(%rip), %r9      # 0x56698
movl 0xc(%rsp), %edi
movslq %eax, %r8
movl %ebp, %esi
movl %r15d, %edx
movq %r12, %rcx
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/teximage.c
// Function: GetTextureImage
static int GetTextureImage(lua_State *L)
/* get_texture_image(target|texture, lod, format, type, n)
 * -> bstring or nil
 */
    {
    intptr_t data = 0;
    GLsizei bufsz = 0;
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    intptr_t n = luaL_checkinteger(L, arg++);
    GLint64 bound_buffer = getUint(L, GL_PIXEL_PACK_BUFFER_BINDING);
    if(bound_buffer == 0)
        {
        /* no buffer is bound to GL_PIXEL_PACK_BUFFER, so treat n as the data size */
        bufsz = (GLsizei)n;
        data = (intptr_t)Malloc(L, bufsz *sizeof(char));
        if(texture==0)
            glGetTexImage(target, level, format, type, (void*)data);
        else
            glGetTextureImage(texture, level, format, type, bufsz, (void*)data);
        CheckErrorFree(L, (void*)data);
        lua_pushlstring(L, (char*)data, bufsz);
        Free(L, (void*)data);
        return 1;
        }
    else /* a buffer is bound to GL_PIXEL_PACK_BUFFER, so treat n as an offset */
        {
        if(texture==0)
            glGetTexImage(target, level, format, type, (void*)n);
        else
            glGetTextureImage(texture, level, format, type, 0, (void*)n);
        CheckError(L);
        }
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x1, %esi
movl $0x13, %ecx
callq 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x11150
movl %eax, %r15d
movq %rbx, %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x88ed, %esi           # imm = 0x88ED
callq 0x11a70
testl %eax, %eax
je 0x386e6
testl %ebp, %ebp
je 0x38720
movq 0x1dda7(%rip), %rax     # 0x56478
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
movq %r13, %r9
callq *(%rax)
jmp 0x38735
movq %r14, 0x8(%rsp)
movslq %r13d, %rsi
movq %rbx, %rdi
movq %rsi, 0x10(%rsp)
callq 0x111f0
movq %rax, %r14
testl %ebp, %ebp
je 0x38741
movq 0x1dd6f(%rip), %rax     # 0x56478
movl %ebp, %edi
movq 0x8(%rsp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movq %r14, %r9
callq *(%rax)
jmp 0x38758
movl 0x4(%rsp), %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movq %r13, %r8
callq 0x114f0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
jmp 0x38783
movl 0x4(%rsp), %edi
movq 0x8(%rsp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movq %r14, %r8
callq 0x114f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
movq %rbx, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq 0x11ab0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl $0x1, %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/teximage.c
// Function: GetCompressedTextureImage
static int GetCompressedTextureImage(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    GLint level = luaL_checkinteger(L, arg++);
    GLsizei bufsz = luaL_checkinteger(L, arg++);
    char* data = (char*)Malloc(L, bufsz *sizeof(char));
    if(texture==0)
        glGetCompressedTexImage(target, level, (void*)data);
    else
        glGetCompressedTextureImage(texture, level, bufsz, (void*)data);
    CheckErrorFree(L, data);
    lua_pushlstring(L, data, bufsz);
    Free(L, data);
    return 1;
    }

// 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 0x11420
movl %eax, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r13
movslq %r13d, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x111f0
movq %rax, %r15
testl %ebp, %ebp
je 0x38801
movq 0x1e61e(%rip), %rax     # 0x56e10
movl %ebp, %edi
movl %r12d, %esi
movl %r13d, %edx
movq %r15, %rcx
callq *(%rax)
jmp 0x38814
movq 0x1e778(%rip), %rax     # 0x56f80
movl 0x4(%rsp), %edi
movl %r12d, %esi
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11540
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11ab0
movq %rbx, %rdi
movq %r15, %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/teximage.c
// Function: GetTextureSubImage
static int GetTextureSubImage(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    GLint xoffset = luaL_checkinteger(L, arg++);
    GLint yoffset = luaL_checkinteger(L, arg++);
    GLint zoffset = luaL_checkinteger(L, arg++);
    GLsizei width = luaL_checkinteger(L, arg++);
    GLsizei height = luaL_checkinteger(L, arg++);
    GLsizei depth = luaL_checkinteger(L, arg++);
    GLsizei bufsz = luaL_checkinteger(L, arg++);
    char* data = (char*)Malloc(L, bufsz *sizeof(char));
    glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufsz, (void*)data);
    CheckErrorFree(L, data);
    lua_pushlstring(L, data, bufsz);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x30(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x20(%rsp)
movq %rbx, %rdi
movl $0x12, %esi
movl $0x3, %edx
callq 0x11150
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
movl $0x7, %esi
movl $0x4, %edx
callq 0x11150
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x8, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x9, %esi
callq 0x11af0
movq %rax, (%rsp)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0xb, %esi
callq 0x11af0
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %rbp
movq 0x1dc2a(%rip), %rax     # 0x56560
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
movl %r12d, %r8d
movl %r14d, %r9d
pushq %rbp
pushq %r13
pushq 0x28(%rsp)
pushq 0x40(%rsp)
pushq %r15
pushq 0x28(%rsp)
callq *(%rax)
addq $0x30, %rsp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x11540
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x11ab0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x11360
movl $0x1, %eax
addq $0x38, %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/teximage.c
// Function: GenerateMipmap
static int GenerateMipmap(lua_State *L)
    {
    int arg = 1;
    GLenum target;
    GLuint texture = checktargetorname(L, arg++, &target, DOMAIN_TEXTURE_TARGET);
    if(texture==0)
        glGenerateMipmap(target);
    else
        glGenerateTextureMipmap(texture);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
movl $0x13, %ecx
callq 0x11420
testl %eax, %eax
je 0x38ae8
movq 0x1e4d6(%rip), %rcx     # 0x56fb8
movl %eax, %edi
callq *(%rcx)
jmp 0x38af5
movq 0x1d879(%rip), %rax     # 0x56368
movl 0xc(%rsp), %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: TextureView
static int TextureView(lua_State *L)
    {
    int arg = 1;
    GLuint texture = luaL_checkinteger(L, arg++);
    GLenum target = checktexturetarget(L, arg++);
    GLuint origtexture = luaL_checkinteger(L, arg++);
    GLenum intfmt = checkinternalformat(L, arg++);
    GLuint minlevel = luaL_checkinteger(L, arg++);
    GLuint numlevels = luaL_checkinteger(L, arg++);
    GLuint minlayer = luaL_checkinteger(L, arg++);
    GLuint numlayers = luaL_checkinteger(L, arg++);
    glTextureView(texture, target, origtexture, intfmt, minlevel, numlevels, minlayer, numlayers);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x13, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x11, %esi
movl $0x4, %edx
callq 0x11150
movl %eax, %r12d
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11af0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x8, %esi
callq 0x11af0
movq 0x1dff4(%rip), %r10     # 0x56b98
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl %r14d, %r9d
pushq %rax
pushq %rbp
callq *(%r10)
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: BindImageTexture
static int BindImageTexture(lua_State *L)
    {
    int arg = 1;
    GLuint unit = luaL_checkinteger(L, arg++);
    GLuint texture = luaL_checkinteger(L, arg++);
    GLint level = luaL_checkinteger(L, arg++);
    GLboolean layered = checkboolean(L, arg++);
    GLint layer = luaL_checkinteger(L, arg++);
    GLenum access = checktextureaccess(L, arg++);
    GLenum format = checkinternalformat(L, arg++);
    glBindImageTexture(unit, texture, level, layered, layer, access, format);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11500
movl %eax, %ebp
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5c, %esi
movl $0x6, %edx
callq 0x11150
movl %eax, %r14d
movq %rbx, %rdi
movl $0x11, %esi
movl $0x7, %edx
callq 0x11150
movq 0x1e388(%rip), %r10     # 0x56ff0
movl %eax, (%rsp)
movzbl %bpl, %ecx
movq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %r8d
movl %r14d, %r9d
callq *(%r10)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/teximage.c
// Function: BindImageTextures
static int BindImageTextures(lua_State *L)
    {
    GLsizei count, i, arg;
    GLuint *textures;
    GLuint first = luaL_checkinteger(L, 1);
    arg = 2;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    if(arg==2)
        luaL_checkinteger(L, arg); /* raise an error */
    count = arg - 2;
    textures = (GLuint*)Malloc(L, count*sizeof(GLuint));
    arg = 2;
    for(i=0; i < count; i++)
        textures[i]=lua_tointeger(L, arg++);
    glBindImageTextures(first, count, textures);
    Free(L, textures);  
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11850
testl %eax, %eax
jle 0x38ced
movl $0x2, %ebp
movl %ebp, %esi
leal 0x1(%rsi), %ebp
movq %rbx, %rdi
callq 0x11af0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11850
testl %eax, %eax
jg 0x38ccd
cmpl $0x2, %ebp
jne 0x38cff
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movl $0x2, %ebp
movslq %ebp, %r12
addl $-0x2, %ebp
leaq -0x8(,%r12,4), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r15
cmpl $0x3, %r12d
jl 0x38d3e
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x2(%r13), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r15,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x38d24
movq 0x1e283(%rip), %rax     # 0x56fc8
movl %r14d, %edi
movl %ebp, %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
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: ActiveTexture
static int ActiveTexture(lua_State *L)
    {
    GLuint n = luaL_checkinteger(L, 1);
    GLenum texture;
    switch(n)
        {
#define C(i) case i: texture = GL_TEXTURE##i; break
        C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); 
        C(10); C(11); C(12); C(13); C(14); C(15); C(16); C(17); C(18); C(19); C(20); 
        C(21); C(22); C(23); C(24); C(25); C(26); C(27); C(28); C(29); C(30); C(31); 
#undef C
        default: return luaL_argerror(L, 1, "out of range");
        }
    glActiveTexture(texture);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
cmpl $0x20, %eax
jae 0x391a5
orl $0x84c0, %eax           # imm = 0x84C0
movq 0x1d32b(%rip), %rcx     # 0x564c0
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
leaq 0x11212(%rip), %rdx     # 0x4a3be
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x11930
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: SetEnum
static int SetEnum(lua_State *L, GLuint texture, GLenum target, GLenum pname, int arg, uint32_t domain) 
    {
    GLint param = enums_check(L, domain, arg);
    if(texture==0)
        glTexParameteri(target, pname, param);
    else 
        glTextureParameteri(texture, pname, param);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movl %r8d, %esi
movl $0x3, %edx
callq 0x11150
testl %r14d, %r14d
je 0x39a60
movq 0x1c87b(%rip), %rcx     # 0x562d0
movl %r14d, %edi
movl %ebp, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x39a6c
movl %r15d, %edi
movl %ebp, %esi
movl %eax, %edx
callq 0x11b00
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11870
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: SetFloat
static int SetFloat(lua_State *L, GLuint texture, GLenum target, GLenum pname, int arg)
    {
    GLfloat param = luaL_checkinteger(L, arg);
    if(texture==0)
        glTexParameterf(target, pname, param);
    else 
        glTextureParameterf(texture, pname, param);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movl $0x3, %esi
callq 0x11af0
cvtsi2ss %rax, %xmm0
testl %r14d, %r14d
je 0x39ab4
movq 0x1d275(%rip), %rax     # 0x56d20
movl %r14d, %edi
movl %ebp, %esi
callq *(%rax)
jmp 0x39abe
movl %r15d, %edi
movl %ebp, %esi
callq 0x111c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11870
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: GetEnum
static int GetEnum(lua_State *L, GLuint texture, GLenum target, GLenum pname, uint32_t domain)
    {
    GLint param;
    if(texture==0)
        glGetTexParameteriv(target, pname, &param);
    else
        glGetTextureParameteriv(texture, pname, &param);
    CheckError(L);
    enums_push(L, domain, param);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0x39af2
movq 0x1ca5b(%rip), %rax     # 0x56540
leaq 0x4(%rsp), %rdx
movl %esi, %edi
movl %ecx, %esi
callq *(%rax)
jmp 0x39b03
leaq 0x4(%rsp), %rax
movl %edx, %edi
movl %ecx, %esi
movq %rax, %rdx
callq 0x119a0
movq %r14, %rdi
callq 0x11870
movl 0x4(%rsp), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11110
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: GetFloat
static int GetFloat(lua_State *L, GLuint texture, GLenum target, GLenum pname)
    {
    GLfloat param;
    if(texture==0)
        glGetTexParameterfv(target, pname, &param);
    else
        glGetTextureParameterfv(texture, pname, &param);
    CheckError(L);
    lua_pushnumber(L, param); 
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x39b9a
movq 0x1cb03(%rip), %rax     # 0x56690
leaq 0xc(%rsp), %rdx
movl %esi, %edi
movl %ecx, %esi
callq *(%rax)
jmp 0x39bab
leaq 0xc(%rsp), %rax
movl %edx, %edi
movl %ecx, %esi
movq %rax, %rdx
callq 0x11350
movq %rbx, %rdi
callq 0x11870
cvtss2sd 0xc(%rsp), %xmm0
movq %rbx, %rdi
callq 0x11370
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/texture.c
// Function: LGetEnum
static int LGetEnum(lua_State *L, GLuint texture, GLenum target, GLint level, GLenum pname, uint32_t domain)
    {
    GLint param;
    if(texture==0)
        glGetTexLevelParameteriv(target, level, pname, &param);
    else
        glGetTextureLevelParameteriv(texture, level, pname, &param);
    CheckError(L);
    enums_push(L, domain, param);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0x39c53
movq 0x1d0e9(%rip), %r9      # 0x56d28
leaq 0x4(%rsp), %rax
movl %esi, %edi
movl %ecx, %esi
movl %r8d, %edx
movq %rax, %rcx
callq *(%r9)
jmp 0x39c67
leaq 0x4(%rsp), %rax
movl %edx, %edi
movl %ecx, %esi
movl %r8d, %edx
movq %rax, %rcx
callq 0x11a10
movq %r14, %rdi
callq 0x11870
movl 0x4(%rsp), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x11110
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: TransformFeedbackBufferRange
static int TransformFeedbackBufferRange(lua_State *L)
    {
    GLuint xfb = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    GLuint buffer = luaL_checkinteger(L, 3);
    GLintptr offset = luaL_checkinteger(L, 4);
    GLsizei size = luaL_checkinteger(L, 5);
    glTransformFeedbackBufferRange(xfb, index, buffer, offset, size);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x11af0
movq 0x1c4ff(%rip), %r9      # 0x56590
movslq %eax, %r8
movl %r14d, %edi
movl %r15d, %esi
movl %r12d, %edx
movq %r13, %rcx
callq *(%r9)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: DrawTransformFeedback
static int DrawTransformFeedback(lua_State *L)
    {
    GLsizei instancecount;
    GLenum mode = checkdrawmode(L, 1);
    GLuint id = luaL_checkinteger(L, 2);
    if(lua_isnoneornil(L, 3))
        glDrawTransformFeedback(mode, id);
    else
        {
        instancecount = luaL_checkinteger(L, 3);
        glDrawTransformFeedbackInstanced(mode, id, instancecount);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x2c, %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 0x3a10f
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x1ca54(%rip), %rcx     # 0x56b58
movl %ebp, %edi
movl %r14d, %esi
movl %eax, %edx
callq *(%rcx)
jmp 0x3a11d
movq 0x1c2a2(%rip), %rax     # 0x563b8
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/transform.c
// Function: DrawTransformFeedbackStream
static int DrawTransformFeedbackStream(lua_State *L)
    {
    GLsizei instancecount;
    GLenum mode = checkdrawmode(L, 1);
    GLuint id = luaL_checkinteger(L, 2);
    GLuint stream = luaL_checkinteger(L, 3);
    if(lua_isnoneornil(L, 4))
        glDrawTransformFeedbackStream(mode, id, stream);
    else
        {
        instancecount = luaL_checkinteger(L, 4);
        glDrawTransformFeedbackStreamInstanced(mode, id, stream, instancecount);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2c, %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 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11850
testl %eax, %eax
jle 0x3a19b
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq 0x1c85c(%rip), %r8      # 0x569e8
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %eax, %ecx
callq *(%r8)
jmp 0x3a1ac
movq 0x1c75e(%rip), %rax     # 0x56900
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: TransformFeedbackVaryings
static int TransformFeedbackVaryings(lua_State *L)
/* transform_feedback_varyings(program, mode, varying1 [, varying2, ...])
 */
    {
    GLsizei count, arg, i;
    const GLchar **varyings;
    GLuint program = luaL_checkinteger(L, 1);
    GLenum mode = checkbuffermode(L, 2);
    arg = 3;
    while(!lua_isnoneornil(L, arg))
        luaL_checkstring(L, arg++);
    if(arg == 3)
        luaL_checkstring(L, arg); /* raise an error */
    count = arg - 3;
    varyings = (const GLchar**)Malloc(L, count*sizeof(GLchar*));
    arg = 3;
    for(i=0; i<count; i++)
        varyings[i] = lua_tostring(L, arg++);
    glTransformFeedbackVaryings(program, count, varyings, mode);
    Free(L, varyings);  
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, (%rsp)
movq %rbx, %rdi
movl $0x57, %esi
movl $0x2, %edx
callq 0x11150
movl %eax, %ebp
movl $0x3, %r15d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11850
testl %eax, %eax
jle 0x3a235
movl $0x4, %r12d
leal -0x1(%r12), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11440
movq %rbx, %rdi
movl %r12d, %esi
callq 0x11850
incl %r12d
testl %eax, %eax
jg 0x3a20e
cmpl $0x4, %r12d
jne 0x3a246
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x11440
jmp 0x3a24c
decl %r12d
movl %r12d, %r15d
movslq %r15d, %r14
addl $-0x3, %r15d
leaq -0x18(,%r14,8), %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r12
cmpl $0x4, %r14d
jl 0x3a28c
movl %r15d, %r13d
xorl %r14d, %r14d
leal 0x3(%r14), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11940
movq %rax, (%r12,%r14,8)
incq %r14
cmpq %r14, %r13
jne 0x3a272
movq 0x1c81d(%rip), %rax     # 0x56ab0
movq (%rsp), %rdi
movl %r15d, %esi
movq %r12, %rdx
movl %ebp, %ecx
callq *(%rax)
movq %rbx, %rdi
movq %r12, %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
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/transform.c
// Function: GetTransformFeedbackVarying
static int GetTransformFeedbackVarying(lua_State *L)
/* get_transform_feedback_varying(program, index)
 * -> name, type, size
 */
    {
    GLchar *name;
    GLenum type;
    GLsizei bufsz, length, size;
    GLuint program = luaL_checkinteger(L, 1);
    GLuint index = luaL_checkinteger(L, 2);
    bufsz = programGet(L, program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH);
    name = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetTransformFeedbackVarying(program, index, bufsz, &length, &size, &type, name);
    CheckErrorFree(L, name);
    if(length == 0)
        { Free(L, name); return 0; }
    lua_pushstring(L, name);
    pushglsltype(L, type);
    lua_pushinteger(L, size);
    Free(L, name);
    return 3;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl %r15d, %esi
movl $0x8c76, %edx           # imm = 0x8C76
callq 0x11840
movslq %eax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x111f0
movq %rax, %r14
movq 0x1bf9d(%rip), %rax     # 0x562b8
movq %r14, (%rsp)
leaq 0x14(%rsp), %rbp
leaq 0xc(%rsp), %r8
leaq 0x10(%rsp), %r9
movl %r15d, %edi
movl %r12d, %esi
movl %r13d, %edx
movq %rbp, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11540
cmpl $0x0, (%rbp)
je 0x3a37d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x110c0
movl 0x10(%rsp), %edx
movq %rbx, %rdi
movl $0xe, %esi
callq 0x11110
movslq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x3, %ebp
jmp 0x3a37f
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11360
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq