#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*/ abort();
int /*<<< orphan*/ free(double *);
double *malloc(int);
double rint(double);
void omplennard_jones(double *coords, double *out, int dim, double sigma,
                      double eps, int periodic, double boxsize) {
  int i, j;
  double rsq, rsq7, rsq4, s6, s12, fac;
  double *dist;
#pragma omp parallel for shared(coords, out, sigma, eps, periodic,             \
                                boxsize) private(i, j, rsq, rsq7, rsq4, s6,    \
                                                 s12, fac, dist)
  for (i = 0; i < dim; i++) {
    for (j = i + 1; j < dim; j++) {
      dist = malloc(sizeof(double) * 3);
      if (dist == NULL)
        abort();
      dist[0] = coords[j * 3] - coords[i * 3];
      dist[1] = coords[j * 3 + 1] - coords[i * 3 + 1];
      dist[2] = coords[j * 3 + 2] - coords[i * 3 + 2];
      if (periodic) {
        dist[0] = dist[0] - boxsize * rint(dist[0] / boxsize);
        dist[1] = dist[1] - boxsize * rint(dist[1] / boxsize);
        dist[2] = dist[2] - boxsize * rint(dist[2] / boxsize);
      }
      rsq = dist[0] * dist[0] + dist[1] * dist[1] + dist[2] * dist[2];
      rsq4 = rsq * rsq * rsq * rsq;
      rsq7 = rsq4 * rsq * rsq * rsq;
      s6 = sigma * sigma * sigma * sigma * sigma * sigma;
      s12 = s6 * s6;
      fac = -24 * eps * (2 * (s12 / rsq7) - s6 / rsq4);
#pragma omp atomic
      out[i * 3] += fac * dist[0];
#pragma omp atomic
      out[i * 3 + 1] += fac * dist[1];
#pragma omp atomic
      out[i * 3 + 2] += fac * dist[2];
#pragma omp atomic
      out[j * 3] -= fac * dist[0];
#pragma omp atomic
      out[j * 3 + 1] -= fac * dist[1];
#pragma omp atomic
      out[j * 3 + 2] -= fac * dist[2];
      free(dist);
    }
  }
}


