void calcDistImgProjFullR(double a[5], double kc[5], double qr0[4], double t[3],
                          double M[3], double n[2]) {
  double t1;
  double t11;
  double t13;
  double t17;
  double t2;
  double t22;
  double t27;
  double t3;
  double t30;
  double t31;
  double t37;
  double t38;
  double t39;
  double t40;
  double t46;
  double t47;
  double t48;
  double t49;
  double t5;
  double t58;
  double t6;
  double t60;
  double t62;
  double t64;
  double t67;
  double t8;
  double t82;
  double t9;
  {
    t1 = a[0];
    t2 = qr0[1];
    t3 = M[0];
    t5 = qr0[2];
    t6 = M[1];
    t8 = qr0[3];
    t9 = M[2];
    t11 = -t3 * t2 - t6 * t5 - t9 * t8;
    t13 = qr0[0];
    t17 = t13 * t3 + t5 * t9 - t6 * t8;
    t22 = t6 * t13 + t8 * t3 - t9 * t2;
    t27 = t13 * t9 + t2 * t6 - t5 * t3;
    t30 = -t2 * t11 + t13 * t17 - t8 * t22 + t27 * t5 + t[0];
    t31 = t30 * t30;
    t37 = -t8 * t11 + t13 * t27 - t5 * t17 + t2 * t22 + t[2];
    t38 = t37 * t37;
    t39 = 1 / t38;
    t40 = t39 * t31;
    t46 = -t5 * t11 + t13 * t22 - t27 * t2 + t17 * t8 + t[1];
    t47 = t46 * t46;
    t48 = t47 * t39;
    t49 = t40 + t48;
    t58 = 1.0 + t49 * (kc[0] + t49 * (kc[1] + t49 * kc[4]));
    t60 = 1 / t37;
    t62 = kc[2];
    t64 = t39 * t46;
    t67 = kc[3];
    t82 = t58 * t46 * t60 + t62 * (t40 + 3.0 * t48) + 2.0 * t67 * t30 * t64;
    n[0] = t1 * (t58 * t30 * t60 + 2.0 * t62 * t30 * t64 +
                 t67 * (3.0 * t40 + t48)) +
           a[4] * t82 + a[1];
    n[1] = t1 * a[3] * t82 + a[2];
    return;
  }
}


