// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/getvertex.c
// Function: GetVertexArray
static int GetVertexArray(lua_State *L)
/* get_vertex_array(array, pname [, index]) */
    {
    GLuint array = luaL_checkinteger(L, 1);
    GLenum pname = checkvertexpname(L, 2);

    switch(pname)
        {
        case GL_VERTEX_ATTRIB_ARRAY_ENABLED:
        case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED:
        case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
        case GL_VERTEX_ATTRIB_ARRAY_LONG:
                return ArrayGetBoolean(L, array, pname);
        case GL_VERTEX_ATTRIB_ARRAY_SIZE:
        case GL_VERTEX_ATTRIB_ARRAY_STRIDE:
        case GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
        case GL_VERTEX_ATTRIB_RELATIVE_OFFSET:
                return ArrayGetInt(L, array, pname);
        case GL_VERTEX_ATTRIB_ARRAY_TYPE:
                return ArrayGetEnum(L, array, pname);
        case GL_VERTEX_BINDING_OFFSET:
                return ArrayGetInt64(L, array, pname);
        case GL_ELEMENT_ARRAY_BUFFER_BINDING:
                return ArrayGetNonIndexed(L, array, pname);
        default:
            return luaL_argerror(L, 3, "invalid pname");
        }

    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x6, %esi
movl $0x2, %edx
callq 0x11160
cmpl $0x874d, %eax           # imm = 0x874D
jg 0x2f757
cmpl $0x8622, %eax           # imm = 0x8622
jg 0x2f77c
cmpl $0x82d5, %eax           # imm = 0x82D5
je 0x2f787
cmpl $0x82d7, %eax           # imm = 0x82D7
je 0x2f817
cmpl $0x8622, %eax           # imm = 0x8622
je 0x2f7ad
jmp 0x2f887
cmpl $0x8894, %eax           # imm = 0x8894
jle 0x2f79b
cmpl $0x8895, %eax           # imm = 0x8895
je 0x2f84b
cmpl $0x88fe, %eax           # imm = 0x88FE
je 0x2f787
cmpl $0x88fd, %eax           # imm = 0x88FD
je 0x2f7ad
jmp 0x2f887
leal -0x8623(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2f7c9
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x2fb71
jmp 0x2f875
cmpl $0x874e, %eax           # imm = 0x874E
je 0x2f7ad
cmpl $0x886a, %eax           # imm = 0x886A
jne 0x2f887
movl $0x1, %ebp
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
movl $0x1, %ecx
callq 0x2fb71
jmp 0x2f87a
cmpl $0x8625, %eax           # imm = 0x8625
jne 0x2f887
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x27000(%rip), %r8      # 0x567e8
movq %rsp, %r15
movl %r14d, %edi
movl %eax, %esi
movl $0x8625, %edx           # imm = 0x8625
movq %r15, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
movl (%r15), %edx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11120
movl %eax, %ebp
jmp 0x2f87a
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x27605(%rip), %r8      # 0x56e30
movq %rsp, %r15
movl %r14d, %edi
movl %eax, %esi
movl $0x82d7, %edx           # imm = 0x82D7
movq %r15, %rcx
callq *(%r8)
movq %rbx, %rdi
callq 0x11880
movq (%r15), %rsi
jmp 0x2f86d
movq 0x26eae(%rip), %rax     # 0x56700
movq %rsp, %r15
movl %r14d, %edi
movl $0x8895, %esi           # imm = 0x8895
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113c0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ad31(%rip), %rdx     # 0x4a5bf
movq %rbx, %rdi
movl $0x3, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11940