// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x11af0
movq %rax, %r14
pushq $0x6
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
leal -0x8623(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2d1f0
cmpl $0x82d5, %eax           # imm = 0x82D5
je 0x2d1f0
cmpl $0x82d7, %eax           # imm = 0x82D7
je 0x2d20c
cmpl $0x8622, %eax           # imm = 0x8622
je 0x2d1e1
cmpl $0x8625, %eax           # imm = 0x8625
je 0x2d26a
cmpl $0x874e, %eax           # imm = 0x874E
je 0x2d1e1
cmpl $0x886a, %eax           # imm = 0x886A
je 0x2d1e1
cmpl $0x8895, %eax           # imm = 0x8895
je 0x2d23e
cmpl $0x88fe, %eax           # imm = 0x88FE
je 0x2d1f0
cmpl $0x88fd, %eax           # imm = 0x88FD
jne 0x2d2ac
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
movl %ebp, %ecx
jmp 0x2d1fa
movq %rbx, %rdi
movl %r14d, %esi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x2d539
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x28c12(%rip), %r8      # 0x55e30
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 0x2d260
movq 0x284bb(%rip), %rax     # 0x55700
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
jmp 0x2d1ff
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq 0x2856c(%rip), %r8      # 0x557e8
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
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x11110
movl %eax, %ebp
jmp 0x2d1ff
leaq 0x19308(%rip), %rdx     # 0x465bb
pushq $0x3
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11930