// File: /workspace/github_c_makefile_star2_O3/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 0x11150
cmpl $0x874d, %eax           # imm = 0x874D
jg 0x2f7fb
cmpl $0x8622, %eax           # imm = 0x8622
jg 0x2f820
cmpl $0x82d5, %eax           # imm = 0x82D5
je 0x2f82b
cmpl $0x82d7, %eax           # imm = 0x82D7
je 0x2f8bb
cmpl $0x8622, %eax           # imm = 0x8622
je 0x2f851
jmp 0x2f92b
cmpl $0x8894, %eax           # imm = 0x8894
jle 0x2f83f
cmpl $0x8895, %eax           # imm = 0x8895
je 0x2f8ef
cmpl $0x88fe, %eax           # imm = 0x88FE
je 0x2f82b
cmpl $0x88fd, %eax           # imm = 0x88FD
je 0x2f851
jmp 0x2f92b
leal -0x8623(%rax), %ecx
cmpl $0x2, %ecx
jae 0x2f86d
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x2fc15
jmp 0x2f919
cmpl $0x874e, %eax           # imm = 0x874E
je 0x2f851
cmpl $0x886a, %eax           # imm = 0x886A
jne 0x2f92b
movl $0x1, %ebp
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
movl $0x1, %ecx
callq 0x2fc15
jmp 0x2f91e
cmpl $0x8625, %eax           # imm = 0x8625
jne 0x2f92b
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x26f5c(%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 0x11870
movl (%r15), %edx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x11110
movl %eax, %ebp
jmp 0x2f91e
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq 0x27561(%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 0x11870
movq (%r15), %rsi
jmp 0x2f911
movq 0x26e0a(%rip), %rax     # 0x56700
movq %rsp, %r15
movl %r14d, %edi
movl $0x8895, %esi           # imm = 0x8895
movq %r15, %rdx
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x113b0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ac8d(%rip), %rdx     # 0x4a5bf
movq %rbx, %rdi
movl $0x3, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11930