void Lut_Lut2Lab16(double *out, double *in) {
  out[0] = in[0] * (100.0 * 65535.0) / 65280.0;
  out[1] = (in[1] * (255.0 * 65535.0) / 65280) - 128.0;
  out[2] = (in[2] * (255.0 * 65535.0) / 65280) - 128.0;
}


x86 assembly (clang, -O0):
<Lut_Lut2Lab16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xf00(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xed4(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeab(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0xea2(%rip),%xmm0
mulsd  0x10(%rax),%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lut_Lut2Lab16>:
movsd  (%rsi),%xmm0
mulsd  0xef4(%rip),%xmm0
movsd  0xef4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
movsd  0xeec(%rip),%xmm0
movsd  0x8(%rsi),%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm1,%xmm2
movsd  0xedf(%rip),%xmm3
addsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @Lut_Lut2Lab16(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fmul double %7, 6.553500e+06
%9 = fdiv double %8, 6.528000e+04
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
store double %9, double* %11
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %14, 0x416FDFE020000000
%16 = fdiv double %15, 6.528000e+04
%17 = fsub double %16, 1.280000e+02
%18 = load double*, double** %3
%19 = getelementptr inbounds double, double* %18, i64 1
store double %17, double* %19
%20 = load double*, double** %4
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = fmul double %22, 0x416FDFE020000000
%24 = fdiv double %23, 6.528000e+04
%25 = fsub double %24, 1.280000e+02
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i64 2
store double %25, double* %27
ret void
}

LLVM IR (-O2):
define void @Lut_Lut2Lab16(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fmul double %3, 6.553500e+06
%5 = fdiv double %4, 6.528000e+04
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fmul double %7, 0x416FDFE020000000
%9 = fdiv double %8, 6.528000e+04
%10 = fadd double %9, -1.280000e+02
%11 = getelementptr inbounds double, double* %0, i64 1
store double %10, double* %11
%12 = getelementptr inbounds double, double* %1, i64 2
%13 = load double, double* %12
%14 = fmul double %13, 0x416FDFE020000000
%15 = fdiv double %14, 6.528000e+04
%16 = fadd double %15, -1.280000e+02
%17 = getelementptr inbounds double, double* %0, i64 2
store double %16, double* %17
ret void
}