// File: /workspace/github_c_makefile_star2_O2/stetre[P]moongl/src/getuniform.c
// Function: GetUniform
static int GetUniform(lua_State *L)
/* get_uniform(program, location, type, size) */
    {
    GLuint program = luaL_checkinteger(L, 1);
    GLint location = luaL_checkinteger(L, 2);
    GLenum type = checkuniformtype(L, 3);
    GLsizei size = luaL_checkinteger(L, 4); 
    if((size < 1) || (size>16))
        return luaL_argerror(L, 4, "out of range");
    switch(type)
        {
        case NONGL_BOOLEAN: return GetUniform_b(L, program, location, size);
        case GL_INT: return GetUniform_i(L, program, location, size);
        case GL_UNSIGNED_INT: return GetUniform_ui(L, program, location, size);
        case GL_FLOAT:  return GetUniform_f(L, program, location, size);
        case GL_DOUBLE: return GetUniform_d(L, program, location, size);
        default:
            return luaL_error(L, UNEXPECTED_ERROR);
        }

    CheckError(L);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x11af0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r12
pushq $0x34
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x11150
movl %eax, %r13d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x11af0
movq %rax, %r14
addl $-0x11, %eax
cmpl $-0x11, %eax
ja 0x2c617
leaq 0x19dbe(%rip), %rdx     # 0x463ba
pushq $0x4
popq %rsi
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11930
leal -0x1404(%r13), %eax
cmpl $0x6, %eax
ja 0x2c66d
leaq 0x19daa(%rip), %rcx     # 0x463d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x2995e(%rip), %rax     # 0x55f98
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl %r14d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c781
movslq (%rsp,%r12,4), %rsi
movq %rbx, %rdi
callq 0x113b0
incq %r12
jmp 0x2c653
testl %r13d, %r13d
jne 0x2c6ac
movq 0x2991f(%rip), %rax     # 0x55f98
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl %r14d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c781
movl (%rsp,%r12,4), %esi
movq %rbx, %rdi
callq 0x117e0
incq %r12
jmp 0x2c692
leaq 0xebd2(%rip), %rsi      # 0x3b285
leaq 0x19e3a(%rip), %rdx     # 0x464f4
pushq $0x51
popq %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11ae0
movq 0x29352(%rip), %rax     # 0x55a30
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl %r14d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c781
cvtss2sd (%rsp,%r12,4), %xmm0
movq %rbx, %rdi
callq 0x11370
incq %r12
jmp 0x2c6f7
movq 0x28c2e(%rip), %rax     # 0x55348
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl %r14d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c781
movsd (%rsp,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x11370
incq %r12
jmp 0x2c733
movq 0x29116(%rip), %rax     # 0x55868
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11870
movl %r14d, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c781
movl (%rsp,%r12,4), %esi
movq %rbx, %rdi
callq 0x113b0
incq %r12
jmp 0x2c76b
movl %r14d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq