// File: /workspace/github_c_makefile_star2_O3/stetre[P]moongl/src/uniform.c
// Function: ProgramUniformv
static int ProgramUniformv(lua_State *L)
/* program_uniformv(program, location, count, type, val1 [, val2 ... val4]) */
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    GLsizei count = luaL_checkinteger(L, 3);
    GLenum type = checkuniformtype(L, 4);
    if(count<=0)
        return luaL_error(L, "count should be positive");
#define arg_first 5
    switch(type)
        {
        case NONGL_BOOLEAN: return ProgramUniformv_b(L, program, location, count, arg_first);
        case GL_INT: return ProgramUniformv_i(L, program, location, count, arg_first);
        case GL_UNSIGNED_INT: return ProgramUniformv_ui(L, program, location, count, arg_first);
        case GL_FLOAT: return ProgramUniformv_f(L, program, location, count, arg_first);
        case GL_DOUBLE: return ProgramUniformv_d(L, program, location, count, arg_first);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }
    return 0;
#undef arg_first
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x34, %esi
movl $0x4, %edx
callq 0x11150
testl %r12d, %r12d
jle 0x3b54a
leal -0x1404(%rax), %ecx
cmpl $0x6, %ecx
ja 0x3b556
leaq 0x1059d(%rip), %rax     # 0x4ba60
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x3baf0
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x3b805
movl %eax, 0x4(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %ebp, %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3b5d2
movl %ebp, %r15d
xorl %ebp, %ebp
leaq 0x5(%rbp), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x115b0
testl %eax, %eax
je 0x3b83e
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r13,%rbp,4)
incq %rbp
cmpq %rbp, %r15
jne 0x3b514
jmp 0x3b5d2
leaq 0x1057b(%rip), %rsi     # 0x4bacc
jmp 0x3b80c
testl %eax, %eax
jne 0x3b5ef
movq %rbx, %rdi
movl $0x5, %esi
callq 0x3baf0
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x3b805
movl %eax, 0x4(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %ebp, %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3b5d2
movl %ebp, %r15d
xorl %ebp, %ebp
leaq 0x5(%rbp), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11850
movq %rbx, %rdi
cmpl $0x1, %eax
jne 0x3b858
movl %r14d, %esi
callq 0x11700
movl %eax, (%r13,%rbp,4)
incq %rbp
cmpq %rbp, %r15
jne 0x3b5a2
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x3b7fa
movl %eax, %eax
leaq 0x1a746(%rip), %rcx     # 0x55d30
jmp 0x3b7cf
leaq 0x3c8f(%rip), %rsi      # 0x3f285
leaq 0xeefe(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0x111, %ecx            # imm = 0x111
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq %rbx, %rdi
movl $0x5, %esi
callq 0x3baf0
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x3b805
movl %eax, 0x4(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %ebp, %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3b695
movl %ebp, %r15d
xorl %ebp, %ebp
leaq 0x5(%rbp), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11390
testl %eax, %eax
je 0x3b824
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11780
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r13,%rbp,4)
incq %rbp
cmpq %rbp, %r15
jne 0x3b65e
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x3b7fa
movl %eax, %eax
leaq 0x1a6c3(%rip), %rcx     # 0x55d70
jmp 0x3b7cf
movq %rbx, %rdi
movl $0x5, %esi
callq 0x3baf0
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x3b805
movl %eax, 0x4(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3b729
movl %ebp, %r15d
xorl %ebp, %ebp
leaq 0x5(%rbp), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11390
testl %eax, %eax
je 0x3b824
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11780
movsd %xmm0, (%r13,%rbp,8)
incq %rbp
cmpq %rbp, %r15
jne 0x3b6f6
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x3b7fa
movl %eax, %eax
leaq 0x1a64f(%rip), %rcx     # 0x55d90
jmp 0x3b7cf
movq %rbx, %rdi
movl $0x5, %esi
callq 0x3baf0
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x3b805
movl %eax, 0x4(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movslq %ebp, %rsi
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0x111f0
movq %rax, %r13
testl %ebp, %ebp
jle 0x3b7bb
movl %ebp, %r15d
xorl %ebp, %ebp
leaq 0x5(%rbp), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x115b0
testl %eax, %eax
je 0x3b83e
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r13,%rbp,4)
incq %rbp
cmpq %rbp, %r15
jne 0x3b78a
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x3b7fa
movl %eax, %eax
leaq 0x1a581(%rip), %rcx     # 0x55d50
movq (%rcx,%rax,8), %rax
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r12d, %edx
movq %r13, %rcx
callq *(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
movq %rbx, %rdi
callq 0x11870
jmp 0x3b86d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
leaq 0x3d72(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
addl $0x5, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11a80
jmp 0x3b86d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
addl $0x5, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11af0
jmp 0x3b86d
movq %r13, %rsi
callq 0x11360
addl $0x5, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11500
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq