void hpe_to_xyz(double *x, double *y, double *z, double r, double g, double b) {
  *x = (1.910197 * r) - (1.112124 * g) + (0.201908 * b);
  *y = (0.370950 * r) + (0.629054 * g) - (0.000008 * b);
  *z = b;
}


x86 assembly (clang, -O0):
<hpe_to_xyz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  0xefc(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xed0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm1
movsd  0xe8e(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xe79(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xe5c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpe_to_xyz>:
movsd  0xef8(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xef4(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movsd  0xeec(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm4,%xmm3
movsd  %xmm3,(%rdi)
mulsd  0xee0(%rip),%xmm1
mulsd  0xee0(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
movsd  %xmm2,(%rdx)
ret

LLVM IR (-O0):
define void @hpe_to_xyz(double* %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %10
%14 = load double, double* %11
%15 = fmul double 0x3FF1CB4289118C19, %14
%16 = fneg double %15
%17 = call double @llvm.fmuladd.f64(double 0x3FFE902ABABEAD4F, double %13, double %16)
%18 = load double, double* %12
%19 = call double @llvm.fmuladd.f64(double 2.019080e-01, double %18, double %17)
%20 = load double*, double** %7
store double %19, double* %20
%21 = load double, double* %10
%22 = load double, double* %11
%23 = fmul double 6.290540e-01, %22
%24 = call double @llvm.fmuladd.f64(double 3.709500e-01, double %21, double %23)
%25 = load double, double* %12
%26 = call double @llvm.fmuladd.f64(double 0xBEE0C6F7A0B5ED8D, double %25, double %24)
%27 = load double*, double** %8
store double %26, double* %27
%28 = load double, double* %12
%29 = load double*, double** %9
store double %28, double* %29
ret void
}

LLVM IR (-O2):
define void @hpe_to_xyz(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double %3, double %4, double %5) {
%7 = fmul double %4, 0xBFF1CB4289118C19
%8 = tail call double @llvm.fmuladd.f64(double %3, double 0x3FFE902ABABEAD4F, double %7)
%9 = tail call double @llvm.fmuladd.f64(double %5, double 2.019080e-01, double %8)
store double %9, double* %0
%10 = fmul double %4, 6.290540e-01
%11 = tail call double @llvm.fmuladd.f64(double %3, double 3.709500e-01, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %5, double 0xBEE0C6F7A0B5ED8D, double %11)
store double %12, double* %1
store double %5, double* %2
ret void
}