void XYZ_to_RGB(float X, float Y, float Z, float *R, float *G, float *B) {
  *R = (3.240479 * X - 1.537150 * Y - 0.498535 * Z) / 100.000;
  *G = (-0.969256 * X + 1.875992 * Y + 0.041556 * Z) / 100.000;
  *B = (0.055648 * X - 0.204043 * Y + 1.057311 * Z) / 100.000;
}


x86 assembly (clang, -O0):
<XYZ_to_RGB>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xf0f(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xee4(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe7b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe81(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  0xe6d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe4c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe1c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe0a(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xddf(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdbe(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xda6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<XYZ_to_RGB>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movsd  0xef0(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xeec(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
cvtss2sd %xmm2,%xmm2
movsd  0xee0(%rip),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
movsd  0xed8(%rip),%xmm3
divsd  %xmm3,%xmm5
xorps  %xmm4,%xmm4
cvtsd2ss %xmm5,%xmm4
movss  %xmm4,(%rdi)
movsd  0xec9(%rip),%xmm4
mulsd  %xmm1,%xmm4
movsd  0xec5(%rip),%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm4,%xmm5
movsd  0xebd(%rip),%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm5,%xmm4
divsd  %xmm3,%xmm4
cvtsd2ss %xmm4,%xmm4
movss  %xmm4,(%rsi)
mulsd  0xea9(%rip),%xmm1
mulsd  0xea9(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xea5(%rip),%xmm2
addsd  %xmm0,%xmm2
divsd  %xmm3,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @XYZ_to_RGB(float %0, float %1, float %2, float* %3, float* %4, float* %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%13 = load float, float* %7
%14 = fpext float %13 to double
%15 = load float, float* %8
%16 = fpext float %15 to double
%17 = fmul double 1.537150e+00, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double 0x4009EC804102FF8F, double %14, double %18)
%20 = load float, float* %9
%21 = fpext float %20 to double
%22 = call double @llvm.fmuladd.f64(double -4.985350e-01, double %21, double %19)
%23 = fdiv double %22, 1.000000e+02
%24 = fptrunc double %23 to float
%25 = load float*, float** %10
store float %24, float* %25
%26 = load float, float* %7
%27 = fpext float %26 to double
%28 = load float, float* %8
%29 = fpext float %28 to double
%30 = fmul double 0x3FFE04102FF8EC10, %29
%31 = call double @llvm.fmuladd.f64(double -9.692560e-01, double %27, double %30)
%32 = load float, float* %9
%33 = fpext float %32 to double
%34 = call double @llvm.fmuladd.f64(double 4.155600e-02, double %33, double %31)
%35 = fdiv double %34, 1.000000e+02
%36 = fptrunc double %35 to float
%37 = load float*, float** %11
store float %36, float* %37
%38 = load float, float* %7
%39 = fpext float %38 to double
%40 = load float, float* %8
%41 = fpext float %40 to double
%42 = fmul double 2.040430e-01, %41
%43 = fneg double %42
%44 = call double @llvm.fmuladd.f64(double 5.564800e-02, double %39, double %43)
%45 = load float, float* %9
%46 = fpext float %45 to double
%47 = call double @llvm.fmuladd.f64(double 0x3FF0EABEF06B3786, double %46, double %44)
%48 = fdiv double %47, 1.000000e+02
%49 = fptrunc double %48 to float
%50 = load float*, float** %12
store float %49, float* %50
ret void
}

LLVM IR (-O2):
define void @XYZ_to_RGB(float %0, float %1, float %2, float* nocapture writeonly %3, float* nocapture writeonly %4, float* nocapture writeonly %5) {
%7 = fpext float %0 to double
%8 = fpext float %1 to double
%9 = fmul double %8, -1.537150e+00
%10 = tail call double @llvm.fmuladd.f64(double %7, double 0x4009EC804102FF8F, double %9)
%11 = fpext float %2 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double -4.985350e-01, double %10)
%13 = fdiv double %12, 1.000000e+02
%14 = fptrunc double %13 to float
store float %14, float* %3
%15 = fmul double %8, 0x3FFE04102FF8EC10
%16 = tail call double @llvm.fmuladd.f64(double %7, double -9.692560e-01, double %15)
%17 = tail call double @llvm.fmuladd.f64(double %11, double 4.155600e-02, double %16)
%18 = fdiv double %17, 1.000000e+02
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = fmul double %8, -2.040430e-01
%21 = tail call double @llvm.fmuladd.f64(double %7, double 5.564800e-02, double %20)
%22 = tail call double @llvm.fmuladd.f64(double %11, double 0x3FF0EABEF06B3786, double %21)
%23 = fdiv double %22, 1.000000e+02
%24 = fptrunc double %23 to float
store float %24, float* %5
ret void
}