// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/uniform.c
// Function: ProgramUniform
static int ProgramUniform(lua_State *L)
/* program_uniform(program, location, type, val1 [, val2 ... val4]) */
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    GLenum type = checkuniformtype(L, 3);
#define arg_first 4
    switch(type)
        {
        case NONGL_BOOLEAN: return ProgramUniform_b(L, program, location, arg_first);
        case GL_INT: return ProgramUniform_i(L, program, location, arg_first);
        case GL_UNSIGNED_INT: return ProgramUniform_ui(L, program, location, arg_first);
        case GL_FLOAT: return ProgramUniform_f(L, program, location, arg_first);
        case GL_DOUBLE: return ProgramUniform_d(L, program, location, 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 $0x28, %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 $0x34
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
leal -0x1404(%rax), %ecx
cmpl $0x6, %ecx
ja 0x37f5c
leaq 0xfb5d(%rip), %rax      # 0x47a6c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x38801
cmpl $0x4, %eax
jg 0x3806a
movl %eax, %ebp
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
cmpq %r12, %r13
je 0x38099
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r12,4)
incq %r12
jmp 0x37f3d
testl %eax, %eax
jne 0x37fa7
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x38801
cmpl $0x4, %eax
jg 0x3806a
movl %eax, %ebp
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
cmpq %r12, %r13
je 0x3810f
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x11500
movzbl %al, %eax
movl %eax, (%rsp,%r12,4)
incq %r12
jmp 0x37f85
leaq 0x32d7(%rip), %rsi      # 0x3b285
leaq 0xe542(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xce, %ecx
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x38801
cmpl $0x4, %eax
jg 0x3806a
movl %eax, %ebp
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
cmpq %r12, %r13
je 0x38080
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rsp,%r12,4)
incq %r12
jmp 0x37ff7
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x38801
cmpl $0x4, %eax
jg 0x3806a
movl %eax, %ebp
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
cmpq %r12, %r13
je 0x380bb
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x11a80
movsd %xmm0, (%rsp,%r12,8)
incq %r12
jmp 0x3803d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x38801
cmpl $0x4, %eax
jle 0x380d1
leaq 0x350d(%rip), %rsi      # 0x3b57e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x381a2
decl %ebp
cmpl $0x4, %ebp
jae 0x3813d
movl %ebp, %eax
leaq 0x1ccdc(%rip), %rcx     # 0x54d70
jmp 0x3811f
decl %ebp
cmpl $0x4, %ebp
jb 0x38116
leaq 0x31de(%rip), %rsi      # 0x3b285
leaq 0xe449(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xba, %ecx
jmp 0x3819b
decl %ebp
cmpl $0x4, %ebp
jae 0x38155
movl %ebp, %eax
leaq 0x1ccc1(%rip), %rcx     # 0x54d90
jmp 0x3811f
movl %eax, %ebp
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
cmpq %r12, %r13
je 0x380fd
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r12,4)
incq %r12
jmp 0x380e2
decl %ebp
cmpl $0x4, %ebp
jae 0x3816d
movl %ebp, %eax
leaq 0x1cc43(%rip), %rcx     # 0x54d50
jmp 0x3811f
decl %ebp
cmpl $0x4, %ebp
jae 0x38185
movl %ebp, %eax
leaq 0x1cc11(%rip), %rcx     # 0x54d30
movq (%rcx,%rax,8), %rax
pushq $0x1
popq %rdx
movq %rsp, %rcx
movl %r14d, %edi
movl %r15d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
xorl %eax, %eax
jmp 0x381a2
leaq 0x3141(%rip), %rsi      # 0x3b285
leaq 0xe3ac(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xbc, %ecx
jmp 0x3819b
leaq 0x3129(%rip), %rsi      # 0x3b285
leaq 0xe394(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xbd, %ecx
jmp 0x3819b
leaq 0x3111(%rip), %rsi      # 0x3b285
leaq 0xe37c(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xbb, %ecx
jmp 0x3819b
leaq 0x30f9(%rip), %rsi      # 0x3b285
leaq 0xe364(%rip), %rdx      # 0x464f7
movq %rbx, %rdi
movl $0xb9, %ecx
xorl %eax, %eax
callq 0x11ae0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq