// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/vertex_array.c
// Function: VertexAttribN
static int VertexAttribN(lua_State *L)
/* gl.vertex_attrib_n(index, type, val1, val2, val3, val4) */
    {
    GLuint index = luaL_checkinteger(L, 1);
    GLenum type = checktype(L, 2);
    switch(type)
        {
#define arg_first 3
        case GL_BYTE: return VertexAttribN_GLbyte(L, index, arg_first);
        case GL_UNSIGNED_BYTE: return VertexAttribN_GLubyte(L, index, arg_first);
        case GL_SHORT: return VertexAttribN_GLshort(L, index, arg_first);
        case GL_UNSIGNED_SHORT: return VertexAttribN_GLushort(L, index, arg_first);
        case GL_INT: return VertexAttribN_GLint(L, index, arg_first);
        case GL_UNSIGNED_INT: return VertexAttribN_GLuint(L, index, arg_first);
        case GL_FLOAT:
        case GL_DOUBLE:
        case GL_HALF_FLOAT:
        case GL_FIXED:
        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:
            return luaL_error(L, "type not supported by this operation");
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
#undef arg_first
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x7
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x11150
leal -0x1400(%rax), %ecx
cmpl $0xc, %ecx
ja 0x397c2
leaq 0xe4ad(%rip), %rax      # 0x47c4c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0xce1a(%rip), %rsi      # 0x465c9
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
cmpl $0x8368, %eax           # imm = 0x8368
je 0x397a8
cmpl $0x8c3b, %eax           # imm = 0x8C3B
je 0x397a8
cmpl $0x8d9f, %eax           # imm = 0x8D9F
je 0x397a8
leaq 0x1aa7(%rip), %rsi      # 0x3b285
leaq 0xe65f(%rip), %rdx      # 0x47e44
movq %rbx, %rdi
movl $0xba, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x3981b
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
jmp 0x39800
movq 0x1bb36(%rip), %rax     # 0x55358
jmp 0x398ed
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x39845
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movb %al, (%rsp,%r15)
incq %r15
jmp 0x3982a
movq 0x1c20c(%rip), %rax     # 0x55a58
jmp 0x398ed
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x39870
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
jmp 0x39854
movq 0x1c009(%rip), %rax     # 0x55880
jmp 0x398ed
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x39897
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
jmp 0x3987c
movq 0x1bc42(%rip), %rax     # 0x554e0
jmp 0x398ed
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x398bf
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
jmp 0x398a3
movq 0x1beca(%rip), %rax     # 0x55790
jmp 0x398ed
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x398e6
leaq 0x3(%r15), %rsi
movq %rbx, %rdi
callq 0x11af0
movb %al, (%rsp,%r15)
incq %r15
jmp 0x398cb
movq 0x1bc5b(%rip), %rax     # 0x55548
movq %rsp, %rsi
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq