LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: BufferStorage
static int BufferStorage(lua_State *L)
/* size = buffer_storage(target|buffer, data, flag1, flag2, ... ) */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLbitfield flags;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    if(lua_isnoneornil(L, 2))
        {
        data = NULL;
        size = 0;
        }
    else if(lua_isstring(L, 2))
        {
        data = lua_tolstring(L, 2, &len);
        size = len;
        }
    else if(lua_istable(L, 2))
        {
        data = checkdataptr(L, 2, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 2, "invalid type");
    flags = CheckStorageFlags(L, 3, 0);

    if(buffer==0)
        glBufferStorage(target, size, data, flags);
    else
        glNamedBufferStorage(buffer, size, data, flags);
    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
movl %ebx, %esi
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11850
testl %eax, %eax
jle 0x12153
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x110b0
pushq $0x2
popq %rsi
testl %eax, %eax
je 0x1215b
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x11940
jmp 0x1217b
xorl %r15d, %r15d
xorl %r12d, %r12d
jmp 0x12181
movq %r14, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x121dc
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x11b20
movq %rax, %r12
movq (%r15), %r15
leaq 0x44458(%rip), %rcx     # 0x565e0
pushq $0x3
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11b50
testl %ebp, %ebp
je 0x121a4
movq 0x43ae0(%rip), %r8      # 0x55c80
movl %ebp, %edi
jmp 0x121af
movq 0x4324d(%rip), %r8      # 0x553f8
movl 0x4(%rsp), %edi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq *(%r8)
movq %r14, %rdi
callq 0x11870
movq %r14, %rdi
movq %r15, %rsi
callq 0x113b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29015(%rip), %rdx     # 0x3b1f8
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11930
movl %eax, %ebx
jmp 0x121cd
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: BufferData
static int BufferData(lua_State *L)
/* size = buffer_data(target|buffer, data, usage) data = binary string (see string.pack())
 * size = buffer_data(target|buffer, size, usage) allocates memory only, without storing
 *                                              any data in it
 */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLenum target, usage;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);

    if(lua_type(L, 2)==LUA_TNUMBER)
        {
        data = NULL;
        size = luaL_checkinteger(L, 2);
        }
    else if(lua_isstring(L, 2))
        {
        data = lua_tolstring(L, 2, &len);
        size = len;
        }
    else if(lua_istable(L, 2))
        {
        data = checkdataptr(L, 2, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 2, "invalid type");
    usage = checkbufferusage(L, 3);
    
    if(buffer == 0)
        glBufferData(target, size, data, usage);
    else
        glNamedBufferData(buffer, size, data, usage);
    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
movl %ebx, %esi
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11850
pushq $0x2
popq %rsi
movq %r14, %rdi
cmpl $0x3, %eax
jne 0x12238
callq 0x11af0
movq %rax, %r15
xorl %r12d, %r12d
jmp 0x1227c
callq 0x110b0
pushq $0x2
popq %rsi
testl %eax, %eax
je 0x12256
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x11940
jmp 0x12276
movq %r14, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x122d1
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x11b20
movq %rax, %r12
movq (%r15), %r15
pushq $0x38
popq %rsi
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x11150
testl %ebp, %ebp
je 0x12299
movq 0x43c73(%rip), %r8      # 0x55f08
movl %ebp, %edi
jmp 0x122a4
movq 0x43b38(%rip), %r8      # 0x55dd8
movl 0x4(%rsp), %edi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq *(%r8)
movq %r14, %rdi
callq 0x11870
movq %r14, %rdi
movq %r15, %rsi
callq 0x113b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28f20(%rip), %rdx     # 0x3b1f8
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11930
movl %eax, %ebx
jmp 0x122c2
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: BufferSubData
static int BufferSubData(lua_State *L)
/* size = buffer_sub_data(target|buffer, offset, data) 
 * data = binary string (see string.pack())
 */
    {
    size_t len;
    const char *data;
    GLsizeiptr size;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = lua_tointeger(L, 2);
    if(lua_isstring(L, 3))
        {
        data = lua_tolstring(L, 3, &len);
        size = len;
        }
    else if(lua_istable(L, 3))
        {
        data = checkdataptr(L, 3, &len);
        size = len;
        }
    else
        return luaL_argerror(L, 3, "invalid type");
    
    if(buffer == 0)
        glBufferSubData(target, offset, size, data);
    else
        glNamedBufferSubData(buffer, offset, size, data);

    CheckError(L);
    lua_pushinteger(L, size);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
movl %ebx, %esi
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, %r15
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x110b0
pushq $0x3
popq %rsi
testl %eax, %eax
je 0x1233b
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x11940
jmp 0x12358
movq %r14, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x123a5
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x11b20
movq 0x8(%rsp), %r12
testl %ebp, %ebp
je 0x1236c
movq 0x43478(%rip), %r8      # 0x557e0
movl %ebp, %edi
jmp 0x12377
movq 0x43615(%rip), %r8      # 0x55988
movl 0x4(%rsp), %edi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq *(%r8)
movq %r14, %rdi
callq 0x11870
movq %r14, %rdi
movq %r12, %rsi
callq 0x113b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28e4c(%rip), %rdx     # 0x3b1f8
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11930
movl %eax, %ebx
jmp 0x12396
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: ClearBufferData
static int ClearBufferData(lua_State *L)
    {
    size_t len;
    const void* data;
    int arg = 1;
    GLenum target;
    GLuint buffer = checktargetorname(L, arg++, &target, DOMAIN_BUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        data = NULL;
    else if(lua_isstring(L, arg))
        data = lua_tolstring(L, arg, &len);
    else if(lua_istable(L, arg))
        data = checkdataptr(L, arg, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    if(buffer == 0)
        glClearBufferData(target, internalformat, format, type, (void*)data);
    else
        glClearNamedBufferData(buffer, internalformat, format, type, (void*)data);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r12
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
callq 0x11420
movl %eax, %ebx
pushq $0x11
popq %rsi
pushq $0x2
popq %rdx
movq %r12, %rdi
callq 0x11150
movl %eax, %ebp
pushq $0x12
popq %rsi
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x11150
movl %eax, %r14d
pushq $0x7
popq %rsi
pushq $0x4
popq %rdx
movq %r12, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x5
popq %rsi
movq %r12, %rdi
callq 0x11850
testl %eax, %eax
jle 0x1243e
pushq $0x5
popq %rsi
movq %r12, %rdi
callq 0x110b0
pushq $0x5
popq %rsi
testl %eax, %eax
je 0x12443
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
callq 0x11940
jmp 0x12460
xorl %r8d, %r8d
jmp 0x12463
movq %r12, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x12496
pushq $0x5
popq %rsi
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
callq 0x11b20
movq %rax, %r8
testl %ebx, %ebx
je 0x12472
movq 0x434b2(%rip), %rax     # 0x55920
movl %ebx, %edi
jmp 0x1247d
movq 0x43277(%rip), %rax     # 0x556f0
movl 0x4(%rsp), %edi
movl %ebp, %esi
movl %r14d, %edx
movl %r15d, %ecx
callq *(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28d5b(%rip), %rdx     # 0x3b1f8
pushq $0x5
popq %rsi
movq %r12, %rdi
callq 0x11930
jmp 0x12489
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: ClearBufferSubData
static int ClearBufferSubData(lua_State *L)
    {
    int arg = 1;
    size_t len;
    const void* data;
    GLenum target;
    GLuint buffer = checktargetorname(L, arg++, &target, DOMAIN_BUFFER_TARGET);
    GLenum internalformat = checkinternalformat(L, arg++);
    GLintptr offset = luaL_checkinteger(L, arg++);
    GLsizei size = luaL_checkinteger(L, arg++);
    GLenum format = checkformat(L, arg++);
    GLenum type = checktype(L, arg++);
    if(lua_isnoneornil(L, arg))
        data = NULL;
    else if(lua_isstring(L, arg))
        data = lua_tolstring(L, arg, &len);
    else if(lua_istable(L, arg))
        data = checkdataptr(L, arg, &len);
    else
        return luaL_argerror(L, arg, "invalid type");
    if(buffer == 0)
        glClearBufferSubData(target, internalformat, offset, size, format, type, (void*)data);
    else
        glClearNamedBufferSubData(buffer,internalformat, offset, size, format, type, (void*)data);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x14(%rsp), %rdx
pushq $0x36
popq %rcx
callq 0x11420
movl %eax, %ebp
pushq $0x11
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, 0x10(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x18(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x12
popq %rsi
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x7
popq %r14
pushq $0x6
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11150
movl %eax, %r13d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11850
testl %eax, %eax
jle 0x12553
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x110b0
pushq $0x7
popq %rsi
testl %eax, %eax
je 0x12557
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x11940
jmp 0x12574
xorl %eax, %eax
jmp 0x12574
movq %rbx, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x125bf
pushq $0x7
popq %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x11b20
testl %ebp, %ebp
je 0x1258a
movq 0x43399(%rip), %r10     # 0x55918
movslq %r12d, %rcx
movq %rax, (%rsp)
movl %ebp, %edi
jmp 0x1259c
movq 0x43287(%rip), %r10     # 0x55818
movl 0x14(%rsp), %edi
movslq %r12d, %rcx
movq %rax, (%rsp)
movl 0x10(%rsp), %esi
movq 0x18(%rsp), %rdx
movl %r15d, %r8d
movl %r13d, %r9d
callq *(%r10)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28c32(%rip), %rdx     # 0x3b1f8
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11930
jmp 0x125b0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: GetBufferSubData
static int GetBufferSubData(lua_State *L)
/* data = get_buffer_sub_data(target|buffer, offset, size) */
    {
    char *data;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = lua_tointeger(L, 2);
    GLsizeiptr size = lua_tointeger(L, 3);
    data = (char*)Malloc(L, size*sizeof(char));
    
    if(buffer == 0)
        glGetBufferSubData(target, offset, size, data);
    else
        glGetNamedBufferSubData(buffer, offset, size, data);
    CheckErrorFree(L, data);
    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rdx
pushq $0x36
popq %rcx
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, %r12
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x111f0
movq %rax, %r15
testl %ebp, %ebp
je 0x12631
movq 0x4355b(%rip), %rax     # 0x55b88
movl %ebp, %edi
jmp 0x1263c
movq 0x43940(%rip), %rax     # 0x55f78
movl 0xc(%rsp), %edi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
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
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: CopyBufferSubData
static int CopyBufferSubData(lua_State *L)
/* data = copy_buffer_sub_data(src, dst, src_offset, dst_offset, size) 
 * src,dst = target,target | buffer,buffer
 */
    {
    GLenum src_target, dst_target;
    GLuint src_buffer = checktargetorname(L, 1, &src_target, DOMAIN_BUFFER_TARGET);
    GLuint dst_buffer = checktargetorname(L, 2, &dst_target, DOMAIN_BUFFER_TARGET);
    GLintptr src_offset = lua_tointeger(L, 3);
    GLintptr dst_offset = lua_tointeger(L, 4);
    GLsizeiptr size = lua_tointeger(L, 5);
    if((src_buffer==0) &&(dst_buffer != 0))
        glCopyBufferSubData(src_target, dst_target, src_offset, dst_offset, size);
    else if((dst_buffer!=0) && (dst_buffer != 0))
        glCopyNamedBufferSubData(src_buffer, dst_buffer, src_offset, dst_offset, size); 
    else
        return luaL_error(L, "invalid arguments (can not mix names and targets)");
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rdx
pushq $0x36
popq %r14
movl %r14d, %ecx
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %r14d, %ecx
callq 0x11420
movl %eax, %r14d
pushq $0x3
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
testl %ebp, %ebp
sete %cl
testl %r14d, %r14d
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x12706
movq 0x43484(%rip), %r9      # 0x55b80
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
jmp 0x12717
testl %r14d, %r14d
je 0x1273a
movq 0x43436(%rip), %r9      # 0x55b48
movl %ebp, %edi
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
callq *(%r9)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28b12(%rip), %rsi     # 0x3b253
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x1272d
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: InvalidateBufferData
static int InvalidateBufferData(lua_State *L)
    {
    GLuint buffer = luaL_checkinteger(L, 1);
    glInvalidateBufferData(buffer);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq 0x436c8(%rip), %rcx     # 0x55e28
movl %eax, %edi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: InvalidateBufferSubData
static int InvalidateBufferSubData(lua_State *L)
    {
    GLuint buffer = luaL_checkinteger(L, 1);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizeiptr length = luaL_checkinteger(L, 3);
    glInvalidateBufferSubData(buffer, offset, length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x42cf5(%rip), %rcx     # 0x55498
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapBuffer
static int MapBuffer(lua_State *L)
/* map_buffer(target|buffer, access) */
    {
    void *ptr;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLenum access = checkbufferaccess(L, 2);
    if(buffer == 0)
        ptr = glMapBuffer(target, access);
    else
        ptr = glMapNamedBuffer(buffer, access);
    CheckError(L);
    if(ptr==NULL)
        return luaL_error(L, "cannot bind buffer");
    lua_pushlightuserdata(L, ptr);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
movl %ebx, %esi
callq 0x11420
movl %eax, %ebp
pushq $0x3a
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x11150
testl %ebp, %ebp
je 0x12963
movq 0x43291(%rip), %rcx     # 0x55bf0
movl %ebp, %edi
jmp 0x1296e
movq 0x42ef6(%rip), %rcx     # 0x55860
movl 0x4(%rsp), %edi
movl %eax, %esi
callq *(%rcx)
movq %rax, %r15
movq %r14, %rdi
callq 0x11870
testq %r15, %r15
je 0x1298f
movq %r14, %rdi
movq %r15, %rsi
callq 0x114a0
jmp 0x129a2
leaq 0x2894a(%rip), %rsi     # 0x3b2e0
movq %r14, %rdi
xorl %eax, %eax
callq 0x11ae0
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapBufferRange
static int MapBufferRange(lua_State *L)
/* map_buffer_range(target|buffer, offset, length, accessbit1, ...) */
    {
    void *ptr;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizei length = luaL_checkinteger(L, 3);
    GLbitfield access = CheckAccessFlags(L, 4, 0);
    if(buffer == 0)
        ptr = glMapBufferRange(target, offset, length, access);
    else
        ptr = glMapNamedBufferRange(buffer, offset, length, access);
    CheckError(L);
    if(ptr==NULL)
        return luaL_error(L, "cannot bind buffer");
    lua_pushlightuserdata(L, ptr);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0xc(%rsp), %rdx
pushq $0x36
popq %rcx
movl %ebx, %esi
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r12
leaq 0x43c63(%rip), %rcx     # 0x56658
pushq $0x4
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x11b50
testl %ebp, %ebp
je 0x12a14
movq 0x42b6b(%rip), %r8      # 0x55578
movslq %r12d, %rdx
movl %ebp, %edi
jmp 0x12a22
movq 0x42edd(%rip), %r8      # 0x558f8
movl 0xc(%rsp), %edi
movslq %r12d, %rdx
movq %r15, %rsi
movl %eax, %ecx
callq *(%r8)
movq %rax, %r15
movq %r14, %rdi
callq 0x11870
testq %r15, %r15
je 0x12a47
movq %r14, %rdi
movq %r15, %rsi
callq 0x114a0
jmp 0x12a5a
leaq 0x28892(%rip), %rsi     # 0x3b2e0
movq %r14, %rdi
xorl %eax, %eax
callq 0x11ae0
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: FlushMappedBufferRange
static int FlushMappedBufferRange(lua_State *L)
    {
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLintptr offset = luaL_checkinteger(L, 2);
    GLsizei length = luaL_checkinteger(L, 3);
    if(buffer == 0)
        glFlushMappedBufferRange(target, offset, length);
    else
        glFlushMappedNamedBufferRange(buffer, offset, length);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %rdx
pushq $0x36
popq %rcx
callq 0x11420
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
testl %ebp, %ebp
je 0x12ab1
movq 0x43526(%rip), %rcx     # 0x55fd0
movslq %eax, %rdx
movl %ebp, %edi
jmp 0x12abf
movq 0x43360(%rip), %rcx     # 0x55e18
movl 0xc(%rsp), %edi
movslq %eax, %rdx
movq %r14, %rsi
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_O2/stetre[P]moongl/src/buffer.c
// Function: UnmapBuffer
static int UnmapBuffer(lua_State *L)
/* unmap_buffer(targe|buffer)
 * -> boolean
 */
    {
    GLboolean res;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    if(buffer == 0)
        res = glUnmapBuffer(target);
    else
        res = glUnmapNamedBuffer(buffer);
    CheckError(L);
    lua_pushboolean(L, res);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %rdx
pushq $0x36
popq %rcx
callq 0x11420
testl %eax, %eax
je 0x12afe
movq 0x42908(%rip), %rcx     # 0x55400
movl %eax, %edi
callq *(%rcx)
jmp 0x12b0b
movq 0x434d3(%rip), %rax     # 0x55fd8
movl 0x4(%rsp), %edi
callq *(%rax)
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x117e0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapWrite
static int MapWrite(lua_State *L) /* nongl */
/* mapped_buffer_write(target|buffer, offset, bstring) */
    {
    size_t length, buflen;
    const char *data;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    if(lua_isstring(L, 3))
        data = luaL_checklstring(L, 3, &length);
    else if(lua_istable(L, 3))
        data = checkdataptr(L, 3, &length);
    else
        return luaL_argerror(L, 3, "invalid data");
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_WRITE_BIT))
        return luaL_error(L, "no write access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    memcpy(ptr + offset, data, length);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r14
pushq $0x36
popq %rcx
movq %r14, %rdx
callq 0x11420
movl %eax, %ebp
movl (%r14), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x13026
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x110b0
pushq $0x3
popq %rsi
testl %eax, %eax
je 0x12b8e
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11440
jmp 0x12bab
movq %rbx, %rdi
callq 0x11850
cmpl $0x5, %eax
jne 0x12c15
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11b20
movq %rax, %r12
movl 0x4(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x12fea
testb $0x2, %al
jne 0x12bce
leaq 0x28734(%rip), %rsi     # 0x3b300
jmp 0x12bf7
movl 0x4(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x12fb0
cltq
movq 0x8(%rsp), %rdx
subq %r15, %rax
cmpq %rax, %rdx
jbe 0x12c03
leaq 0x28719(%rip), %rsi     # 0x3b310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12c27
addq %r15, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x11b10
xorl %eax, %eax
jmp 0x12c27
leaq 0x286d7(%rip), %rdx     # 0x3b2f3
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11930
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapRead
static int MapRead(lua_State *L) /* nongl */
/* bstring = mapped_buffer_read(target|buffer, offset, length) */
    {
    size_t buflen;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    size_t length =  luaL_checkinteger(L, 3);
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_READ_BIT))
        return luaL_error(L, "no read access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    lua_pushlstring(L, ptr+offset, length);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
pushq $0x1
popq %rbx
leaq 0xc(%rsp), %r15
pushq $0x36
popq %rcx
movl %ebx, %esi
movq %r15, %rdx
callq 0x11420
movl %eax, %ebp
movl (%r15), %esi
movq %r14, %rdi
movl %eax, %edx
callq 0x13026
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x11af0
movq %rax, %r13
movl (%r15), %esi
movq %r14, %rdi
movl %ebp, %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x12fea
testb $0x1, %al
jne 0x12ca9
leaq 0x2869c(%rip), %rsi     # 0x3b343
jmp 0x12ccd
movl 0xc(%rsp), %esi
movq %r14, %rdi
movl %ebp, %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x12fb0
cltq
subq %r12, %rax
cmpq %rax, %r13
jbe 0x12cdb
leaq 0x28643(%rip), %rsi     # 0x3b310
movq %r14, %rdi
xorl %eax, %eax
callq 0x11ae0
movl %eax, %ebx
jmp 0x12cee
movq 0x10(%rsp), %rsi
addq %r12, %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x11ab0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapCopyFrom
static int MapCopyFrom(lua_State *L) /* nongl */
/* mapped_buffer_copy_from(target|buffer, offset, length, srcptr, [srcoffset]) */
    {
    size_t buflen;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    size_t length = luaL_checkinteger(L, 3);
    char *srcptr = (char*)checklightuserdata(L, 4);
    size_t srcoffset = luaL_optinteger(L, 5, 0);
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_WRITE_BIT))
        return luaL_error(L, "no write access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    memcpy(ptr + offset, srcptr + srcoffset, length);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r14
pushq $0x36
popq %rcx
movq %r14, %rdx
callq 0x11420
movl %eax, %ebp
movl (%r14), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x13026
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11770
movq %rax, %r13
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11b30
movq %rax, 0x8(%rsp)
movl (%r14), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x12fea
testb $0x2, %al
jne 0x12d92
leaq 0x28570(%rip), %rsi     # 0x3b300
jmp 0x12db6
movl 0x4(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x12fb0
cltq
subq %r15, %rax
cmpq %rax, %r12
jbe 0x12dc2
leaq 0x2855a(%rip), %rsi     # 0x3b310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12ddc
movq 0x10(%rsp), %rdi
addq %r15, %rdi
addq 0x8(%rsp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x11b10
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: MapCopyTo
static int MapCopyTo(lua_State *L) /* nongl */
/* bstring = mapped_buffer_copy_to(target|buffer, offset, length, dstptr, [dstoffset]) */
    {
    size_t buflen;
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    char *ptr = (char*)GetPointer(L, target, buffer);
    GLintptr offset = luaL_checkinteger(L, 2);
    size_t length =  luaL_checkinteger(L, 3);
    char *dstptr = (char*)checklightuserdata(L, 4);
    size_t dstoffset = luaL_optinteger(L, 5, 0);
    /* access and boundary checks */
    GLbitfield flags = GetAccessFlags(L, target, buffer);
    if(!(flags & GL_MAP_READ_BIT))
        return luaL_error(L, "no read access");
    buflen = GetMapLength(L, target, buffer);
    if(length > (buflen - offset))
        return luaL_error(L, "length is too large");
    memcpy(dstptr + dstoffset, ptr + offset, length);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r13
pushq $0x36
popq %rcx
movq %r13, %rdx
callq 0x11420
movl %eax, %ebp
movl (%r13), %esi
movq %rbx, %rdi
movl %eax, %edx
callq 0x13026
movq %rax, 0x8(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, 0x10(%rsp)
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11770
movq %rax, %r14
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11b30
movq %rax, %r15
movl (%r13), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x12fea
testb $0x1, %al
jne 0x12e80
leaq 0x284c5(%rip), %rsi     # 0x3b343
jmp 0x12ea9
movl 0x4(%rsp), %esi
movq %rbx, %rdi
movl %ebp, %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x12fb0
cltq
movq 0x10(%rsp), %rcx
subq %rcx, %rax
cmpq %rax, %r12
jbe 0x12eb5
leaq 0x28467(%rip), %rsi     # 0x3b310
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x12ecd
addq %r15, %r14
movq 0x8(%rsp), %rsi
addq %rcx, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x11b10
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: GetBoolean
static int GetBoolean(lua_State *L, GLenum target, GLuint buffer, GLenum pname)
    {
    GLint param;
    if(buffer==0)
        glGetBufferParameteriv(target, pname, &param);
    else
        glGetNamedBufferParameteriv(buffer, pname, &param);
    CheckError(L);
    lua_pushboolean(L, (param == GL_TRUE) );
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
cmovnel %edx, %esi
movq 0x42b78(%rip), %rax     # 0x55af0
cmoveq 0x42fa8(%rip), %rax     # 0x55f28
leaq 0x4(%rsp), %r14
movl %esi, %edi
movl %ecx, %esi
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %esi, %esi
cmpl $0x1, (%r14)
sete %sil
movq %rbx, %rdi
callq 0x117e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/buffer.c
// Function: GetPointer
static void *GetPointer(lua_State *L, GLenum target, GLuint buffer)
    {
    void *ptr = NULL;
    if(buffer == 0)
        glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &ptr);
    else
        glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &ptr);
    CheckErrorp(L);
    if(ptr == NULL)
        { luaL_error(L, "cannot retrieve buffer pointer"); return NULL; }
    return ptr;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %r14
andq $0x0, (%r14)
movq %rdi, %rbx
testl %edx, %edx
cmovnel %edx, %esi
movq 0x42a40(%rip), %rax     # 0x55a80
cmoveq 0x42720(%rip), %rax     # 0x55768
movl %esi, %edi
movl $0x88bd, %esi           # imm = 0x88BD
movq %r14, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x112c0
movq (%r14), %r14
testq %r14, %r14
jne 0x13075
leaq 0x282b9(%rip), %rsi     # 0x3b324
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/capabilities.c
// Function: Enable
static int Enable(lua_State *L)
    {
    GLenum cap = checkcapability(L, 1);
    int indexed = lua_isinteger(L, 2);
    if(indexed)
        glEnablei(cap, lua_tointeger(L, 2));
    else
        glEnable(cap);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x44
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x115b0
testl %eax, %eax
je 0x130d1
movq 0x42800(%rip), %rax     # 0x558b8
movq (%rax), %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %ebp, %edi
movl %eax, %esi
callq *%r14
jmp 0x130d8
movl %ebp, %edi
callq 0x11060
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/capabilities.c
// Function: Disable
static int Disable(lua_State *L)
    {
    GLenum cap = checkcapability(L, 1);
    int indexed = lua_isinteger(L, 2);
    if(indexed)
        glDisablei(cap, lua_tointeger(L, 2));
    else
        glDisable(cap);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x44
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x115b0
testl %eax, %eax
je 0x1312a
movq 0x4234f(%rip), %rax     # 0x55460
movq (%rax), %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %ebp, %edi
movl %eax, %esi
callq *%r14
jmp 0x13131
movl %ebp, %edi
callq 0x111a0
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/capabilities.c
// Function: IsEnabled
static int IsEnabled(lua_State *L)
    {
    GLboolean res;
    GLenum cap = checkcapability(L, 1);
    int indexed = lua_isinteger(L, 2);
    if(indexed)
        res = glIsEnabledi(cap, lua_tointeger(L, 2));
    else
        res = glIsEnabled(cap);
    CheckError(L);
    lua_pushboolean(L, res);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x44
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x115b0
testl %eax, %eax
je 0x13183
movq 0x42726(%rip), %rax     # 0x55890
movq (%rax), %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %ebp, %edi
movl %eax, %esi
callq *%r14
jmp 0x1318a
movl %ebp, %edi
callq 0x11140
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11870
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x117e0
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/debug.c
// Function: DebugMessageCallback
static int DebugMessageCallback(lua_State *L)
/* debug_message_callback(func) 
 * func(source, type, id, severity, message)
 */
    {
    if(!lua_isfunction(L, 1))
        return luaL_argerror(L, 1, "function expected");
    lua_pushvalue(L, 1);
    lua_setfield(L, LUA_REGISTRYINDEX, CALLBACK);
    glDebugMessageCallback((GLDEBUGPROC)Callback, (void*)L);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11850
cmpl $0x6, %eax
jne 0x13205
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x11720
leaq 0x28244(%rip), %rdx     # 0x3b41d
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x11890
movq 0x42833(%rip), %rax     # 0x55a20
leaq 0x377(%rip), %rdi       # 0x1356b
movq %rbx, %rsi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
retq
leaq 0x281ff(%rip), %rdx     # 0x3b40b
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x11930
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/debug.c
// Function: DebugMessageControl
static int DebugMessageControl(lua_State *L)
/* debug_message_control(source, type, severity, enabled [, id1, ... ]) */
    {
    GLsizei arg, i, count;
    GLuint *ids;
    GLenum source = checkdebugsource(L, 1);
    GLenum type = checkdebugtype(L, 2);
    GLenum severity = checkdebugseverity(L, 3);
    GLboolean enabled = checkboolean(L, 4);
    arg = 5;
    while(!lua_isnoneornil(L, arg))
        luaL_checkinteger(L, arg++);
    if(arg == 5) /* no ids */
        glDebugMessageControl(source, type, severity, 0, NULL, enabled);
    else
        {
        count = arg - 5;
        ids = (GLuint*)Malloc(L, count*sizeof(GLuint));
        arg = 5;
        for(i=0; i<count; i++)
            ids[i] = lua_tointeger(L, arg++);
        glDebugMessageControl(source, type, severity, count, ids, enabled);
        Free(L,ids);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pushq $0x58
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %r13d
pushq $0x59
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r12d
pushq $0x5a
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, 0x10(%rsp)
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11500
movb %al, 0xf(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
leaq 0x5(%r15), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11850
testl %eax, %eax
jle 0x13295
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11af0
incq %r15
addq $0x4, %rbp
jmp 0x1326e
testl %r15d, %r15d
je 0x13301
movl %r12d, 0x14(%rsp)
movl %r13d, %r12d
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x111f0
movq %rax, %rbp
xorl %r14d, %r14d
movq %r15, %r13
subq $0x1, %r13
jb 0x132d4
leaq 0x5(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x11040
movl %eax, (%rbp,%r14,4)
incq %r14
jmp 0x132b6
movq 0x42305(%rip), %rax     # 0x555e0
movzbl 0xf(%rsp), %r9d
movl %r12d, %edi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl %r15d, %ecx
movq %rbp, %r8
callq *(%rax)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x11360
jmp 0x1331f
movq 0x422d8(%rip), %rax     # 0x555e0
movzbl 0xf(%rsp), %r9d
movl %r13d, %edi
movl %r12d, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/debug.c
// Function: DebugMessageInsert
static int DebugMessageInsert(lua_State *L)
    {
    size_t length;
    GLenum source = checkdebugsource(L, 1);
    GLenum type = checkdebugtype(L, 2);
    GLenum severity = checkdebugseverity(L, 3);
    GLuint id = luaL_checkinteger(L, 4);
    const GLchar *message = luaL_checklstring(L, 5, &length);
    glDebugMessageInsert(source, type, id, severity, (GLsizei)length, message);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x58
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x59
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r14d
pushq $0x5a
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rsp, %r13
movq %rbx, %rdi
movq %r13, %rdx
callq 0x11440
movq 0x429ed(%rip), %r10     # 0x55d88
movl (%r13), %r8d
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movq %rax, %r9
callq *(%r10)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/debug.c
// Function: PushDebugGroup
static int PushDebugGroup(lua_State *L)
    {
    size_t length;
    GLenum source = checkdebugsource(L, 1);
    GLuint id = luaL_checkinteger(L, 2);
    const GLchar *message = luaL_checklstring(L, 3, &length);
    glPushDebugGroup(source, id, (GLsizei)length, message);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x58
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x11440
movq 0x42b3a(%rip), %r8      # 0x55f40
movl (%r15), %edx
movl %ebp, %edi
movl %r14d, %esi
movq %rax, %rcx
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_O2/stetre[P]moongl/src/debug.c
// Function: ObjectLabel
VOID_FUNC(PopDebugGroup)

static int ObjectLabel(lua_State *L)
    {
    size_t length;
    GLenum identifier = checkdebugidentifier(L, 1);
    GLuint name = luaL_checkinteger(L, 2);
    const GLchar *label= luaL_checklstring(L, 3, &length);
    glObjectLabel(identifier, name, (GLsizei)length, label);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x5b
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x11440
movq 0x41f99(%rip), %r8      # 0x55418
movl (%r15), %edx
movl %ebp, %edi
movl %r14d, %esi
movq %rax, %rcx
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_O2/stetre[P]moongl/src/debug.c
// Function: GetObjectLabel
static int GetObjectLabel(lua_State *L)
    {
    GLsizei length, bufsz = MaxLabelLength(L);
    GLenum identifier = checkdebugidentifier(L, 1);
    GLuint name = luaL_checkinteger(L, 2);
    GLchar *label = (GLchar*)Malloc(L, bufsz*sizeof(GLchar));
    glGetObjectLabel(identifier, name, bufsz, &length, label);
    CheckErrorFree(L, label);
    lua_pushlstring(L, label, length);
    Free(L, label);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x82e8, %esi           # imm = 0x82E8
callq 0x11a70
movl %eax, %r14d
pushq $0x5b
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r15d
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
movslq %r14d, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x111f0
movq %rax, %r13
movq 0x42298(%rip), %rax     # 0x557a8
leaq 0x4(%rsp), %rbp
movl %r15d, %edi
movl %r12d, %esi
movl %r14d, %edx
movq %rbp, %rcx
movq %r13, %r8
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11540
movslq (%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11ab0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/debug.c
// Function: Callback
static void Callback(GLenum source, GLenum type, GLuint id, GLenum severity,
            GLsizei length, const GLchar *message, void *userParam)
    {
#define L ((lua_State*)userParam)
    /* Retrieve the callback */
    lua_getfield(L, LUA_REGISTRYINDEX, CALLBACK);
    /* push arguments */
    pushdebugsource(L, source);
    pushdebugtype(L, type);
    lua_pushinteger(L, id);
    pushdebugseverity(L, severity);
    lua_pushlstring(L, message, length);
    /* Execute the callback */
    lua_call(L, 5, 0);
#undef L
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movl %edi, %r14d
movq 0x40(%rsp), %rbx
leaq 0x27e88(%rip), %rdx     # 0x3b41d
movq %rbx, %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x11080
pushq $0x58
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x11110
pushq $0x59
popq %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x11110
movl %r12d, %esi
movq %rbx, %rdi
callq 0x113b0
pushq $0x5a
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x11110
movslq %ebp, %rdx
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x11ab0
pushq $0x5
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11280
nop
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/draw.c
// Function: DrawArrays
static int DrawArrays(lua_State *L)
/* draw_arrays(mode, first, count [, instancecount [, baseinstance]])
 */
    {
    GLsizei instancecount;
    GLuint baseinstance;
    GLenum mode = checkdrawmode(L, 1);
    GLint first = luaL_checkinteger(L, 2);
    GLsizei count = luaL_checkinteger(L, 3);
    if(lua_isnoneornil(L, 4))
        {
        glDrawArrays(mode, first, count);
        CheckError(L);
        return 0;
        }
    instancecount = luaL_checkinteger(L, 4);
    if(lua_isnoneornil(L, 5))
        {
        glDrawArraysInstanced(mode, first, count, instancecount);
        CheckError(L);
        return 0;
        }
    baseinstance = luaL_checkinteger(L, 5);
    glDrawArraysInstancedBaseInstance(mode, first, count, instancecount, baseinstance);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x136c5
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11850
testl %eax, %eax
jle 0x136d4
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x4214e(%rip), %r9      # 0x55800
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %eax, %r8d
callq *(%r9)
jmp 0x136e8
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0x118e0
jmp 0x136e8
movq 0x41e55(%rip), %rax     # 0x55530
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/draw.c
// Function: DrawArraysIndirect
static int DrawArraysIndirect(lua_State *L)
/* draw_arrays_indirect(mode, indirect)
 */
    {
    GLenum mode = checkdrawmode(L, 1);
    GLintptr indirect = luaL_checkinteger(L, 2);
    glDrawArraysIndirect(mode, (const void *)indirect);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
callq 0x11150
movl %eax, %ebp
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x424c8(%rip), %rcx     # 0x55be8
movl %ebp, %edi
movq %rax, %rsi
callq *(%rcx)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq