#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_YM(int, double, double *);
void twobody_YM_lub(int n, double l, double s, double *YM11, double *YM12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_YM_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_YM(n, l, f);
  *YM11 = 0.0;
  *YM12 = 0.0;
  double l1 = 1.0 + l;
  double l13 = l1 * l1 * l1;
  double g2, g3, g5, g6;
  g2 = 0.24 * l * (1.0 + l * (-1.0 + 4.0 * l)) / l13;
  g3 = (24.0 + l * (-201.0 + l * (882.0 + l * (-1182 + 591.0 * l)))) / 625.0 /
       l13;
  g5 = 0.06 * l * l * (7.0 + l * (-10.0 + 7.0 * l)) / l13;
  g6 = 3.0 * l *
       (221.0 + l * (-728.0 + l * (1902.0 + l * (-728 + 221.0 * l)))) / 2500.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);
  *YM11 = (g2 + g3 * s3) * ls5 - g3 + 1.0;
  *YM12 = (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));
      *YM11 += f[m] / s1lm + a * s2m;
    } else {
      a = -2.0 * g5 / (double)m + 4.0 * g6 / (double)(m * (m + 2));
      *YM12 += f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *YM12 *= 8.0 / l13;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_YM_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_YM_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_YM_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xee1(%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_YM@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  0xe65(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xdce(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe3a(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xda2(%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  0xdec(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xde8(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xdc8(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdb0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd98(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd84(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd66(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xd3a(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd36(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd1e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xcfc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
movsd  0xcc3(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xcbf(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xcb7(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc9f(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc87(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc6f(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc39(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc2e(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xc09(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xbf7(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbe4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xbe0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xbb9(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xbb5(%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  0xb84(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1070 <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
movsd  0xafa(%rip),%xmm1
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  0xa91(%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  0xa60(%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    1746 <twobody_YM_lub+0x5e6>
mov    -0xc4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    167a <twobody_YM_lub+0x51a>
movsd  0xab3(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0xc4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0xa0a(%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    1702 <twobody_YM_lub+0x5a2>
movsd  0xa26(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0xc4(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  0x97d(%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    15c7 <twobody_YM_lub+0x467>
movsd  0x952(%rip),%xmm0
divsd  -0x40(%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_YM_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%r15
mov    %rsi,%r14
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     14da <twobody_YM_lub+0x37a>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movaps 0x10(%rsp),%xmm0
mov    %rax,%rsi
call   1040 <twobody_YM@plt>
movsd  0xe46(%rip),%xmm0
movapd 0x10(%rsp),%xmm5
movapd %xmm5,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
movsd  0xe34(%rip),%xmm0
mulsd  %xmm5,%xmm0
movsd  0xe30(%rip),%xmm3
mulsd  %xmm5,%xmm3
addsd  0xe2c(%rip),%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm4
movapd %xmm5,%xmm1
unpcklpd %xmm2,%xmm1
movapd 0xea4(%rip),%xmm0
movapd %xmm2,0x50(%rsp)
unpcklpd %xmm2,%xmm0
mulpd  %xmm1,%xmm0
mulpd  %xmm1,%xmm0
movsd  0xdfa(%rip),%xmm2
mulsd  %xmm5,%xmm2
addsd  0xdf6(%rip),%xmm2
movsd  0xe16(%rip),%xmm1
movapd %xmm5,%xmm3
mulsd  %xmm1,%xmm3
addsd  0xe0e(%rip),%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm1
movapd %xmm0,%xmm3
mulsd  %xmm5,%xmm2
addsd  0xdc6(%rip),%xmm2
unpckhpd %xmm0,%xmm3
mulsd  %xmm5,%xmm2
addsd  0xdbe(%rip),%xmm2
divsd  %xmm3,%xmm4
movsd  %xmm4,0x48(%rsp)
mulsd  %xmm5,%xmm2
movapd %xmm5,%xmm4
addsd  0xdac(%rip),%xmm2
divsd  0xdac(%rip),%xmm2
divsd  %xmm3,%xmm2
movsd  %xmm2,0x40(%rsp)
divsd  %xmm3,%xmm1
movapd %xmm1,0x70(%rsp)
movsd  0xda8(%rip),%xmm0
movsd  0xda8(%rip),%xmm1
mulsd  %xmm1,%xmm5
movsd  0xda4(%rip),%xmm2
addsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm5
addsd  0xd9c(%rip),%xmm5
mulsd  %xmm4,%xmm0
mulsd  %xmm4,%xmm5
addsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm1,%xmm5
mulsd  %xmm0,%xmm5
divsd  0xd84(%rip),%xmm5
movapd %xmm3,0x10(%rsp)
divsd  %xmm3,%xmm5
movapd %xmm5,0x60(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xd66(%rip),%xmm3
addsd  %xmm0,%xmm3
movapd %xmm0,%xmm4
movapd %xmm2,%xmm0
addsd  0xd5a(%rip),%xmm0
movsd  0xd5a(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm3,%xmm4
movsd  %xmm4,0x28(%rsp)
mulsd  0xd48(%rip),%xmm3
movsd  %xmm3,0x30(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x28(%rsp),%xmm0
call   1070 <log@plt>
movapd 0x60(%rsp),%xmm10
movapd 0x70(%rsp),%xmm9
movsd  0x40(%rsp),%xmm7
movsd  0x48(%rsp),%xmm8
movapd %xmm7,%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm8,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm7,%xmm1
addsd  0xc4e(%rip),%xmm1
movsd  %xmm1,(%r14)
movapd %xmm2,%xmm1
mulsd  %xmm10,%xmm1
addsd  %xmm9,%xmm1
movapd %xmm10,%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
cmp    $0x2,%r12d
jl     14ad <twobody_YM_lub+0x34d>
movsd  0x8(%rsp),%xmm0
movapd 0x50(%rsp),%xmm6
mulsd  %xmm0,%xmm6
movsd  0xc8f(%rip),%xmm3
divsd  %xmm0,%xmm3
mov    %r12d,%eax
mov    $0x1,%ecx
mov    $0x3,%edx
movsd  0xbf5(%rip),%xmm11
movapd %xmm3,%xmm1
movapd %xmm6,%xmm2
movapd %xmm3,%xmm0
jmp    148c <twobody_YM_lub+0x32c>
nopl   0x0(%rax)
xorps  %xmm5,%xmm5
cvtsi2sd %ecx,%xmm5
addsd  %xmm4,%xmm4
divsd  %xmm5,%xmm4
mulsd  %xmm11,%xmm3
mov    %r15,%rsi
cmove  %r14,%rsi
mov    %edx,%edi
imul   %ecx,%edi
xorps  %xmm5,%xmm5
cvtsi2sd %edi,%xmm5
divsd  %xmm5,%xmm3
subsd  %xmm4,%xmm3
movsd  (%rbx,%rcx,8),%xmm4
divsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm3
addsd  (%rsi),%xmm3
movsd  %xmm3,(%rsi)
mulsd  %xmm6,%xmm2
mulsd  %xmm0,%xmm1
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
je     14a8 <twobody_YM_lub+0x348>
movapd %xmm8,%xmm4
test   $0x1,%cl
je     149b <twobody_YM_lub+0x33b>
movapd %xmm9,%xmm4
movapd %xmm7,%xmm3
je     1430 <twobody_YM_lub+0x2d0>
movapd %xmm10,%xmm3
jmp    1430 <twobody_YM_lub+0x2d0>
movsd  (%r15),%xmm1
movsd  0xbf3(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
mov    %rbx,%rdi
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2aff(%rip),%rax
mov    (%rax),%edi
lea    0xbd6(%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_YM_lub : malloc error for f\0A\00"
define void @twobody_YM_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_YM(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
%63 = load double, double* %12
%64 = fmul double %62, %63
store double %64, double* %13
%65 = load double, double* %7
%66 = fmul double 2.400000e-01, %65
%67 = load double, double* %7
%68 = load double, double* %7
%69 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %68, double -1.000000e+00)
%70 = call double @llvm.fmuladd.f64(double %67, double %69, double 1.000000e+00)
%71 = fmul double %66, %70
%72 = load double, double* %13
%73 = fdiv double %71, %72
store double %73, double* %14
%74 = load double, double* %7
%75 = load double, double* %7
%76 = load double, double* %7
%77 = load double, double* %7
%78 = call double @llvm.fmuladd.f64(double 5.910000e+02, double %77, double -1.182000e+03)
%79 = call double @llvm.fmuladd.f64(double %76, double %78, double 8.820000e+02)
%80 = call double @llvm.fmuladd.f64(double %75, double %79, double -2.010000e+02)
%81 = call double @llvm.fmuladd.f64(double %74, double %80, double 2.400000e+01)
%82 = fdiv double %81, 6.250000e+02
%83 = load double, double* %13
%84 = fdiv double %82, %83
store double %84, double* %15
%85 = load double, double* %7
%86 = fmul double 6.000000e-02, %85
%87 = load double, double* %7
%88 = fmul double %86, %87
%89 = load double, double* %7
%90 = load double, double* %7
%91 = call double @llvm.fmuladd.f64(double 7.000000e+00, double %90, double -1.000000e+01)
%92 = call double @llvm.fmuladd.f64(double %89, double %91, double 7.000000e+00)
%93 = fmul double %88, %92
%94 = load double, double* %13
%95 = fdiv double %93, %94
store double %95, double* %16
%96 = load double, double* %7
%97 = fmul double 3.000000e+00, %96
%98 = load double, double* %7
%99 = load double, double* %7
%100 = load double, double* %7
%101 = load double, double* %7
%102 = call double @llvm.fmuladd.f64(double 2.210000e+02, double %101, double -7.280000e+02)
%103 = call double @llvm.fmuladd.f64(double %100, double %102, double 1.902000e+03)
%104 = call double @llvm.fmuladd.f64(double %99, double %103, double -7.280000e+02)
%105 = call double @llvm.fmuladd.f64(double %98, double %104, double 2.210000e+02)
%106 = fmul double %97, %105
%107 = fdiv double %106, 2.500000e+03
%108 = load double, double* %13
%109 = fdiv double %107, %108
store double %109, double* %17
%110 = load double, double* %8
%111 = fmul double 2.000000e+00, %110
%112 = load double, double* %8
%113 = load double, double* %8
%114 = call double @llvm.fmuladd.f64(double %112, double %113, double -4.000000e+00)
%115 = fdiv double %111, %114
store double %115, double* %18
%116 = load double, double* %8
%117 = fadd double %116, 2.000000e+00
%118 = load double, double* %8
%119 = fsub double %118, 2.000000e+00
%120 = fdiv double %117, %119
store double %120, double* %19
%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 %123, 4.000000e+00
store double %124, double* %20
%125 = load double, double* %8
%126 = load double, double* %8
%127 = call double @llvm.fmuladd.f64(double %125, double %126, double -4.000000e+00)
%128 = fdiv double 4.000000e+00, %127
store double %128, double* %21
%129 = load double, double* %8
%130 = load double, double* %8
%131 = fmul double %129, %130
%132 = load double, double* %8
%133 = load double, double* %8
%134 = call double @llvm.fmuladd.f64(double %132, double %133, double -4.000000e+00)
%135 = fdiv double %131, %134
store double %135, double* %22
%136 = load double, double* %19
%137 = call double @log(double %136)
store double %137, double* %23
%138 = load double, double* %22
%139 = call double @log(double %138)
store double %139, double* %24
%140 = load double, double* %14
%141 = load double, double* %15
%142 = load double, double* %20
%143 = call double @llvm.fmuladd.f64(double %141, double %142, double %140)
%144 = load double, double* %24
%145 = load double, double* %15
%146 = fneg double %145
%147 = call double @llvm.fmuladd.f64(double %143, double %144, double %146)
%148 = fadd double %147, 1.000000e+00
%149 = load double*, double** %9
store double %148, double* %149
%150 = load double, double* %16
%151 = load double, double* %17
%152 = load double, double* %20
%153 = call double @llvm.fmuladd.f64(double %151, double %152, double %150)
%154 = load double, double* %23
%155 = load double, double* %17
%156 = load double, double* %8
%157 = fmul double %155, %156
%158 = fneg double %157
%159 = call double @llvm.fmuladd.f64(double %153, double %154, double %158)
%160 = load double*, double** %10
store double %159, double* %160
%161 = load double, double* %8
%162 = load double, double* %7
%163 = fadd double 1.000000e+00, %162
%164 = fmul double %161, %163
store double %164, double* %25
%165 = load double, double* %25
store double %165, double* %26
%166 = load double, double* %8
%167 = fdiv double 2.000000e+00, %166
store double %167, double* %27
%168 = load double, double* %27
store double %168, double* %28
store i32 1, i32* %30
br label %169
169: ; preds = %240, %51
%170 = load i32, i32* %30
%171 = load i32, i32* %6
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %243
173: ; preds = %169
%174 = load i32, i32* %30
%175 = srem i32 %174, 2
%176 = icmp eq i32 %175, 0
br i1 %176, label %177, label %205
177: ; preds = %173
%178 = load double, double* %14
%179 = fmul double -2.000000e+00, %178
%180 = load i32, i32* %30
%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* %30
%186 = load i32, i32* %30
%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* %29
%192 = load double*, double** %11
%193 = load i32, i32* %30
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
%196 = load double, double* %195
%197 = load double, double* %26
%198 = fdiv double %196, %197
%199 = load double, double* %29
%200 = load double, double* %28
%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 %233
205: ; preds = %173
%206 = load double, double* %16
%207 = fmul double -2.000000e+00, %206
%208 = load i32, i32* %30
%209 = sitofp i32 %208 to double
%210 = fdiv double %207, %209
%211 = load double, double* %17
%212 = fmul double 4.000000e+00, %211
%213 = load i32, i32* %30
%214 = load i32, i32* %30
%215 = add nsw i32 %214, 2
%216 = mul nsw i32 %213, %215
%217 = sitofp i32 %216 to double
%218 = fdiv double %212, %217
%219 = fadd double %210, %218
store double %219, double* %29
%220 = load double*, double** %11
%221 = load i32, i32* %30
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
%224 = load double, double* %223
%225 = load double, double* %26
%226 = fdiv double %224, %225
%227 = load double, double* %29
%228 = load double, double* %28
%229 = call double @llvm.fmuladd.f64(double %227, double %228, double %226)
%230 = load double*, double** %10
%231 = load double, double* %230
%232 = fadd double %231, %229
store double %232, double* %230
br label %233
233: ; preds = %205, %177
%234 = load double, double* %25
%235 = load double, double* %26
%236 = fmul double %235, %234
store double %236, double* %26
%237 = load double, double* %27
%238 = load double, double* %28
%239 = fmul double %238, %237
store double %239, double* %28
br label %240
240: ; preds = %233
%241 = load i32, i32* %30
%242 = add nsw i32 %241, 1
store i32 %242, i32* %30
br label %169
243: ; preds = %169
%244 = load double, double* %13
%245 = fdiv double 8.000000e+00, %244
%246 = load double*, double** %10
%247 = load double, double* %246
%248 = fmul double %247, %245
store double %248, double* %246
%249 = load double*, double** %11
%250 = call i32 @free(double* %249)
ret void
}

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