// File: /workspace/github_c_makefile_star2_O1/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 0x11160
cmpl $0x8367, %eax           # imm = 0x8367
jg 0x3cb2f
addl $0xffffec00, %eax       # imm = 0xFFFFEC00
cmpl $0xc, %eax
ja 0x3cb44
leaq 0xf118(%rip), %rcx      # 0x4bc24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xdab1(%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 0x3cb15
cmpl $0x8c3b, %eax           # imm = 0x8C3B
je 0x3cb15
cmpl $0x8d9f, %eax           # imm = 0x8D9F
je 0x3cb15
leaq 0x273a(%rip), %rsi      # 0x3f285
leaq 0xf2ca(%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 0x3cb6d
movq 0x19ecb(%rip), %rax     # 0x56a58
jmp 0x3cc4e
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movb %al, (%rsp,%r15)
incq %r15
cmpq $0x4, %r15
jne 0x3cb95
movq 0x19993(%rip), %rax     # 0x56548
jmp 0x3cc4e
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0x3cbbd
movq 0x1977b(%rip), %rax     # 0x56358
jmp 0x3cc4e
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
cmpq $0x4, %r15
jne 0x3cbe2
movq 0x19b8d(%rip), %rax     # 0x56790
jmp 0x3cc4e
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r15,4)
incq %r15
cmpq $0x4, %r15
jne 0x3cc08
movq 0x198b8(%rip), %rax     # 0x564e0
jmp 0x3cc4e
xorl %r15d, %r15d
leal 0x3(%r15), %esi
movq %rbx, %rdi
callq 0x11af0
movw %ax, (%rsp,%r15,2)
incq %r15
cmpq $0x4, %r15
jne 0x3cc2d
movq 0x19c32(%rip), %rax     # 0x56880
movq %rsp, %rsi
movl %r14d, %edi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq