#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(double *);
double log(double);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ twobody_XC(int, double, double *);
void twobody_XC_lub(int n, double l, double s, double *XC11, double *XC12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_XC_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_XC(n, l, f);
  *XC11 = 0.0;
  *XC12 = 0.0;
  double l1 = 1.0 + l;
  double s1, s2, s3, s4, s5, ls1, ls2;
  s1 = 1.0 - 4.0 / s / s;
  s2 = (s + 2.0) / (s - 2.0);
  s3 = s * s;
  s4 = 1.0 / s3;
  s5 = s * s / 4.0 - 1.0;
  ls1 = log(s1);
  ls2 = log(s2);
  *XC11 = l * l / l1 * (0.5 * ls1 + ls2 / s) + 1.0;
  *XC12 = -l * l / l1 * (0.5 * ls2 + (ls1 - 2.0) / s);
  double s1l = s * (1.0 + l);
  double s1lm = s1l * s1l;
  double s21 = 2.0 / s;
  double s2m = s21 * s21;
  double a;
  int m;
  for (m = 2; m < n; m++) {
    if (m % 2 == 0) {
      a = -l * l / l1 / (double)(m * (m - 1));
      *XC11 += f[m] / s1lm + a * s2m;
    } else {
      a = -l * l / l1 / (double)(m * (m - 1));
      *XC12 += f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *XC12 *= -8.0 / l1 / l1 / l1;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_XC_lub>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     119d <twobody_XC_lub+0x3d>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11de <twobody_XC_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xe59(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rsi
call   1040 <twobody_XC@plt>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  0xdfb(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xdf9(%rip),%xmm1
divsd  -0x18(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xdd7(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xdbe(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdac(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd90(%rip),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xd84(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd68(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  0xd23(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd07(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  0xcbb(%rip),%xmm3
subsd  %xmm3,%xmm2
divsd  -0x18(%rbp),%xmm2
movsd  0xcba(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  0xc91(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xc64(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x2,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1533 <twobody_XC_lub+0x3d3>
mov    -0x9c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1477 <twobody_XC_lub+0x317>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x9c(%rbp),%eax
mov    -0x9c(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    14f8 <twobody_XC_lub+0x398>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x9c(%rbp),%eax
mov    -0x9c(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    13cb <twobody_XC_lub+0x26b>
movsd  0xae5(%rip),%xmm0
divsd  -0x38(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twobody_XC_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
movsd  %xmm1,0x8(%rsp)
movaps %xmm0,0x10(%rsp)
mov    %edi,%r12d
lea    0x0(,%r12,8),%edi
or     $0x8,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1360 <twobody_XC_lub+0x200>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movaps 0x10(%rsp),%xmm0
mov    %rax,%rsi
call   1040 <twobody_XC@plt>
movsd  0xe49(%rip),%xmm1
movapd 0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
movsd  0xe39(%rip),%xmm0
movsd  0x8(%rsp),%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm3
addsd  0xe23(%rip),%xmm3
movapd %xmm2,%xmm1
addsd  0xe1f(%rip),%xmm1
divsd  %xmm1,%xmm3
movsd  %xmm3,0x20(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x20(%rsp),%xmm0
call   1070 <log@plt>
movapd 0x30(%rsp),%xmm6
movapd 0x10(%rsp),%xmm5
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
divsd  %xmm6,%xmm1
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm7
divsd  %xmm7,%xmm2
movsd  0xdd8(%rip),%xmm8
movsd  0x28(%rsp),%xmm3
movapd %xmm3,%xmm4
mulsd  %xmm8,%xmm4
addsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm4
addsd  0xd99(%rip),%xmm4
movsd  %xmm4,(%r15)
movapd 0xdbc(%rip),%xmm1
movapd %xmm5,%xmm2
xorpd  %xmm5,%xmm1
mulsd  %xmm5,%xmm1
divsd  %xmm6,%xmm1
movapd %xmm3,%xmm2
addsd  0xd88(%rip),%xmm2
divsd  %xmm7,%xmm2
mulsd  %xmm8,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
cmp    $0x3,%r12d
jl     1330 <twobody_XC_lub+0x1d0>
movapd %xmm6,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xd4a(%rip),%xmm7
divsd  %xmm2,%xmm7
mov    %r12d,%eax
mov    $0x2,%ecx
mov    $0x1,%edx
movapd %xmm0,%xmm2
movapd %xmm7,%xmm3
nop
mulsd  %xmm7,%xmm3
mulsd  %xmm0,%xmm2
mov    %edx,%esi
imul   %ecx,%esi
test   $0x1,%cl
xorps  %xmm4,%xmm4
cvtsi2sd %esi,%xmm4
movapd %xmm1,%xmm5
divsd  %xmm4,%xmm5
movsd  (%rbx,%rcx,8),%xmm4
divsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm5
addsd  %xmm4,%xmm5
mov    %r14,%rsi
cmove  %r15,%rsi
addsd  (%rsi),%xmm5
movsd  %xmm5,(%rsi)
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
jne    12e0 <twobody_XC_lub+0x180>
movsd  (%r14),%xmm0
movsd  0xcf0(%rip),%xmm1
divsd  %xmm6,%xmm1
divsd  %xmm6,%xmm1
divsd  %xmm6,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
mov    %rbx,%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
lea    0xcd0(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"twobody_XC_lub : malloc error for f\0A\00"
define void @twobody_XC_lub(i32 %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca i32
%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 i32
store i32 %0, i32* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%26 = load i32, i32* %6
%27 = srem i32 %26, 2
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %5
%30 = load i32, i32* %6
%31 = add nsw i32 %30, -1
store i32 %31, i32* %6
br label %32
32: ; preds = %29, %5
%33 = load i32, i32* %6
%34 = add nsw i32 %33, 1
%35 = sext i32 %34 to i64
%36 = mul i64 8, %35
%37 = trunc i64 %36 to i32
%38 = call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to double*
store double* %39, double** %11
%40 = load double*, double** %11
%41 = icmp eq double* %40, null
br i1 %41, label %42, label %46
42: ; preds = %32
%43 = load i32, i32* @stderr
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%45 = call i32 @exit(i32 1)
unreachable
46: ; preds = %32
%47 = load i32, i32* %6
%48 = load double, double* %7
%49 = load double*, double** %11
%50 = call i32 @twobody_XC(i32 %47, double %48, double* %49)
%51 = load double*, double** %9
store double 0.000000e+00, double* %51
%52 = load double*, double** %10
store double 0.000000e+00, double* %52
%53 = load double, double* %7
%54 = fadd double 1.000000e+00, %53
store double %54, double* %12
%55 = load double, double* %8
%56 = fdiv double 4.000000e+00, %55
%57 = load double, double* %8
%58 = fdiv double %56, %57
%59 = fsub double 1.000000e+00, %58
store double %59, double* %13
%60 = load double, double* %8
%61 = fadd double %60, 2.000000e+00
%62 = load double, double* %8
%63 = fsub double %62, 2.000000e+00
%64 = fdiv double %61, %63
store double %64, double* %14
%65 = load double, double* %8
%66 = load double, double* %8
%67 = fmul double %65, %66
store double %67, double* %15
%68 = load double, double* %15
%69 = fdiv double 1.000000e+00, %68
store double %69, double* %16
%70 = load double, double* %8
%71 = load double, double* %8
%72 = fmul double %70, %71
%73 = fdiv double %72, 4.000000e+00
%74 = fsub double %73, 1.000000e+00
store double %74, double* %17
%75 = load double, double* %13
%76 = call double @log(double %75)
store double %76, double* %18
%77 = load double, double* %14
%78 = call double @log(double %77)
store double %78, double* %19
%79 = load double, double* %7
%80 = load double, double* %7
%81 = fmul double %79, %80
%82 = load double, double* %12
%83 = fdiv double %81, %82
%84 = load double, double* %18
%85 = load double, double* %19
%86 = load double, double* %8
%87 = fdiv double %85, %86
%88 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %84, double %87)
%89 = call double @llvm.fmuladd.f64(double %83, double %88, double 1.000000e+00)
%90 = load double*, double** %9
store double %89, double* %90
%91 = load double, double* %7
%92 = fneg double %91
%93 = load double, double* %7
%94 = fmul double %92, %93
%95 = load double, double* %12
%96 = fdiv double %94, %95
%97 = load double, double* %19
%98 = load double, double* %18
%99 = fsub double %98, 2.000000e+00
%100 = load double, double* %8
%101 = fdiv double %99, %100
%102 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %97, double %101)
%103 = fmul double %96, %102
%104 = load double*, double** %10
store double %103, double* %104
%105 = load double, double* %8
%106 = load double, double* %7
%107 = fadd double 1.000000e+00, %106
%108 = fmul double %105, %107
store double %108, double* %20
%109 = load double, double* %20
%110 = load double, double* %20
%111 = fmul double %109, %110
store double %111, double* %21
%112 = load double, double* %8
%113 = fdiv double 2.000000e+00, %112
store double %113, double* %22
%114 = load double, double* %22
%115 = load double, double* %22
%116 = fmul double %114, %115
store double %116, double* %23
store i32 2, i32* %25
br label %117
117: ; preds = %184, %46
%118 = load i32, i32* %25
%119 = load i32, i32* %6
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %187
121: ; preds = %117
%122 = load i32, i32* %25
%123 = srem i32 %122, 2
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %151
125: ; preds = %121
%126 = load double, double* %7
%127 = fneg double %126
%128 = load double, double* %7
%129 = fmul double %127, %128
%130 = load double, double* %12
%131 = fdiv double %129, %130
%132 = load i32, i32* %25
%133 = load i32, i32* %25
%134 = sub nsw i32 %133, 1
%135 = mul nsw i32 %132, %134
%136 = sitofp i32 %135 to double
%137 = fdiv double %131, %136
store double %137, double* %24
%138 = load double*, double** %11
%139 = load i32, i32* %25
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %138, i64 %140
%142 = load double, double* %141
%143 = load double, double* %21
%144 = fdiv double %142, %143
%145 = load double, double* %24
%146 = load double, double* %23
%147 = call double @llvm.fmuladd.f64(double %145, double %146, double %144)
%148 = load double*, double** %9
%149 = load double, double* %148
%150 = fadd double %149, %147
store double %150, double* %148
br label %177
151: ; preds = %121
%152 = load double, double* %7
%153 = fneg double %152
%154 = load double, double* %7
%155 = fmul double %153, %154
%156 = load double, double* %12
%157 = fdiv double %155, %156
%158 = load i32, i32* %25
%159 = load i32, i32* %25
%160 = sub nsw i32 %159, 1
%161 = mul nsw i32 %158, %160
%162 = sitofp i32 %161 to double
%163 = fdiv double %157, %162
store double %163, double* %24
%164 = load double*, double** %11
%165 = load i32, i32* %25
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %164, i64 %166
%168 = load double, double* %167
%169 = load double, double* %21
%170 = fdiv double %168, %169
%171 = load double, double* %24
%172 = load double, double* %23
%173 = call double @llvm.fmuladd.f64(double %171, double %172, double %170)
%174 = load double*, double** %10
%175 = load double, double* %174
%176 = fadd double %175, %173
store double %176, double* %174
br label %177
177: ; preds = %151, %125
%178 = load double, double* %20
%179 = load double, double* %21
%180 = fmul double %179, %178
store double %180, double* %21
%181 = load double, double* %22
%182 = load double, double* %23
%183 = fmul double %182, %181
store double %183, double* %23
br label %184
184: ; preds = %177
%185 = load i32, i32* %25
%186 = add nsw i32 %185, 1
store i32 %186, i32* %25
br label %117
187: ; preds = %117
%188 = load double, double* %12
%189 = fdiv double -8.000000e+00, %188
%190 = load double, double* %12
%191 = fdiv double %189, %190
%192 = load double, double* %12
%193 = fdiv double %191, %192
%194 = load double*, double** %10
%195 = load double, double* %194
%196 = fmul double %195, %193
store double %196, double* %194
%197 = load double*, double** %11
%198 = call i32 @free(double* %197)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"twobody_XC_lub : malloc error for f\0A\00"
define void @twobody_XC_lub(i32 %0, double %1, double %2, double* nocapture %3, double* nocapture %4) {
%6 = and i32 %0, -2
%7 = shl i32 %0, 3
%8 = or i32 %7, 8
%9 = tail call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to double*
%11 = icmp eq i64 %9, 0
br i1 %11, label %12, label %16
12: ; preds = %5
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %5
%17 = tail call i32 @twobody_XC(i32 %6, double %1, double* %10)
%18 = fadd double %1, 1.000000e+00
%19 = fdiv double 4.000000e+00, %2
%20 = fdiv double %19, %2
%21 = fsub double 1.000000e+00, %20
%22 = fadd double %2, 2.000000e+00
%23 = fadd double %2, -2.000000e+00
%24 = fdiv double %22, %23
%25 = tail call double @log(double %21)
%26 = tail call double @log(double %24)
%27 = fmul double %1, %1
%28 = fdiv double %27, %18
%29 = fdiv double %26, %2
%30 = tail call double @llvm.fmuladd.f64(double %25, double 5.000000e-01, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %28, double %30, double 1.000000e+00)
store double %31, double* %3
%32 = fneg double %1
%33 = fmul double %32, %1
%34 = fdiv double %33, %18
%35 = fadd double %25, -2.000000e+00
%36 = fdiv double %35, %2
%37 = tail call double @llvm.fmuladd.f64(double %26, double 5.000000e-01, double %36)
%38 = fmul double %34, %37
store double %38, double* %4
%39 = fmul double %18, %2
%40 = fdiv double 2.000000e+00, %2
%41 = icmp sgt i32 %6, 2
br i1 %41, label %42, label %68
42: ; preds = %16
%43 = zext i32 %6 to i64
br label %44
44: ; preds = %42, %44
%45 = phi i64 [ 2, %42 ], [ %64, %44 ]
%46 = phi double [ %39, %42 ], [ %50, %44 ]
%47 = phi double [ %40, %42 ], [ %49, %44 ]
%48 = trunc i64 %45 to i32
%49 = fmul double %40, %47
%50 = fmul double %39, %46
%51 = and i32 %48, 1
%52 = icmp eq i32 %51, 0
%53 = add nsw i32 %48, -1
%54 = mul nsw i32 %53, %48
%55 = sitofp i32 %54 to double
%56 = fdiv double %34, %55
%57 = getelementptr inbounds double, double* %10, i64 %45
%58 = load double, double* %57
%59 = fdiv double %58, %50
%60 = tail call double @llvm.fmuladd.f64(double %56, double %49, double %59)
%61 = select i1 %52, double* %3, double* %4
%62 = load double, double* %61
%63 = fadd double %62, %60
store double %63, double* %61
%64 = add nuw nsw i64 %45, 1
%65 = icmp eq i64 %64, %43
br i1 %65, label %66, label %44
66: ; preds = %44
%67 = load double, double* %4
br label %68
68: ; preds = %66, %16
%69 = phi double [ %67, %66 ], [ %38, %16 ]
%70 = fdiv double -8.000000e+00, %18
%71 = fdiv double %70, %18
%72 = fdiv double %71, %18
%73 = fmul double %72, %69
store double %73, double* %4
%74 = tail call i32 @free(double* %10)
ret void
}