// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x7, %esi
movl $0x2, %edx
callq 0x11150
cmpl $0x8367, %eax           # imm = 0x8367
jg 0x3cc47
addl $0xffffec00, %eax       # imm = 0xFFFFEC00
cmpl $0xc, %eax
ja 0x3cc5c
leaq 0xf000(%rip), %rcx      # 0x4bc24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xd999(%rip), %rsi      # 0x4a5cd
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
cmpl $0x8368, %eax           # imm = 0x8368
je 0x3cc2d
cmpl $0x8c3b, %eax           # imm = 0x8C3B
je 0x3cc2d
cmpl $0x8d9f, %eax           # imm = 0x8D9F
je 0x3cc2d
leaq 0x2622(%rip), %rsi      # 0x3f285
leaq 0xf1b2(%rip), %rdx      # 0x4be1c
movq %rbx, %rdi
movl $0xba, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x11ae0
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movb %al, (%rsp,%r15)
incq %r15
cmpq $0x4, %r15
jne 0x3cc85
movq 0x19db3(%rip), %rax     # 0x56a58
jmp 0x3cd66
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movb %al, (%rsp,%r15)
incq %r15
cmpq $0x4, %r15
jne 0x3ccad
movq 0x1987b(%rip), %rax     # 0x56548
jmp 0x3cd66
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0x3ccd5
movq 0x19663(%rip), %rax     # 0x56358
jmp 0x3cd66
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
cmpq $0x4, %r15
jne 0x3ccfa
movq 0x19a75(%rip), %rax     # 0x56790
jmp 0x3cd66
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0x3cd20
movq 0x197a0(%rip), %rax     # 0x564e0
jmp 0x3cd66
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
cmpq $0x4, %r15
jne 0x3cd45
movq 0x19b1a(%rip), %rax     # 0x56880
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