#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 */
double RAND_MAX;
double ed(double *, int, int, int);
int getpid();
scalar_t__ malloc(int);
int neighbours(double *, int, double, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int, double, ...);
int rand();
scalar_t__ realloc(int *, int);
int /*<<< orphan*/ srand(scalar_t__);
double stress(double *, double *, int, int);
scalar_t__ time(int /*<<< orphan*/ *);
double CkNeighboursStochasticProximityEmbedding(double *s, double *d_coords,
                                                double rco, int kn, int nelem,
                                                int dim, double maxlam,
                                                double minlam, int ncycle,
                                                int stressfreq) {
  int *tmp;
  int a = 0, b = 0, idx = 0, idxa = 0, idxb = 0, idxak = 0, idxbk = 0,
      idxab = 0;
  double dab = 0.0, rab = 0.0;
  double lam = maxlam;
  double t = 0.0;
  double finalstress = 0.0;
  int *s_indeces = (int *)malloc(nelem * nelem * sizeof(int));
  int *ioffsets = (int *)malloc(nelem * sizeof(int));
  int *js = (int *)malloc(nelem * nelem * sizeof(int));
  int nlistlen = 0;
  srand(time(NULL) + getpid() * getpid());
  nlistlen = neighbours(s, nelem, rco, s_indeces, ioffsets, js);
  s_indeces = (int *)realloc(s_indeces, nlistlen * sizeof(int));
  ioffsets = (int *)realloc(ioffsets, nelem * sizeof(int));
  js = (int *)realloc(js, nlistlen * sizeof(int));
  for (int i = 0; i < nelem * dim; i++) {
    d_coords[i] = (double)rand() / RAND_MAX;
  }
  for (int i = 0; i < nelem + 1; i++) {
  }
  for (int i = 0; i < ncycle; i++) {
    for (int a = 0; a < nelem; a++) {
      for (int k = 0; k < kn; k++) {
        int test = ioffsets[1] - ioffsets[0];
        b = rand() % (ioffsets[a + 1] - ioffsets[a]);
        idxab = s_indeces[ioffsets[a] + b];
        b = js[ioffsets[a] + b];
        dab = ed(d_coords, a, b, dim);
        rab = s[idxab];
        if (dab < rab) {
          idxa = a * dim;
          idxb = b * dim;
          t = lam * 0.5 * (rab - dab) / (dab + 1e-8);
          for (int k = 0; k < dim; k++) {
            idxak = idxa + k;
            idxbk = idxb + k;
            d_coords[idxak] =
                d_coords[idxak] + t * (d_coords[idxak] - d_coords[idxbk]);
            d_coords[idxbk] =
                d_coords[idxbk] + t * (d_coords[idxbk] - d_coords[idxak]);
          }
        }
      }
    }
    lam = lam - (maxlam - minlam) / (double)(ncycle - 1);
    if (i % stressfreq == 0 && i != 0 && stressfreq > 0)
      printf("Cycle %d - Residual stress: %.3f, lambda %.3f\n", i,
             stress(s, d_coords, dim, nelem), lam);
  }
  finalstress = stress(s, d_coords, dim, nelem);
  printf("Calculation finished (%d dimensions). - Residual stress: %.3f\n", dim,
         finalstress);
  return (finalstress);
}


