#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_YG(int, double, double *);
void twobody_YG_lub(int n, double l, double s, double *YG11, double *YG12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_YG_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_YG(n, l, f);
  *YG11 = 0.0;
  *YG12 = 0.0;
  double l1 = 1.0 + l;
  double l13 = l1 * l1 * l1;
  double g2, g3;
  g2 = 0.1 * l * (4.0 + l * (-1.0 + 7.0 * l)) / l13;
  g3 = (32.0 + l * (-179.0 + l * (532.0 + l * (-356.0 + 221.0 * l)))) / 500.0 /
       l13;
  double s1, s2, s3, s4, s5;
  double ls2, ls5;
  s1 = 2.0 * s / (s * s - 4.0);
  s2 = (s + 2.0) / (s - 2.0);
  s3 = (s * s - 4.0) / 4.0;
  s4 = 4.0 / (s * s - 4.0);
  s5 = s * s / (s * s - 4.0);
  ls2 = log(s2);
  ls5 = log(s5);
  *YG11 = (g2 + g3 * s3) * ls2 - g3 * s;
  *YG12 = -(g2 + g3 * s3) * ls5 + g3;
  double s1l = s * (1.0 + l);
  double s1lm = s1l;
  double s21 = 2.0 / s;
  double s2m = s21;
  double a;
  int m;
  for (m = 1; m < n; m++) {
    if (m % 2 == 0) {
      a = -2.0 * g2 / (double)m + 4.0 * g3 / (double)(m * (m + 2));
      *YG12 -= f[m] / s1lm + a * s2m;
    } else {
      a = -2.0 * g2 / (double)m + 4.0 * g3 / (double)(m * (m + 2));
      *YG11 += f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *YG12 *= 4.0 / l1 / l1;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_YG_lub>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%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_YG_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_YG_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%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_YG@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  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe2d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xe06(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe02(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdb2(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  0xdac(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xda8(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd88(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd70(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd58(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd44(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd0e(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd03(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xcde(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xccc(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcb9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xcb5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xc8e(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xc8a(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc59(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  0xb7e(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xb4d(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x1,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    165d <twobody_YG_lub+0x4fd>
mov    -0xb4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1591 <twobody_YG_lub+0x431>
movsd  0xb60(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0xb4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0xaf7(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
mov    -0xb4(%rbp),%eax
mov    -0xb4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x98(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    1619 <twobody_YG_lub+0x4b9>
movsd  0xacf(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0xb4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0xa66(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
mov    -0xb4(%rbp),%eax
mov    -0xb4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0x98(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    14da <twobody_YG_lub+0x37a>
movsd  0x9b3(%rip),%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    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twobody_YG_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %edi,%r12d
lea    0x0(,%r12,8),%edi
or     $0x8,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     13ff <twobody_YG_lub+0x29f>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movsd  (%rsp),%xmm0
mov    %rax,%rsi
call   1040 <twobody_YG@plt>
movsd  0xe49(%rip),%xmm1
movsd  (%rsp),%xmm3
addsd  %xmm3,%xmm1
movsd  %xmm1,0x30(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe2e(%rip),%xmm1
mulsd  %xmm3,%xmm1
movsd  0xe2a(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe26(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe22(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  0xe1e(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  0xe1a(%rip),%xmm1
divsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rsp)
mulsd  %xmm3,%xmm1
addsd  0xe0c(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  0xe08(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  0xe04(%rip),%xmm1
divsd  0xe04(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xded(%rip),%xmm3
addsd  %xmm0,%xmm3
movapd %xmm0,%xmm4
movapd %xmm2,%xmm0
addsd  0xde1(%rip),%xmm0
movsd  0xde1(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm3,%xmm4
movsd  %xmm4,0x10(%rsp)
mulsd  0xdcf(%rip),%xmm3
movsd  %xmm3,0x18(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <log@plt>
movsd  (%rsp),%xmm6
movsd  0x28(%rsp),%xmm9
movsd  0x30(%rsp),%xmm8
movsd  0x18(%rsp),%xmm2
mulsd  %xmm6,%xmm2
addsd  %xmm9,%xmm2
movapd %xmm6,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0x20(%rsp),%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm1,%xmm3
movsd  %xmm3,(%r15)
mulsd  %xmm0,%xmm2
movapd %xmm6,%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
cmp    $0x2,%r12d
jl     13d1 <twobody_YG_lub+0x271>
movapd %xmm8,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd32(%rip),%xmm7
divsd  %xmm1,%xmm7
mulsd  0xce6(%rip),%xmm6
addsd  %xmm9,%xmm9
mov    %r12d,%eax
mov    $0x1,%ecx
mov    $0x3,%edx
movapd %xmm7,%xmm1
movapd %xmm0,%xmm2
jmp    137e <twobody_YG_lub+0x21e>
cs nopw 0x0(%rax,%rax,1)
addsd  (%r15),%xmm3
movsd  %xmm3,(%r15)
mulsd  %xmm0,%xmm2
mulsd  %xmm7,%xmm1
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
je     13cc <twobody_YG_lub+0x26c>
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
movapd %xmm9,%xmm4
mov    %edx,%esi
imul   %ecx,%esi
xorps  %xmm5,%xmm5
cvtsi2sd %esi,%xmm5
divsd  %xmm3,%xmm4
movapd %xmm6,%xmm3
divsd  %xmm5,%xmm3
subsd  %xmm4,%xmm3
movsd  (%rbx,%rcx,8),%xmm4
divsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm3
test   $0x1,%cl
jne    1360 <twobody_YG_lub+0x200>
movsd  (%r14),%xmm4
subsd  %xmm3,%xmm4
movsd  %xmm4,(%r14)
jmp    136a <twobody_YG_lub+0x20a>
movsd  (%r14),%xmm0
movsd  0xc47(%rip),%xmm1
divsd  %xmm8,%xmm1
divsd  %xmm8,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
mov    %rbx,%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2bda(%rip),%rax
mov    (%rax),%edi
lea    0xc69(%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_YG_lub : malloc error for f\0A\00"
define void @twobody_YG_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 double
%26 = alloca double
%27 = alloca double
%28 = 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
%29 = load i32, i32* %6
%30 = srem i32 %29, 2
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %5
%33 = load i32, i32* %6
%34 = add nsw i32 %33, -1
store i32 %34, i32* %6
br label %35
35: ; preds = %32, %5
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = mul i64 8, %38
%40 = trunc i64 %39 to i32
%41 = call i64 @malloc(i32 %40)
%42 = inttoptr i64 %41 to double*
store double* %42, double** %11
%43 = load double*, double** %11
%44 = icmp eq double* %43, null
br i1 %44, label %45, label %49
45: ; preds = %35
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %35
%50 = load i32, i32* %6
%51 = load double, double* %7
%52 = load double*, double** %11
%53 = call i32 @twobody_YG(i32 %50, double %51, double* %52)
%54 = load double*, double** %9
store double 0.000000e+00, double* %54
%55 = load double*, double** %10
store double 0.000000e+00, double* %55
%56 = load double, double* %7
%57 = fadd double 1.000000e+00, %56
store double %57, double* %12
%58 = load double, double* %12
%59 = load double, double* %12
%60 = fmul double %58, %59
%61 = load double, double* %12
%62 = fmul double %60, %61
store double %62, double* %13
%63 = load double, double* %7
%64 = fmul double 1.000000e-01, %63
%65 = load double, double* %7
%66 = load double, double* %7
%67 = call double @llvm.fmuladd.f64(double 7.000000e+00, double %66, double -1.000000e+00)
%68 = call double @llvm.fmuladd.f64(double %65, double %67, double 4.000000e+00)
%69 = fmul double %64, %68
%70 = load double, double* %13
%71 = fdiv double %69, %70
store double %71, double* %14
%72 = load double, double* %7
%73 = load double, double* %7
%74 = load double, double* %7
%75 = load double, double* %7
%76 = call double @llvm.fmuladd.f64(double 2.210000e+02, double %75, double -3.560000e+02)
%77 = call double @llvm.fmuladd.f64(double %74, double %76, double 5.320000e+02)
%78 = call double @llvm.fmuladd.f64(double %73, double %77, double -1.790000e+02)
%79 = call double @llvm.fmuladd.f64(double %72, double %78, double 3.200000e+01)
%80 = fdiv double %79, 5.000000e+02
%81 = load double, double* %13
%82 = fdiv double %80, %81
store double %82, double* %15
%83 = load double, double* %8
%84 = fmul double 2.000000e+00, %83
%85 = load double, double* %8
%86 = load double, double* %8
%87 = call double @llvm.fmuladd.f64(double %85, double %86, double -4.000000e+00)
%88 = fdiv double %84, %87
store double %88, double* %16
%89 = load double, double* %8
%90 = fadd double %89, 2.000000e+00
%91 = load double, double* %8
%92 = fsub double %91, 2.000000e+00
%93 = fdiv double %90, %92
store double %93, double* %17
%94 = load double, double* %8
%95 = load double, double* %8
%96 = call double @llvm.fmuladd.f64(double %94, double %95, double -4.000000e+00)
%97 = fdiv double %96, 4.000000e+00
store double %97, double* %18
%98 = load double, double* %8
%99 = load double, double* %8
%100 = call double @llvm.fmuladd.f64(double %98, double %99, double -4.000000e+00)
%101 = fdiv double 4.000000e+00, %100
store double %101, double* %19
%102 = load double, double* %8
%103 = load double, double* %8
%104 = fmul double %102, %103
%105 = load double, double* %8
%106 = load double, double* %8
%107 = call double @llvm.fmuladd.f64(double %105, double %106, double -4.000000e+00)
%108 = fdiv double %104, %107
store double %108, double* %20
%109 = load double, double* %17
%110 = call double @log(double %109)
store double %110, double* %21
%111 = load double, double* %20
%112 = call double @log(double %111)
store double %112, double* %22
%113 = load double, double* %14
%114 = load double, double* %15
%115 = load double, double* %18
%116 = call double @llvm.fmuladd.f64(double %114, double %115, double %113)
%117 = load double, double* %21
%118 = load double, double* %15
%119 = load double, double* %8
%120 = fmul double %118, %119
%121 = fneg double %120
%122 = call double @llvm.fmuladd.f64(double %116, double %117, double %121)
%123 = load double*, double** %9
store double %122, double* %123
%124 = load double, double* %14
%125 = load double, double* %15
%126 = load double, double* %18
%127 = call double @llvm.fmuladd.f64(double %125, double %126, double %124)
%128 = fneg double %127
%129 = load double, double* %22
%130 = load double, double* %15
%131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
%132 = load double*, double** %10
store double %131, double* %132
%133 = load double, double* %8
%134 = load double, double* %7
%135 = fadd double 1.000000e+00, %134
%136 = fmul double %133, %135
store double %136, double* %23
%137 = load double, double* %23
store double %137, double* %24
%138 = load double, double* %8
%139 = fdiv double 2.000000e+00, %138
store double %139, double* %25
%140 = load double, double* %25
store double %140, double* %26
store i32 1, i32* %28
br label %141
141: ; preds = %212, %49
%142 = load i32, i32* %28
%143 = load i32, i32* %6
%144 = icmp slt i32 %142, %143
br i1 %144, label %145, label %215
145: ; preds = %141
%146 = load i32, i32* %28
%147 = srem i32 %146, 2
%148 = icmp eq i32 %147, 0
br i1 %148, label %149, label %177
149: ; preds = %145
%150 = load double, double* %14
%151 = fmul double -2.000000e+00, %150
%152 = load i32, i32* %28
%153 = sitofp i32 %152 to double
%154 = fdiv double %151, %153
%155 = load double, double* %15
%156 = fmul double 4.000000e+00, %155
%157 = load i32, i32* %28
%158 = load i32, i32* %28
%159 = add nsw i32 %158, 2
%160 = mul nsw i32 %157, %159
%161 = sitofp i32 %160 to double
%162 = fdiv double %156, %161
%163 = fadd double %154, %162
store double %163, double* %27
%164 = load double*, double** %11
%165 = load i32, i32* %28
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %164, i64 %166
%168 = load double, double* %167
%169 = load double, double* %24
%170 = fdiv double %168, %169
%171 = load double, double* %27
%172 = load double, double* %26
%173 = call double @llvm.fmuladd.f64(double %171, double %172, double %170)
%174 = load double*, double** %10
%175 = load double, double* %174
%176 = fsub double %175, %173
store double %176, double* %174
br label %205
177: ; preds = %145
%178 = load double, double* %14
%179 = fmul double -2.000000e+00, %178
%180 = load i32, i32* %28
%181 = sitofp i32 %180 to double
%182 = fdiv double %179, %181
%183 = load double, double* %15
%184 = fmul double 4.000000e+00, %183
%185 = load i32, i32* %28
%186 = load i32, i32* %28
%187 = add nsw i32 %186, 2
%188 = mul nsw i32 %185, %187
%189 = sitofp i32 %188 to double
%190 = fdiv double %184, %189
%191 = fadd double %182, %190
store double %191, double* %27
%192 = load double*, double** %11
%193 = load i32, i32* %28
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
%196 = load double, double* %195
%197 = load double, double* %24
%198 = fdiv double %196, %197
%199 = load double, double* %27
%200 = load double, double* %26
%201 = call double @llvm.fmuladd.f64(double %199, double %200, double %198)
%202 = load double*, double** %9
%203 = load double, double* %202
%204 = fadd double %203, %201
store double %204, double* %202
br label %205
205: ; preds = %177, %149
%206 = load double, double* %23
%207 = load double, double* %24
%208 = fmul double %207, %206
store double %208, double* %24
%209 = load double, double* %25
%210 = load double, double* %26
%211 = fmul double %210, %209
store double %211, double* %26
br label %212
212: ; preds = %205
%213 = load i32, i32* %28
%214 = add nsw i32 %213, 1
store i32 %214, i32* %28
br label %141
215: ; preds = %141
%216 = load double, double* %12
%217 = fdiv double 4.000000e+00, %216
%218 = load double, double* %12
%219 = fdiv double %217, %218
%220 = load double*, double** %10
%221 = load double, double* %220
%222 = fmul double %221, %219
store double %222, double* %220
%223 = load double*, double** %11
%224 = call i32 @free(double* %223)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"twobody_YG_lub : malloc error for f\0A\00"
define void @twobody_YG_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_YG(i32 %6, double %1, double* %10)
%18 = fadd double %1, 1.000000e+00
%19 = fmul double %18, %18
%20 = fmul double %18, %19
%21 = fmul double %1, 1.000000e-01
%22 = tail call double @llvm.fmuladd.f64(double %1, double 7.000000e+00, double -1.000000e+00)
%23 = tail call double @llvm.fmuladd.f64(double %1, double %22, double 4.000000e+00)
%24 = fmul double %21, %23
%25 = fdiv double %24, %20
%26 = tail call double @llvm.fmuladd.f64(double %1, double 2.210000e+02, double -3.560000e+02)
%27 = tail call double @llvm.fmuladd.f64(double %1, double %26, double 5.320000e+02)
%28 = tail call double @llvm.fmuladd.f64(double %1, double %27, double -1.790000e+02)
%29 = tail call double @llvm.fmuladd.f64(double %1, double %28, double 3.200000e+01)
%30 = fdiv double %29, 5.000000e+02
%31 = fdiv double %30, %20
%32 = tail call double @llvm.fmuladd.f64(double %2, double %2, double -4.000000e+00)
%33 = fadd double %2, 2.000000e+00
%34 = fadd double %2, -2.000000e+00
%35 = fdiv double %33, %34
%36 = fmul double %32, 2.500000e-01
%37 = fmul double %2, %2
%38 = fdiv double %37, %32
%39 = tail call double @log(double %35)
%40 = tail call double @log(double %38)
%41 = tail call double @llvm.fmuladd.f64(double %31, double %36, double %25)
%42 = fneg double %31
%43 = fmul double %42, %2
%44 = tail call double @llvm.fmuladd.f64(double %41, double %39, double %43)
store double %44, double* %3
%45 = fneg double %41
%46 = tail call double @llvm.fmuladd.f64(double %45, double %40, double %31)
store double %46, double* %4
%47 = fmul double %18, %2
%48 = fdiv double 2.000000e+00, %2
%49 = icmp sgt i32 %6, 1
br i1 %49, label %50, label %85
50: ; preds = %16
%51 = fmul double %25, 2.000000e+00
%52 = fmul double %31, 4.000000e+00
%53 = zext i32 %6 to i64
br label %54
54: ; preds = %50, %78
%55 = phi i64 [ 1, %50 ], [ %81, %78 ]
%56 = phi double [ %48, %50 ], [ %80, %78 ]
%57 = phi double [ %47, %50 ], [ %79, %78 ]
%58 = trunc i64 %55 to i32
%59 = and i32 %58, 1
%60 = icmp eq i32 %59, 0
%61 = sitofp i32 %58 to double
%62 = fdiv double %51, %61
%63 = add nuw nsw i32 %58, 2
%64 = mul nsw i32 %63, %58
%65 = sitofp i32 %64 to double
%66 = fdiv double %52, %65
%67 = fsub double %66, %62
%68 = getelementptr inbounds double, double* %10, i64 %55
%69 = load double, double* %68
%70 = fdiv double %69, %57
%71 = tail call double @llvm.fmuladd.f64(double %67, double %56, double %70)
br i1 %60, label %72, label %75
72: ; preds = %54
%73 = load double, double* %4
%74 = fsub double %73, %71
store double %74, double* %4
br label %78
75: ; preds = %54
%76 = load double, double* %3
%77 = fadd double %76, %71
store double %77, double* %3
br label %78
78: ; preds = %75, %72
%79 = fmul double %47, %57
%80 = fmul double %48, %56
%81 = add nuw nsw i64 %55, 1
%82 = icmp eq i64 %81, %53
br i1 %82, label %83, label %54
83: ; preds = %78
%84 = load double, double* %4
br label %85
85: ; preds = %83, %16
%86 = phi double [ %84, %83 ], [ %46, %16 ]
%87 = fdiv double 4.000000e+00, %18
%88 = fdiv double %87, %18
%89 = fmul double %88, %86
store double %89, double* %4
%90 = tail call i32 @free(double* %10)
ret void
}