// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x34, %esi
movl $0x3, %edx
callq 0x11160
leal -0x1404(%rax), %ecx
cmpl $0x6, %ecx
ja 0x3b18c
leaq 0x1091d(%rip), %rax     # 0x4ba44
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ba44
cmpl $0x4, %eax
jg 0x3b2ca
movl %eax, %ebp
testl %eax, %eax
jle 0x3b16a
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3b152
decl %ebp
cmpl $0x4, %ebp
jb 0x3b1d8
leaq 0x410d(%rip), %rsi      # 0x3f285
leaq 0xf37c(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xba, %ecx
jmp 0x3b392
testl %eax, %eax
jne 0x3b1e6
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ba44
cmpl $0x4, %eax
jg 0x3b2ca
movl %eax, %ebp
testl %eax, %eax
jle 0x3b1cd
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11510
movzbl %al, %eax
movl %eax, (%rsp,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3b1b2
decl %ebp
cmpl $0x4, %ebp
jae 0x3b37c
movl %ebp, %eax
leaq 0x1ab4f(%rip), %rcx     # 0x55d30
jmp 0x3b314
leaq 0x4098(%rip), %rsi      # 0x3f285
leaq 0xf307(%rip), %rdx      # 0x4a4fb
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
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ba44
cmpl $0x4, %eax
jg 0x3b2ca
movl %eax, %ebp
testl %eax, %eax
jle 0x3b251
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11a80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rsp,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3b233
decl %ebp
cmpl $0x4, %ebp
jae 0x3b334
movl %ebp, %eax
leaq 0x1ab0b(%rip), %rcx     # 0x55d70
jmp 0x3b314
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ba44
cmpl $0x4, %eax
jg 0x3b2ca
movl %eax, %ebp
testl %eax, %eax
jle 0x3b2a2
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11a80
movsd %xmm0, (%rsp,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x3b288
decl %ebp
cmpl $0x4, %ebp
jae 0x3b34c
movl %ebp, %eax
leaq 0x1aada(%rip), %rcx     # 0x55d90
jmp 0x3b314
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ba44
cmpl $0x4, %eax
jle 0x3b2e0
leaq 0x42ad(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x3b399
movl %eax, %ebp
testl %eax, %eax
jle 0x3b304
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11af0
movl %eax, (%rsp,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3b2ec
decl %ebp
cmpl $0x4, %ebp
jae 0x3b364
movl %ebp, %eax
leaq 0x1aa3c(%rip), %rcx     # 0x55d50
movq (%rcx,%rax,8), %rax
movq %rsp, %rcx
movl %r14d, %edi
movl %r15d, %esi
movl $0x1, %edx
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
jmp 0x3b399
leaq 0x3f4a(%rip), %rsi      # 0x3f285
leaq 0xf1b9(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbc, %ecx
jmp 0x3b392
leaq 0x3f32(%rip), %rsi      # 0x3f285
leaq 0xf1a1(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbd, %ecx
jmp 0x3b392
leaq 0x3f1a(%rip), %rsi      # 0x3f285
leaq 0xf189(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbb, %ecx
jmp 0x3b392
leaq 0x3f02(%rip), %rsi      # 0x3f285
leaq 0xf171(%rip), %rdx      # 0x4a4fb
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