// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r15
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x34
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x11150
testl %r12d, %r12d
jle 0x38298
leal -0x1404(%rax), %ecx
cmpl $0x6, %ecx
ja 0x382a4
leaq 0xf872(%rip), %rax      # 0x47a88
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x38801
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x38584
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
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x384f8
leaq 0x5(%r14), %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x115b0
testl %eax, %eax
je 0x384d9
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r13,%r14,4)
incq %r14
jmp 0x38261
leaq 0xf855(%rip), %rsi      # 0x47af4
jmp 0x3858b
testl %eax, %eax
jne 0x38320
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x38801
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x38584
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
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x384f8
leaq 0x5(%r14), %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11850
movq %rbx, %rdi
cmpl $0x1, %eax
jne 0x385a3
movl %r15d, %esi
callq 0x11700
movl %eax, (%r13,%r14,4)
incq %r14
jmp 0x382ea
leaq 0x2f5e(%rip), %rsi      # 0x3b285
leaq 0xe1c9(%rip), %rdx      # 0x464f7
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
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x38801
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x38584
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
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x3850e
leaq 0x5(%r14), %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11390
testl %eax, %eax
je 0x384ba
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x11780
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r13,%r14,4)
incq %r14
jmp 0x3838d
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x38801
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x38584
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
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x38524
leaq 0x5(%r14), %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11390
testl %eax, %eax
je 0x384ba
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x11780
movsd %xmm0, (%r13,%r14,8)
incq %r14
jmp 0x3840c
pushq $0x5
popq %rsi
movq %rbx, %rdi
callq 0x38801
movl %eax, %ebp
cltd
idivl %r12d
testl %edx, %edx
jne 0x38584
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
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x3853a
leaq 0x5(%r14), %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x115b0
testl %eax, %eax
je 0x384d9
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x11040
movl %eax, (%r13,%r14,4)
incq %r14
jmp 0x38487
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
addl $0x5, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11a80
jmp 0x385ba
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
addl $0x5, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11af0
jmp 0x385ba
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x38579
movl %eax, %eax
leaq 0x1c824(%rip), %rcx     # 0x54d30
jmp 0x3854e
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x38579
movl %eax, %eax
leaq 0x1c84e(%rip), %rcx     # 0x54d70
jmp 0x3854e
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x38579
movl %eax, %eax
leaq 0x1c858(%rip), %rcx     # 0x54d90
jmp 0x3854e
movl 0x4(%rsp), %eax
decl %eax
cmpl $0x4, %eax
jae 0x38579
movl %eax, %eax
leaq 0x1c802(%rip), %rcx     # 0x54d50
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 0x385ba
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11360
leaq 0x2ff3(%rip), %rsi      # 0x3b57e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
movq %r13, %rsi
callq 0x11360
addl $0x5, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11500
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq