void MyColRamp(double frac, double *red, double *green, double *blue) {
  *red = 0.991 * (0.80 * frac + 0.2 * frac);
  *green = 0.991 * (0.80 * frac + 0.1);
  *blue = 0.991 * (0.80 * frac + 0.2 - 0.2 * frac);
}


x86 assembly (clang, -O0):
<MyColRamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xef6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee1(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xec1(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm1
movsd  0xeb8(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe90(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  0xe87(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe83(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe62(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe4a(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MyColRamp>:
movsd  0xef8(%rip),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  0xef0(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm3,%xmm2
movsd  0xee8(%rip),%xmm4
mulsd  %xmm4,%xmm2
movsd  %xmm2,(%rdi)
movsd  0xee0(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
movsd  %xmm2,(%rsi)
mulsd  0xed4(%rip),%xmm0
addsd  %xmm1,%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @MyColRamp(double %0, double* %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double, double* %5
%10 = load double, double* %5
%11 = fmul double 2.000000e-01, %10
%12 = call double @llvm.fmuladd.f64(double 8.000000e-01, double %9, double %11)
%13 = fmul double 0x3FEFB645A1CAC083, %12
%14 = load double*, double** %6
store double %13, double* %14
%15 = load double, double* %5
%16 = call double @llvm.fmuladd.f64(double 8.000000e-01, double %15, double 1.000000e-01)
%17 = fmul double 0x3FEFB645A1CAC083, %16
%18 = load double*, double** %7
store double %17, double* %18
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double 8.000000e-01, double %19, double 2.000000e-01)
%21 = load double, double* %5
%22 = call double @llvm.fmuladd.f64(double -2.000000e-01, double %21, double %20)
%23 = fmul double 0x3FEFB645A1CAC083, %22
%24 = load double*, double** %8
store double %23, double* %24
ret void
}

LLVM IR (-O2):
define void @MyColRamp(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %0, 2.000000e-01
%6 = tail call double @llvm.fmuladd.f64(double %0, double 8.000000e-01, double %5)
%7 = fmul double %6, 0x3FEFB645A1CAC083
store double %7, double* %1
%8 = tail call double @llvm.fmuladd.f64(double %0, double 8.000000e-01, double 1.000000e-01)
%9 = fmul double %8, 0x3FEFB645A1CAC083
store double %9, double* %2
%10 = tail call double @llvm.fmuladd.f64(double %0, double 8.000000e-01, double 2.000000e-01)
%11 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e-01, double %10)
%12 = fmul double %11, 0x3FEFB645A1CAC083
store double %12, double* %3
ret void
}