x86 assembly (clang, -O0):
<calcDistImgProjFullR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x48(%rbp),%xmm2
movsd  -0x100(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x58(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x110(%rbp),%xmm2
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x100(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0xc8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x100(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0x50(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xbbf(%rip),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x100(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0xc0(%rbp),%xmm1
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm4
movsd  -0xc0(%rbp),%xmm3
ff
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa7f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xa6b(%rip),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm4
ff
movsd  -0xb8(%rbp),%xmm3
ff
movsd  0x9d9(%rip),%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x9c5(%rip),%xmm0
mulsd  -0xf8(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
movsd  -0xf0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0x78(%rbp),%xmm1
movsd  -0xe0(%rbp),%xmm3
ff
movsd  0x97e(%rip),%xmm2
mulsd  -0xe8(%rbp),%xmm2
ff
mulsd  -0x78(%rbp),%xmm2
mulsd  -0xf0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm3
ff
movsd  -0xb8(%rbp),%xmm4
ff
movsd  0x939(%rip),%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  -0x108(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  -0x108(%rbp),%xmm2
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcDistImgProjFullR>:
movsd  (%rdx),%xmm9
movsd  0x8(%rdx),%xmm0
movsd  0x10(%rdx),%xmm6
movsd  (%r8),%xmm10
movsd  0x8(%r8),%xmm1
movsd  0x18(%rdx),%xmm8
movsd  0x10(%r8),%xmm14
movapd 0xed2(%rip),%xmm4
xorpd  %xmm10,%xmm4
movapd %xmm6,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm4
subsd  %xmm2,%xmm4
movapd %xmm14,%xmm2
mulsd  %xmm8,%xmm2
subsd  %xmm2,%xmm4
movapd %xmm6,%xmm2
mulsd  %xmm10,%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm9,%xmm5
mulsd  %xmm14,%xmm5
addsd  %xmm3,%xmm5
subsd  %xmm2,%xmm5
movapd %xmm0,%xmm13
mulsd  %xmm4,%xmm13
movapd %xmm5,%xmm12
mulsd  %xmm6,%xmm12
movapd %xmm8,%xmm15
mulsd  %xmm4,%xmm15
movapd %xmm6,%xmm3
mulsd  %xmm6,%xmm4
movapd %xmm6,%xmm7
mulsd  %xmm14,%xmm7
movapd %xmm9,%xmm6
mulsd  %xmm10,%xmm6
addsd  %xmm7,%xmm6
movapd %xmm1,%xmm7
mulsd  %xmm8,%xmm7
subsd  %xmm7,%xmm6
movsd  (%rdi),%xmm11
mulsd  %xmm8,%xmm10
mulsd  %xmm9,%xmm1
addsd  %xmm10,%xmm1
mulsd  %xmm0,%xmm14
subsd  %xmm14,%xmm1
movapd %xmm8,%xmm7
mulsd  %xmm1,%xmm7
movapd %xmm9,%xmm2
mulsd  %xmm5,%xmm2
mulsd  %xmm0,%xmm5
mulsd  %xmm1,%xmm0
mulsd  %xmm9,%xmm1
mulsd  %xmm6,%xmm9
subsd  %xmm13,%xmm9
subsd  %xmm7,%xmm9
addsd  %xmm9,%xmm12
addsd  (%rcx),%xmm12
movapd %xmm12,%xmm7
mulsd  %xmm12,%xmm7
subsd  %xmm15,%xmm2
mulsd  %xmm6,%xmm3
subsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
addsd  0x10(%rcx),%xmm0
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xdcb(%rip),%xmm9
movapd %xmm9,%xmm3
divsd  %xmm2,%xmm3
subsd  %xmm4,%xmm1
subsd  %xmm5,%xmm1
mulsd  %xmm8,%xmm6
addsd  %xmm1,%xmm6
addsd  0x8(%rcx),%xmm6
mulsd  %xmm3,%xmm7
movapd %xmm6,%xmm5
mulsd  %xmm6,%xmm5
mulsd  %xmm3,%xmm5
movapd %xmm7,%xmm2
addsd  %xmm5,%xmm2
movsd  0x20(%rsi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x8(%rsi),%xmm1
mulsd  %xmm2,%xmm1
addsd  (%rsi),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm9,%xmm1
divsd  %xmm0,%xmm9
mulsd  %xmm6,%xmm3
movsd  0x10(%rsi),%xmm0
movsd  0x18(%rsi),%xmm2
mulsd  %xmm1,%xmm6
movsd  0xd5d(%rip),%xmm8
movapd %xmm5,%xmm4
mulsd  %xmm8,%xmm4
addsd  %xmm7,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm9,%xmm6
addsd  %xmm4,%xmm6
mulsd  %xmm8,%xmm7
addsd  %xmm5,%xmm7
mulsd  %xmm2,%xmm7
addsd  %xmm2,%xmm2
mulsd  %xmm12,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm6,%xmm2
mulsd  %xmm12,%xmm1
addsd  %xmm0,%xmm0
mulsd  %xmm12,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm9,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm7
movsd  0x20(%rdi),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm11,%xmm7
addsd  %xmm0,%xmm7
addsd  0x8(%rdi),%xmm7
movsd  %xmm7,(%r9)
mulsd  0x18(%rdi),%xmm11
mulsd  %xmm2,%xmm11
addsd  0x10(%rdi),%xmm11
movsd  %xmm11,0x8(%r9)
ret

LLVM IR (-O0):
define void @calcDistImgProjFullR(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*
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = 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
%41 = load double*, double** %7
%42 = getelementptr inbounds double, double* %41, i64 0
%43 = load double, double* %42
store double %43, double* %13
%44 = load double*, double** %9
%45 = getelementptr inbounds double, double* %44, i64 1
%46 = load double, double* %45
store double %46, double* %17
%47 = load double*, double** %11
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
store double %49, double* %20
%50 = load double*, double** %9
%51 = getelementptr inbounds double, double* %50, i64 2
%52 = load double, double* %51
store double %52, double* %31
%53 = load double*, double** %11
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
store double %55, double* %33
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 3
%58 = load double, double* %57
store double %58, double* %38
%59 = load double*, double** %11
%60 = getelementptr inbounds double, double* %59, i64 2
%61 = load double, double* %60
store double %61, double* %40
%62 = load double, double* %20
%63 = fneg double %62
%64 = load double, double* %17
%65 = load double, double* %33
%66 = load double, double* %31
%67 = fmul double %65, %66
%68 = fneg double %67
%69 = call double @llvm.fmuladd.f64(double %63, double %64, double %68)
%70 = load double, double* %40
%71 = load double, double* %38
%72 = fneg double %70
%73 = call double @llvm.fmuladd.f64(double %72, double %71, double %69)
store double %73, double* %14
%74 = load double*, double** %9
%75 = getelementptr inbounds double, double* %74, i64 0
%76 = load double, double* %75
store double %76, double* %15
%77 = load double, double* %15
%78 = load double, double* %20
%79 = load double, double* %31
%80 = load double, double* %40
%81 = fmul double %79, %80
%82 = call double @llvm.fmuladd.f64(double %77, double %78, double %81)
%83 = load double, double* %33
%84 = load double, double* %38
%85 = fneg double %83
%86 = call double @llvm.fmuladd.f64(double %85, double %84, double %82)
store double %86, double* %16
%87 = load double, double* %33
%88 = load double, double* %15
%89 = load double, double* %38
%90 = load double, double* %20
%91 = fmul double %89, %90
%92 = call double @llvm.fmuladd.f64(double %87, double %88, double %91)
%93 = load double, double* %40
%94 = load double, double* %17
%95 = fneg double %93
%96 = call double @llvm.fmuladd.f64(double %95, double %94, double %92)
store double %96, double* %18
%97 = load double, double* %15
%98 = load double, double* %40
%99 = load double, double* %17
%100 = load double, double* %33
%101 = fmul double %99, %100
%102 = call double @llvm.fmuladd.f64(double %97, double %98, double %101)
%103 = load double, double* %31
%104 = load double, double* %20
%105 = fneg double %103
%106 = call double @llvm.fmuladd.f64(double %105, double %104, double %102)
store double %106, double* %19
%107 = load double, double* %17
%108 = fneg double %107
%109 = load double, double* %14
%110 = load double, double* %15
%111 = load double, double* %16
%112 = fmul double %110, %111
%113 = call double @llvm.fmuladd.f64(double %108, double %109, double %112)
%114 = load double, double* %38
%115 = load double, double* %18
%116 = fneg double %114
%117 = call double @llvm.fmuladd.f64(double %116, double %115, double %113)
%118 = load double, double* %19
%119 = load double, double* %31
%120 = call double @llvm.fmuladd.f64(double %118, double %119, double %117)
%121 = load double*, double** %10
%122 = getelementptr inbounds double, double* %121, i64 0
%123 = load double, double* %122
%124 = fadd double %120, %123
store double %124, double* %21
%125 = load double, double* %21
%126 = load double, double* %21
%127 = fmul double %125, %126
store double %127, double* %22
%128 = load double, double* %38
%129 = fneg double %128
%130 = load double, double* %14
%131 = load double, double* %15
%132 = load double, double* %19
%133 = fmul double %131, %132
%134 = call double @llvm.fmuladd.f64(double %129, double %130, double %133)
%135 = load double, double* %31
%136 = load double, double* %16
%137 = fneg double %135
%138 = call double @llvm.fmuladd.f64(double %137, double %136, double %134)
%139 = load double, double* %17
%140 = load double, double* %18
%141 = call double @llvm.fmuladd.f64(double %139, double %140, double %138)
%142 = load double*, double** %10
%143 = getelementptr inbounds double, double* %142, i64 2
%144 = load double, double* %143
%145 = fadd double %141, %144
store double %145, double* %23
%146 = load double, double* %23
%147 = load double, double* %23
%148 = fmul double %146, %147
store double %148, double* %24
%149 = load double, double* %24
%150 = fdiv double 1.000000e+00, %149
store double %150, double* %25
%151 = load double, double* %25
%152 = load double, double* %22
%153 = fmul double %151, %152
store double %153, double* %26
%154 = load double, double* %31
%155 = fneg double %154
%156 = load double, double* %14
%157 = load double, double* %15
%158 = load double, double* %18
%159 = fmul double %157, %158
%160 = call double @llvm.fmuladd.f64(double %155, double %156, double %159)
%161 = load double, double* %19
%162 = load double, double* %17
%163 = fneg double %161
%164 = call double @llvm.fmuladd.f64(double %163, double %162, double %160)
%165 = load double, double* %16
%166 = load double, double* %38
%167 = call double @llvm.fmuladd.f64(double %165, double %166, double %164)
%168 = load double*, double** %10
%169 = getelementptr inbounds double, double* %168, i64 1
%170 = load double, double* %169
%171 = fadd double %167, %170
store double %171, double* %27
%172 = load double, double* %27
%173 = load double, double* %27
%174 = fmul double %172, %173
store double %174, double* %28
%175 = load double, double* %28
%176 = load double, double* %25
%177 = fmul double %175, %176
store double %177, double* %29
%178 = load double, double* %26
%179 = load double, double* %29
%180 = fadd double %178, %179
store double %180, double* %30
%181 = load double, double* %30
%182 = load double*, double** %8
%183 = getelementptr inbounds double, double* %182, i64 0
%184 = load double, double* %183
%185 = load double, double* %30
%186 = load double*, double** %8
%187 = getelementptr inbounds double, double* %186, i64 1
%188 = load double, double* %187
%189 = load double, double* %30
%190 = load double*, double** %8
%191 = getelementptr inbounds double, double* %190, i64 4
%192 = load double, double* %191
%193 = call double @llvm.fmuladd.f64(double %189, double %192, double %188)
%194 = call double @llvm.fmuladd.f64(double %185, double %193, double %184)
%195 = call double @llvm.fmuladd.f64(double %181, double %194, double 1.000000e+00)
store double %195, double* %32
%196 = load double, double* %23
%197 = fdiv double 1.000000e+00, %196
store double %197, double* %34
%198 = load double*, double** %8
%199 = getelementptr inbounds double, double* %198, i64 2
%200 = load double, double* %199
store double %200, double* %35
%201 = load double, double* %25
%202 = load double, double* %27
%203 = fmul double %201, %202
store double %203, double* %36
%204 = load double*, double** %8
%205 = getelementptr inbounds double, double* %204, i64 3
%206 = load double, double* %205
store double %206, double* %37
%207 = load double, double* %32
%208 = load double, double* %27
%209 = fmul double %207, %208
%210 = load double, double* %34
%211 = load double, double* %35
%212 = load double, double* %26
%213 = load double, double* %29
%214 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %213, double %212)
%215 = fmul double %211, %214
%216 = call double @llvm.fmuladd.f64(double %209, double %210, double %215)
%217 = load double, double* %37
%218 = fmul double 2.000000e+00, %217
%219 = load double, double* %21
%220 = fmul double %218, %219
%221 = load double, double* %36
%222 = call double @llvm.fmuladd.f64(double %220, double %221, double %216)
store double %222, double* %39
%223 = load double, double* %13
%224 = load double, double* %32
%225 = load double, double* %21
%226 = fmul double %224, %225
%227 = load double, double* %34
%228 = load double, double* %35
%229 = fmul double 2.000000e+00, %228
%230 = load double, double* %21
%231 = fmul double %229, %230
%232 = load double, double* %36
%233 = fmul double %231, %232
%234 = call double @llvm.fmuladd.f64(double %226, double %227, double %233)
%235 = load double, double* %37
%236 = load double, double* %26
%237 = load double, double* %29
%238 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %236, double %237)
%239 = call double @llvm.fmuladd.f64(double %235, double %238, double %234)
%240 = load double*, double** %7
%241 = getelementptr inbounds double, double* %240, i64 4
%242 = load double, double* %241
%243 = load double, double* %39
%244 = fmul double %242, %243
%245 = call double @llvm.fmuladd.f64(double %223, double %239, double %244)
%246 = load double*, double** %7
%247 = getelementptr inbounds double, double* %246, i64 1
%248 = load double, double* %247
%249 = fadd double %245, %248
%250 = load double*, double** %12
%251 = getelementptr inbounds double, double* %250, i64 0
store double %249, double* %251
%252 = load double, double* %13
%253 = load double*, double** %7
%254 = getelementptr inbounds double, double* %253, i64 3
%255 = load double, double* %254
%256 = fmul double %252, %255
%257 = load double, double* %39
%258 = load double*, double** %7
%259 = getelementptr inbounds double, double* %258, i64 2
%260 = load double, double* %259
%261 = call double @llvm.fmuladd.f64(double %256, double %257, double %260)
%262 = load double*, double** %12
%263 = getelementptr inbounds double, double* %262, i64 1
store double %261, double* %263
ret void
}

LLVM IR (-O2):
define void @calcDistImgProjFullR(double* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture writeonly %5) {
%7 = load double, double* %0
%8 = getelementptr inbounds double, double* %2, i64 1
%9 = load double, double* %8
%10 = load double, double* %4
%11 = getelementptr inbounds double, double* %2, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %4, i64 1
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 3
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %4, i64 2
%18 = load double, double* %17
%19 = fneg double %10
%20 = fneg double %14
%21 = fmul double %12, %20
%22 = tail call double @llvm.fmuladd.f64(double %19, double %9, double %21)
%23 = fneg double %18
%24 = tail call double @llvm.fmuladd.f64(double %23, double %16, double %22)
%25 = load double, double* %2
%26 = fmul double %12, %18
%27 = tail call double @llvm.fmuladd.f64(double %25, double %10, double %26)
%28 = tail call double @llvm.fmuladd.f64(double %20, double %16, double %27)
%29 = fmul double %10, %16
%30 = tail call double @llvm.fmuladd.f64(double %14, double %25, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %23, double %9, double %30)
%32 = fmul double %9, %14
%33 = tail call double @llvm.fmuladd.f64(double %25, double %18, double %32)
%34 = fneg double %12
%35 = tail call double @llvm.fmuladd.f64(double %34, double %10, double %33)
%36 = fneg double %9
%37 = fmul double %25, %28
%38 = tail call double @llvm.fmuladd.f64(double %36, double %24, double %37)
%39 = fneg double %16
%40 = tail call double @llvm.fmuladd.f64(double %39, double %31, double %38)
%41 = tail call double @llvm.fmuladd.f64(double %35, double %12, double %40)
%42 = load double, double* %3
%43 = fadd double %42, %41
%44 = fmul double %43, %43
%45 = fmul double %25, %35
%46 = tail call double @llvm.fmuladd.f64(double %39, double %24, double %45)
%47 = tail call double @llvm.fmuladd.f64(double %34, double %28, double %46)
%48 = tail call double @llvm.fmuladd.f64(double %9, double %31, double %47)
%49 = getelementptr inbounds double, double* %3, i64 2
%50 = load double, double* %49
%51 = fadd double %50, %48
%52 = fmul double %51, %51
%53 = fdiv double 1.000000e+00, %52
%54 = fmul double %44, %53
%55 = fmul double %25, %31
%56 = tail call double @llvm.fmuladd.f64(double %34, double %24, double %55)
%57 = fneg double %35
%58 = tail call double @llvm.fmuladd.f64(double %57, double %9, double %56)
%59 = tail call double @llvm.fmuladd.f64(double %28, double %16, double %58)
%60 = getelementptr inbounds double, double* %3, i64 1
%61 = load double, double* %60
%62 = fadd double %61, %59
%63 = fmul double %62, %62
%64 = fmul double %63, %53
%65 = fadd double %54, %64
%66 = load double, double* %1
%67 = getelementptr inbounds double, double* %1, i64 1
%68 = load double, double* %67
%69 = getelementptr inbounds double, double* %1, i64 4
%70 = load double, double* %69
%71 = tail call double @llvm.fmuladd.f64(double %65, double %70, double %68)
%72 = tail call double @llvm.fmuladd.f64(double %65, double %71, double %66)
%73 = tail call double @llvm.fmuladd.f64(double %65, double %72, double 1.000000e+00)
%74 = fdiv double 1.000000e+00, %51
%75 = getelementptr inbounds double, double* %1, i64 2
%76 = load double, double* %75
%77 = fmul double %62, %53
%78 = getelementptr inbounds double, double* %1, i64 3
%79 = load double, double* %78
%80 = fmul double %62, %73
%81 = tail call double @llvm.fmuladd.f64(double %64, double 3.000000e+00, double %54)
%82 = fmul double %76, %81
%83 = tail call double @llvm.fmuladd.f64(double %80, double %74, double %82)
%84 = fmul double %79, 2.000000e+00
%85 = fmul double %43, %84
%86 = tail call double @llvm.fmuladd.f64(double %85, double %77, double %83)
%87 = fmul double %43, %73
%88 = fmul double %76, 2.000000e+00
%89 = fmul double %43, %88
%90 = fmul double %89, %77
%91 = tail call double @llvm.fmuladd.f64(double %87, double %74, double %90)
%92 = tail call double @llvm.fmuladd.f64(double %54, double 3.000000e+00, double %64)
%93 = tail call double @llvm.fmuladd.f64(double %79, double %92, double %91)
%94 = getelementptr inbounds double, double* %0, i64 4
%95 = load double, double* %94
%96 = fmul double %95, %86
%97 = tail call double @llvm.fmuladd.f64(double %7, double %93, double %96)
%98 = getelementptr inbounds double, double* %0, i64 1
%99 = load double, double* %98
%100 = fadd double %99, %97
store double %100, double* %5
%101 = getelementptr inbounds double, double* %0, i64 3
%102 = load double, double* %101
%103 = fmul double %7, %102
%104 = getelementptr inbounds double, double* %0, i64 2
%105 = load double, double* %104
%106 = tail call double @llvm.fmuladd.f64(double %103, double %86, double %105)
%107 = getelementptr inbounds double, double* %5, i64 1
store double %106, double* %107
ret void
}