#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 */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ acc_device_default;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
double rand();
int /*<<< orphan*/ srand(int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ wave13pt(int, int, int, double, double, double, double *,
                            double *, double *);
int main(int argc, char *argv[]) {
  int i, it;
  struct timeval tim;
  double start, end;
  if (argc != 5) {
    printf("Usage: %s <nx> <ny> <ns> <nt>\n", argv[0]);
    exit(1);
  }
  srand(17);
  int nx = atoi(argv[1]);
  if (nx < 0) {
    printf("Value for "
           "nx"
           " is invalid: %d\n",
           nx);
    exit(1);
  };
  int ny = atoi(argv[2]);
  if (ny < 0) {
    printf("Value for "
           "ny"
           " is invalid: %d\n",
           ny);
    exit(1);
  };
  int ns = atoi(argv[3]);
  if (ns < 0) {
    printf("Value for "
           "ns"
           " is invalid: %d\n",
           ns);
    exit(1);
  };
  int nt = atoi(argv[4]);
  if (nt < 0) {
    printf("Value for "
           "nt"
           " is invalid: %d\n",
           nt);
    exit(1);
  };
  double c0 = (double)(rand() / (double)RAND_MAX);
  double c1 = (double)(rand() / (double)RAND_MAX) / 6.;
  double c2 = (double)(rand() / (double)RAND_MAX) / 6.;
  printf("c0 = %f, c1 = %f, c2 = %f\n", c0, c1, c2);
  unsigned int szarray = (unsigned int)nx * ny * ns;
  unsigned int szarrayb = szarray * sizeof(double);
  double *w0 = (double *)malloc(szarrayb);
  double *w1 = (double *)malloc(szarrayb);
  double *w2 = (double *)malloc(szarrayb);
  if (!w0 || !w1 || !w2) {
    printf("Error allocating memory for arrays: %p, %p, %p\n", w0, w1, w2);
    exit(1);
  }
  double mean = 0.0f;
  for (i = 0; i < szarray; i++) {
    w0[i] = (double)(rand() / (double)RAND_MAX);
    w1[i] = (double)(rand() / (double)RAND_MAX);
    w2[i] = (double)(rand() / (double)RAND_MAX);
    mean += w0[i] + w1[i] + w2[i];
  }
  printf("initial mean = %f\n", mean / szarray / 3);
  acc_init(acc_device_default);
  gettimeofday(&tim, NULL);
  start = tim.tv_sec + (tim.tv_usec / 1000000.0);
#pragma acc data create(w0 [0:szarray], w1 [0:szarray], w2 [0:szarray])
  {
#pragma acc update device(w0 [0:szarray], w1 [0:szarray], w2 [0:szarray])
    for (it = 0; it < nt; it++) {
      wave13pt(nx, ny, ns, c0, c1, c2, w0, w1, w2);
      double *w = w0;
      w0 = w1;
      w1 = w2;
      w2 = w;
    }
#pragma acc update host(w1 [0:szarray])
  }
  gettimeofday(&tim, NULL);
  end = tim.tv_sec + (tim.tv_usec / 1000000.0);
  acc_shutdown(acc_device_default);
  mean = 0.0f;
  for (i = 0; i < szarray; i++)
    mean += w1[i];
  printf("final mean = %f\n", mean / szarray);
  printf("Time for computing: %.2f s\n", end - start);
  free(w0);
  free(w1);
  free(w2);
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1202 <main+0x42>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    $0x11,%edi
call   1080 <srand@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jge    1241 <main+0x81>
mov    -0x3c(%rbp),%esi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jge    1276 <main+0xb6>
mov    -0x40(%rbp),%esi
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jge    12ab <main+0xeb>
mov    -0x44(%rbp),%esi
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jge    12e0 <main+0x120>
mov    -0x48(%rbp),%esi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2cfa(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2cde(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xce5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2cb6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xcbd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xd49(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0x3c(%rbp),%eax
imul   -0x40(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
shl    $0x3,%rax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    -0x68(%rbp),%edi
call   1090 <malloc@plt>
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x70(%rbp)
je     13c6 <main+0x206>
cmpq   $0x0,-0x78(%rbp)
je     13c6 <main+0x206>
cmpq   $0x0,-0x80(%rbp)
jne    13ea <main+0x22a>
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x80(%rbp),%rcx
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x64(%rbp),%eax
jae    14b9 <main+0x2f9>
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2bd2(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2bae(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    0x2b8a(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mov    -0x80(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x14(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13fc <main+0x23c>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x64(%rbp),%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xb3b(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xc16(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2aea(%rip),%rax
mov    (%rax),%edi
call   10b0 <acc_init@plt>
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xaf4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1591 <main+0x3d1>
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    -0x44(%rbp),%edx
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x70(%rbp),%rcx
mov    -0x78(%rbp),%r8
mov    -0x80(%rbp),%r9
call   1070 <wave13pt@plt>
mov    -0x70(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1528 <main+0x368>
lea    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1060 <gettimeofday@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xa58(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    0x2a14(%rip),%rax
mov    (%rax),%edi
call   1050 <acc_shutdown@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x64(%rbp),%eax
jae    1614 <main+0x454>
mov    -0x78(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15dd <main+0x41d>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x64(%rbp),%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
lea    0xada(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
lea    0xad3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    0x2960(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rsi,%rbx
cmp    $0x5,%edi
jne    15f3 <main+0x433>
mov    $0x11,%edi
call   1080 <srand@plt>
mov    0x8(%rbx),%rdi
call   10c0 <atoi@plt>
mov    %eax,%ebp
test   %eax,%eax
js     160e <main+0x44e>
mov    0x10(%rbx),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r15d
test   %eax,%eax
js     1619 <main+0x459>
mov    0x18(%rbx),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r13d
test   %eax,%eax
js     1625 <main+0x465>
mov    %ebp,0xc(%rsp)
mov    0x20(%rbx),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r12d
test   %eax,%eax
js     1631 <main+0x471>
xor    %eax,%eax
call   10e0 <rand@plt>
mov    0x2da0(%rip),%r14
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x48(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
divsd  0xd8e(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
movapd %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sdq (%r14),%xmm0
divsd  %xmm0,%xmm2
divsd  0xd69(%rip),%xmm2
lea    0xe15(%rip),%rdi
movsd  0x48(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  %xmm2,0x68(%rsp)
mov    $0x3,%al
call   1040 <printf@plt>
mov    %r15d,0x2c(%rsp)
mov    %r15d,%ebp
imul   0xc(%rsp),%ebp
mov    %r13d,0x28(%rsp)
imul   %r13d,%ebp
lea    0x0(,%rbp,8),%r15d
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %r15d,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    %r15d,%edi
call   1090 <malloc@plt>
test   %r13,%r13
je     164c <main+0x48c>
test   %rbx,%rbx
je     164c <main+0x48c>
test   %rax,%rax
je     164c <main+0x48c>
mov    %ebp,%ecx
mov    %rbp,0x60(%rsp)
test   %ebp,%ebp
mov    %rcx,0x38(%rsp)
xorpd  %xmm0,%xmm0
je     13bb <main+0x1fb>
xor    %ebp,%ebp
mov    %rax,%r15
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   10e0 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
xor    %eax,%eax
call   10e0 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
xor    %eax,%eax
call   10e0 <rand@plt>
mov    0x38(%rsp),%rcx
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rbp,8)
movsd  0x0(%r13,%rbp,8),%xmm1
addsd  (%rbx,%rbp,8),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
add    $0x1,%rbp
cmp    %rbp,%rcx
jne    1330 <main+0x170>
jmp    13be <main+0x1fe>
mov    %rax,%r15
xorps  %xmm1,%xmm1
cvtsi2sd %rcx,%xmm1
movsd  %xmm1,0x30(%rsp)
divsd  %xmm1,%xmm0
divsd  0xc30(%rip),%xmm0
lea    0xd1f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2beb(%rip),%rax
mov    (%rax),%edi
call   10b0 <acc_init@plt>
lea    0x50(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
movsd  0x50(%rsp),%xmm0
movaps %xmm0,0x80(%rsp)
movsd  0x58(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
test   %r12d,%r12d
jle    146d <main+0x2ad>
mov    %r15,%rax
mov    0x2c(%rsp),%ebp
mov    0x28(%rsp),%r15d
nopw   0x0(%rax,%rax,1)
mov    %r13,%r14
mov    %rbx,%r13
mov    %rax,%rbx
mov    0xc(%rsp),%edi
mov    %ebp,%esi
mov    %r15d,%edx
movsd  0x48(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x68(%rsp),%xmm2
mov    %r14,%rcx
mov    %r13,%r8
mov    %rax,%r9
call   1070 <wave13pt@plt>
mov    %r14,%rax
add    $0xffffffff,%r12d
jne    1430 <main+0x270>
jmp    1470 <main+0x2b0>
mov    %r15,%r14
lea    0x50(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
movapd 0x50(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
mov    0x2b49(%rip),%rax
mov    (%rax),%edi
call   1050 <acc_shutdown@plt>
cmpl   $0x0,0x60(%rsp)
je     14ce <main+0x30e>
mov    0x38(%rsp),%rdx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
movsd  0x30(%rsp),%xmm2
movapd 0x80(%rsp),%xmm3
movapd 0x70(%rsp),%xmm4
jae    14e9 <main+0x329>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    1538 <main+0x378>
xorpd  %xmm0,%xmm0
movsd  0x30(%rsp),%xmm2
movapd 0x80(%rsp),%xmm3
movapd 0x70(%rsp),%xmm4
jmp    155e <main+0x39e>
and    $0xfffffff8,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  (%rbx,%rcx,8),%xmm0
addsd  0x8(%rbx,%rcx,8),%xmm0
addsd  0x10(%rbx,%rcx,8),%xmm0
addsd  0x18(%rbx,%rcx,8),%xmm0
addsd  0x20(%rbx,%rcx,8),%xmm0
addsd  0x28(%rbx,%rcx,8),%xmm0
addsd  0x30(%rbx,%rcx,8),%xmm0
addsd  0x38(%rbx,%rcx,8),%xmm0
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    1500 <main+0x340>
test   %rax,%rax
je     155e <main+0x39e>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%rcx,%rdx,8),%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1550 <main+0x390>
movapd 0x10(%rsp),%xmm5
movapd %xmm5,%xmm1
shufpd $0x1,%xmm4,%xmm1
divpd  0xa9b(%rip),%xmm1
unpcklpd %xmm3,%xmm5
addpd  %xmm1,%xmm5
movapd %xmm5,0x10(%rsp)
divsd  %xmm2,%xmm0
lea    0xb83(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movapd 0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xb70(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x29f8(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rsi
lea    0xa23(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
lea    0xa2a(%rip),%rdi
mov    %ebp,%esi
jmp    163b <main+0x47b>
lea    0xa3c(%rip),%rdi
mov    %r15d,%esi
jmp    163b <main+0x47b>
lea    0xa4d(%rip),%rdi
mov    %r13d,%esi
jmp    163b <main+0x47b>
lea    0xa5e(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
lea    0xa7b(%rip),%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { double, double }
@.str = [31 x i8] c"Usage: %s <nx> <ny> <ns> <nt>\0A\00"
@.str.1 = [29 x i8] c"Value for nx is invalid: %d\0A\00"
@.str.2 = [29 x i8] c"Value for ny is invalid: %d\0A\00"
@.str.3 = [29 x i8] c"Value for ns is invalid: %d\0A\00"
@.str.4 = [29 x i8] c"Value for nt is invalid: %d\0A\00"
@RAND_MAX = global i64 0
@.str.5 = [27 x i8] c"c0 = %f, c1 = %f, c2 = %f\0A\00"
@.str.6 = [48 x i8] c"Error allocating memory for arrays: %p, %p, %p\0A\00"
@.str.7 = [19 x i8] c"initial mean = %f\0A\00"
@acc_device_default = global i32 0
@.str.8 = [17 x i8] c"final mean = %f\0A\00"
@.str.9 = [28 x i8] c"Time for computing: %.2f s\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.timeval
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double
%24 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%25 = load i32, i32* %4
%26 = icmp ne i32 %25, 5
br i1 %26, label %27, label %33
27: ; preds = %2
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 0
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %30)
%32 = call i32 @exit(i32 1)
unreachable
33: ; preds = %2
%34 = call i32 @srand(i32 17)
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 @atoi(i8* %37)
store i32 %38, i32* %11
%39 = load i32, i32* %11
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %33
%42 = load i32, i32* %11
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %42)
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %33
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 2
%48 = load i8*, i8** %47
%49 = call i32 @atoi(i8* %48)
store i32 %49, i32* %12
%50 = load i32, i32* %12
%51 = icmp slt i32 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %45
%53 = load i32, i32* %12
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %45
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 3
%59 = load i8*, i8** %58
%60 = call i32 @atoi(i8* %59)
store i32 %60, i32* %13
%61 = load i32, i32* %13
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %67
63: ; preds = %56
%64 = load i32, i32* %13
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %64)
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %56
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 4
%70 = load i8*, i8** %69
%71 = call i32 @atoi(i8* %70)
store i32 %71, i32* %14
%72 = load i32, i32* %14
%73 = icmp slt i32 %72, 0
br i1 %73, label %74, label %78
74: ; preds = %67
%75 = load i32, i32* %14
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %75)
%77 = call i32 @exit(i32 1)
unreachable
78: ; preds = %67
%79 = call double (...) @rand()
%80 = load i64, i64* @RAND_MAX
%81 = sitofp i64 %80 to double
%82 = fdiv double %79, %81
store double %82, double* %15
%83 = call double (...) @rand()
%84 = load i64, i64* @RAND_MAX
%85 = sitofp i64 %84 to double
%86 = fdiv double %83, %85
%87 = fdiv double %86, 6.000000e+00
store double %87, double* %16
%88 = call double (...) @rand()
%89 = load i64, i64* @RAND_MAX
%90 = sitofp i64 %89 to double
%91 = fdiv double %88, %90
%92 = fdiv double %91, 6.000000e+00
store double %92, double* %17
%93 = load double, double* %15
%94 = load double, double* %16
%95 = load double, double* %17
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %93, double %94, double %95)
%97 = load i32, i32* %11
%98 = load i32, i32* %12
%99 = mul i32 %97, %98
%100 = load i32, i32* %13
%101 = mul i32 %99, %100
store i32 %101, i32* %18
%102 = load i32, i32* %18
%103 = zext i32 %102 to i64
%104 = mul i64 %103, 8
%105 = trunc i64 %104 to i32
store i32 %105, i32* %19
%106 = load i32, i32* %19
%107 = call i64 @malloc(i32 %106)
%108 = inttoptr i64 %107 to double*
store double* %108, double** %20
%109 = load i32, i32* %19
%110 = call i64 @malloc(i32 %109)
%111 = inttoptr i64 %110 to double*
store double* %111, double** %21
%112 = load i32, i32* %19
%113 = call i64 @malloc(i32 %112)
%114 = inttoptr i64 %113 to double*
store double* %114, double** %22
%115 = load double*, double** %20
%116 = icmp ne double* %115, null
br i1 %116, label %117, label %123
117: ; preds = %78
%118 = load double*, double** %21
%119 = icmp ne double* %118, null
br i1 %119, label %120, label %123
120: ; preds = %117
%121 = load double*, double** %22
%122 = icmp ne double* %121, null
br i1 %122, label %129, label %123
123: ; preds = %120, %117, %78
%124 = load double*, double** %20
%125 = load double*, double** %21
%126 = load double*, double** %22
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), double* %124, double* %125, double* %126)
%128 = call i32 @exit(i32 1)
unreachable
129: ; preds = %120
store double 0.000000e+00, double* %23
store i32 0, i32* %6
br label %130
130: ; preds = %178, %129
%131 = load i32, i32* %6
%132 = load i32, i32* %18
%133 = icmp ult i32 %131, %132
br i1 %133, label %134, label %181
134: ; preds = %130
%135 = call double (...) @rand()
%136 = load i64, i64* @RAND_MAX
%137 = sitofp i64 %136 to double
%138 = fdiv double %135, %137
%139 = load double*, double** %20
%140 = load i32, i32* %6
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %139, i64 %141
store double %138, double* %142
%143 = call double (...) @rand()
%144 = load i64, i64* @RAND_MAX
%145 = sitofp i64 %144 to double
%146 = fdiv double %143, %145
%147 = load double*, double** %21
%148 = load i32, i32* %6
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
store double %146, double* %150
%151 = call double (...) @rand()
%152 = load i64, i64* @RAND_MAX
%153 = sitofp i64 %152 to double
%154 = fdiv double %151, %153
%155 = load double*, double** %22
%156 = load i32, i32* %6
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %155, i64 %157
store double %154, double* %158
%159 = load double*, double** %20
%160 = load i32, i32* %6
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %159, i64 %161
%163 = load double, double* %162
%164 = load double*, double** %21
%165 = load i32, i32* %6
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %164, i64 %166
%168 = load double, double* %167
%169 = fadd double %163, %168
%170 = load double*, double** %22
%171 = load i32, i32* %6
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
%174 = load double, double* %173
%175 = fadd double %169, %174
%176 = load double, double* %23
%177 = fadd double %176, %175
store double %177, double* %23
br label %178
178: ; preds = %134
%179 = load i32, i32* %6
%180 = add nsw i32 %179, 1
store i32 %180, i32* %6
br label %130
181: ; preds = %130
%182 = load double, double* %23
%183 = load i32, i32* %18
%184 = uitofp i32 %183 to double
%185 = fdiv double %182, %184
%186 = fdiv double %185, 3.000000e+00
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %186)
%188 = load i32, i32* @acc_device_default
%189 = call i32 @acc_init(i32 %188)
%190 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%191 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%192 = load double, double* %191
%193 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%194 = load double, double* %193
%195 = fdiv double %194, 1.000000e+06
%196 = fadd double %192, %195
store double %196, double* %9
store i32 0, i32* %7
br label %197
197: ; preds = %216, %181
%198 = load i32, i32* %7
%199 = load i32, i32* %14
%200 = icmp slt i32 %198, %199
br i1 %200, label %201, label %219
201: ; preds = %197
%202 = load i32, i32* %11
%203 = load i32, i32* %12
%204 = load i32, i32* %13
%205 = load double, double* %15
%206 = load double, double* %16
%207 = load double, double* %17
%208 = load double*, double** %20
%209 = load double*, double** %21
%210 = load double*, double** %22
%211 = call i32 @wave13pt(i32 %202, i32 %203, i32 %204, double %205, double %206, double %207, double* %208, double* %209, double* %210)
%212 = load double*, double** %20
store double* %212, double** %24
%213 = load double*, double** %21
store double* %213, double** %20
%214 = load double*, double** %22
store double* %214, double** %21
%215 = load double*, double** %24
store double* %215, double** %22
br label %216
216: ; preds = %201
%217 = load i32, i32* %7
%218 = add nsw i32 %217, 1
store i32 %218, i32* %7
br label %197
219: ; preds = %197
%220 = call i32 @gettimeofday(%struct.timeval* %8, i32* null)
%221 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%222 = load double, double* %221
%223 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%224 = load double, double* %223
%225 = fdiv double %224, 1.000000e+06
%226 = fadd double %222, %225
store double %226, double* %10
%227 = load i32, i32* @acc_device_default
%228 = call i32 @acc_shutdown(i32 %227)
store double 0.000000e+00, double* %23
store i32 0, i32* %6
br label %229
229: ; preds = %241, %219
%230 = load i32, i32* %6
%231 = load i32, i32* %18
%232 = icmp ult i32 %230, %231
br i1 %232, label %233, label %244
233: ; preds = %229
%234 = load double*, double** %21
%235 = load i32, i32* %6
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds double, double* %234, i64 %236
%238 = load double, double* %237
%239 = load double, double* %23
%240 = fadd double %239, %238
store double %240, double* %23
br label %241
241: ; preds = %233
%242 = load i32, i32* %6
%243 = add nsw i32 %242, 1
store i32 %243, i32* %6
br label %229
244: ; preds = %229
%245 = load double, double* %23
%246 = load i32, i32* %18
%247 = uitofp i32 %246 to double
%248 = fdiv double %245, %247
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %248)
%250 = load double, double* %10
%251 = load double, double* %9
%252 = fsub double %250, %251
%253 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), double %252)
%254 = load double*, double** %20
%255 = call i32 @free(double* %254)
%256 = load double*, double** %21
%257 = call i32 @free(double* %256)
%258 = load double*, double** %22
%259 = call i32 @free(double* %258)
%260 = load i32, i32* @stdout
%261 = call i32 @fflush(i32 %260)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
@.str = [31 x i8] c"Usage: %s <nx> <ny> <ns> <nt>\0A\00"
@.str.1 = [29 x i8] c"Value for nx is invalid: %d\0A\00"
@.str.2 = [29 x i8] c"Value for ny is invalid: %d\0A\00"
@.str.3 = [29 x i8] c"Value for ns is invalid: %d\0A\00"
@.str.4 = [29 x i8] c"Value for nt is invalid: %d\0A\00"
@RAND_MAX = global i64 0
@.str.5 = [27 x i8] c"c0 = %f, c1 = %f, c2 = %f\0A\00"
@.str.6 = [48 x i8] c"Error allocating memory for arrays: %p, %p, %p\0A\00"
@.str.7 = [19 x i8] c"initial mean = %f\0A\00"
@acc_device_default = global i32 0
@.str.8 = [17 x i8] c"final mean = %f\0A\00"
@.str.9 = [28 x i8] c"Time for computing: %.2f s\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca <2 x double>
%4 = bitcast <2 x double>* %3 to %struct.timeval*
%5 = bitcast <2 x double>* %3 to i8*
%6 = icmp eq i32 %0, 5
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = tail call i32 @srand(i32 17)
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%19 = tail call i32 @exit(i32 1)
unreachable
20: ; preds = %11
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i32 @atoi(i8* %22)
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %20
%29 = getelementptr inbounds i8*, i8** %1, i64 3
%30 = load i8*, i8** %29
%31 = tail call i32 @atoi(i8* %30)
%32 = icmp slt i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%35 = tail call i32 @exit(i32 1)
unreachable
36: ; preds = %28
%37 = getelementptr inbounds i8*, i8** %1, i64 4
%38 = load i8*, i8** %37
%39 = tail call i32 @atoi(i8* %38)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %44
41: ; preds = %36
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%43 = tail call i32 @exit(i32 1)
unreachable
44: ; preds = %36
%45 = tail call double (...) @rand()
%46 = load i64, i64* @RAND_MAX
%47 = sitofp i64 %46 to double
%48 = fdiv double %45, %47
%49 = tail call double (...) @rand()
%50 = load i64, i64* @RAND_MAX
%51 = sitofp i64 %50 to double
%52 = fdiv double %49, %51
%53 = fdiv double %52, 6.000000e+00
%54 = tail call double (...) @rand()
%55 = load i64, i64* @RAND_MAX
%56 = sitofp i64 %55 to double
%57 = fdiv double %54, %56
%58 = fdiv double %57, 6.000000e+00
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %48, double %53, double %58)
%60 = mul i32 %23, %15
%61 = mul i32 %60, %31
%62 = shl i32 %61, 3
%63 = tail call i64 @malloc(i32 %62)
%64 = inttoptr i64 %63 to double*
%65 = tail call i64 @malloc(i32 %62)
%66 = inttoptr i64 %65 to double*
%67 = tail call i64 @malloc(i32 %62)
%68 = inttoptr i64 %67 to double*
%69 = icmp ne i64 %63, 0
%70 = icmp ne i64 %65, 0
%71 = select i1 %69, i1 %70, i1 false
%72 = icmp ne i64 %67, 0
%73 = select i1 %71, i1 %72, i1 false
br i1 %73, label %74, label %78
74: ; preds = %44
%75 = icmp eq i32 %61, 0
br i1 %75, label %106, label %76
76: ; preds = %74
%77 = zext i32 %61 to i64
br label %81
78: ; preds = %44
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), double* %64, double* %66, double* %68)
%80 = tail call i32 @exit(i32 1)
unreachable
81: ; preds = %76, %81
%82 = phi i64 [ 0, %76 ], [ %104, %81 ]
%83 = phi double [ 0.000000e+00, %76 ], [ %103, %81 ]
%84 = tail call double (...) @rand()
%85 = load i64, i64* @RAND_MAX
%86 = sitofp i64 %85 to double
%87 = fdiv double %84, %86
%88 = getelementptr inbounds double, double* %64, i64 %82
store double %87, double* %88
%89 = tail call double (...) @rand()
%90 = load i64, i64* @RAND_MAX
%91 = sitofp i64 %90 to double
%92 = fdiv double %89, %91
%93 = getelementptr inbounds double, double* %66, i64 %82
store double %92, double* %93
%94 = tail call double (...) @rand()
%95 = load i64, i64* @RAND_MAX
%96 = sitofp i64 %95 to double
%97 = fdiv double %94, %96
%98 = getelementptr inbounds double, double* %68, i64 %82
store double %97, double* %98
%99 = load double, double* %88
%100 = load double, double* %93
%101 = fadd double %99, %100
%102 = fadd double %97, %101
%103 = fadd double %83, %102
%104 = add nuw nsw i64 %82, 1
%105 = icmp eq i64 %104, %77
br i1 %105, label %106, label %81
106: ; preds = %81, %74
%107 = phi double [ 0.000000e+00, %74 ], [ %103, %81 ]
%108 = uitofp i32 %61 to double
%109 = fdiv double %107, %108
%110 = fdiv double %109, 3.000000e+00
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), double %110)
%112 = load i32, i32* @acc_device_default
%113 = tail call i32 @acc_init(i32 %112)
%114 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%115 = getelementptr inbounds <2 x double>, <2 x double>* %3, i64 0, i64 0
%116 = load double, double* %115
%117 = getelementptr inbounds <2 x double>, <2 x double>* %3, i64 0, i64 1
%118 = load double, double* %117
%119 = icmp sgt i32 %39, 0
br i1 %119, label %120, label %128
120: ; preds = %106, %120
%121 = phi double* [ %123, %120 ], [ %68, %106 ]
%122 = phi double* [ %121, %120 ], [ %66, %106 ]
%123 = phi double* [ %122, %120 ], [ %64, %106 ]
%124 = phi i32 [ %126, %120 ], [ 0, %106 ]
%125 = tail call i32 @wave13pt(i32 %15, i32 %23, i32 %31, double %48, double %53, double %58, double* %123, double* %122, double* %121)
%126 = add nuw nsw i32 %124, 1
%127 = icmp eq i32 %126, %39
br i1 %127, label %128, label %120
128: ; preds = %120, %106
%129 = phi double* [ %64, %106 ], [ %122, %120 ]
%130 = phi double* [ %66, %106 ], [ %121, %120 ]
%131 = phi double* [ %68, %106 ], [ %123, %120 ]
%132 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%133 = load <2 x double>, <2 x double>* %3
%134 = load i32, i32* @acc_device_default
%135 = tail call i32 @acc_shutdown(i32 %134)
br i1 %75, label %196, label %136
136: ; preds = %128
%137 = zext i32 %61 to i64
%138 = add nsw i64 %137, -1
%139 = and i64 %137, 7
%140 = icmp ult i64 %138, 7
br i1 %140, label %181, label %141
141: ; preds = %136
%142 = and i64 %137, 4294967288
br label %143
143: ; preds = %143, %141
%144 = phi i64 [ 0, %141 ], [ %178, %143 ]
%145 = phi double [ 0.000000e+00, %141 ], [ %177, %143 ]
%146 = phi i64 [ 0, %141 ], [ %179, %143 ]
%147 = getelementptr inbounds double, double* %130, i64 %144
%148 = load double, double* %147
%149 = fadd double %145, %148
%150 = or i64 %144, 1
%151 = getelementptr inbounds double, double* %130, i64 %150
%152 = load double, double* %151
%153 = fadd double %149, %152
%154 = or i64 %144, 2
%155 = getelementptr inbounds double, double* %130, i64 %154
%156 = load double, double* %155
%157 = fadd double %153, %156
%158 = or i64 %144, 3
%159 = getelementptr inbounds double, double* %130, i64 %158
%160 = load double, double* %159
%161 = fadd double %157, %160
%162 = or i64 %144, 4
%163 = getelementptr inbounds double, double* %130, i64 %162
%164 = load double, double* %163
%165 = fadd double %161, %164
%166 = or i64 %144, 5
%167 = getelementptr inbounds double, double* %130, i64 %166
%168 = load double, double* %167
%169 = fadd double %165, %168
%170 = or i64 %144, 6
%171 = getelementptr inbounds double, double* %130, i64 %170
%172 = load double, double* %171
%173 = fadd double %169, %172
%174 = or i64 %144, 7
%175 = getelementptr inbounds double, double* %130, i64 %174
%176 = load double, double* %175
%177 = fadd double %173, %176
%178 = add nuw nsw i64 %144, 8
%179 = add i64 %146, 8
%180 = icmp eq i64 %179, %142
br i1 %180, label %181, label %143
181: ; preds = %143, %136
%182 = phi double [ undef, %136 ], [ %177, %143 ]
%183 = phi i64 [ 0, %136 ], [ %178, %143 ]
%184 = phi double [ 0.000000e+00, %136 ], [ %177, %143 ]
%185 = icmp eq i64 %139, 0
br i1 %185, label %196, label %186
186: ; preds = %181, %186
%187 = phi i64 [ %193, %186 ], [ %183, %181 ]
%188 = phi double [ %192, %186 ], [ %184, %181 ]
%189 = phi i64 [ %194, %186 ], [ 0, %181 ]
%190 = getelementptr inbounds double, double* %130, i64 %187
%191 = load double, double* %190
%192 = fadd double %188, %191
%193 = add nuw nsw i64 %187, 1
%194 = add i64 %189, 1
%195 = icmp eq i64 %194, %139
br i1 %195, label %196, label %186
196: ; preds = %181, %186, %128
%197 = phi double [ 0.000000e+00, %128 ], [ %182, %181 ], [ %192, %186 ]
%198 = shufflevector <2 x double> %133, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%199 = insertelement <2 x double> %198, double %118, i64 1
%200 = fdiv <2 x double> %199, <double 1.000000e+06, double 1.000000e+06>
%201 = insertelement <2 x double> %133, double %116, i64 1
%202 = fadd <2 x double> %201, %200
%203 = fdiv double %197, %108
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %203)
%205 = shufflevector <2 x double> %202, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%206 = fsub <2 x double> %202, %205
%207 = extractelement <2 x double> %206, i64 0
%208 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), double %207)
%209 = tail call i32 @free(double* %129)
%210 = tail call i32 @free(double* %130)
%211 = tail call i32 @free(double* %131)
%212 = load i32, i32* @stdout
%213 = tail call i32 @fflush(i32 %212)
ret i32 0
}