void ERI_Coordinate_Transform(double out_R[3], double out_a1[3],
                              double out_a2[3], double out_a3[3],
                              double out_a4[3], const double in_a1[3],
                              const double in_a2[3], const double in_a3[3],
                              const double in_a4[3], double x12, double x34) {
  double c12[3], c34[3];
  double a1[3], a2[3], a3[3], a4[3];
  c12[0] = x12 * in_a1[0] + (1.0 - x12) * in_a2[0];
  c12[1] = x12 * in_a1[1] + (1.0 - x12) * in_a2[1];
  c12[2] = x12 * in_a1[2] + (1.0 - x12) * in_a2[2];
  c34[0] = x34 * in_a3[0] + (1.0 - x34) * in_a4[0];
  c34[1] = x34 * in_a3[1] + (1.0 - x34) * in_a4[1];
  c34[2] = x34 * in_a3[2] + (1.0 - x34) * in_a4[2];
  a1[0] = in_a1[0] - c12[0];
  a1[1] = in_a1[1] - c12[1];
  a1[2] = in_a1[2] - c12[2];
  a2[0] = in_a2[0] - c12[0];
  a2[1] = in_a2[1] - c12[1];
  a2[2] = in_a2[2] - c12[2];
  a3[0] = in_a3[0] - c34[0];
  a3[1] = in_a3[1] - c34[1];
  a3[2] = in_a3[2] - c34[2];
  a4[0] = in_a4[0] - c34[0];
  a4[1] = in_a4[1] - c34[1];
  a4[2] = in_a4[2] - c34[2];
  coord_spherical(a1[0], a1[1], a1[2], &out_a1[0], &out_a1[1], &out_a1[2]);
  coord_spherical(a2[0], a2[1], a2[2], &out_a2[0], &out_a2[1], &out_a2[2]);
  coord_spherical(a3[0], a3[1], a3[2], &out_a3[0], &out_a3[1], &out_a3[2]);
  coord_spherical(a4[0], a4[1], a4[2], &out_a4[0], &out_a4[1], &out_a4[2]);
  coord_spherical(c34[0] - c12[0], c34[1] - c12[1], c34[2] - c12[2], &out_R[0],
                  &out_R[1], &out_R[2]);
}


