#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_ZM(int, double, double *);
void twobody_ZM_lub(int n, double l, double s, double *ZM11, double *ZM12) {
  if (n % 2 != 0)
    n--;
  double *f = (double *)malloc(sizeof(double) * (n + 1));
  if (f == NULL) {
    fprintf(stderr, "twobody_ZM_lub"
                    " : malloc error for "
                    "f"
                    "\n");
    exit(1);
  };
  twobody_ZM(n, l, f);
  *ZM11 = 0.0;
  *ZM12 = 0.0;
  double l1 = 1.0 + l;
  double l13 = l1 * l1 * l1;
  double g3;
  g3 = -0.3 * l * l * (1.0 + l * l) / 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);
  *ZM11 = g3 * s3 * ls5 - g3 + 1.0;
  *ZM12 = -g3 * s3 * ls2 + g3 * 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 = +4.0 * g3 / (double)(m * (m + 2));
      *ZM11 += f[m] / s1lm + a * s2m;
    } else {
      a = +4.0 * g3 / (double)(m * (m + 2));
      *ZM12 -= f[m] / s1lm + a * s2m;
    }
    s1lm *= s1l;
    s2m *= s21;
  }
  *ZM12 *= 8.0 / l13;
  free(f);
}


x86 assembly (clang, -O0):
<twobody_ZM_lub>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%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_ZM_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_ZM_lub+0x7e>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xe61(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rsi
call   1080 <twobody_ZM@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  0xded(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xdb5(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xd93(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd88(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd63(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xd51(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd3e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd3a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd13(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xd0f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xcde(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc70(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  0xc17(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xbe6(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x1,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    158a <twobody_ZM_lub+0x42a>
mov    -0xac(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14d7 <twobody_ZM_lub+0x377>
movsd  0xba9(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0xac(%rbp),%eax
mov    -0xac(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xac(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
divsd  -0x90(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1546 <twobody_ZM_lub+0x3e6>
movsd  0xb39(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0xac(%rbp),%eax
mov    -0xac(%rbp),%ecx
add    $0x2,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x30(%rbp),%rax
movslq -0xac(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x90(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1441 <twobody_ZM_lub+0x2e1>
movsd  0xa96(%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    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twobody_ZM_lub>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%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   1050 <malloc@plt>
test   %rax,%rax
je     1387 <twobody_ZM_lub+0x227>
mov    %rax,%rbx
and    $0xfffffffe,%r12d
mov    %r12d,%edi
movaps 0x10(%rsp),%xmm0
mov    %rax,%rsi
call   1080 <twobody_ZM@plt>
movsd  0xe49(%rip),%xmm0
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm4
movapd %xmm3,%xmm0
unpcklpd %xmm2,%xmm0
movapd 0xe67(%rip),%xmm1
movapd %xmm2,0x40(%rsp)
unpcklpd %xmm2,%xmm1
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm1
mulsd  %xmm3,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm3
unpckhpd %xmm1,%xmm1
movapd %xmm1,0x50(%rsp)
divsd  %xmm1,%xmm3
movapd %xmm3,0x10(%rsp)
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xde7(%rip),%xmm3
addsd  %xmm0,%xmm3
movapd %xmm0,%xmm4
movapd %xmm2,%xmm0
addsd  0xddb(%rip),%xmm0
movsd  0xddb(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm3,%xmm4
movsd  %xmm4,0x28(%rsp)
mulsd  0xdc9(%rip),%xmm3
movsd  %xmm3,0x30(%rsp)
call   1060 <log@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x28(%rsp),%xmm0
call   1060 <log@plt>
movapd 0x10(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
addsd  0xd6d(%rip),%xmm0
movsd  %xmm0,(%r14)
movapd %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm2
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r15)
cmp    $0x2,%r12d
jl     135d <twobody_ZM_lub+0x1fd>
movapd %xmm1,%xmm4
movsd  0x8(%rsp),%xmm0
movapd 0x40(%rsp),%xmm5
mulsd  %xmm0,%xmm5
mulsd  0xd51(%rip),%xmm4
movsd  0xd31(%rip),%xmm6
divsd  %xmm0,%xmm6
mov    %r12d,%eax
mov    $0x1,%ecx
mov    $0x3,%edx
movapd %xmm6,%xmm0
movapd %xmm5,%xmm1
jmp    1322 <twobody_ZM_lub+0x1c2>
nopw   0x0(%rax,%rax,1)
movsd  (%r15),%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,(%r15)
mulsd  %xmm5,%xmm1
mulsd  %xmm6,%xmm0
add    $0x1,%rcx
add    $0x1,%edx
cmp    %rcx,%rax
je     1358 <twobody_ZM_lub+0x1f8>
mov    %ecx,%esi
imul   %edx,%esi
xorps  %xmm3,%xmm3
cvtsi2sd %esi,%xmm3
movapd %xmm4,%xmm2
divsd  %xmm3,%xmm2
movsd  (%rbx,%rcx,8),%xmm3
divsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
test   $0x1,%cl
jne    1300 <twobody_ZM_lub+0x1a0>
addsd  (%r14),%xmm2
movsd  %xmm2,(%r14)
jmp    130e <twobody_ZM_lub+0x1ae>
movsd  (%r15),%xmm0
movsd  0xccb(%rip),%xmm1
divsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
mov    %rbx,%rdi
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
mov    0x2c52(%rip),%rax
mov    (%rax),%edi
lea    0xcb9(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

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

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