x86 assembly (clang, -O0):
<omplennard_jones>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
movsd  %xmm2,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15ec <omplennard_jones+0x4ac>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15d9 <omplennard_jones+0x499>
mov    $0x18,%edi
call   1060 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    11b0 <omplennard_jones+0x70>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,0x10(%rax)
cmpl   $0x0,-0x2c(%rbp)
je     137b <omplennard_jones+0x23b>
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x38(%rbp),%xmm0
call   1050 <rint@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x78(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x38(%rbp),%xmm0
call   1050 <rint@plt>
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x38(%rbp),%xmm0
call   1050 <rint@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x78(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x78(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xbd0(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
divsd  -0x50(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
divsd  -0x58(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x3c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
imul   $0x3,-0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1184 <omplennard_jones+0x44>
jmp    15de <omplennard_jones+0x49e>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    116f <omplennard_jones+0x2f>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omplennard_jones>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
movapd %xmm2,0x60(%rsp)
mov    %ecx,0x1c(%rsp)
movsd  %xmm1,0x10(%rsp)
mov    %rdi,0x50(%rsp)
test   %edx,%edx
jle    14af <omplennard_jones+0x36f>
mov    %rsi,%rbx
movapd 0xe87(%rip),%xmm1
movapd 0x60(%rsp),%xmm2
movapd %xmm2,%xmm3
xorpd  %xmm1,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm4,%xmm5
movsd  0x10(%rsp),%xmm0
mulsd  0xe5f(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  %xmm4,%xmm5
movapd %xmm5,0xb0(%rsp)
xorpd  %xmm1,%xmm4
movapd %xmm4,0xc0(%rsp)
mov    %edx,%ecx
movapd %xmm3,0xa0(%rsp)
pshufd $0x44,%xmm3,%xmm0
movdqa %xmm0,0x90(%rsp)
unpcklpd %xmm2,%xmm2
movapd %xmm2,0x80(%rsp)
mov    $0x1,%eax
mov    %rax,0x28(%rsp)
movl   $0x3,0x4(%rsp)
xor    %eax,%eax
mov    %rcx,0x20(%rsp)
jmp    123e <omplennard_jones+0xfe>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addq   $0x1,0x28(%rsp)
addl   $0x3,0x4(%rsp)
mov    0x20(%rsp),%rcx
mov    0x48(%rsp),%rax
cmp    %rcx,%rax
je     14af <omplennard_jones+0x36f>
lea    0x1(%rax),%rdx
mov    %rdx,0x48(%rsp)
cmp    %rcx,%rdx
jae    1220 <omplennard_jones+0xe0>
lea    (%rax,%rax,2),%ecx
mov    %rcx,0x40(%rsp)
lea    (%rax,%rax,2),%ecx
add    $0x1,%ecx
mov    %rcx,0x38(%rsp)
lea    0x2(%rax,%rax,2),%eax
mov    %rax,0x30(%rsp)
mov    0x20(%rsp),%r12
mov    0x4(%rsp),%eax
mov    %eax,%r14d
jmp    137e <omplennard_jones+0x23e>
nopl   0x0(%rax)
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm4,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm5,%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movapd 0xb0(%rsp),%xmm1
divsd  %xmm3,%xmm1
movapd 0xc0(%rsp),%xmm3
divsd  %xmm2,%xmm3
addsd  %xmm1,%xmm1
addsd  %xmm3,%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm4
mov    0x40(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm2
addsd  %xmm4,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
mulsd  %xmm1,%xmm0
mov    0x38(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
mulsd  %xmm5,%xmm1
mov    0x30(%rsp),%rax
movsd  (%rbx,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
movsd  (%rbx,%r13,8),%xmm2
subsd  %xmm4,%xmm2
movsd  %xmm2,(%rbx,%r13,8)
movsd  (%rbx,%r15,8),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%r15,8)
movsd  (%rbx,%rdx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
mov    %rbp,%rdi
call   1030 <free@plt>
add    $0x3,%r14d
add    $0xffffffffffffffff,%r12
cmp    %r12,0x28(%rsp)
je     1220 <omplennard_jones+0xe0>
mov    $0x18,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     14c1 <omplennard_jones+0x381>
mov    %rax,%rbp
lea    0x1(%r14),%r15d
lea    0x2(%r14),%edx
mov    %r14d,%r13d
mov    0x50(%rsp),%rax
movsd  (%rax,%r13,8),%xmm4
mov    0x40(%rsp),%rcx
subsd  (%rax,%rcx,8),%xmm4
movsd  %xmm4,0x0(%rbp)
movsd  (%rax,%rdx,8),%xmm5
movhpd (%rax,%r15,8),%xmm5
mov    0x30(%rsp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rsp),%rcx
movhpd (%rax,%rcx,8),%xmm0
subpd  %xmm0,%xmm5
movapd %xmm5,%xmm0
shufpd $0x1,%xmm5,%xmm0
movupd %xmm0,0x8(%rbp)
cmpl   $0x0,0x1c(%rsp)
je     1280 <omplennard_jones+0x140>
movapd %xmm4,%xmm0
divsd  0x60(%rsp),%xmm0
mov    %rdx,0x58(%rsp)
movsd  %xmm4,0x8(%rsp)
movapd %xmm5,0x70(%rsp)
call   1050 <rint@plt>
mulsd  0xa0(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x0(%rbp)
movapd 0x70(%rsp),%xmm0
divpd  0x80(%rsp),%xmm0
movapd %xmm0,0xd0(%rsp)
call   1050 <rint@plt>
movapd %xmm0,0xe0(%rsp)
movapd 0xd0(%rsp),%xmm0
unpckhpd %xmm0,%xmm0
call   1050 <rint@plt>
movapd 0x70(%rsp),%xmm5
movsd  0x8(%rsp),%xmm4
mov    0x58(%rsp),%rdx
movapd 0xe0(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x90(%rsp),%xmm1
addpd  %xmm1,%xmm5
movapd %xmm5,%xmm0
shufpd $0x1,%xmm5,%xmm0
movupd %xmm0,0x8(%rbp)
jmp    1280 <omplennard_jones+0x140>
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @omplennard_jones(double* %0, double* %1, i32 %2, double %3, double %4, i32 %5, double %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca double
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double*
store double* %0, double** %8
store double* %1, double** %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store i32 %5, i32* %13
store double %6, double* %14
store i32 0, i32* %15
br label %24
24: ; preds = %276, %7
%25 = load i32, i32* %15
%26 = load i32, i32* %10
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %279
28: ; preds = %24
%29 = load i32, i32* %15
%30 = add nsw i32 %29, 1
store i32 %30, i32* %16
br label %31
31: ; preds = %272, %28
%32 = load i32, i32* %16
%33 = load i32, i32* %10
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %275
35: ; preds = %31
%36 = call double* @malloc(i32 24)
store double* %36, double** %23
%37 = load double*, double** %23
%38 = icmp eq double* %37, null
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %35
%42 = load double*, double** %8
%43 = load i32, i32* %16
%44 = mul nsw i32 %43, 3
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %42, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %8
%49 = load i32, i32* %15
%50 = mul nsw i32 %49, 3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %48, i64 %51
%53 = load double, double* %52
%54 = fsub double %47, %53
%55 = load double*, double** %23
%56 = getelementptr inbounds double, double* %55, i64 0
store double %54, double* %56
%57 = load double*, double** %8
%58 = load i32, i32* %16
%59 = mul nsw i32 %58, 3
%60 = add nsw i32 %59, 1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %57, i64 %61
%63 = load double, double* %62
%64 = load double*, double** %8
%65 = load i32, i32* %15
%66 = mul nsw i32 %65, 3
%67 = add nsw i32 %66, 1
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %64, i64 %68
%70 = load double, double* %69
%71 = fsub double %63, %70
%72 = load double*, double** %23
%73 = getelementptr inbounds double, double* %72, i64 1
store double %71, double* %73
%74 = load double*, double** %8
%75 = load i32, i32* %16
%76 = mul nsw i32 %75, 3
%77 = add nsw i32 %76, 2
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %74, i64 %78
%80 = load double, double* %79
%81 = load double*, double** %8
%82 = load i32, i32* %15
%83 = mul nsw i32 %82, 3
%84 = add nsw i32 %83, 2
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %81, i64 %85
%87 = load double, double* %86
%88 = fsub double %80, %87
%89 = load double*, double** %23
%90 = getelementptr inbounds double, double* %89, i64 2
store double %88, double* %90
%91 = load i32, i32* %13
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %136
93: ; preds = %41
%94 = load double*, double** %23
%95 = getelementptr inbounds double, double* %94, i64 0
%96 = load double, double* %95
%97 = load double, double* %14
%98 = load double*, double** %23
%99 = getelementptr inbounds double, double* %98, i64 0
%100 = load double, double* %99
%101 = load double, double* %14
%102 = fdiv double %100, %101
%103 = call double @llvm.rint.f64(double %102)
%104 = fneg double %97
%105 = call double @llvm.fmuladd.f64(double %104, double %103, double %96)
%106 = load double*, double** %23
%107 = getelementptr inbounds double, double* %106, i64 0
store double %105, double* %107
%108 = load double*, double** %23
%109 = getelementptr inbounds double, double* %108, i64 1
%110 = load double, double* %109
%111 = load double, double* %14
%112 = load double*, double** %23
%113 = getelementptr inbounds double, double* %112, i64 1
%114 = load double, double* %113
%115 = load double, double* %14
%116 = fdiv double %114, %115
%117 = call double @llvm.rint.f64(double %116)
%118 = fneg double %111
%119 = call double @llvm.fmuladd.f64(double %118, double %117, double %110)
%120 = load double*, double** %23
%121 = getelementptr inbounds double, double* %120, i64 1
store double %119, double* %121
%122 = load double*, double** %23
%123 = getelementptr inbounds double, double* %122, i64 2
%124 = load double, double* %123
%125 = load double, double* %14
%126 = load double*, double** %23
%127 = getelementptr inbounds double, double* %126, i64 2
%128 = load double, double* %127
%129 = load double, double* %14
%130 = fdiv double %128, %129
%131 = call double @llvm.rint.f64(double %130)
%132 = fneg double %125
%133 = call double @llvm.fmuladd.f64(double %132, double %131, double %124)
%134 = load double*, double** %23
%135 = getelementptr inbounds double, double* %134, i64 2
store double %133, double* %135
br label %136
136: ; preds = %93, %41
%137 = load double*, double** %23
%138 = getelementptr inbounds double, double* %137, i64 0
%139 = load double, double* %138
%140 = load double*, double** %23
%141 = getelementptr inbounds double, double* %140, i64 0
%142 = load double, double* %141
%143 = load double*, double** %23
%144 = getelementptr inbounds double, double* %143, i64 1
%145 = load double, double* %144
%146 = load double*, double** %23
%147 = getelementptr inbounds double, double* %146, i64 1
%148 = load double, double* %147
%149 = fmul double %145, %148
%150 = call double @llvm.fmuladd.f64(double %139, double %142, double %149)
%151 = load double*, double** %23
%152 = getelementptr inbounds double, double* %151, i64 2
%153 = load double, double* %152
%154 = load double*, double** %23
%155 = getelementptr inbounds double, double* %154, i64 2
%156 = load double, double* %155
%157 = call double @llvm.fmuladd.f64(double %153, double %156, double %150)
store double %157, double* %17
%158 = load double, double* %17
%159 = load double, double* %17
%160 = fmul double %158, %159
%161 = load double, double* %17
%162 = fmul double %160, %161
%163 = load double, double* %17
%164 = fmul double %162, %163
store double %164, double* %19
%165 = load double, double* %19
%166 = load double, double* %17
%167 = fmul double %165, %166
%168 = load double, double* %17
%169 = fmul double %167, %168
%170 = load double, double* %17
%171 = fmul double %169, %170
store double %171, double* %18
%172 = load double, double* %11
%173 = load double, double* %11
%174 = fmul double %172, %173
%175 = load double, double* %11
%176 = fmul double %174, %175
%177 = load double, double* %11
%178 = fmul double %176, %177
%179 = load double, double* %11
%180 = fmul double %178, %179
%181 = load double, double* %11
%182 = fmul double %180, %181
store double %182, double* %20
%183 = load double, double* %20
%184 = load double, double* %20
%185 = fmul double %183, %184
store double %185, double* %21
%186 = load double, double* %12
%187 = fmul double -2.400000e+01, %186
%188 = load double, double* %21
%189 = load double, double* %18
%190 = fdiv double %188, %189
%191 = load double, double* %20
%192 = load double, double* %19
%193 = fdiv double %191, %192
%194 = fneg double %193
%195 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %190, double %194)
%196 = fmul double %187, %195
store double %196, double* %22
%197 = load double, double* %22
%198 = load double*, double** %23
%199 = getelementptr inbounds double, double* %198, i64 0
%200 = load double, double* %199
%201 = load double*, double** %9
%202 = load i32, i32* %15
%203 = mul nsw i32 %202, 3
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds double, double* %201, i64 %204
%206 = load double, double* %205
%207 = call double @llvm.fmuladd.f64(double %197, double %200, double %206)
store double %207, double* %205
%208 = load double, double* %22
%209 = load double*, double** %23
%210 = getelementptr inbounds double, double* %209, i64 1
%211 = load double, double* %210
%212 = load double*, double** %9
%213 = load i32, i32* %15
%214 = mul nsw i32 %213, 3
%215 = add nsw i32 %214, 1
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %212, i64 %216
%218 = load double, double* %217
%219 = call double @llvm.fmuladd.f64(double %208, double %211, double %218)
store double %219, double* %217
%220 = load double, double* %22
%221 = load double*, double** %23
%222 = getelementptr inbounds double, double* %221, i64 2
%223 = load double, double* %222
%224 = load double*, double** %9
%225 = load i32, i32* %15
%226 = mul nsw i32 %225, 3
%227 = add nsw i32 %226, 2
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds double, double* %224, i64 %228
%230 = load double, double* %229
%231 = call double @llvm.fmuladd.f64(double %220, double %223, double %230)
store double %231, double* %229
%232 = load double, double* %22
%233 = load double*, double** %23
%234 = getelementptr inbounds double, double* %233, i64 0
%235 = load double, double* %234
%236 = load double*, double** %9
%237 = load i32, i32* %16
%238 = mul nsw i32 %237, 3
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %236, i64 %239
%241 = load double, double* %240
%242 = fneg double %232
%243 = call double @llvm.fmuladd.f64(double %242, double %235, double %241)
store double %243, double* %240
%244 = load double, double* %22
%245 = load double*, double** %23
%246 = getelementptr inbounds double, double* %245, i64 1
%247 = load double, double* %246
%248 = load double*, double** %9
%249 = load i32, i32* %16
%250 = mul nsw i32 %249, 3
%251 = add nsw i32 %250, 1
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double, double* %248, i64 %252
%254 = load double, double* %253
%255 = fneg double %244
%256 = call double @llvm.fmuladd.f64(double %255, double %247, double %254)
store double %256, double* %253
%257 = load double, double* %22
%258 = load double*, double** %23
%259 = getelementptr inbounds double, double* %258, i64 2
%260 = load double, double* %259
%261 = load double*, double** %9
%262 = load i32, i32* %16
%263 = mul nsw i32 %262, 3
%264 = add nsw i32 %263, 2
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %261, i64 %265
%267 = load double, double* %266
%268 = fneg double %257
%269 = call double @llvm.fmuladd.f64(double %268, double %260, double %267)
store double %269, double* %266
%270 = load double*, double** %23
%271 = call i32 @free(double* %270)
br label %272
272: ; preds = %136
%273 = load i32, i32* %16
%274 = add nsw i32 %273, 1
store i32 %274, i32* %16
br label %31
275: ; preds = %31
br label %276
276: ; preds = %275
%277 = load i32, i32* %15
%278 = add nsw i32 %277, 1
store i32 %278, i32* %15
br label %24
279: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @omplennard_jones(double* nocapture %0, double* nocapture %1, i32 %2, double %3, double %4, i32 %5, double %6) {
%8 = icmp sgt i32 %2, 0
br i1 %8, label %9, label %126
9: ; preds = %7
%10 = icmp eq i32 %5, 0
%11 = fneg double %6
%12 = fmul double %3, %3
%13 = fmul double %12, %3
%14 = fmul double %13, %3
%15 = fmul double %14, %3
%16 = fmul double %15, %3
%17 = fmul double %16, %16
%18 = fmul double %4, -2.400000e+01
%19 = fneg double %16
%20 = zext i32 %2 to i64
%21 = zext i32 %2 to i64
%22 = insertelement <2 x double> poison, double %11, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = insertelement <2 x double> poison, double %6, i64 0
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> zeroinitializer
br label %29
26: ; preds = %89, %29
%27 = add nuw nsw i64 %31, 1
%28 = icmp eq i64 %32, %21
br i1 %28, label %126, label %29
29: ; preds = %9, %26
%30 = phi i64 [ 0, %9 ], [ %32, %26 ]
%31 = phi i64 [ 1, %9 ], [ %27, %26 ]
%32 = add nuw nsw i64 %30, 1
%33 = icmp ult i64 %32, %20
br i1 %33, label %34, label %26
34: ; preds = %29
%35 = trunc i64 %30 to i32
%36 = mul nsw i32 %35, 3
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds double, double* %0, i64 %37
%39 = add nuw nsw i32 %36, 1
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds double, double* %0, i64 %40
%42 = add nuw nsw i32 %36, 2
%43 = zext i32 %42 to i64
%44 = getelementptr inbounds double, double* %0, i64 %43
%45 = getelementptr inbounds double, double* %1, i64 %37
%46 = getelementptr inbounds double, double* %1, i64 %40
%47 = getelementptr inbounds double, double* %1, i64 %43
br label %48
48: ; preds = %34, %89
%49 = phi i64 [ %31, %34 ], [ %124, %89 ]
%50 = tail call double* @malloc(i32 24)
%51 = icmp eq double* %50, null
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = tail call i32 (...) @abort()
unreachable
54: ; preds = %48
%55 = trunc i64 %49 to i32
%56 = mul nsw i32 %55, 3
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds double, double* %0, i64 %57
%59 = load double, double* %58
%60 = load double, double* %38
%61 = fsub double %59, %60
store double %61, double* %50
%62 = add nuw nsw i32 %56, 1
%63 = zext i32 %62 to i64
%64 = getelementptr inbounds double, double* %0, i64 %63
%65 = load double, double* %64
%66 = load double, double* %41
%67 = getelementptr inbounds double, double* %50, i64 1
%68 = add nuw nsw i32 %56, 2
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds double, double* %0, i64 %69
%71 = load double, double* %70
%72 = load double, double* %44
%73 = insertelement <2 x double> poison, double %71, i64 0
%74 = insertelement <2 x double> %73, double %65, i64 1
%75 = insertelement <2 x double> poison, double %72, i64 0
%76 = insertelement <2 x double> %75, double %66, i64 1
%77 = fsub <2 x double> %74, %76
%78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%79 = bitcast double* %67 to <2 x double>*
store <2 x double> %78, <2 x double>* %79
br i1 %10, label %89, label %80
80: ; preds = %54
%81 = fdiv double %61, %6
%82 = tail call double @llvm.rint.f64(double %81)
%83 = tail call double @llvm.fmuladd.f64(double %11, double %82, double %61)
store double %83, double* %50
%84 = fdiv <2 x double> %77, %25
%85 = call <2 x double> @llvm.rint.v2f64(<2 x double> %84)
%86 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %23, <2 x double> %85, <2 x double> %77)
%87 = shufflevector <2 x double> %86, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%88 = bitcast double* %67 to <2 x double>*
store <2 x double> %87, <2 x double>* %88
br label %89
89: ; preds = %80, %54
%90 = phi double [ %83, %80 ], [ %61, %54 ]
%91 = phi <2 x double> [ %86, %80 ], [ %77, %54 ]
%92 = extractelement <2 x double> %91, i64 1
%93 = fmul double %92, %92
%94 = tail call double @llvm.fmuladd.f64(double %90, double %90, double %93)
%95 = extractelement <2 x double> %91, i64 0
%96 = tail call double @llvm.fmuladd.f64(double %95, double %95, double %94)
%97 = fmul double %96, %96
%98 = fmul double %96, %97
%99 = fmul double %96, %98
%100 = fmul double %96, %99
%101 = fmul double %96, %100
%102 = fmul double %96, %101
%103 = fdiv double %17, %102
%104 = fdiv double %19, %99
%105 = tail call double @llvm.fmuladd.f64(double %103, double 2.000000e+00, double %104)
%106 = fmul double %18, %105
%107 = load double, double* %45
%108 = tail call double @llvm.fmuladd.f64(double %106, double %90, double %107)
store double %108, double* %45
%109 = load double, double* %46
%110 = tail call double @llvm.fmuladd.f64(double %106, double %92, double %109)
store double %110, double* %46
%111 = load double, double* %47
%112 = tail call double @llvm.fmuladd.f64(double %106, double %95, double %111)
store double %112, double* %47
%113 = getelementptr inbounds double, double* %1, i64 %57
%114 = load double, double* %113
%115 = fneg double %106
%116 = tail call double @llvm.fmuladd.f64(double %115, double %90, double %114)
store double %116, double* %113
%117 = getelementptr inbounds double, double* %1, i64 %63
%118 = load double, double* %117
%119 = tail call double @llvm.fmuladd.f64(double %115, double %92, double %118)
store double %119, double* %117
%120 = getelementptr inbounds double, double* %1, i64 %69
%121 = load double, double* %120
%122 = tail call double @llvm.fmuladd.f64(double %115, double %95, double %121)
store double %122, double* %120
%123 = tail call i32 @free(double* %50)
%124 = add nuw nsw i64 %49, 1
%125 = icmp eq i64 %124, %21
br i1 %125, label %26, label %48
126: ; preds = %26, %7
ret void
}