// File: /workspace/github_c_makefile_star2_O0/stetre[P]moongl/src/vertex_array.c
// Function: VertexAttribPointer
static int VertexAttribPointer(lua_State *L)
/* vertex_attrib_pointer(index, size, type, normalized, stride, pointer) */
    {
    GLuint index = luaL_checkinteger(L, 1);
    GLint size = luaL_checkinteger(L, 2); /* no. of components */
    GLenum type = checktype(L, 3);
    GLboolean normalized = checkboolean(L, 4);
    GLsizei stride = luaL_checkinteger(L, 5);
    intptr_t pointer = luaL_checkinteger(L, 6);

    if(size == 0)
        size = GL_BGRA;

    switch(type)
        {
        case GL_BYTE:
        case GL_UNSIGNED_BYTE:
        case GL_SHORT:
        case GL_UNSIGNED_SHORT:
        case GL_INT:
        case GL_UNSIGNED_INT:
        case GL_FLOAT:
        case GL_HALF_FLOAT:
        case GL_INT_2_10_10_10_REV:
        case GL_UNSIGNED_INT_2_10_10_10_REV:
        case GL_UNSIGNED_INT_10F_11F_11F_REV:
        case GL_FIXED:
                glVertexAttribPointer(index, size, type, normalized, stride, (void*)pointer);
                break;
        case GL_DOUBLE:
                glVertexAttribLPointer(index, size, GL_DOUBLE, stride, (void*)pointer);
                break;
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    CheckError(L);
    return 0;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x11af0
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x11af0
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x11510
movb %al, 0x1b(%rsp)
movq 0x28(%rsp), %rdi
movl $0x5, %esi
callq 0x11af0
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rdi
movl $0x6, %esi
callq 0x11af0
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x20(%rsp)
jne 0x4f800
movl $0x80e1, 0x20(%rsp)     # imm = 0x80E1
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
addl $0xffffec00, %eax       # imm = 0xFFFFEC00
subl $0x7, %eax
jb 0x4f858
jmp 0x4f814
movl 0x4(%rsp), %eax
subl $0x140a, %eax           # imm = 0x140A
je 0x4f883
jmp 0x4f821
movl 0x4(%rsp), %eax
addl $0xffffebf5, %eax       # imm = 0xFFFFEBF5
subl $0x2, %eax
jb 0x4f858
jmp 0x4f831
movl 0x4(%rsp), %eax
subl $0x8368, %eax           # imm = 0x8368
je 0x4f858
jmp 0x4f83e
movl 0x4(%rsp), %eax
subl $0x8c3b, %eax           # imm = 0x8C3B
je 0x4f858
jmp 0x4f84b
movl 0x4(%rsp), %eax
subl $0x8d9f, %eax           # imm = 0x8D9F
jne 0x4f8a7
jmp 0x4f858
movq 0x17ac1(%rip), %rax     # 0x67320
movq (%rax), %rax
movl 0x24(%rsp), %edi
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %edx
movb 0x1b(%rsp), %cl
movl 0x14(%rsp), %r8d
movq 0x8(%rsp), %r9
movzbl %cl, %ecx
callq *%rax
jmp 0x4f8cc
movq 0x1813e(%rip), %rax     # 0x679c8
movq (%rax), %rax
movl 0x24(%rsp), %edi
movl 0x20(%rsp), %esi
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %r8
movl $0x140a, %edx           # imm = 0x140A
callq *%rax
jmp 0x4f8cc
movq 0x28(%rsp), %rdi
leaq 0x29d2(%rip), %rsi      # 0x52285
leaq 0xed26(%rip), %rdx      # 0x5e5e0
movl $0x110, %ecx            # imm = 0x110
movb $0x0, %al
callq 0x11ae0
movl %eax, 0x34(%rsp)
jmp 0x4f8de
movq 0x28(%rsp), %rdi
callq 0x11880
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)