#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_XM(int, double, double *);
void twobody_XM_lub(int n, double l, double s, double *XM11, double *XM12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_XM_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_XM(n, l, f);
  *XM11 = 0.0;
  *XM12 = 0.0;
  double l1 = 1.0 + l;
  double l13 = l1 * l1 * l1;
  double g1, g2, g3, g4, g5, g6;
  g1 = 1.2 * l * l / l13;
  g2 = 0.12 * l * (1.0 + l * (17.0 - 9.0 * l)) / l13;
  g3 = (5.0 + l * (272.0 + l * (-831.0 + l * (1322.0 - 415.0 * l)))) / 350.0 /
       l13;
  g4 = g1 * l;
  g5 = 0.12 * l * l * (-4.0 + l * (17.0 - 4.0 * l)) / l13;
  g6 = l * (-65.0 + l * (832.0 + l * (-1041.0 + l * (832.0 - 65.0 * l)))) /
       350.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);
  *XM11 = g1 * s4 + (g2 + g3 * s3) * ls5 - g3 + 1.0;
  *XM12 = g4 * s1 + (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 = -g1 - 2.0 * g2 / (double)m + 4.0 * g3 / (double)(m * (m + 2));
      *XM11 += f[m] / s1lm + a * s2m;
    } else {
      a = -g4 - 2.0 * g5 / (double)m + 4.0 * g6 / (double)(m * (m + 2));
      *XM12 += f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *XM12 *= 8.0 / l13;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_XM_lub>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%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_XM_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_XM_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%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_XM@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  0xe4d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdf9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xe12(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xdce(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd86(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  0xdb8(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdb4(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd94(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd7c(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd64(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd28(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd2b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xcd7(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xcfb(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xcbb(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
movsd  0xca0(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xc9c(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xc94(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc7c(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc64(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc4c(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xc16(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc0b(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xbe6(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xbd4(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbc1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xbbd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xb93(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xb8f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb5b(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1070 <log@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1070 <log@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x50(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm4
ff
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  0xad8(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x70(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm4
ff
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  0xa5a(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xa29(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x1,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    17bd <twobody_XM_lub+0x65d>
mov    -0xd4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    16d1 <twobody_XM_lub+0x571>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x9b8(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
cvtsi2sdl -0xd4(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0x9b3(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mov    -0xd4(%rbp),%eax
mov    -0xd4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xd4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1779 <twobody_XM_lub+0x619>
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x90b(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
cvtsi2sdl -0xd4(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0x906(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
mov    -0xd4(%rbp),%eax
mov    -0xd4(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xd4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    15fe <twobody_XM_lub+0x49e>
movsd  0x8c3(%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    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twobody_XM_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xb8,%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     1588 <twobody_XM_lub+0x428>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movaps 0x10(%rsp),%xmm0
mov    %rax,%rsi
call   1040 <twobody_XM@plt>
movsd  0xe46(%rip),%xmm2
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm4,%xmm0
unpcklpd %xmm1,%xmm0
movapd 0xec8(%rip),%xmm3
movapd %xmm1,0x60(%rsp)
unpcklpd %xmm1,%xmm3
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm3
movapd %xmm3,%xmm10
unpckhpd %xmm3,%xmm10
divsd  %xmm10,%xmm3
movapd %xmm3,%xmm1
movapd %xmm3,0xa0(%rsp)
movsd  0xdfa(%rip),%xmm3
mulsd  %xmm4,%xmm3
movsd  0xdf6(%rip),%xmm5
mulsd  %xmm4,%xmm5
movsd  0xdf1(%rip),%xmm8
addsd  %xmm8,%xmm5
mulsd  %xmm4,%xmm5
movsd  0xde8(%rip),%xmm7
mulsd  %xmm4,%xmm7
addsd  0xde4(%rip),%xmm7
addsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm7
addsd  0xddc(%rip),%xmm7
mulsd  %xmm3,%xmm5
mulsd  %xmm4,%xmm7
addsd  0xdd4(%rip),%xmm7
mulsd  %xmm4,%xmm7
addsd  0xdd0(%rip),%xmm7
movsd  0xdcf(%rip),%xmm9
divsd  %xmm9,%xmm7
mulsd  %xmm4,%xmm1
movapd %xmm1,0x90(%rsp)
mulsd  %xmm4,%xmm3
movsd  0xdb9(%rip),%xmm1
movapd %xmm4,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm8,%xmm6
mulsd  %xmm4,%xmm6
addsd  %xmm1,%xmm6
mulsd  %xmm3,%xmm6
movapd %xmm6,%xmm8
movsd  0xd9b(%rip),%xmm2
movapd %xmm4,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xd93(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
addsd  0xd8b(%rip),%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm9,%xmm0
movapd %xmm0,%xmm4
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movapd %xmm2,%xmm6
divsd  %xmm1,%xmm0
movsd  %xmm0,0x58(%rsp)
movapd %xmm3,%xmm0
addsd  0xd42(%rip),%xmm0
movsd  0xd42(%rip),%xmm2
addsd  %xmm3,%xmm2
divsd  %xmm2,%xmm0
movsd  0xd3a(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp)
movsd  0xd30(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x48(%rsp)
divsd  %xmm1,%xmm6
movsd  %xmm6,0x28(%rsp)
divsd  %xmm10,%xmm5
movsd  %xmm5,0x38(%rsp)
divsd  %xmm10,%xmm7
movsd  %xmm7,0x30(%rsp)
divsd  %xmm10,%xmm8
movapd %xmm8,0x80(%rsp)
movapd %xmm10,0x10(%rsp)
divsd  %xmm10,%xmm4
movapd %xmm4,0x70(%rsp)
call   1070 <log@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0x28(%rsp),%xmm0
call   1070 <log@plt>
movapd 0x70(%rsp),%xmm13
movapd 0x80(%rsp),%xmm12
movapd 0x90(%rsp),%xmm11
movsd  0x30(%rsp),%xmm10
movsd  0x38(%rsp),%xmm9
movapd 0xa0(%rsp),%xmm8
movapd %xmm10,%xmm1
movsd  0x40(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm9,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  %xmm8,%xmm0
addsd  %xmm1,%xmm0
movsd  0x58(%rsp),%xmm1
subsd  %xmm10,%xmm0
addsd  0xbda(%rip),%xmm0
movsd  %xmm0,(%r14)
mulsd  %xmm13,%xmm2
addsd  %xmm12,%xmm2
mulsd  0x50(%rsp),%xmm2
mulsd  %xmm11,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm13,%xmm0
mulsd  0x8(%rsp),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
cmp    $0x2,%r12d
jl     155b <twobody_XM_lub+0x3fb>
movsd  0x8(%rsp),%xmm0
movapd 0x60(%rsp),%xmm7
mulsd  %xmm0,%xmm7
movsd  0xbf6(%rip),%xmm3
divsd  %xmm0,%xmm3
mov    %r12d,%eax
mov    $0x1,%ecx
mov    $0x3,%edx
movapd 0xc1c(%rip),%xmm14
movapd %xmm3,%xmm1
movapd %xmm7,%xmm2
movapd %xmm3,%xmm0
movsd  0xbdf(%rip),%xmm15
jmp    1515 <twobody_XM_lub+0x3b5>
nopl   0x0(%rax,%rax,1)
xorps  %xmm6,%xmm6
cvtsi2sd %ecx,%xmm6
addsd  %xmm5,%xmm5
divsd  %xmm6,%xmm5
xorpd  %xmm14,%xmm4
mulsd  %xmm15,%xmm3
mov    %r15,%rsi
cmove  %r14,%rsi
subsd  %xmm5,%xmm4
mov    %edx,%edi
imul   %ecx,%edi
xorps  %xmm5,%xmm5
cvtsi2sd %edi,%xmm5
divsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movsd  (%rbx,%rcx,8),%xmm4
divsd  %xmm2,%xmm4
mulsd  %xmm1,%xmm3
addsd  %xmm4,%xmm3
addsd  (%rsi),%xmm3
movsd  %xmm3,(%rsi)
mulsd  %xmm7,%xmm2
mulsd  %xmm0,%xmm1
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
je     1556 <twobody_XM_lub+0x3f6>
movapd %xmm9,%xmm5
test   $0x1,%cl
jne    1530 <twobody_XM_lub+0x3d0>
movapd %xmm8,%xmm4
jne    153c <twobody_XM_lub+0x3dc>
movapd %xmm10,%xmm3
je     14b0 <twobody_XM_lub+0x350>
jmp    154c <twobody_XM_lub+0x3ec>
nop
movapd %xmm12,%xmm5
movapd %xmm8,%xmm4
je     1526 <twobody_XM_lub+0x3c6>
movapd %xmm11,%xmm4
movapd %xmm10,%xmm3
je     14b0 <twobody_XM_lub+0x350>
movapd %xmm13,%xmm3
jmp    14b0 <twobody_XM_lub+0x350>
movsd  (%r15),%xmm1
movsd  0xb2d(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
mov    %rbx,%rdi
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2a51(%rip),%rax
mov    (%rax),%edi
lea    0xb28(%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_XM_lub : malloc error for f\0A\00"
define void @twobody_XM_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 double
%31 = alloca double
%32 = 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
%33 = load i32, i32* %6
%34 = srem i32 %33, 2
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %5
%37 = load i32, i32* %6
%38 = add nsw i32 %37, -1
store i32 %38, i32* %6
br label %39
39: ; preds = %36, %5
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = mul i64 8, %42
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** %11
%47 = load double*, double** %11
%48 = icmp eq double* %47, null
br i1 %48, label %49, label %53
49: ; preds = %39
%50 = load i32, i32* @stderr
%51 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %39
%54 = load i32, i32* %6
%55 = load double, double* %7
%56 = load double*, double** %11
%57 = call i32 @twobody_XM(i32 %54, double %55, double* %56)
%58 = load double*, double** %9
store double 0.000000e+00, double* %58
%59 = load double*, double** %10
store double 0.000000e+00, double* %59
%60 = load double, double* %7
%61 = fadd double 1.000000e+00, %60
store double %61, double* %12
%62 = load double, double* %12
%63 = load double, double* %12
%64 = fmul double %62, %63
%65 = load double, double* %12
%66 = fmul double %64, %65
store double %66, double* %13
%67 = load double, double* %7
%68 = fmul double 1.200000e+00, %67
%69 = load double, double* %7
%70 = fmul double %68, %69
%71 = load double, double* %13
%72 = fdiv double %70, %71
store double %72, double* %14
%73 = load double, double* %7
%74 = fmul double 1.200000e-01, %73
%75 = load double, double* %7
%76 = load double, double* %7
%77 = call double @llvm.fmuladd.f64(double -9.000000e+00, double %76, double 1.700000e+01)
%78 = call double @llvm.fmuladd.f64(double %75, double %77, double 1.000000e+00)
%79 = fmul double %74, %78
%80 = load double, double* %13
%81 = fdiv double %79, %80
store double %81, double* %15
%82 = load double, double* %7
%83 = load double, double* %7
%84 = load double, double* %7
%85 = load double, double* %7
%86 = call double @llvm.fmuladd.f64(double -4.150000e+02, double %85, double 1.322000e+03)
%87 = call double @llvm.fmuladd.f64(double %84, double %86, double -8.310000e+02)
%88 = call double @llvm.fmuladd.f64(double %83, double %87, double 2.720000e+02)
%89 = call double @llvm.fmuladd.f64(double %82, double %88, double 5.000000e+00)
%90 = fdiv double %89, 3.500000e+02
%91 = load double, double* %13
%92 = fdiv double %90, %91
store double %92, double* %16
%93 = load double, double* %14
%94 = load double, double* %7
%95 = fmul double %93, %94
store double %95, double* %17
%96 = load double, double* %7
%97 = fmul double 1.200000e-01, %96
%98 = load double, double* %7
%99 = fmul double %97, %98
%100 = load double, double* %7
%101 = load double, double* %7
%102 = call double @llvm.fmuladd.f64(double -4.000000e+00, double %101, double 1.700000e+01)
%103 = call double @llvm.fmuladd.f64(double %100, double %102, double -4.000000e+00)
%104 = fmul double %99, %103
%105 = load double, double* %13
%106 = fdiv double %104, %105
store double %106, double* %18
%107 = load double, double* %7
%108 = load double, double* %7
%109 = load double, double* %7
%110 = load double, double* %7
%111 = load double, double* %7
%112 = call double @llvm.fmuladd.f64(double -6.500000e+01, double %111, double 8.320000e+02)
%113 = call double @llvm.fmuladd.f64(double %110, double %112, double -1.041000e+03)
%114 = call double @llvm.fmuladd.f64(double %109, double %113, double 8.320000e+02)
%115 = call double @llvm.fmuladd.f64(double %108, double %114, double -6.500000e+01)
%116 = fmul double %107, %115
%117 = fdiv double %116, 3.500000e+02
%118 = load double, double* %13
%119 = fdiv double %117, %118
store double %119, double* %19
%120 = load double, double* %8
%121 = fmul double 2.000000e+00, %120
%122 = load double, double* %8
%123 = load double, double* %8
%124 = call double @llvm.fmuladd.f64(double %122, double %123, double -4.000000e+00)
%125 = fdiv double %121, %124
store double %125, double* %20
%126 = load double, double* %8
%127 = fadd double %126, 2.000000e+00
%128 = load double, double* %8
%129 = fsub double %128, 2.000000e+00
%130 = fdiv double %127, %129
store double %130, double* %21
%131 = load double, double* %8
%132 = load double, double* %8
%133 = call double @llvm.fmuladd.f64(double %131, double %132, double -4.000000e+00)
%134 = fdiv double %133, 4.000000e+00
store double %134, double* %22
%135 = load double, double* %8
%136 = load double, double* %8
%137 = call double @llvm.fmuladd.f64(double %135, double %136, double -4.000000e+00)
%138 = fdiv double 4.000000e+00, %137
store double %138, double* %23
%139 = load double, double* %8
%140 = load double, double* %8
%141 = fmul double %139, %140
%142 = load double, double* %8
%143 = load double, double* %8
%144 = call double @llvm.fmuladd.f64(double %142, double %143, double -4.000000e+00)
%145 = fdiv double %141, %144
store double %145, double* %24
%146 = load double, double* %21
%147 = call double @log(double %146)
store double %147, double* %25
%148 = load double, double* %24
%149 = call double @log(double %148)
store double %149, double* %26
%150 = load double, double* %14
%151 = load double, double* %23
%152 = load double, double* %15
%153 = load double, double* %16
%154 = load double, double* %22
%155 = call double @llvm.fmuladd.f64(double %153, double %154, double %152)
%156 = load double, double* %26
%157 = fmul double %155, %156
%158 = call double @llvm.fmuladd.f64(double %150, double %151, double %157)
%159 = load double, double* %16
%160 = fsub double %158, %159
%161 = fadd double %160, 1.000000e+00
%162 = load double*, double** %9
store double %161, double* %162
%163 = load double, double* %17
%164 = load double, double* %20
%165 = load double, double* %18
%166 = load double, double* %19
%167 = load double, double* %22
%168 = call double @llvm.fmuladd.f64(double %166, double %167, double %165)
%169 = load double, double* %25
%170 = fmul double %168, %169
%171 = call double @llvm.fmuladd.f64(double %163, double %164, double %170)
%172 = load double, double* %19
%173 = load double, double* %8
%174 = fneg double %172
%175 = call double @llvm.fmuladd.f64(double %174, double %173, double %171)
%176 = load double*, double** %10
store double %175, double* %176
%177 = load double, double* %8
%178 = load double, double* %7
%179 = fadd double 1.000000e+00, %178
%180 = fmul double %177, %179
store double %180, double* %27
%181 = load double, double* %27
store double %181, double* %28
%182 = load double, double* %8
%183 = fdiv double 2.000000e+00, %182
store double %183, double* %29
%184 = load double, double* %29
store double %184, double* %30
store i32 1, i32* %32
br label %185
185: ; preds = %262, %53
%186 = load i32, i32* %32
%187 = load i32, i32* %6
%188 = icmp slt i32 %186, %187
br i1 %188, label %189, label %265
189: ; preds = %185
%190 = load i32, i32* %32
%191 = srem i32 %190, 2
%192 = icmp eq i32 %191, 0
br i1 %192, label %193, label %224
193: ; preds = %189
%194 = load double, double* %14
%195 = fneg double %194
%196 = load double, double* %15
%197 = fmul double 2.000000e+00, %196
%198 = load i32, i32* %32
%199 = sitofp i32 %198 to double
%200 = fdiv double %197, %199
%201 = fsub double %195, %200
%202 = load double, double* %16
%203 = fmul double 4.000000e+00, %202
%204 = load i32, i32* %32
%205 = load i32, i32* %32
%206 = add nsw i32 %205, 2
%207 = mul nsw i32 %204, %206
%208 = sitofp i32 %207 to double
%209 = fdiv double %203, %208
%210 = fadd double %201, %209
store double %210, double* %31
%211 = load double*, double** %11
%212 = load i32, i32* %32
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = load double, double* %28
%217 = fdiv double %215, %216
%218 = load double, double* %31
%219 = load double, double* %30
%220 = call double @llvm.fmuladd.f64(double %218, double %219, double %217)
%221 = load double*, double** %9
%222 = load double, double* %221
%223 = fadd double %222, %220
store double %223, double* %221
br label %255
224: ; preds = %189
%225 = load double, double* %17
%226 = fneg double %225
%227 = load double, double* %18
%228 = fmul double 2.000000e+00, %227
%229 = load i32, i32* %32
%230 = sitofp i32 %229 to double
%231 = fdiv double %228, %230
%232 = fsub double %226, %231
%233 = load double, double* %19
%234 = fmul double 4.000000e+00, %233
%235 = load i32, i32* %32
%236 = load i32, i32* %32
%237 = add nsw i32 %236, 2
%238 = mul nsw i32 %235, %237
%239 = sitofp i32 %238 to double
%240 = fdiv double %234, %239
%241 = fadd double %232, %240
store double %241, double* %31
%242 = load double*, double** %11
%243 = load i32, i32* %32
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
%246 = load double, double* %245
%247 = load double, double* %28
%248 = fdiv double %246, %247
%249 = load double, double* %31
%250 = load double, double* %30
%251 = call double @llvm.fmuladd.f64(double %249, double %250, double %248)
%252 = load double*, double** %10
%253 = load double, double* %252
%254 = fadd double %253, %251
store double %254, double* %252
br label %255
255: ; preds = %224, %193
%256 = load double, double* %27
%257 = load double, double* %28
%258 = fmul double %257, %256
store double %258, double* %28
%259 = load double, double* %29
%260 = load double, double* %30
%261 = fmul double %260, %259
store double %261, double* %30
br label %262
262: ; preds = %255
%263 = load i32, i32* %32
%264 = add nsw i32 %263, 1
store i32 %264, i32* %32
br label %185
265: ; preds = %185
%266 = load double, double* %13
%267 = fdiv double 8.000000e+00, %266
%268 = load double*, double** %10
%269 = load double, double* %268
%270 = fmul double %269, %267
store double %270, double* %268
%271 = load double*, double** %11
%272 = call i32 @free(double* %271)
ret void
}

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