LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0xc(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x4(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11860
cmpl $0x3, %eax
jne 0x1251c
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
jmp 0x125b1
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x12555
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x20(%rsp), %rdx
callq 0x11950
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x125af
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x1258e
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x20(%rsp), %rdx
callq 0x11b20
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x125ad
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x3fc59(%rip), %rdx     # 0x521f8
callq 0x11940
movl %eax, 0x34(%rsp)
jmp 0x1262f
jmp 0x125af
jmp 0x125b1
movq 0x28(%rsp), %rdi
movl $0x38, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x125f0
movq 0x557a9(%rip), %rax     # 0x67d80
movq (%rax), %rax
movl 0xc(%rsp), %edi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq *%rax
jmp 0x1260e
movq 0x558e9(%rip), %rax     # 0x67ee0
movq (%rax), %rax
movl 0x4(%rsp), %edi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq *%rax
movq 0x28(%rsp), %rdi
callq 0x11880
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x113c0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0xc(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
movl $0x3, %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x126b6
movq 0x28(%rsp), %rdi
movl $0x3, %esi
leaq 0x20(%rsp), %rdx
callq 0x11950
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1270d
movq 0x28(%rsp), %rdi
movl $0x3, %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x126ef
movq 0x28(%rsp), %rdi
movl $0x3, %esi
leaq 0x20(%rsp), %rdx
callq 0x11b20
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1270b
movq 0x28(%rsp), %rdi
movl $0x3, %esi
leaq 0x3faf8(%rip), %rdx     # 0x521f8
callq 0x11940
movl %eax, 0x34(%rsp)
jmp 0x12773
jmp 0x1270d
cmpl $0x0, 0x8(%rsp)
jne 0x12734
movq 0x5517d(%rip), %rax     # 0x67898
movq (%rax), %rax
movl 0xc(%rsp), %edi
movq (%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq *%rax
jmp 0x12752
movq 0x54f6d(%rip), %rax     # 0x676a8
movq (%rax), %rax
movl 0x8(%rsp), %edi
movq (%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq *%rax
movq 0x28(%rsp), %rdi
callq 0x11880
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x113c0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl $0x1, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
leaq 0x10(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x11, %esi
callq 0x11160
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x12, %esi
callq 0x11160
movl %eax, 0x4(%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x7, %esi
callq 0x11160
movl %eax, (%rsp)
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
jg 0x12833
movq $0x0, 0x18(%rsp)
jmp 0x128ac
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x12860
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
leaq 0x20(%rsp), %rdx
callq 0x11950
movq %rax, 0x18(%rsp)
jmp 0x128aa
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x1288d
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
leaq 0x20(%rsp), %rdx
callq 0x11b20
movq %rax, 0x18(%rsp)
jmp 0x128a8
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %esi
leaq 0x3f95b(%rip), %rdx     # 0x521f8
callq 0x11940
movl %eax, 0x34(%rsp)
jmp 0x128fd
jmp 0x128aa
jmp 0x128ac
cmpl $0x0, 0xc(%rsp)
jne 0x128d5
movq 0x54cd6(%rip), %rax     # 0x67590
movq (%rax), %rax
movl 0x10(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %edx
movl (%rsp), %ecx
movq 0x18(%rsp), %r8
callq *%rax
jmp 0x128f5
movq 0x54f4c(%rip), %rax     # 0x67828
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %edx
movl (%rsp), %ecx
movq 0x18(%rsp), %r8
callq *%rax
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x14(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
shlq $0x0, %rsi
callq 0x11200
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x12b83
movq 0x553f6(%rip), %rax     # 0x67f60
movq (%rax), %rax
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
movq 0x18(%rsp), %rcx
callq *%rax
jmp 0x12ba1
movq 0x54f36(%rip), %rax     # 0x67ac0
movq (%rax), %rax
movl 0x10(%rsp), %edi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
movq 0x18(%rsp), %rcx
callq *%rax
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11550
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rsp), %rdx
callq 0x11ab0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11370
movl $0x1, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x24(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x20(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
movl $0x5, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movq %rax, (%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x12c9c
cmpl $0x0, 0x18(%rsp)
je 0x12c9c
movq 0x54e39(%rip), %rax     # 0x67ab8
movq (%rax), %rax
movl 0x24(%rsp), %edi
movl 0x20(%rsp), %esi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq (%rsp), %r8
callq *%rax
jmp 0x12ce9
cmpl $0x0, 0x18(%rsp)
je 0x12cce
cmpl $0x0, 0x18(%rsp)
je 0x12cce
movq 0x54dcf(%rip), %rax     # 0x67a80
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq (%rsp), %r8
callq *%rax
jmp 0x12ce7
movq 0x28(%rsp), %rdi
leaq 0x3f579(%rip), %rsi     # 0x52253
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x34(%rsp)
jmp 0x12cfb
jmp 0x12ce9
movq 0x28(%rsp), %rdi
callq 0x11880
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0xc(%rsp)
movq 0x550a5(%rip), %rax     # 0x67dd8
movq (%rax), %rax
movl 0xc(%rsp), %edi
callq *%rax
movq 0x10(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movq 0x54575(%rip), %rax     # 0x67310
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0xc(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl $0x3a, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x13050
movq 0x54704(%rip), %rax     # 0x67740
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x4(%rsp), %esi
callq *%rax
movq %rax, 0x10(%rsp)
jmp 0x13069
movq 0x54ae1(%rip), %rax     # 0x67b38
movq (%rax), %rax
movl 0x8(%rsp), %edi
movl 0x4(%rsp), %esi
callq *%rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x11880
cmpq $0x0, 0x10(%rsp)
jne 0x13094
movq 0x18(%rsp), %rdi
leaq 0x3f259(%rip), %rsi     # 0x522e0
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x24(%rsp)
jmp 0x130ab
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x114b0
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x1c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
xorl %edx, %edx
leaq 0x55538(%rip), %rcx     # 0x68658
callq 0x11b50
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x13155
movq 0x546c9(%rip), %rax     # 0x67800
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq *%rax
movq %rax, 0x20(%rsp)
jmp 0x13178
movq 0x542a4(%rip), %rax     # 0x67400
movq (%rax), %rax
movl 0x18(%rsp), %edi
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq *%rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11880
cmpq $0x0, 0x20(%rsp)
jne 0x131a3
movq 0x28(%rsp), %rdi
leaq 0x3f14a(%rip), %rsi     # 0x522e0
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x34(%rsp)
jmp 0x131ba
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x114b0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x1c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x13240
movq 0x54b9d(%rip), %rax     # 0x67dc8
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
callq *%rax
jmp 0x1325a
movq 0x54d89(%rip), %rax     # 0x67fd0
movq (%rax), %rax
movl 0x18(%rsp), %edi
movq 0x10(%rsp), %rsi
movslq 0xc(%rsp), %rdx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
leaq 0x8(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jne 0x132b3
movq 0x54d34(%rip), %rax     # 0x67fd8
movq (%rax), %rax
movl 0x8(%rsp), %edi
callq *%rax
movb %al, 0xf(%rsp)
jmp 0x132c7
movq 0x53fa6(%rip), %rax     # 0x67260
movq (%rax), %rax
movl 0x4(%rsp), %edi
callq *%rax
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rdi
callq 0x11880
movq 0x10(%rsp), %rdi
movzbl 0xf(%rsp), %esi
callq 0x117f0
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x1c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
callq 0x13ab0
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x110b0
cmpl $0x0, %eax
je 0x13370
movq 0x38(%rsp), %rdi
movl $0x3, %esi
leaq 0x30(%rsp), %rdx
callq 0x11450
movq %rax, 0x20(%rsp)
jmp 0x133c0
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x11860
cmpl $0x5, %eax
jne 0x1339f
movq 0x38(%rsp), %rdi
movl $0x3, %esi
leaq 0x30(%rsp), %rdx
callq 0x11b20
movq %rax, 0x20(%rsp)
jmp 0x133be
movq 0x38(%rsp), %rdi
movl $0x3, %esi
leaq 0x3ef43(%rip), %rdx     # 0x522f3
callq 0x11940
movl %eax, 0x44(%rsp)
jmp 0x1346c
jmp 0x133c0
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x13a50
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x13400
movq 0x38(%rsp), %rdi
leaq 0x3ef0d(%rip), %rsi     # 0x52300
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x44(%rsp)
jmp 0x1346c
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x139e0
cltq
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
subq 0x8(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x1344b
movq 0x38(%rsp), %rdi
leaq 0x3eed2(%rip), %rsi     # 0x52310
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x44(%rsp)
jmp 0x1346c
movq 0x10(%rsp), %rdi
addq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x11b10
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
leaq 0x2c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
callq 0x13ab0
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x13a50
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x13525
movq 0x38(%rsp), %rdi
leaq 0x3ee2b(%rip), %rsi     # 0x52343
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x44(%rsp)
jmp 0x13591
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x139e0
cltq
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x13570
movq 0x38(%rsp), %rdi
leaq 0x3edad(%rip), %rsi     # 0x52310
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x44(%rsp)
jmp 0x13591
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x11ab0
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x3c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
callq 0x13ab0
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movl $0x4, %esi
callq 0x11780
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movl $0x5, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11b30
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x13a50
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x13671
movq 0x48(%rsp), %rdi
leaq 0x3ec9c(%rip), %rsi     # 0x52300
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x54(%rsp)
jmp 0x136e2
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x139e0
cltq
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
subq 0x28(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x136bc
movq 0x48(%rsp), %rdi
leaq 0x3ec61(%rip), %rsi     # 0x52310
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x54(%rsp)
jmp 0x136e2
movq 0x30(%rsp), %rdi
addq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x11b10
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
leaq 0x3c(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
callq 0x13ab0
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movl $0x4, %esi
callq 0x11780
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movl $0x5, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11b30
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
movl $0x911f, %ecx           # imm = 0x911F
callq 0x13a50
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x137c1
movq 0x48(%rsp), %rdi
leaq 0x3eb8f(%rip), %rsi     # 0x52343
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x54(%rsp)
jmp 0x13832
movq 0x48(%rsp), %rdi
movl 0x3c(%rsp), %esi
movl 0x38(%rsp), %edx
movl $0x9120, %ecx           # imm = 0x9120
callq 0x139e0
cltq
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
subq 0x28(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x1380c
movq 0x48(%rsp), %rdi
leaq 0x3eb11(%rip), %rsi     # 0x52310
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x54(%rsp)
jmp 0x13832
movq 0x18(%rsp), %rdi
addq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x11b10
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/buffer.c
// Function: GetEnum
static int GetEnum(lua_State *L, GLenum target, GLuint buffer, GLenum pname, uint32_t domain)
    {
    GLint param;
    if(buffer==0)
        glGetBufferParameteriv(target, pname, &param);
    else
        glGetNamedBufferParameteriv(buffer, pname, &param);
    CheckError(L);
    return enums_push(L, domain, param);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x138cc
movq 0x54658(%rip), %rax     # 0x67f10
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movl 0x14(%rsp), %esi
leaq 0xc(%rsp), %rdx
callq *%rax
jmp 0x138e5
movq 0x54145(%rip), %rax     # 0x67a18
movq (%rax), %rax
movl 0x18(%rsp), %edi
movl 0x14(%rsp), %esi
leaq 0xc(%rsp), %rdx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
movq 0x20(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x11120
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x13995
movq 0x5458d(%rip), %rax     # 0x67f10
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x4(%rsp), %esi
movq %rsp, %rdx
callq *%rax
jmp 0x139ac
movq 0x5407c(%rip), %rax     # 0x67a18
movq (%rax), %rax
movl 0x8(%rsp), %edi
movl 0x4(%rsp), %esi
movq %rsp, %rdx
callq *%rax
movq 0x10(%rsp), %rdi
callq 0x11880
movq 0x10(%rsp), %rdi
cmpl $0x1, (%rsp)
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x117f0
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/buffer.c
// Function: GetInt64_
static int GetInt64_(lua_State *L, GLenum target, GLuint buffer, GLenum pname)
    {
    GLint64 param;
    if(buffer==0)
        glGetBufferParameteri64v(target, pname, &param);
    else
        glGetNamedBufferParameteri64v(buffer, pname, &param);
    CheckError(L);
    return param;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x13a17
movq 0x54295(%rip), %rax     # 0x67c98
movq (%rax), %rax
movl 0x1c(%rsp), %edi
movl 0x14(%rsp), %esi
leaq 0x8(%rsp), %rdx
callq *%rax
jmp 0x13a30
movq 0x53efa(%rip), %rax     # 0x67918
movq (%rax), %rax
movl 0x18(%rsp), %edi
movl 0x14(%rsp), %esi
leaq 0x8(%rsp), %rdx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/buffer.c
// Function: GetBitfield_
static GLbitfield GetBitfield_(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);
    return (GLbitfield)param;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x13a85
movq 0x5449d(%rip), %rax     # 0x67f10
movq (%rax), %rax
movl 0xc(%rsp), %edi
movl 0x4(%rsp), %esi
movq %rsp, %rdx
callq *%rax
jmp 0x13a9c
movq 0x53f8c(%rip), %rax     # 0x67a18
movq (%rax), %rax
movl 0x8(%rsp), %edi
movl 0x4(%rsp), %esi
movq %rsp, %rdx
callq *%rax
movq 0x10(%rsp), %rdi
callq 0x11880
movl (%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x13aed
movq 0x53b50(%rip), %rax     # 0x67628
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl $0x88bd, %esi           # imm = 0x88BD
leaq 0x8(%rsp), %rdx
callq *%rax
jmp 0x13b07
movq 0x53eac(%rip), %rax     # 0x679a0
movq (%rax), %rax
movl 0x10(%rsp), %edi
movl $0x88bd, %esi           # imm = 0x88BD
leaq 0x8(%rsp), %rdx
callq *%rax
movq 0x18(%rsp), %rdi
callq 0x112d0
cmpq $0x0, 0x8(%rsp)
jne 0x13b37
movq 0x18(%rsp), %rdi
leaq 0x3e7ff(%rip), %rsi     # 0x52324
movb $0x0, %al
callq 0x11ae0
movq $0x0, 0x20(%rsp)
jmp 0x13b41
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x44, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x115c0
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x13be7
movq 0x53be6(%rip), %rax     # 0x67798
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movl 0xc(%rsp), %edi
movq %rax, %rcx
movq 0x10(%rsp), %rax
movl %ecx, %esi
callq *%rax
jmp 0x13bf0
movl 0x1c(%rsp), %edi
callq 0x11060
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x44, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x115c0
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x13c87
movq 0x5367e(%rip), %rax     # 0x672d0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movl 0xc(%rsp), %edi
movq %rax, %rcx
movq 0x10(%rsp), %rax
movl %ecx, %esi
callq *%rax
jmp 0x13c90
movl 0x1c(%rsp), %edi
callq 0x111b0
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x44, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x115c0
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0x13d2b
movq 0x53a7e(%rip), %rax     # 0x67770
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movl 0x4(%rsp), %edi
movq %rax, %rcx
movq 0x8(%rsp), %rax
movl %ecx, %esi
callq *%rax
movb %al, 0x1f(%rsp)
jmp 0x13d38
movl 0x18(%rsp), %edi
callq 0x11150
movb %al, 0x1f(%rsp)
movq 0x20(%rsp), %rdi
callq 0x11880
movq 0x20(%rsp), %rdi
movzbl 0x1f(%rsp), %esi
callq 0x117f0
movl $0x1, %eax
addq $0x28, %rsp
retq
nop
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11860
cmpl $0x6, %eax
je 0x13db9
movq 0x8(%rsp), %rdi
movl $0x1, %esi
leaq 0x3e65d(%rip), %rdx     # 0x5240b
callq 0x11940
movl %eax, 0x14(%rsp)
jmp 0x13e08
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11730
movq 0x8(%rsp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x3e644(%rip), %rdx     # 0x5241d
callq 0x118a0
movq 0x53b4b(%rip), %rax     # 0x67930
movq (%rax), %rax
movq 0x8(%rsp), %rsi
leaq 0x4ec(%rip), %rdi       # 0x142e0
callq *%rax
movq 0x8(%rsp), %rdi
callq 0x11880
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movl $0x58, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rdi
movl $0x59, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movl $0x5a, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movl $0x4, %esi
callq 0x11510
movb %al, 0xb(%rsp)
movl $0x5, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x11860
cmpl $0x0, %eax
setle %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x13ea8
jmp 0x13ec1
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
callq 0x11af0
jmp 0x13e8c
cmpl $0x5, 0x2c(%rsp)
jne 0x13ef0
movq 0x53599(%rip), %rax     # 0x67468
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movzbl 0xb(%rsp), %r9d
callq *%rax
jmp 0x13f9a
movl 0x2c(%rsp), %eax
subl $0x5, %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movslq 0x24(%rsp), %rsi
shlq $0x2, %rsi
callq 0x11200
movq %rax, 0x18(%rsp)
movl $0x5, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x13f64
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x11040
movl %eax, %edx
movq 0x18(%rsp), %rax
movslq 0x28(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x13f23
movq 0x534fd(%rip), %rax     # 0x67468
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x24(%rsp), %ecx
movq 0x18(%rsp), %r8
movzbl 0xb(%rsp), %r9d
callq *%rax
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x11370
movq 0x30(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x58, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movl $0x59, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x5a, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movl $0x4, %esi
callq 0x11af0
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0x5, %esi
leaq 0x18(%rsp), %rdx
callq 0x11450
movq %rax, (%rsp)
movq 0x53cdd(%rip), %rax     # 0x67d10
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
movq 0x18(%rsp), %r8
movq (%rsp), %r9
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x58, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
leaq 0x18(%rsp), %rdx
callq 0x11450
movq %rax, 0x8(%rsp)
movq 0x53e64(%rip), %rax     # 0x67f28
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movq 0x18(%rsp), %rcx
movl %ecx, %edx
movq 0x8(%rsp), %rcx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x5b, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x3, %esi
leaq 0x18(%rsp), %rdx
callq 0x11450
movq %rax, 0x8(%rsp)
movq 0x53114(%rip), %rax     # 0x67278
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movq 0x18(%rsp), %rcx
movl %ecx, %edx
movq 0x8(%rsp), %rcx
callq *%rax
movq 0x20(%rsp), %rdi
callq 0x11880
xorl %eax, %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movl $0x82e8, %esi           # imm = 0x82E8
callq 0x11a70
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x5b, %esi
movl $0x1, %edx
callq 0x11160
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movslq 0x18(%rsp), %rsi
shlq $0x0, %rsi
callq 0x11200
movq %rax, 0x8(%rsp)
movq 0x5341a(%rip), %rax     # 0x67670
movq (%rax), %rax
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
movl 0x18(%rsp), %edx
movq 0x8(%rsp), %r8
leaq 0x1c(%rsp), %rcx
callq *%rax
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11550
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movslq 0x1c(%rsp), %rdx
callq 0x11ab0
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11370
movl $0x1, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq 0x30(%rsp), %rax
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movq %r9, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
leaq 0x3e109(%rip), %rdx     # 0x5241d
callq 0x11080
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %edx
movl $0x58, %esi
callq 0x11120
movq 0x30(%rsp), %rdi
movl 0x20(%rsp), %edx
movl $0x59, %esi
callq 0x11120
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x113c0
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %edx
movl $0x5a, %esi
callq 0x11120
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movslq 0x14(%rsp), %rdx
callq 0x11ab0
movq 0x30(%rsp), %rdi
movl $0x5, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x11290
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop