#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_YH(int, double, double *);
void twobody_YH_lub(int n, double l, double s, double *YH11, double *YH12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_YH_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_YH(n, l, f);
  *YH11 = 0.0;
  *YH12 = 0.0;
  double l1 = 1.0 + l;
  double l12 = l1 * l1;
  double g2, g3, g5, g6;
  g2 = 0.1 * l * (2.0 - l) / l12;
  g3 = (16.0 + l * (-61.0 + l * (180.0 + 2.0 * l))) / 500.0 / l12;
  g5 = 0.05 * l * l * (1.0 + 7.0 * l) / l12;
  g6 = l * (43.0 + l * (147.0 + l * (-185.0 + 221.0 * l))) / 1000.0 / l12;
  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);
  *YH11 = (g2 + g3 * s3) * ls5 - g3;
  *YH12 = (g5 + g6 * s3) * ls2 - g6 * s;
  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));
      *YH11 += f[m] / s1lm + a * s2m;
    } else {
      a = -2.0 * g5 / (double)m + 4.0 * g6 / (double)(m * (m + 2));
      *YH12 += f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *YH12 *= 8.0 / l12 / l1;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_YH_lub>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%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_YH_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   1050 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11de <twobody_YH_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rsi
call   1070 <twobody_YH@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
movsd  %xmm0,-0x40(%rbp)
movsd  0xe4a(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xdc5(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xe07(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdef(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdd7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xdc3(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xda5(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xd86(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd3a(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  0xd3c(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd38(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd18(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd00(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xce8(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xcb2(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xca7(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xc82(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xc70(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc5d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xc59(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xc32(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xc2e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbfd(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1060 <log@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x50(%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  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x60(%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    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  0xb16(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xae5(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movl   $0x1,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    16c1 <twobody_YH_lub+0x561>
mov    -0xc4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    15f5 <twobody_YH_lub+0x495>
movsd  0xb18(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0xc4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0xa8f(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
mov    -0xc4(%rbp),%eax
mov    -0xc4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    167d <twobody_YH_lub+0x51d>
movsd  0xa8b(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0xc4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0xa02(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mov    -0xc4(%rbp),%eax
mov    -0xc4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1542 <twobody_YH_lub+0x3e2>
movsd  0x9b7(%rip),%xmm0
divsd  -0x40(%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    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twobody_YH_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %edi,%r12d
lea    0x0(,%r12,8),%edi
or     $0x8,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     146c <twobody_YH_lub+0x30c>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movsd  0x8(%rsp),%xmm0
mov    %rax,%rsi
call   1070 <twobody_YH@plt>
movsd  0xe47(%rip),%xmm0
movsd  0x8(%rsp),%xmm6
movapd %xmm6,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x50(%rsp)
mulsd  %xmm2,%xmm2
movsd  0xe2f(%rip),%xmm1
mulsd  %xmm6,%xmm1
movsd  0xe2b(%rip),%xmm3
movapd %xmm3,%xmm4
movapd %xmm6,%xmm5
addsd  %xmm6,%xmm5
addsd  0xe1f(%rip),%xmm5
subsd  %xmm6,%xmm4
mulsd  %xmm6,%xmm5
addsd  0xe17(%rip),%xmm5
mulsd  %xmm1,%xmm4
mulsd  %xmm6,%xmm5
addsd  0xe0f(%rip),%xmm5
divsd  %xmm2,%xmm4
movsd  %xmm4,0x48(%rsp)
divsd  0xe05(%rip),%xmm5
divsd  %xmm2,%xmm5
movsd  %xmm5,0x40(%rsp)
movsd  0xdfb(%rip),%xmm1
mulsd  %xmm6,%xmm1
mulsd  %xmm6,%xmm1
movsd  0xdf3(%rip),%xmm4
movsd  0xdf3(%rip),%xmm5
mulsd  %xmm6,%xmm5
addsd  0xdef(%rip),%xmm5
mulsd  %xmm6,%xmm4
mulsd  %xmm6,%xmm5
addsd  0xde7(%rip),%xmm5
addsd  %xmm0,%xmm4
mulsd  %xmm6,%xmm5
addsd  0xddf(%rip),%xmm5
mulsd  %xmm1,%xmm4
mulsd  %xmm6,%xmm5
divsd  0xdd7(%rip),%xmm5
divsd  %xmm2,%xmm4
movsd  %xmm4,0x38(%rsp)
movsd  %xmm2,0x8(%rsp)
divsd  %xmm2,%xmm5
movsd  %xmm5,0x30(%rsp)
movsd  0x10(%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xdaf(%rip),%xmm4
addsd  %xmm0,%xmm4
movapd %xmm0,%xmm5
movapd %xmm2,%xmm0
addsd  %xmm3,%xmm0
movsd  0xd9f(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm4,%xmm5
movsd  %xmm5,0x18(%rsp)
mulsd  0xd8d(%rip),%xmm4
movsd  %xmm4,0x20(%rsp)
call   1060 <log@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
call   1060 <log@plt>
movsd  0x30(%rsp),%xmm12
movsd  0x38(%rsp),%xmm11
movsd  0x40(%rsp),%xmm10
movsd  0x48(%rsp),%xmm9
movsd  0x50(%rsp),%xmm8
movapd %xmm10,%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm9,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm10,%xmm1
movsd  %xmm1,(%r15)
movapd %xmm2,%xmm1
mulsd  %xmm12,%xmm1
addsd  %xmm11,%xmm1
movapd %xmm12,%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0x28(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
cmp    $0x2,%r12d
jl     143d <twobody_YH_lub+0x2dd>
movapd %xmm8,%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc73(%rip),%xmm7
divsd  %xmm1,%xmm7
mov    %r12d,%eax
mov    $0x1,%ecx
mov    $0x3,%edx
movsd  0xcd2(%rip),%xmm1
movapd %xmm7,%xmm2
movapd %xmm0,%xmm3
jmp    141b <twobody_YH_lub+0x2bb>
xorps  %xmm6,%xmm6
cvtsi2sd %ecx,%xmm6
addsd  %xmm5,%xmm5
divsd  %xmm6,%xmm5
mulsd  %xmm1,%xmm4
mov    %r14,%rsi
cmove  %r15,%rsi
mov    %edx,%edi
imul   %ecx,%edi
xorps  %xmm6,%xmm6
cvtsi2sd %edi,%xmm6
divsd  %xmm6,%xmm4
subsd  %xmm5,%xmm4
movsd  (%rbx,%rcx,8),%xmm5
divsd  %xmm3,%xmm5
mulsd  %xmm2,%xmm4
addsd  %xmm5,%xmm4
addsd  (%rsi),%xmm4
movsd  %xmm4,(%rsi)
mulsd  %xmm0,%xmm3
mulsd  %xmm7,%xmm2
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
je     1438 <twobody_YH_lub+0x2d8>
movapd %xmm9,%xmm5
test   $0x1,%cl
je     142a <twobody_YH_lub+0x2ca>
movapd %xmm11,%xmm5
movapd %xmm10,%xmm4
je     13c0 <twobody_YH_lub+0x260>
movapd %xmm12,%xmm4
jmp    13c0 <twobody_YH_lub+0x260>
movsd  (%r14),%xmm1
movsd  0xc4b(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
divsd  %xmm8,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
mov    %rbx,%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2b6d(%rip),%rax
mov    (%rax),%edi
lea    0xc1c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

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

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