// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0x11af0
movq %rax, %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11af0
movq %rax, %r12
movq %rbx, %rdi
movl $0x34, %esi
movl $0x3, %edx
callq 0x11160
movl %eax, %r13d
movq %rbx, %rdi
movl $0x4, %esi
callq 0x11af0
movq %rax, %r14
addl $-0x11, %eax
cmpl $-0x11, %eax
ja 0x2ea7f
leaq 0x1b95c(%rip), %rdx     # 0x4a3be
movq %rbx, %rdi
movl $0x4, %esi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11940
leal -0x1404(%r13), %eax
cmpl $0x6, %eax
ja 0x2eae4
leaq 0x1b946(%rip), %rcx     # 0x4a3d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x284f6(%rip), %rax     # 0x56f98
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
testl %r14d, %r14d
jle 0x2ec31
movl %r14d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movslq (%rsp,%r12,4), %rsi
movq %rbx, %rdi
callq 0x113c0
incq %r12
cmpq %r12, %r15
jne 0x2eacb
jmp 0x2ec31
testl %r13d, %r13d
jne 0x2eb32
movq 0x284a8(%rip), %rax     # 0x56f98
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
testl %r14d, %r14d
jle 0x2ec31
movl %r14d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movl (%rsp,%r12,4), %esi
movq %rbx, %rdi
callq 0x117f0
incq %r12
cmpq %r12, %r15
jne 0x2eb19
jmp 0x2ec31
leaq 0x1074c(%rip), %rsi     # 0x3f285
leaq 0x1b9b8(%rip), %rdx     # 0x4a4f8
movq %rbx, %rdi
movl $0x51, %ecx
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11ae0
movq 0x27eca(%rip), %rax     # 0x56a30
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
testl %r14d, %r14d
jle 0x2ec31
movl %r14d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
xorps %xmm0, %xmm0
cvtss2sd (%rsp,%r12,4), %xmm0
movq %rbx, %rdi
callq 0x11380
incq %r12
cmpq %r12, %r15
jne 0x2eb8f
jmp 0x2ec31
movq 0x27794(%rip), %rax     # 0x56348
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
testl %r14d, %r14d
jle 0x2ec31
movl %r14d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movsd (%rsp,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x11380
incq %r12
cmpq %r12, %r15
jne 0x2ebd9
jmp 0x2ec31
movq 0x27c70(%rip), %rax     # 0x56868
movq %rsp, %rdx
movl %r15d, %edi
movl %r12d, %esi
callq *(%rax)
movq %rbx, %rdi
callq 0x11880
testl %r14d, %r14d
jle 0x2ec31
movl %r14d, %r15d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movl (%rsp,%r12,4), %esi
movq %rbx, %rdi
callq 0x113c0
incq %r12
cmpq %r12, %r15
jne 0x2ec1d
movl %r14d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq