// File: /workspace/github_c_makefile_star2_O3/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 0x11150
leal -0x1404(%rax), %ecx
cmpl $0x6, %ecx
ja 0x3b238
leaq 0x10871(%rip), %rax     # 0x4ba44
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3baf0
cmpl $0x4, %eax
jg 0x3b376
movl %eax, %ebp
testl %eax, %eax
jle 0x3b216
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 0x3b1fe
decl %ebp
cmpl $0x4, %ebp
jb 0x3b284
leaq 0x4061(%rip), %rsi      # 0x3f285
leaq 0xf2d0(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xba, %ecx
jmp 0x3b43e
testl %eax, %eax
jne 0x3b292
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3baf0
cmpl $0x4, %eax
jg 0x3b376
movl %eax, %ebp
testl %eax, %eax
jle 0x3b279
movl %ebp, %r12d
xorl %r13d, %r13d
leal 0x4(%r13), %esi
movq %rbx, %rdi
callq 0x11500
movzbl %al, %eax
movl %eax, (%rsp,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x3b25e
decl %ebp
cmpl $0x4, %ebp
jae 0x3b428
movl %ebp, %eax
leaq 0x1aaa3(%rip), %rcx     # 0x55d30
jmp 0x3b3c0
leaq 0x3fec(%rip), %rsi      # 0x3f285
leaq 0xf25b(%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 0x3baf0
cmpl $0x4, %eax
jg 0x3b376
movl %eax, %ebp
testl %eax, %eax
jle 0x3b2fd
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 0x3b2df
decl %ebp
cmpl $0x4, %ebp
jae 0x3b3e0
movl %ebp, %eax
leaq 0x1aa5f(%rip), %rcx     # 0x55d70
jmp 0x3b3c0
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3baf0
cmpl $0x4, %eax
jg 0x3b376
movl %eax, %ebp
testl %eax, %eax
jle 0x3b34e
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 0x3b334
decl %ebp
cmpl $0x4, %ebp
jae 0x3b3f8
movl %ebp, %eax
leaq 0x1aa2e(%rip), %rcx     # 0x55d90
jmp 0x3b3c0
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3baf0
cmpl $0x4, %eax
jle 0x3b38c
leaq 0x4201(%rip), %rsi      # 0x3f57e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11ae0
jmp 0x3b445
movl %eax, %ebp
testl %eax, %eax
jle 0x3b3b0
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 0x3b398
decl %ebp
cmpl $0x4, %ebp
jae 0x3b410
movl %ebp, %eax
leaq 0x1a990(%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 0x11870
xorl %eax, %eax
jmp 0x3b445
leaq 0x3e9e(%rip), %rsi      # 0x3f285
leaq 0xf10d(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbc, %ecx
jmp 0x3b43e
leaq 0x3e86(%rip), %rsi      # 0x3f285
leaq 0xf0f5(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbd, %ecx
jmp 0x3b43e
leaq 0x3e6e(%rip), %rsi      # 0x3f285
leaq 0xf0dd(%rip), %rdx      # 0x4a4fb
movq %rbx, %rdi
movl $0xbb, %ecx
jmp 0x3b43e
leaq 0x3e56(%rip), %rsi      # 0x3f285
leaq 0xf0c5(%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