void xyY_to_XYZ(double *xyY, double *XYZ) {
  XYZ[0] = (xyY[0] * xyY[2]) / xyY[1];
  XYZ[1] = xyY[2];
  XYZ[2] = ((1.0 - xyY[0] - xyY[1]) * xyY[2]) / xyY[1];
}


x86 assembly (clang, -O0):
<xyY_to_XYZ>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xeb4(%rip),%xmm0
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
divsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyY_to_XYZ>:
movsd  (%rdi),%xmm0
mulsd  0x10(%rdi),%xmm0
divsd  0x8(%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0xedc(%rip),%xmm0
subsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
subsd  %xmm1,%xmm0
mulsd  0x10(%rdi),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsi)
ret

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

LLVM IR (-O2):
define void @xyY_to_XYZ(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 2
%5 = load double, double* %4
%6 = fmul double %3, %5
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = fdiv double %6, %8
store double %9, double* %1
%10 = load double, double* %4
%11 = getelementptr inbounds double, double* %1, i64 1
store double %10, double* %11
%12 = load double, double* %0
%13 = fsub double 1.000000e+00, %12
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = fdiv double %17, %14
%19 = getelementptr inbounds double, double* %1, i64 2
store double %18, double* %19
ret void
}