#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
void glmMix3fv(float out[3], const float x[3], const float y[3],
               const float a[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[3] = x[3] * ((1 - a[i]) * a[i] * y[3]);
}


x86 assembly (clang, -O0):
<glmMix3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x3,-0x28(%rbp)
jae    1179 <glmMix3fv+0x79>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movss  0xec0(%rip),%xmm1
subss  (%rax,%rcx,4),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm1
mov    -0x18(%rbp),%rax
mulss  0xc(%rax),%xmm1
mulss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111c <glmMix3fv+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMix3fv>:
movss  (%rcx),%xmm0
movss  0xef4(%rip),%xmm1
movaps %xmm1,%xmm2
subss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
mulss  0xc(%rdx),%xmm2
mulss  0xc(%rsi),%xmm2
movss  %xmm2,0xc(%rdi)
movss  0x4(%rcx),%xmm0
movaps %xmm1,%xmm2
subss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
mulss  0xc(%rdx),%xmm2
mulss  0xc(%rsi),%xmm2
movss  %xmm2,0xc(%rdi)
movss  0x8(%rcx),%xmm0
subss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  0xc(%rdx),%xmm1
mulss  0xc(%rsi),%xmm1
movss  %xmm1,0xc(%rdi)
ret

LLVM IR (-O0):
define void @glmMix3fv(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i64
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
store i64 0, i64* %9
br label %10
10: ; preds = %34, %4
%11 = load i64, i64* %9
%12 = icmp ult i64 %11, 3
br i1 %12, label %13, label %37
13: ; preds = %10
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 3
%16 = load float, float* %15
%17 = load float*, float** %8
%18 = load i64, i64* %9
%19 = getelementptr inbounds float, float* %17, i64 %18
%20 = load float, float* %19
%21 = fsub float 1.000000e+00, %20
%22 = load float*, float** %8
%23 = load i64, i64* %9
%24 = getelementptr inbounds float, float* %22, i64 %23
%25 = load float, float* %24
%26 = fmul float %21, %25
%27 = load float*, float** %7
%28 = getelementptr inbounds float, float* %27, i64 3
%29 = load float, float* %28
%30 = fmul float %26, %29
%31 = fmul float %16, %30
%32 = load float*, float** %5
%33 = getelementptr inbounds float, float* %32, i64 3
store float %31, float* %33
br label %34
34: ; preds = %13
%35 = load i64, i64* %9
%36 = add i64 %35, 1
store i64 %36, i64* %9
br label %10
37: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @glmMix3fv(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2, float* nocapture %3) {
%5 = getelementptr inbounds float, float* %1, i64 3
%6 = getelementptr inbounds float, float* %2, i64 3
%7 = getelementptr inbounds float, float* %0, i64 3
%8 = load float, float* %5
%9 = load float, float* %3
%10 = fsub float 1.000000e+00, %9
%11 = fmul float %9, %10
%12 = load float, float* %6
%13 = fmul float %12, %11
%14 = fmul float %8, %13
store float %14, float* %7
%15 = load float, float* %5
%16 = getelementptr inbounds float, float* %3, i64 1
%17 = load float, float* %16
%18 = fsub float 1.000000e+00, %17
%19 = fmul float %17, %18
%20 = load float, float* %6
%21 = fmul float %20, %19
%22 = fmul float %15, %21
store float %22, float* %7
%23 = load float, float* %5
%24 = getelementptr inbounds float, float* %3, i64 2
%25 = load float, float* %24
%26 = fsub float 1.000000e+00, %25
%27 = fmul float %25, %26
%28 = load float, float* %6
%29 = fmul float %28, %27
%30 = fmul float %23, %29
store float %30, float* %7
ret void
}