x86 assembly (clang, -O0):
<CkNeighboursStochasticProximityEmbedding>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
mov    %r9d,-0x3c(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x20(%rbp),%eax
imul   -0x20(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x20(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0xac(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %rax,-0xd8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0xcc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0xd8(%rbp),%rdi
mov    %eax,%ecx
mov    -0xcc(%rbp),%eax
imul   %ecx,%eax
cltq
add    %rax,%rdi
call   1060 <srand@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
mov    -0x98(%rbp),%rdx
mov    -0xa0(%rbp),%rcx
mov    -0xa8(%rbp),%r8
call   10b0 <neighbours@plt>
mov    %eax,-0xac(%rbp)
mov    -0x98(%rbp),%rdi
movslq -0xac(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10a0 <realloc@plt>
mov    %rax,-0x98(%rbp)
mov    -0xa0(%rbp),%rdi
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10a0 <realloc@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa8(%rbp),%rdi
movslq -0xac(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   10a0 <realloc@plt>
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%eax
mov    -0x20(%rbp),%ecx
imul   -0x24(%rbp),%ecx
cmp    %ecx,%eax
jge    13b3 <CkNeighboursStochasticProximityEmbedding+0x213>
mov    $0x0,%al
call   10c0 <rand@plt>
cvtsi2sd %eax,%xmm0
mov    0x2c5d(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0xb0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    1364 <CkNeighboursStochasticProximityEmbedding+0x1c4>
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13ea <CkNeighboursStochasticProximityEmbedding+0x24a>
jmp    13d6 <CkNeighboursStochasticProximityEmbedding+0x236>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    13bd <CkNeighboursStochasticProximityEmbedding+0x21d>
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    16fa <CkNeighboursStochasticProximityEmbedding+0x55a>
movl   $0x0,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1659 <CkNeighboursStochasticProximityEmbedding+0x4b9>
movl   $0x0,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1640 <CkNeighboursStochasticProximityEmbedding+0x4a0>
mov    -0xa0(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0xa0(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0xc4(%rbp)
mov    $0x0,%al
call   10c0 <rand@plt>
mov    -0xa0(%rbp),%rcx
mov    -0xbc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
mov    -0xa0(%rbp),%rdx
movslq -0xbc(%rbp),%rsi
sub    (%rdx,%rsi,4),%ecx
cltd
idiv   %ecx
mov    %edx,-0x50(%rbp)
mov    -0x98(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movslq -0xbc(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x68(%rbp)
mov    -0xa8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movslq -0xbc(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0xbc(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x24(%rbp),%ecx
call   1070 <ed@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1627 <CkNeighboursStochasticProximityEmbedding+0x487>
mov    -0xbc(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x50(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x5c(%rbp)
movsd  0xadf(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
subsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xabc(%rip),%xmm1
addsd  -0x70(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1622 <CkNeighboursStochasticProximityEmbedding+0x482>
mov    -0x58(%rbp),%eax
add    -0xc8(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
add    -0xc8(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    155f <CkNeighboursStochasticProximityEmbedding+0x3bf>
jmp    1627 <CkNeighboursStochasticProximityEmbedding+0x487>
jmp    162c <CkNeighboursStochasticProximityEmbedding+0x48c>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1426 <CkNeighboursStochasticProximityEmbedding+0x286>
jmp    1645 <CkNeighboursStochasticProximityEmbedding+0x4a5>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    140d <CkNeighboursStochasticProximityEmbedding+0x26d>
movsd  -0x80(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0xb8(%rbp),%eax
cltd
idivl  0x10(%rbp)
cmp    $0x0,%edx
jne    16e1 <CkNeighboursStochasticProximityEmbedding+0x541>
cmpl   $0x0,-0xb8(%rbp)
je     16e1 <CkNeighboursStochasticProximityEmbedding+0x541>
cmpl   $0x0,0x10(%rbp)
jle    16e1 <CkNeighboursStochasticProximityEmbedding+0x541>
mov    -0xb8(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1050 <stress@plt>
mov    -0xdc(%rbp),%esi
movsd  -0x80(%rbp),%xmm1
lea    0x936(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    16e6 <CkNeighboursStochasticProximityEmbedding+0x546>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    13f4 <CkNeighboursStochasticProximityEmbedding+0x254>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1050 <stress@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x24(%rbp),%esi
movsd  -0x90(%rbp),%xmm0
ff
lea    0x918(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CkNeighboursStochasticProximityEmbedding>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,0x38(%rsp)
movsd  %xmm2,0x40(%rsp)
movsd  %xmm1,0x10(%rsp)
mov    %r8d,0x4(%rsp)
mov    %ecx,%r12d
mov    %edx,0x1c(%rsp)
movsd  %xmm0,0x30(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,%rbx
lea    0x0(,%r12,4),%r13d
mov    %r13d,%ebp
imul   %ecx,%ebp
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,%r15
mov    %r13d,%edi
call   1090 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    %ebp,%edi
call   1090 <malloc@plt>
mov    %rax,0x48(%rsp)
xor    %edi,%edi
call   1080 <time@plt>
mov    %rax,%rbp
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <getpid@plt>
imul   %r14d,%eax
movslq %eax,%rdi
add    %rbp,%rdi
call   1060 <srand@plt>
mov    %rbx,0x50(%rsp)
mov    %rbx,%rdi
mov    %r12d,%esi
movsd  0x30(%rsp),%xmm0
mov    %r15,%rdx
mov    0x28(%rsp),%rbx
mov    %rbx,%rcx
mov    0x48(%rsp),%r14
mov    %r14,%r8
call   10b0 <neighbours@plt>
lea    0x0(,%rax,4),%ebp
mov    %r15,%rdi
mov    %ebp,%esi
call   10a0 <realloc@plt>
mov    %rax,0xd0(%rsp)
mov    %rbx,%rdi
mov    %r13d,%esi
mov    0x8(%rsp),%r15
call   10a0 <realloc@plt>
mov    %rax,0xc8(%rsp)
mov    %r14,%rdi
mov    %ebp,%esi
call   10a0 <realloc@plt>
mov    %rax,0x48(%rsp)
mov    0x4(%rsp),%eax
mov    %r12,0x20(%rsp)
imul   %r12d,%eax
test   %eax,%eax
jle    12e2 <CkNeighboursStochasticProximityEmbedding+0x142>
mov    %eax,%ebx
mov    0x2d2e(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %eax,%eax
call   10c0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  (%r14),%xmm0
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12c0 <CkNeighboursStochasticProximityEmbedding+0x120>
cmpl   $0x0,0x38(%rsp)
jle    170d <CkNeighboursStochasticProximityEmbedding+0x56d>
movsd  0x10(%rsp),%xmm1
subsd  0x40(%rsp),%xmm1
mov    0x38(%rsp),%rax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x68(%rsp)
movslq 0x4(%rsp),%rcx
mov    0x20(%rsp),%eax
mov    %rax,0x88(%rsp)
mov    %ecx,%r13d
mov    0x8(%rsp),%rax
lea    (%rax,%r13,8),%rdx
mov    %rdx,0xb8(%rsp)
mov    %r13d,%edx
and    $0xfffffffe,%edx
mov    %rdx,0xa8(%rsp)
add    $0xfffffffffffffffe,%rdx
mov    %rdx,0xa0(%rsp)
mov    %rdx,%rsi
shr    %rsi
add    $0x1,%rsi
mov    %rsi,%rdx
mov    %rsi,0x98(%rsp)
and    $0xfffffffffffffffe,%rsi
mov    %rsi,0x78(%rsp)
add    $0x10,%rax
mov    %rax,0x60(%rsp)
mov    %rcx,0x70(%rsp)
lea    0x0(,%rcx,8),%rax
mov    %rax,0x80(%rsp)
xor    %ebx,%ebx
jmp    13ad <CkNeighboursStochasticProximityEmbedding+0x20d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    0x38(%rsp),%ebx
je     170d <CkNeighboursStochasticProximityEmbedding+0x56d>
mov    %ebx,0x5c(%rsp)
cmpl   $0x0,0x20(%rsp)
jle    16a0 <CkNeighboursStochasticProximityEmbedding+0x500>
movsd  0x10(%rsp),%xmm0
mulsd  0xc36(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
mov    0x8(%rsp),%r12
mov    0x60(%rsp),%rbx
xor    %eax,%eax
jmp    1404 <CkNeighboursStochasticProximityEmbedding+0x264>
xchg   %ax,%ax
mov    0x80(%rsp),%rax
add    %rax,%rbx
add    %rax,%r12
mov    0x30(%rsp),%rcx
mov    %rcx,%rax
cmp    0x88(%rsp),%rcx
je     16a0 <CkNeighboursStochasticProximityEmbedding+0x500>
mov    %rax,0x28(%rsp)
add    $0x1,%rax
mov    %rax,0x30(%rsp)
cmpl   $0x0,0x1c(%rsp)
jle    13e0 <CkNeighboursStochasticProximityEmbedding+0x240>
mov    0x28(%rsp),%rdx
imul   0x70(%rsp),%rdx
lea    (%rdx,%r13,1),%rax
mov    0x8(%rsp),%rcx
mov    %rdx,0x90(%rsp)
lea    (%rcx,%rdx,8),%rdx
mov    %rdx,0xc0(%rsp)
lea    (%rcx,%rax,8),%rax
mov    %rax,0xb0(%rsp)
xor    %r14d,%r14d
jmp    146f <CkNeighboursStochasticProximityEmbedding+0x2cf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
cmp    0x1c(%rsp),%r14d
je     13e0 <CkNeighboursStochasticProximityEmbedding+0x240>
xor    %eax,%eax
call   10c0 <rand@plt>
mov    0xc8(%rsp),%rdx
mov    0x30(%rsp),%rcx
mov    (%rdx,%rcx,4),%ecx
mov    0x28(%rsp),%rsi
mov    (%rdx,%rsi,4),%edi
sub    %edi,%ecx
cltd
idiv   %ecx
add    %edi,%edx
movslq %edx,%rax
mov    0xd0(%rsp),%rcx
movslq (%rcx,%rax,4),%rbp
mov    0x48(%rsp),%rcx
mov    (%rcx,%rax,4),%r15d
mov    0x8(%rsp),%rdi
mov    %r15d,%edx
mov    0x4(%rsp),%ecx
call   1070 <ed@plt>
mov    0x50(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
ucomisd %xmm0,%xmm1
jbe    1460 <CkNeighboursStochasticProximityEmbedding+0x2c0>
movapd %xmm0,%xmm2
addsd  0xb2e(%rip),%xmm2
cmpl   $0x0,0x4(%rsp)
jle    1460 <CkNeighboursStochasticProximityEmbedding+0x2c0>
subsd  %xmm0,%xmm1
mulsd  0x40(%rsp),%xmm1
divsd  %xmm2,%xmm1
mov    0x4(%rsp),%ecx
imul   %ecx,%r15d
movslq %r15d,%rax
cmp    $0x1,%ecx
je     152c <CkNeighboursStochasticProximityEmbedding+0x38c>
mov    0xb8(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
cmp    %rcx,0xc0(%rsp)
jae    1585 <CkNeighboursStochasticProximityEmbedding+0x3e5>
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
cmp    0xb0(%rsp),%rcx
jae    1585 <CkNeighboursStochasticProximityEmbedding+0x3e5>
xor    %ecx,%ecx
mov    0x8(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rcx,8),%xmm0
movapd %xmm0,%xmm2
subsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%r12,%rcx,8)
movsd  (%rax,%rcx,8),%xmm0
movapd %xmm0,%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r13
jne    1540 <CkNeighboursStochasticProximityEmbedding+0x3a0>
jmp    1460 <CkNeighboursStochasticProximityEmbedding+0x2c0>
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
cmpq   $0x0,0xa0(%rsp)
je     1690 <CkNeighboursStochasticProximityEmbedding+0x4f0>
mov    0x60(%rsp),%rcx
lea    (%rcx,%rax,8),%rdx
mov    0x78(%rsp),%rsi
xor    %ecx,%ecx
nopl   0x0(%rax)
movupd -0x10(%rbx,%rcx,8),%xmm2
movupd -0x10(%rdx,%rcx,8),%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm4,-0x10(%rbx,%rcx,8)
movapd %xmm3,%xmm2
subpd  %xmm4,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm2,-0x10(%rdx,%rcx,8)
movupd (%rbx,%rcx,8),%xmm2
movupd (%rdx,%rcx,8),%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm4,(%rbx,%rcx,8)
movapd %xmm3,%xmm2
subpd  %xmm4,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm2,(%rdx,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    15b0 <CkNeighboursStochasticProximityEmbedding+0x410>
testb  $0x1,0x98(%rsp)
01
je     1677 <CkNeighboursStochasticProximityEmbedding+0x4d7>
mov    0x90(%rsp),%rdx
add    %rcx,%rdx
add    %rax,%rcx
mov    0x8(%rsp),%rsi
movupd (%rsi,%rdx,8),%xmm2
movupd (%rsi,%rcx,8),%xmm3
movapd %xmm2,%xmm4
subpd  %xmm3,%xmm4
mulpd  %xmm0,%xmm4
addpd  %xmm2,%xmm4
movupd %xmm4,(%rsi,%rdx,8)
movapd %xmm3,%xmm2
subpd  %xmm4,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm2,(%rsi,%rcx,8)
mov    0xa8(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r13,%rdx
je     1460 <CkNeighboursStochasticProximityEmbedding+0x2c0>
jmp    152e <CkNeighboursStochasticProximityEmbedding+0x38e>
xor    %ecx,%ecx
testb  $0x1,0x98(%rsp)
01
jne    1630 <CkNeighboursStochasticProximityEmbedding+0x490>
jmp    1677 <CkNeighboursStochasticProximityEmbedding+0x4d7>
xchg   %ax,%ax
mov    0x5c(%rsp),%ebx
mov    %ebx,%eax
cltd
mov    0x110(%rsp),%ecx
idiv   %ecx
movsd  0x10(%rsp),%xmm0
subsd  0x68(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
test   %ecx,%ecx
jle    13a0 <CkNeighboursStochasticProximityEmbedding+0x200>
test   %ebx,%ebx
je     13a0 <CkNeighboursStochasticProximityEmbedding+0x200>
test   %edx,%edx
jne    13a0 <CkNeighboursStochasticProximityEmbedding+0x200>
mov    0x50(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    0x4(%rsp),%edx
mov    0x20(%rsp),%rcx
call   1050 <stress@plt>
lea    0x917(%rip),%rdi
mov    %ebx,%esi
movsd  0x10(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
jmp    13a0 <CkNeighboursStochasticProximityEmbedding+0x200>
mov    0x50(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    0x4(%rsp),%ebx
mov    %ebx,%edx
mov    0x20(%rsp),%rcx
call   1050 <stress@plt>
movsd  %xmm0,0x8(%rsp)
lea    0x90b(%rip),%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
@.str = [47 x i8] c"Cycle %d - Residual stress: %.3f, lambda %.3f\0A\00"
@.str.1 = [63 x i8] c"Calculation finished (%d dimensions). - Residual stress: %.3f\0A\00"
define double @CkNeighboursStochasticProximityEmbedding(double* %0, double* %1, double %2, i32 %3, i32 %4, i32 %5, double %6, double %7, i32 %8, i32 %9) {
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca i32*
%36 = alloca i32*
%37 = alloca i32*
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
store double* %0, double** %11
store double* %1, double** %12
store double %2, double* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store double %6, double* %17
store double %7, double* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
store i32 0, i32* %22
store i32 0, i32* %23
store i32 0, i32* %24
store i32 0, i32* %25
store i32 0, i32* %26
store i32 0, i32* %27
store i32 0, i32* %28
store i32 0, i32* %29
store double 0.000000e+00, double* %30
store double 0.000000e+00, double* %31
%46 = load double, double* %17
store double %46, double* %32
store double 0.000000e+00, double* %33
store double 0.000000e+00, double* %34
%47 = load i32, i32* %15
%48 = load i32, i32* %15
%49 = mul nsw i32 %47, %48
%50 = sext i32 %49 to i64
%51 = mul i64 %50, 4
%52 = trunc i64 %51 to i32
%53 = call i64 @malloc(i32 %52)
%54 = inttoptr i64 %53 to i32*
store i32* %54, i32** %35
%55 = load i32, i32* %15
%56 = sext i32 %55 to i64
%57 = mul i64 %56, 4
%58 = trunc i64 %57 to i32
%59 = call i64 @malloc(i32 %58)
%60 = inttoptr i64 %59 to i32*
store i32* %60, i32** %36
%61 = load i32, i32* %15
%62 = load i32, i32* %15
%63 = mul nsw i32 %61, %62
%64 = sext i32 %63 to i64
%65 = mul i64 %64, 4
%66 = trunc i64 %65 to i32
%67 = call i64 @malloc(i32 %66)
%68 = inttoptr i64 %67 to i32*
store i32* %68, i32** %37
store i32 0, i32* %38
%69 = call i64 @time(i32* null)
%70 = call i32 (...) @getpid()
%71 = call i32 (...) @getpid()
%72 = mul nsw i32 %70, %71
%73 = sext i32 %72 to i64
%74 = add nsw i64 %69, %73
%75 = call i32 @srand(i64 %74)
%76 = load double*, double** %11
%77 = load i32, i32* %15
%78 = load double, double* %13
%79 = load i32*, i32** %35
%80 = load i32*, i32** %36
%81 = load i32*, i32** %37
%82 = call i32 @neighbours(double* %76, i32 %77, double %78, i32* %79, i32* %80, i32* %81)
store i32 %82, i32* %38
%83 = load i32*, i32** %35
%84 = load i32, i32* %38
%85 = sext i32 %84 to i64
%86 = mul i64 %85, 4
%87 = trunc i64 %86 to i32
%88 = call i64 @realloc(i32* %83, i32 %87)
%89 = inttoptr i64 %88 to i32*
store i32* %89, i32** %35
%90 = load i32*, i32** %36
%91 = load i32, i32* %15
%92 = sext i32 %91 to i64
%93 = mul i64 %92, 4
%94 = trunc i64 %93 to i32
%95 = call i64 @realloc(i32* %90, i32 %94)
%96 = inttoptr i64 %95 to i32*
store i32* %96, i32** %36
%97 = load i32*, i32** %37
%98 = load i32, i32* %38
%99 = sext i32 %98 to i64
%100 = mul i64 %99, 4
%101 = trunc i64 %100 to i32
%102 = call i64 @realloc(i32* %97, i32 %101)
%103 = inttoptr i64 %102 to i32*
store i32* %103, i32** %37
store i32 0, i32* %39
br label %104
104: ; preds = %119, %10
%105 = load i32, i32* %39
%106 = load i32, i32* %15
%107 = load i32, i32* %16
%108 = mul nsw i32 %106, %107
%109 = icmp slt i32 %105, %108
br i1 %109, label %110, label %122
110: ; preds = %104
%111 = call i32 (...) @rand()
%112 = sitofp i32 %111 to double
%113 = load double, double* @RAND_MAX
%114 = fdiv double %112, %113
%115 = load double*, double** %12
%116 = load i32, i32* %39
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %115, i64 %117
store double %114, double* %118
br label %119
119: ; preds = %110
%120 = load i32, i32* %39
%121 = add nsw i32 %120, 1
store i32 %121, i32* %39
br label %104
122: ; preds = %104
store i32 0, i32* %40
br label %123
123: ; preds = %129, %122
%124 = load i32, i32* %40
%125 = load i32, i32* %15
%126 = add nsw i32 %125, 1
%127 = icmp slt i32 %124, %126
br i1 %127, label %128, label %132
128: ; preds = %123
br label %129
129: ; preds = %128
%130 = load i32, i32* %40
%131 = add nsw i32 %130, 1
store i32 %131, i32* %40
br label %123
132: ; preds = %123
store i32 0, i32* %41
br label %133
133: ; preds = %317, %132
%134 = load i32, i32* %41
%135 = load i32, i32* %19
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %320
137: ; preds = %133
store i32 0, i32* %42
br label %138
138: ; preds = %284, %137
%139 = load i32, i32* %42
%140 = load i32, i32* %15
%141 = icmp slt i32 %139, %140
br i1 %141, label %142, label %287
142: ; preds = %138
store i32 0, i32* %43
br label %143
143: ; preds = %280, %142
%144 = load i32, i32* %43
%145 = load i32, i32* %14
%146 = icmp slt i32 %144, %145
br i1 %146, label %147, label %283
147: ; preds = %143
%148 = load i32*, i32** %36
%149 = getelementptr inbounds i32, i32* %148, i64 1
%150 = load i32, i32* %149
%151 = load i32*, i32** %36
%152 = getelementptr inbounds i32, i32* %151, i64 0
%153 = load i32, i32* %152
%154 = sub nsw i32 %150, %153
store i32 %154, i32* %44
%155 = call i32 (...) @rand()
%156 = load i32*, i32** %36
%157 = load i32, i32* %42
%158 = add nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %156, i64 %159
%161 = load i32, i32* %160
%162 = load i32*, i32** %36
%163 = load i32, i32* %42
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i32, i32* %162, i64 %164
%166 = load i32, i32* %165
%167 = sub nsw i32 %161, %166
%168 = srem i32 %155, %167
store i32 %168, i32* %23
%169 = load i32*, i32** %35
%170 = load i32*, i32** %36
%171 = load i32, i32* %42
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i32, i32* %170, i64 %172
%174 = load i32, i32* %173
%175 = load i32, i32* %23
%176 = add nsw i32 %174, %175
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i32, i32* %169, i64 %177
%179 = load i32, i32* %178
store i32 %179, i32* %29
%180 = load i32*, i32** %37
%181 = load i32*, i32** %36
%182 = load i32, i32* %42
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds i32, i32* %181, i64 %183
%185 = load i32, i32* %184
%186 = load i32, i32* %23
%187 = add nsw i32 %185, %186
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds i32, i32* %180, i64 %188
%190 = load i32, i32* %189
store i32 %190, i32* %23
%191 = load double*, double** %12
%192 = load i32, i32* %42
%193 = load i32, i32* %23
%194 = load i32, i32* %16
%195 = call double @ed(double* %191, i32 %192, i32 %193, i32 %194)
store double %195, double* %30
%196 = load double*, double** %11
%197 = load i32, i32* %29
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %196, i64 %198
%200 = load double, double* %199
store double %200, double* %31
%201 = load double, double* %30
%202 = load double, double* %31
%203 = fcmp olt double %201, %202
br i1 %203, label %204, label %279
204: ; preds = %147
%205 = load i32, i32* %42
%206 = load i32, i32* %16
%207 = mul nsw i32 %205, %206
store i32 %207, i32* %25
%208 = load i32, i32* %23
%209 = load i32, i32* %16
%210 = mul nsw i32 %208, %209
store i32 %210, i32* %26
%211 = load double, double* %32
%212 = fmul double %211, 5.000000e-01
%213 = load double, double* %31
%214 = load double, double* %30
%215 = fsub double %213, %214
%216 = fmul double %212, %215
%217 = load double, double* %30
%218 = fadd double %217, 1.000000e-08
%219 = fdiv double %216, %218
store double %219, double* %33
store i32 0, i32* %45
br label %220
220: ; preds = %275, %204
%221 = load i32, i32* %45
%222 = load i32, i32* %16
%223 = icmp slt i32 %221, %222
br i1 %223, label %224, label %278
224: ; preds = %220
%225 = load i32, i32* %25
%226 = load i32, i32* %45
%227 = add nsw i32 %225, %226
store i32 %227, i32* %27
%228 = load i32, i32* %26
%229 = load i32, i32* %45
%230 = add nsw i32 %228, %229
store i32 %230, i32* %28
%231 = load double*, double** %12
%232 = load i32, i32* %27
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds double, double* %231, i64 %233
%235 = load double, double* %234
%236 = load double, double* %33
%237 = load double*, double** %12
%238 = load i32, i32* %27
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %237, i64 %239
%241 = load double, double* %240
%242 = load double*, double** %12
%243 = load i32, i32* %28
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
%246 = load double, double* %245
%247 = fsub double %241, %246
%248 = call double @llvm.fmuladd.f64(double %236, double %247, double %235)
%249 = load double*, double** %12
%250 = load i32, i32* %27
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds double, double* %249, i64 %251
store double %248, double* %252
%253 = load double*, double** %12
%254 = load i32, i32* %28
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds double, double* %253, i64 %255
%257 = load double, double* %256
%258 = load double, double* %33
%259 = load double*, double** %12
%260 = load i32, i32* %28
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
%263 = load double, double* %262
%264 = load double*, double** %12
%265 = load i32, i32* %27
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %264, i64 %266
%268 = load double, double* %267
%269 = fsub double %263, %268
%270 = call double @llvm.fmuladd.f64(double %258, double %269, double %257)
%271 = load double*, double** %12
%272 = load i32, i32* %28
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds double, double* %271, i64 %273
store double %270, double* %274
br label %275
275: ; preds = %224
%276 = load i32, i32* %45
%277 = add nsw i32 %276, 1
store i32 %277, i32* %45
br label %220
278: ; preds = %220
br label %279
279: ; preds = %278, %147
br label %280
280: ; preds = %279
%281 = load i32, i32* %43
%282 = add nsw i32 %281, 1
store i32 %282, i32* %43
br label %143
283: ; preds = %143
br label %284
284: ; preds = %283
%285 = load i32, i32* %42
%286 = add nsw i32 %285, 1
store i32 %286, i32* %42
br label %138
287: ; preds = %138
%288 = load double, double* %32
%289 = load double, double* %17
%290 = load double, double* %18
%291 = fsub double %289, %290
%292 = load i32, i32* %19
%293 = sub nsw i32 %292, 1
%294 = sitofp i32 %293 to double
%295 = fdiv double %291, %294
%296 = fsub double %288, %295
store double %296, double* %32
%297 = load i32, i32* %41
%298 = load i32, i32* %20
%299 = srem i32 %297, %298
%300 = icmp eq i32 %299, 0
br i1 %300, label %301, label %316
301: ; preds = %287
%302 = load i32, i32* %41
%303 = icmp ne i32 %302, 0
br i1 %303, label %304, label %316
304: ; preds = %301
%305 = load i32, i32* %20
%306 = icmp sgt i32 %305, 0
br i1 %306, label %307, label %316
307: ; preds = %304
%308 = load i32, i32* %41
%309 = load double*, double** %11
%310 = load double*, double** %12
%311 = load i32, i32* %16
%312 = load i32, i32* %15
%313 = call double @stress(double* %309, double* %310, i32 %311, i32 %312)
%314 = load double, double* %32
%315 = call i32 (i8*, i32, double, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %308, double %313, double %314)
br label %316
316: ; preds = %307, %304, %301, %287
br label %317
317: ; preds = %316
%318 = load i32, i32* %41
%319 = add nsw i32 %318, 1
store i32 %319, i32* %41
br label %133
320: ; preds = %133
%321 = load double*, double** %11
%322 = load double*, double** %12
%323 = load i32, i32* %16
%324 = load i32, i32* %15
%325 = call double @stress(double* %321, double* %322, i32 %323, i32 %324)
store double %325, double* %34
%326 = load i32, i32* %16
%327 = load double, double* %34
%328 = call i32 (i8*, i32, double, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %326, double %327)
%329 = load double, double* %34
ret double %329
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
@.str = [47 x i8] c"Cycle %d - Residual stress: %.3f, lambda %.3f\0A\00"
@.str.1 = [63 x i8] c"Calculation finished (%d dimensions). - Residual stress: %.3f\0A\00"
define double @CkNeighboursStochasticProximityEmbedding(double* %0, double* %1, double %2, i32 %3, i32 %4, i32 %5, double %6, double %7, i32 %8, i32 %9) {
%11 = shl i32 %4, 2
%12 = mul i32 %11, %4
%13 = tail call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
%15 = tail call i64 @malloc(i32 %11)
%16 = inttoptr i64 %15 to i32*
%17 = tail call i64 @malloc(i32 %12)
%18 = inttoptr i64 %17 to i32*
%19 = tail call i64 @time(i32* null)
%20 = tail call i32 (...) @getpid()
%21 = tail call i32 (...) @getpid()
%22 = mul nsw i32 %21, %20
%23 = sext i32 %22 to i64
%24 = add nsw i64 %19, %23
%25 = tail call i32 @srand(i64 %24)
%26 = tail call i32 @neighbours(double* %0, i32 %4, double %2, i32* %14, i32* %16, i32* %18)
%27 = shl i32 %26, 2
%28 = tail call i64 @realloc(i32* %14, i32 %27)
%29 = inttoptr i64 %28 to i32*
%30 = tail call i64 @realloc(i32* %16, i32 %11)
%31 = inttoptr i64 %30 to i32*
%32 = tail call i64 @realloc(i32* %18, i32 %27)
%33 = inttoptr i64 %32 to i32*
%34 = mul i32 %5, %4
%35 = icmp sgt i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %10
%37 = zext i32 %34 to i64
br label %40
38: ; preds = %40, %10
%39 = icmp sgt i32 %8, 0
br i1 %39, label %49, label %78
40: ; preds = %36, %40
%41 = phi i64 [ 0, %36 ], [ %47, %40 ]
%42 = tail call i32 (...) @rand()
%43 = sitofp i32 %42 to double
%44 = load double, double* @RAND_MAX
%45 = fdiv double %43, %44
%46 = getelementptr inbounds double, double* %1, i64 %41
store double %45, double* %46
%47 = add nuw nsw i64 %41, 1
%48 = icmp eq i64 %47, %37
br i1 %48, label %38, label %40
49: ; preds = %38
%50 = icmp sgt i32 %4, 0
%51 = icmp sgt i32 %3, 0
%52 = icmp sgt i32 %5, 0
%53 = fsub double %6, %7
%54 = add nsw i32 %8, -1
%55 = sitofp i32 %54 to double
%56 = fdiv double %53, %55
%57 = icmp sgt i32 %9, 0
%58 = sext i32 %5 to i64
%59 = zext i32 %4 to i64
%60 = zext i32 %5 to i64
%61 = getelementptr double, double* %1, i64 %60
%62 = and i64 %60, 4294967294
%63 = add nsw i64 %62, -2
%64 = lshr exact i64 %63, 1
%65 = add nuw i64 %64, 1
%66 = icmp eq i32 %5, 1
%67 = and i64 %60, 4294967294
%68 = and i64 %65, 1
%69 = icmp eq i64 %63, 0
%70 = and i64 %65, -2
%71 = icmp eq i64 %68, 0
%72 = icmp eq i64 %67, %60
br label %73
73: ; preds = %49, %213
%74 = phi i32 [ 0, %49 ], [ %214, %213 ]
%75 = phi double [ %6, %49 ], [ %94, %213 ]
br i1 %50, label %76, label %93
76: ; preds = %73
%77 = fmul double %75, 5.000000e-01
br label %81
78: ; preds = %213, %38
%79 = tail call double @stress(double* %0, double* %1, i32 %5, i32 %4)
%80 = tail call i32 (i8*, i32, double, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %5, double %79)
ret double %79
81: ; preds = %76, %100
%82 = phi i64 [ 0, %76 ], [ %87, %100 ]
%83 = mul i64 %82, %58
%84 = getelementptr double, double* %1, i64 %83
%85 = add i64 %83, %60
%86 = getelementptr double, double* %1, i64 %85
%87 = add nuw nsw i64 %82, 1
br i1 %51, label %88, label %100
88: ; preds = %81
%89 = getelementptr inbounds i32, i32* %31, i64 %87
%90 = getelementptr inbounds i32, i32* %31, i64 %82
%91 = mul nsw i64 %82, %58
%92 = trunc i64 %82 to i32
br label %102
93: ; preds = %100, %73
%94 = fsub double %75, %56
%95 = srem i32 %74, %9
%96 = icmp eq i32 %95, 0
%97 = icmp ne i32 %74, 0
%98 = and i1 %97, %96
%99 = and i1 %57, %98
br i1 %99, label %210, label %213
100: ; preds = %207, %81
%101 = icmp eq i64 %87, %59
br i1 %101, label %93, label %81
102: ; preds = %88, %207
%103 = phi i32 [ 0, %88 ], [ %208, %207 ]
%104 = tail call i32 (...) @rand()
%105 = load i32, i32* %89
%106 = load i32, i32* %90
%107 = sub nsw i32 %105, %106
%108 = srem i32 %104, %107
%109 = add nsw i32 %108, %106
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %29, i64 %110
%112 = load i32, i32* %111
%113 = getelementptr inbounds i32, i32* %33, i64 %110
%114 = load i32, i32* %113
%115 = tail call double @ed(double* %1, i32 %92, i32 %114, i32 %5)
%116 = sext i32 %112 to i64
%117 = getelementptr inbounds double, double* %0, i64 %116
%118 = load double, double* %117
%119 = fcmp olt double %115, %118
br i1 %119, label %120, label %207
120: ; preds = %102
%121 = fsub double %118, %115
%122 = fmul double %77, %121
%123 = fadd double %115, 1.000000e-08
%124 = fdiv double %122, %123
br i1 %52, label %125, label %207
125: ; preds = %120
%126 = mul nsw i32 %114, %5
%127 = sext i32 %126 to i64
br i1 %66, label %190, label %128
128: ; preds = %125
%129 = getelementptr double, double* %1, i64 %127
%130 = getelementptr double, double* %61, i64 %127
%131 = icmp ult double* %84, %130
%132 = icmp ult double* %129, %86
%133 = and i1 %131, %132
br i1 %133, label %190, label %134
134: ; preds = %128
%135 = insertelement <2 x double> poison, double %124, i64 0
%136 = shufflevector <2 x double> %135, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %69, label %172, label %137
137: ; preds = %134, %137
%138 = phi i64 [ %169, %137 ], [ 0, %134 ]
%139 = phi i64 [ %170, %137 ], [ 0, %134 ]
%140 = add nsw i64 %138, %91
%141 = add nsw i64 %138, %127
%142 = getelementptr inbounds double, double* %1, i64 %140
%143 = bitcast double* %142 to <2 x double>*
%144 = load <2 x double>, <2 x double>* %143
%145 = getelementptr inbounds double, double* %1, i64 %141
%146 = bitcast double* %145 to <2 x double>*
%147 = load <2 x double>, <2 x double>* %146
%148 = fsub <2 x double> %144, %147
%149 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %148, <2 x double> %144)
%150 = bitcast double* %142 to <2 x double>*
store <2 x double> %149, <2 x double>* %150
%151 = fsub <2 x double> %147, %149
%152 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %151, <2 x double> %147)
%153 = bitcast double* %145 to <2 x double>*
store <2 x double> %152, <2 x double>* %153
%154 = or i64 %138, 2
%155 = add nsw i64 %154, %91
%156 = add nsw i64 %154, %127
%157 = getelementptr inbounds double, double* %1, i64 %155
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = getelementptr inbounds double, double* %1, i64 %156
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = fsub <2 x double> %159, %162
%164 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %163, <2 x double> %159)
%165 = bitcast double* %157 to <2 x double>*
store <2 x double> %164, <2 x double>* %165
%166 = fsub <2 x double> %162, %164
%167 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %166, <2 x double> %162)
%168 = bitcast double* %160 to <2 x double>*
store <2 x double> %167, <2 x double>* %168
%169 = add nuw i64 %138, 4
%170 = add nuw i64 %139, 2
%171 = icmp eq i64 %170, %70
br i1 %171, label %172, label %137
172: ; preds = %137, %134
%173 = phi i64 [ 0, %134 ], [ %169, %137 ]
br i1 %71, label %189, label %174
174: ; preds = %172
%175 = add nsw i64 %173, %91
%176 = add nsw i64 %173, %127
%177 = getelementptr inbounds double, double* %1, i64 %175
%178 = bitcast double* %177 to <2 x double>*
%179 = load <2 x double>, <2 x double>* %178
%180 = getelementptr inbounds double, double* %1, i64 %176
%181 = bitcast double* %180 to <2 x double>*
%182 = load <2 x double>, <2 x double>* %181
%183 = fsub <2 x double> %179, %182
%184 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %183, <2 x double> %179)
%185 = bitcast double* %177 to <2 x double>*
store <2 x double> %184, <2 x double>* %185
%186 = fsub <2 x double> %182, %184
%187 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %136, <2 x double> %186, <2 x double> %182)
%188 = bitcast double* %180 to <2 x double>*
store <2 x double> %187, <2 x double>* %188
br label %189
189: ; preds = %172, %174
br i1 %72, label %207, label %190
190: ; preds = %128, %125, %189
%191 = phi i64 [ 0, %128 ], [ 0, %125 ], [ %67, %189 ]
br label %192
192: ; preds = %190, %192
%193 = phi i64 [ %205, %192 ], [ %191, %190 ]
%194 = add nsw i64 %193, %91
%195 = add nsw i64 %193, %127
%196 = getelementptr inbounds double, double* %1, i64 %194
%197 = load double, double* %196
%198 = getelementptr inbounds double, double* %1, i64 %195
%199 = load double, double* %198
%200 = fsub double %197, %199
%201 = tail call double @llvm.fmuladd.f64(double %124, double %200, double %197)
store double %201, double* %196
%202 = load double, double* %198
%203 = fsub double %202, %201
%204 = tail call double @llvm.fmuladd.f64(double %124, double %203, double %202)
store double %204, double* %198
%205 = add nuw nsw i64 %193, 1
%206 = icmp eq i64 %205, %60
br i1 %206, label %207, label %192
207: ; preds = %192, %189, %120, %102
%208 = add nuw nsw i32 %103, 1
%209 = icmp eq i32 %208, %3
br i1 %209, label %100, label %102
210: ; preds = %93
%211 = tail call double @stress(double* %0, double* %1, i32 %5, i32 %4)
%212 = tail call i32 (i8*, i32, double, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %74, double %211, double %94)
br label %213
213: ; preds = %93, %210
%214 = add nuw nsw i32 %74, 1
%215 = icmp eq i32 %214, %8
br i1 %215, label %78, label %73
}