x86 assembly (clang, -O0):
<ERI_Coordinate_Transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
movsd  0xea2(%rip),%xmm1
subsd  -0x38(%rbp),%xmm1
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm2
movsd  0xe72(%rip),%xmm1
subsd  -0x38(%rbp),%xmm1
mov    0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
movsd  0xe41(%rip),%xmm1
subsd  -0x38(%rbp),%xmm1
mov    0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm2
movsd  0xe11(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
mov    0x20(%rbp),%rax
mulsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
movsd  0xde1(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
mov    0x20(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
movsd  0xdb0(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
mov    0x20(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    -0x10(%rbp),%rdx
add    $0x10,%rdx
mov    $0x3,%al
call   1030 <coord_spherical@plt>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
add    $0x10,%rdx
mov    $0x3,%al
call   1030 <coord_spherical@plt>
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm2
ff
mov    -0x20(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x8,%rsi
mov    -0x20(%rbp),%rdx
add    $0x10,%rdx
mov    $0x3,%al
call   1030 <coord_spherical@plt>
movsd  -0x100(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm2
ff
mov    -0x28(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0x8,%rsi
mov    -0x28(%rbp),%rdx
add    $0x10,%rdx
mov    $0x3,%al
call   1030 <coord_spherical@plt>
movsd  -0x80(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
subsd  -0x50(%rbp),%xmm2
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
mov    -0x8(%rbp),%rdx
add    $0x10,%rdx
mov    $0x3,%al
call   1030 <coord_spherical@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERI_Coordinate_Transform>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xf8,%rsp
movapd %xmm1,%xmm13
movapd %xmm0,%xmm2
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %rsi,%rax
mov    %rdi,%r14
mov    0x128(%rsp),%rcx
mov    0x130(%rsp),%rdx
mov    0x120(%rsp),%rsi
movsd  (%r9),%xmm0
movsd  0x8(%r9),%xmm12
movsd  (%rsi),%xmm7
movsd  0x8(%rsi),%xmm10
unpcklpd %xmm2,%xmm13
movapd 0xe8f(%rip),%xmm14
subpd  %xmm13,%xmm14
movsd  0x10(%r9),%xmm8
movsd  0x10(%rsi),%xmm3
movsd  (%rdx),%xmm5
movapd %xmm5,(%rsp)
movsd  0x8(%rdx),%xmm9
unpcklpd %xmm7,%xmm5
movapd %xmm7,%xmm2
mulpd  %xmm14,%xmm5
movsd  (%rcx),%xmm7
movsd  0x8(%rcx),%xmm4
movapd %xmm4,0x10(%rsp)
movapd %xmm7,%xmm6
movapd %xmm7,%xmm15
unpcklpd %xmm0,%xmm6
mulpd  %xmm13,%xmm6
addpd  %xmm5,%xmm6
movapd %xmm9,%xmm5
unpcklpd %xmm10,%xmm5
mulpd  %xmm14,%xmm5
movapd %xmm4,%xmm7
unpcklpd %xmm12,%xmm7
mulpd  %xmm13,%xmm7
addpd  %xmm5,%xmm7
movsd  0x10(%rdx),%xmm11
movapd %xmm11,%xmm5
unpcklpd %xmm3,%xmm5
mulpd  %xmm14,%xmm5
movsd  0x10(%rcx),%xmm14
movapd %xmm14,%xmm1
unpcklpd %xmm8,%xmm1
mulpd  %xmm13,%xmm1
addpd  %xmm5,%xmm1
movapd %xmm6,0xa0(%rsp)
movapd %xmm6,%xmm5
unpckhpd %xmm6,%xmm5
subsd  %xmm5,%xmm0
movapd %xmm5,%xmm13
movapd %xmm5,0xe0(%rsp)
movapd %xmm7,0x90(%rsp)
movapd %xmm7,%xmm5
unpckhpd %xmm7,%xmm5
subsd  %xmm5,%xmm12
movapd %xmm5,%xmm4
movapd %xmm5,0xc0(%rsp)
movapd %xmm1,%xmm5
unpckhpd %xmm1,%xmm5
movapd %xmm5,0xd0(%rsp)
subsd  %xmm5,%xmm8
subsd  %xmm13,%xmm2
movapd %xmm2,0x40(%rsp)
subsd  %xmm4,%xmm10
movapd %xmm10,0x30(%rsp)
subsd  %xmm5,%xmm3
movapd %xmm3,0x20(%rsp)
subsd  %xmm6,%xmm15
movapd %xmm15,0x60(%rsp)
movapd 0x10(%rsp),%xmm3
subsd  %xmm7,%xmm3
movapd %xmm3,0x10(%rsp)
movapd %xmm1,%xmm3
movapd %xmm1,0xb0(%rsp)
subsd  %xmm1,%xmm14
movapd %xmm14,0x50(%rsp)
movapd (%rsp),%xmm1
subsd  %xmm6,%xmm1
movapd %xmm1,(%rsp)
subsd  %xmm7,%xmm9
movapd %xmm9,0x80(%rsp)
subsd  %xmm3,%xmm11
movapd %xmm11,0x70(%rsp)
lea    0x8(%rax),%rsi
lea    0x10(%rax),%rdx
movapd %xmm12,%xmm1
movapd %xmm8,%xmm2
mov    %rax,%rdi
mov    $0x3,%al
call   1030 <coord_spherical@plt>
lea    0x8(%rbx),%rsi
lea    0x10(%rbx),%rdx
movaps 0x40(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
mov    %rbx,%rdi
mov    $0x3,%al
call   1030 <coord_spherical@plt>
lea    0x8(%r12),%rsi
lea    0x10(%r12),%rdx
movaps 0x60(%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x50(%rsp),%xmm2
mov    %r12,%rdi
mov    $0x3,%al
call   1030 <coord_spherical@plt>
lea    0x8(%r15),%rsi
lea    0x10(%r15),%rdx
movaps (%rsp),%xmm0
movaps 0x80(%rsp),%xmm1
movaps 0x70(%rsp),%xmm2
mov    %r15,%rdi
mov    $0x3,%al
call   1030 <coord_spherical@plt>
movapd 0xa0(%rsp),%xmm0
subsd  0xe0(%rsp),%xmm0
movapd 0x90(%rsp),%xmm1
subsd  0xc0(%rsp),%xmm1
movapd 0xb0(%rsp),%xmm2
subsd  0xd0(%rsp),%xmm2
lea    0x8(%r14),%rsi
lea    0x10(%r14),%rdx
mov    %r14,%rdi
mov    $0x3,%al
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <coord_spherical@plt>

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

LLVM IR (-O2):
define void @ERI_Coordinate_Transform(double* %0, double* %1, double* %2, double* %3, double* %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double %9, double %10) {
%12 = load double, double* %5
%13 = load double, double* %6
%14 = getelementptr inbounds double, double* %5, i64 1
%15 = load double, double* %14
%16 = getelementptr inbounds double, double* %6, i64 1
%17 = load double, double* %16
%18 = insertelement <2 x double> poison, double %10, i64 0
%19 = insertelement <2 x double> %18, double %9, i64 1
%20 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %19
%21 = getelementptr inbounds double, double* %5, i64 2
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %6, i64 2
%24 = load double, double* %23
%25 = load double, double* %7
%26 = load double, double* %8
%27 = insertelement <2 x double> poison, double %26, i64 0
%28 = insertelement <2 x double> %27, double %13, i64 1
%29 = fmul <2 x double> %20, %28
%30 = insertelement <2 x double> poison, double %25, i64 0
%31 = insertelement <2 x double> %30, double %12, i64 1
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %31, <2 x double> %29)
%33 = getelementptr inbounds double, double* %7, i64 1
%34 = load double, double* %33
%35 = getelementptr inbounds double, double* %8, i64 1
%36 = load double, double* %35
%37 = insertelement <2 x double> poison, double %36, i64 0
%38 = insertelement <2 x double> %37, double %17, i64 1
%39 = fmul <2 x double> %20, %38
%40 = insertelement <2 x double> poison, double %34, i64 0
%41 = insertelement <2 x double> %40, double %15, i64 1
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %41, <2 x double> %39)
%43 = getelementptr inbounds double, double* %7, i64 2
%44 = load double, double* %43
%45 = getelementptr inbounds double, double* %8, i64 2
%46 = load double, double* %45
%47 = insertelement <2 x double> poison, double %46, i64 0
%48 = insertelement <2 x double> %47, double %24, i64 1
%49 = fmul <2 x double> %20, %48
%50 = insertelement <2 x double> poison, double %44, i64 0
%51 = insertelement <2 x double> %50, double %22, i64 1
%52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %51, <2 x double> %49)
%53 = extractelement <2 x double> %32, i64 1
%54 = fsub double %12, %53
%55 = extractelement <2 x double> %42, i64 1
%56 = fsub double %15, %55
%57 = extractelement <2 x double> %52, i64 1
%58 = fsub double %22, %57
%59 = fsub double %13, %53
%60 = fsub double %17, %55
%61 = fsub double %24, %57
%62 = extractelement <2 x double> %32, i64 0
%63 = fsub double %25, %62
%64 = extractelement <2 x double> %42, i64 0
%65 = fsub double %34, %64
%66 = extractelement <2 x double> %52, i64 0
%67 = fsub double %44, %66
%68 = fsub double %26, %62
%69 = fsub double %36, %64
%70 = fsub double %46, %66
%71 = getelementptr inbounds double, double* %1, i64 1
%72 = getelementptr inbounds double, double* %1, i64 2
%73 = tail call i32 (double, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @coord_spherical to i32 (double, double, double, double*, double*, double*, ...)*)(double %54, double %56, double %58, double* %1, double* %71, double* %72)
%74 = getelementptr inbounds double, double* %2, i64 1
%75 = getelementptr inbounds double, double* %2, i64 2
%76 = tail call i32 (double, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @coord_spherical to i32 (double, double, double, double*, double*, double*, ...)*)(double %59, double %60, double %61, double* %2, double* %74, double* %75)
%77 = getelementptr inbounds double, double* %3, i64 1
%78 = getelementptr inbounds double, double* %3, i64 2
%79 = tail call i32 (double, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @coord_spherical to i32 (double, double, double, double*, double*, double*, ...)*)(double %63, double %65, double %67, double* %3, double* %77, double* %78)
%80 = getelementptr inbounds double, double* %4, i64 1
%81 = getelementptr inbounds double, double* %4, i64 2
%82 = tail call i32 (double, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @coord_spherical to i32 (double, double, double, double*, double*, double*, ...)*)(double %68, double %69, double %70, double* %4, double* %80, double* %81)
%83 = fsub double %62, %53
%84 = fsub double %64, %55
%85 = fsub double %66, %57
%86 = getelementptr inbounds double, double* %0, i64 1
%87 = getelementptr inbounds double, double* %0, i64 2
%88 = tail call i32 (double, double, double, double*, double*, double*, ...) bitcast (i32 (...)* @coord_spherical to i32 (double, double, double, double*, double*, double*, ...)*)(double %83, double %84, double %85, double* %0, double* %86, double* %87)
ret void
}