// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/buffer.c
// Function: GetBufferParameter
static int GetBufferParameter(lua_State *L)
/* get_buffer_parameter(target|buffer, pname) */
    {
    GLenum target;
    GLuint buffer = checktargetorname(L, 1, &target, DOMAIN_BUFFER_TARGET);
    GLenum pname = checkbufferpname(L, 2);
    switch(pname)
        {
        case GL_BUFFER_SIZE: return GetInt64(L, target, buffer, pname);
        case GL_BUFFER_USAGE: return GetEnum(L, target, buffer, pname, DOMAIN_BUFFER_USAGE);
        case GL_BUFFER_ACCESS: return GetEnum(L, target, buffer, pname, DOMAIN_BUFFER_ACCESS);
        case GL_BUFFER_ACCESS_FLAGS:
                    return GetBitfield(L, target, buffer, pname, &AccessFlagsBitfield);
        case GL_BUFFER_IMMUTABLE_STORAGE: return GetBoolean(L, target, buffer, pname);
        case GL_BUFFER_MAPPED: return GetBoolean(L, target, buffer, pname);
/*      case GL_BUFFER_MAP_POINTER: NOT_AVAILABLE; used internally (see mapbuffer.c) */
        case GL_BUFFER_MAP_OFFSET: return GetInt64(L, target, buffer, pname);
        case GL_BUFFER_MAP_LENGTH: return GetInt64(L, target, buffer, pname);
        case GL_BUFFER_STORAGE_FLAGS: 
                    return GetBitfield(L, target, buffer, pname, &StorageFlagsBitfield);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
leaq 0x14(%rsp), %rdx
movl $0x36, %ecx
callq 0x11430
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movl $0x39, %esi
movl $0x2, %edx
callq 0x11160
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $0x821f, %eax           # imm = 0x821F
je 0x12f25
jmp 0x12e13
movl 0x8(%rsp), %eax
subl $0x8220, %eax           # imm = 0x8220
je 0x12f98
jmp 0x12e24
movl 0x8(%rsp), %eax
subl $0x8764, %eax           # imm = 0x8764
je 0x12e96
jmp 0x12e31
movl 0x8(%rsp), %eax
subl $0x8765, %eax           # imm = 0x8765
je 0x12eb5
jmp 0x12e3e
movl 0x8(%rsp), %eax
subl $0x88bb, %eax           # imm = 0x88BB
je 0x12eda
jmp 0x12e4f
movl 0x8(%rsp), %eax
subl $0x88bc, %eax           # imm = 0x88BC
je 0x12f44
jmp 0x12e60
movl 0x8(%rsp), %eax
subl $0x911f, %eax           # imm = 0x911F
je 0x12eff
jmp 0x12e71
movl 0x8(%rsp), %eax
subl $0x9120, %eax           # imm = 0x9120
je 0x12f7c
jmp 0x12e82
movl 0x8(%rsp), %eax
subl $0x9121, %eax           # imm = 0x9121
je 0x12f60
jmp 0x12fbb
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x13840
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x38, %r8d
callq 0x13890
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl $0x3a, %r8d
callq 0x13890
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0x55741(%rip), %r8      # 0x68658
callq 0x13910
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x13960
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x13960
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x13840
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
callq 0x13840
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0x55630(%rip), %r8      # 0x685e0
callq 0x13910
movl %eax, 0x24(%rsp)
jmp 0x12fde
movq 0x18(%rsp), %rdi
leaq 0x3f2be(%rip), %rsi     # 0x52285
leaq 0x4b6aa(%rip), %rdx     # 0x5e678
movl $0x1c3, %ecx            # imm = 0x1C3
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)