#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 {
  int tv_sec;
  double tv_usec;
};

/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ acc_device_default;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
double fabs(double);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
int main() {
  int i, j, k;
  int NI, NJ, NK;
  int error;
  double *finput, *ftemp;
  double frounding_error = 1.E-9;
  int *logics;
  struct timeval tim;
  double start, end;
  NK = 2;
  NJ = 1 << 20;
  NI = 32;
  error = 0;
  finput = (double *)malloc(NK * NJ * NI * sizeof(double));
  ftemp = (double *)malloc(NK * NJ * NI * sizeof(double));
  acc_init(acc_device_default);
  srand((unsigned)time(0));
  for (k = 0; k < NK; k++) {
    for (j = 0; j < NJ; j++) {
      for (i = 0; i < NI; i++) {
        finput[k * NJ * NI + j * NI + i] =
            (double)rand() / (double)RAND_MAX + 0.1;
      }
    }
  }
  gettimeofday(&tim, NULL);
  start = tim.tv_sec * 1000 + (tim.tv_usec / 1000.0);
#pragma acc parallel copyin(finput [0:NK * NJ * NI])                           \
    copyout(ftemp [0:NK * NJ * NI]) num_gangs(192) num_workers(8)              \
        vector_length(128)
  {
#pragma acc loop gang
    for (k = 0; k < NK; k++) {
      double fproduct = 1;
#pragma acc loop worker reduction(* : fproduct)
      for (j = 0; j < NJ; j++) {
#pragma acc loop vector
        for (i = 0; i < NI; i++)
          ftemp[k * NJ * NI + j * NI + i] = finput[k * NJ * NI + j * NI + i];
        fproduct *= ftemp[k * NJ * NI + j * NI];
      }
      ftemp[k * NJ * NI] = fproduct;
    }
  }
  gettimeofday(&tim, NULL);
  end = tim.tv_sec * 1000 + (tim.tv_usec / 1000.0);
  for (k = 0; k < NK; k++) {
    double fproduct = 1;
    for (j = 0; j < NJ; j++) {
      fproduct *= finput[k * NJ * NI + j * NI];
    }
    if (fabs(ftemp[k * NJ * NI] - fproduct) > frounding_error) {
      error++;
      printf("worker * FAILED\n");
    }
  }
  printf("worker * execution time is :%.2lf: ms\n", end - start);
  if (error == 0)
    printf("worker * SUCCESS!\n");
  free(finput);
  free(ftemp);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x100000,-0x18(%rbp)
movl   $0x20,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1090 <acc_init@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12c4 <main+0x144>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12b1 <main+0x131>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    129e <main+0x11e>
mov    $0x0,%al
call   10a0 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2d90(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xdaf(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1239 <main+0xb9>
jmp    12a3 <main+0x123>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1226 <main+0xa6>
jmp    12b6 <main+0x136>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1213 <main+0x93>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x50(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd1f(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13f2 <main+0x272>
movsd  0xcff(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    13c8 <main+0x248>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1390 <main+0x210>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1330 <main+0x1b0>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    131d <main+0x19d>
movsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12fd <main+0x17d>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x50(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xbf1(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14eb <main+0x36b>
movsd  0xbd1(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    148f <main+0x30f>
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    144b <main+0x2cb>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
movaps 0xb6e(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    14d8 <main+0x358>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
lea    0xb5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14dd <main+0x35d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    142b <main+0x2ab>
movsd  -0x60(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
lea    0xb45(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
jne    151b <main+0x39b>
lea    0xb54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x20000000,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    $0x20000000,%edi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    0x2e19(%rip),%rax
mov    (%rax),%edi
call   10a0 <acc_init@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    0x2e0d(%rip),%r13
mov    %r12,%rbx
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq 0x0(%r13),%xmm1
divsd  %xmm1,%xmm0
movsd  0xddc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1200 <main+0x70>
add    $0x1,%r15
add    $0x100,%rbx
cmp    $0x100000,%r15
jne    11f0 <main+0x60>
lea    0x10000000(%r12),%rbx
10
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq 0x0(%r13),%xmm1
divsd  %xmm1,%xmm0
addsd  0xd6c(%rip),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    $0x20,%rbp
jne    1270 <main+0xe0>
add    $0x1,%r15
add    $0x100,%rbx
cmp    $0x100000,%r15
jne    1260 <main+0xd0>
xor    %r15d,%r15d
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%r8d
movsd  0x10(%rsp),%xmm0
divsd  0xd2b(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x18(%r14),%rcx
lea    0x18(%r12),%rdx
movsd  0xd1c(%rip),%xmm0
jmp    144d <main+0x2bd>
nopl   0x0(%rax)
lea    0x0(,%rsi,8),%rdi
movups (%r12,%rsi,8),%xmm1
movups %xmm1,(%r14,%rsi,8)
mov    %rdi,%rbp
or     $0x10,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x20,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x30,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x40,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x50,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x60,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x70,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x80,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0x90,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0xa0,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0xb0,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0xc0,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0xd0,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
mov    %rdi,%rbp
or     $0xe0,%rbp
movups (%r12,%rbp,1),%xmm1
movups %xmm1,(%r14,%rbp,1)
or     $0xf0,%rdi
movupd (%r12,%rdi,1),%xmm1
movupd %xmm1,(%r14,%rdi,1)
mulsd  (%r14,%rsi,8),%xmm0
add    $0x1,%r15
add    $0x100,%rcx
add    $0x100,%rdx
cmp    $0x100000,%r15
je     14cd <main+0x33d>
mov    %r15,%rsi
shl    $0x5,%rsi
mov    %r15,%rdi
shl    $0x8,%rdi
lea    (%r12,%rdi,1),%rbp
add    $0x100,%rbp
lea    (%r14,%rdi,1),%rbx
cmp    %rbp,%rbx
jae    1300 <main+0x170>
lea    (%r12,%rdi,1),%rbp
add    %r14,%rdi
add    $0x100,%rdi
cmp    %rdi,%rbp
jae    1300 <main+0x170>
xor    %edi,%edi
nopl   0x0(%rax)
movsd  -0x18(%rdx,%rdi,8),%xmm1
movsd  %xmm1,-0x18(%rcx,%rdi,8)
movsd  -0x10(%rdx,%rdi,8),%xmm1
movsd  %xmm1,-0x10(%rcx,%rdi,8)
movsd  -0x8(%rdx,%rdi,8),%xmm1
movsd  %xmm1,-0x8(%rcx,%rdi,8)
movsd  (%rdx,%rdi,8),%xmm1
movsd  %xmm1,(%rcx,%rdi,8)
add    $0x4,%rdi
cmp    $0x20,%rdi
jne    1490 <main+0x300>
jmp    1428 <main+0x298>
movsd  %xmm0,(%r14)
lea    0x10000018(%r14),%rcx
lea    0x10000018(%r12),%rdx
10
movsd  0xb27(%rip),%xmm0
xor    %ebx,%ebx
jmp    163b <main+0x4ab>
movups 0x10000000(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000000(%r14,%rdi,8)
movups 0x10000010(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000010(%r14,%rdi,8)
movups 0x10000020(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000020(%r14,%rdi,8)
movups 0x10000030(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000030(%r14,%rdi,8)
movups 0x10000040(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000040(%r14,%rdi,8)
movups 0x10000050(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000050(%r14,%rdi,8)
movups 0x10000060(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000060(%r14,%rdi,8)
movups 0x10000070(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000070(%r14,%rdi,8)
movups 0x10000080(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000080(%r14,%rdi,8)
movups 0x10000090(%r12,%rdi,8),%xmm1
movups %xmm1,0x10000090(%r14,%rdi,8)
movups 0x100000a0(%r12,%rdi,8),%xmm1
movups %xmm1,0x100000a0(%r14,%rdi,8)
movups 0x100000b0(%r12,%rdi,8),%xmm1
movups %xmm1,0x100000b0(%r14,%rdi,8)
movups 0x100000c0(%r12,%rdi,8),%xmm1
movups %xmm1,0x100000c0(%r14,%rdi,8)
movups 0x100000d0(%r12,%rdi,8),%xmm1
movups %xmm1,0x100000d0(%r14,%rdi,8)
movups 0x100000e0(%r12,%rdi,8),%xmm1
movups %xmm1,0x100000e0(%r14,%rdi,8)
movupd 0x100000f0(%r12,%rdi,8),%xmm1
movupd %xmm1,0x100000f0(%r14,%rdi,8)
mulsd  0x10000000(%r14,%rdi,8),%xmm0
add    $0x1,%rbx
add    $0x100,%rcx
add    $0x100,%rdx
cmp    $0x100000,%rbx
je     16cd <main+0x53d>
mov    %rbx,%rdi
shl    $0x5,%rdi
mov    %rbx,%rsi
shl    $0x8,%rsi
lea    (%r12,%rsi,1),%rbp
add    $0x10000100,%rbp
lea    (%r14,%rsi,1),%rax
add    $0x10000000,%rax
cmp    %rbp,%rax
jae    14f0 <main+0x360>
lea    (%r12,%rsi,1),%rax
add    $0x10000000,%rax
add    %r14,%rsi
add    $0x10000100,%rsi
cmp    %rsi,%rax
jae    14f0 <main+0x360>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  -0x18(%rdx,%rbp,8),%xmm1
movsd  %xmm1,-0x18(%rcx,%rbp,8)
movsd  -0x10(%rdx,%rbp,8),%xmm1
movsd  %xmm1,-0x10(%rcx,%rbp,8)
movsd  -0x8(%rdx,%rbp,8),%xmm1
movsd  %xmm1,-0x8(%rcx,%rbp,8)
movsd  (%rdx,%rbp,8),%xmm1
movsd  %xmm1,(%rcx,%rbp,8)
add    $0x4,%rbp
cmp    $0x20,%rbp
jne    1690 <main+0x500>
jmp    1612 <main+0x482>
movsd  %xmm0,0x10000000(%r14)
xorps  %xmm0,%xmm0
cvtsi2sd %r8d,%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%r15d
movsd  0x10(%rsp),%xmm0
divsd  0x901(%rip),%xmm0
movsd  0x901(%rip),%xmm2
mov    $0x300,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mulsd  -0x300(%r12,%rax,1),%xmm2
fd ff ff
mulsd  -0x200(%r12,%rax,1),%xmm2
fe ff ff
mulsd  -0x100(%r12,%rax,1),%xmm2
ff ff ff
mulsd  (%r12,%rax,1),%xmm2
add    $0x400,%rax
cmp    $0x10000300,%rax
jne    1720 <main+0x590>
movsd  (%r14),%xmm1
subsd  %xmm2,%xmm1
andpd  0x8bd(%rip),%xmm1
xor    %ebp,%ebp
ucomisd 0x8ab(%rip),%xmm1
movsd  %xmm0,(%rsp)
jbe    178a <main+0x5fa>
lea    0x8ee(%rip),%rdi
call   1040 <puts@plt>
movsd  (%rsp),%xmm0
mov    $0x1,%ebp
movsd  0x87e(%rip),%xmm2
mov    $0x10000300,%eax
nopw   0x0(%rax,%rax,1)
mulsd  -0x300(%r12,%rax,1),%xmm2
fd ff ff
mulsd  -0x200(%r12,%rax,1),%xmm2
fe ff ff
mulsd  -0x100(%r12,%rax,1),%xmm2
ff ff ff
mulsd  (%r12,%rax,1),%xmm2
add    $0x400,%rax
cmp    $0x20000300,%rax
jne    17a0 <main+0x610>
movsd  0x10000000(%r14),%xmm1
subsd  %xmm2,%xmm1
andpd  0x839(%rip),%xmm1
ucomisd 0x829(%rip),%xmm1
jbe    1807 <main+0x677>
lea    0x871(%rip),%rdi
call   1040 <puts@plt>
movsd  (%rsp),%xmm0
mov    $0x1,%ebp
movsd  0x20(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %r15d,%xmm2
addsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
lea    0x806(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
test   %ebp,%ebp
jne    1841 <main+0x6b1>
lea    0x81b(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.timeval = type { i32, double }
@acc_device_default = global i32 0
@RAND_MAX = global i64 0
@.str.1 = [39 x i8] c"worker * execution time is :%.2lf: ms\0A\00"
@str = [18 x i8] c"worker * SUCCESS!\00"
@str.3 = [16 x i8] c"worker * FAILED\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = tail call i64 @malloc(i32 536870912)
%4 = inttoptr i64 %3 to double*
%5 = tail call i64 @malloc(i32 536870912)
%6 = load i32, i32* @acc_device_default
%7 = tail call i32 @acc_init(i32 %6)
%8 = tail call i64 @time(i32 0)
%9 = trunc i64 %8 to i32
%10 = tail call i32 @srand(i32 %9)
br label %11
11: ; preds = %0, %26
%12 = phi i64 [ 0, %0 ], [ %27, %26 ]
%13 = shl nsw i64 %12, 5
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 0, %11 ], [ %24, %14 ]
%16 = tail call i64 (...) @rand()
%17 = sitofp i64 %16 to double
%18 = load i64, i64* @RAND_MAX
%19 = sitofp i64 %18 to double
%20 = fdiv double %17, %19
%21 = fadd double %20, 1.000000e-01
%22 = add nuw nsw i64 %13, %15
%23 = getelementptr inbounds double, double* %4, i64 %22
store double %21, double* %23
%24 = add nuw nsw i64 %15, 1
%25 = icmp eq i64 %24, 32
br i1 %25, label %26, label %14
26: ; preds = %14
%27 = add nuw nsw i64 %12, 1
%28 = icmp eq i64 %27, 1048576
br i1 %28, label %29, label %11
29: ; preds = %26, %45
%30 = phi i64 [ %46, %45 ], [ 0, %26 ]
%31 = shl nsw i64 %30, 5
%32 = add nuw nsw i64 %31, 33554432
br label %33
33: ; preds = %33, %29
%34 = phi i64 [ 0, %29 ], [ %43, %33 ]
%35 = tail call i64 (...) @rand()
%36 = sitofp i64 %35 to double
%37 = load i64, i64* @RAND_MAX
%38 = sitofp i64 %37 to double
%39 = fdiv double %36, %38
%40 = fadd double %39, 1.000000e-01
%41 = add nuw nsw i64 %32, %34
%42 = getelementptr inbounds double, double* %4, i64 %41
store double %40, double* %42
%43 = add nuw nsw i64 %34, 1
%44 = icmp eq i64 %43, 32
br i1 %44, label %45, label %33
45: ; preds = %33
%46 = add nuw nsw i64 %30, 1
%47 = icmp eq i64 %46, 1048576
br i1 %47, label %48, label %29
48: ; preds = %45
%49 = inttoptr i64 %5 to double*
%50 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%51 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%52 = load i32, i32* %51
%53 = mul nsw i32 %52, 1000
%54 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%55 = load double, double* %54
%56 = fdiv double %55, 1.000000e+03
br label %57
57: ; preds = %48, %189
%58 = phi i64 [ 0, %48 ], [ %193, %189 ]
%59 = phi double [ 1.000000e+00, %48 ], [ %192, %189 ]
%60 = shl nuw nsw i64 %58, 5
%61 = add nuw i64 %60, 32
%62 = shl nsw i64 %58, 5
%63 = getelementptr double, double* %4, i64 %61
%64 = getelementptr double, double* %4, i64 %60
%65 = getelementptr double, double* %49, i64 %61
%66 = getelementptr double, double* %49, i64 %60
%67 = icmp ult double* %66, %63
%68 = icmp ult double* %64, %65
%69 = and i1 %67, %68
br i1 %69, label %166, label %70
70: ; preds = %57
%71 = getelementptr inbounds double, double* %4, i64 %62
%72 = bitcast double* %71 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = getelementptr inbounds double, double* %49, i64 %62
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %73, <2 x double>* %75
%76 = or i64 %62, 2
%77 = getelementptr inbounds double, double* %4, i64 %76
%78 = bitcast double* %77 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = getelementptr inbounds double, double* %49, i64 %76
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %79, <2 x double>* %81
%82 = or i64 %62, 4
%83 = getelementptr inbounds double, double* %4, i64 %82
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %49, i64 %82
%87 = bitcast double* %86 to <2 x double>*
store <2 x double> %85, <2 x double>* %87
%88 = or i64 %62, 6
%89 = getelementptr inbounds double, double* %4, i64 %88
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %49, i64 %88
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %91, <2 x double>* %93
%94 = or i64 %62, 8
%95 = getelementptr inbounds double, double* %4, i64 %94
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = getelementptr inbounds double, double* %49, i64 %94
%99 = bitcast double* %98 to <2 x double>*
store <2 x double> %97, <2 x double>* %99
%100 = or i64 %62, 10
%101 = getelementptr inbounds double, double* %4, i64 %100
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = getelementptr inbounds double, double* %49, i64 %100
%105 = bitcast double* %104 to <2 x double>*
store <2 x double> %103, <2 x double>* %105
%106 = or i64 %62, 12
%107 = getelementptr inbounds double, double* %4, i64 %106
%108 = bitcast double* %107 to <2 x double>*
%109 = load <2 x double>, <2 x double>* %108
%110 = getelementptr inbounds double, double* %49, i64 %106
%111 = bitcast double* %110 to <2 x double>*
store <2 x double> %109, <2 x double>* %111
%112 = or i64 %62, 14
%113 = getelementptr inbounds double, double* %4, i64 %112
%114 = bitcast double* %113 to <2 x double>*
%115 = load <2 x double>, <2 x double>* %114
%116 = getelementptr inbounds double, double* %49, i64 %112
%117 = bitcast double* %116 to <2 x double>*
store <2 x double> %115, <2 x double>* %117
%118 = or i64 %62, 16
%119 = getelementptr inbounds double, double* %4, i64 %118
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds double, double* %49, i64 %118
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> %121, <2 x double>* %123
%124 = or i64 %62, 18
%125 = getelementptr inbounds double, double* %4, i64 %124
%126 = bitcast double* %125 to <2 x double>*
%127 = load <2 x double>, <2 x double>* %126
%128 = getelementptr inbounds double, double* %49, i64 %124
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %127, <2 x double>* %129
%130 = or i64 %62, 20
%131 = getelementptr inbounds double, double* %4, i64 %130
%132 = bitcast double* %131 to <2 x double>*
%133 = load <2 x double>, <2 x double>* %132
%134 = getelementptr inbounds double, double* %49, i64 %130
%135 = bitcast double* %134 to <2 x double>*
store <2 x double> %133, <2 x double>* %135
%136 = or i64 %62, 22
%137 = getelementptr inbounds double, double* %4, i64 %136
%138 = bitcast double* %137 to <2 x double>*
%139 = load <2 x double>, <2 x double>* %138
%140 = getelementptr inbounds double, double* %49, i64 %136
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> %139, <2 x double>* %141
%142 = or i64 %62, 24
%143 = getelementptr inbounds double, double* %4, i64 %142
%144 = bitcast double* %143 to <2 x double>*
%145 = load <2 x double>, <2 x double>* %144
%146 = getelementptr inbounds double, double* %49, i64 %142
%147 = bitcast double* %146 to <2 x double>*
store <2 x double> %145, <2 x double>* %147
%148 = or i64 %62, 26
%149 = getelementptr inbounds double, double* %4, i64 %148
%150 = bitcast double* %149 to <2 x double>*
%151 = load <2 x double>, <2 x double>* %150
%152 = getelementptr inbounds double, double* %49, i64 %148
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> %151, <2 x double>* %153
%154 = or i64 %62, 28
%155 = getelementptr inbounds double, double* %4, i64 %154
%156 = bitcast double* %155 to <2 x double>*
%157 = load <2 x double>, <2 x double>* %156
%158 = getelementptr inbounds double, double* %49, i64 %154
%159 = bitcast double* %158 to <2 x double>*
store <2 x double> %157, <2 x double>* %159
%160 = or i64 %62, 30
%161 = getelementptr inbounds double, double* %4, i64 %160
%162 = bitcast double* %161 to <2 x double>*
%163 = load <2 x double>, <2 x double>* %162
%164 = getelementptr inbounds double, double* %49, i64 %160
%165 = bitcast double* %164 to <2 x double>*
store <2 x double> %163, <2 x double>* %165
br label %189
166: ; preds = %57, %166
%167 = phi i64 [ %187, %166 ], [ 0, %57 ]
%168 = add nuw nsw i64 %62, %167
%169 = getelementptr inbounds double, double* %4, i64 %168
%170 = load double, double* %169
%171 = getelementptr inbounds double, double* %49, i64 %168
store double %170, double* %171
%172 = or i64 %167, 1
%173 = add nuw nsw i64 %62, %172
%174 = getelementptr inbounds double, double* %4, i64 %173
%175 = load double, double* %174
%176 = getelementptr inbounds double, double* %49, i64 %173
store double %175, double* %176
%177 = or i64 %167, 2
%178 = add nuw nsw i64 %62, %177
%179 = getelementptr inbounds double, double* %4, i64 %178
%180 = load double, double* %179
%181 = getelementptr inbounds double, double* %49, i64 %178
store double %180, double* %181
%182 = or i64 %167, 3
%183 = add nuw nsw i64 %62, %182
%184 = getelementptr inbounds double, double* %4, i64 %183
%185 = load double, double* %184
%186 = getelementptr inbounds double, double* %49, i64 %183
store double %185, double* %186
%187 = add nuw nsw i64 %167, 4
%188 = icmp eq i64 %187, 32
br i1 %188, label %189, label %166
189: ; preds = %166, %70
%190 = getelementptr inbounds double, double* %49, i64 %62
%191 = load double, double* %190
%192 = fmul double %59, %191
%193 = add nuw nsw i64 %58, 1
%194 = icmp eq i64 %193, 1048576
br i1 %194, label %195, label %57
195: ; preds = %189
store double %192, double* %49
br label %196
196: ; preds = %330, %195
%197 = phi i64 [ 0, %195 ], [ %334, %330 ]
%198 = phi double [ 1.000000e+00, %195 ], [ %333, %330 ]
%199 = shl nuw nsw i64 %197, 5
%200 = add nuw i64 %199, 33554432
%201 = add nuw i64 %199, 33554464
%202 = shl nsw i64 %197, 5
%203 = add nuw nsw i64 %202, 33554432
%204 = getelementptr double, double* %4, i64 %201
%205 = getelementptr double, double* %4, i64 %200
%206 = getelementptr double, double* %49, i64 %201
%207 = getelementptr double, double* %49, i64 %200
%208 = icmp ult double* %207, %204
%209 = icmp ult double* %205, %206
%210 = and i1 %208, %209
br i1 %210, label %307, label %211
211: ; preds = %196
%212 = getelementptr inbounds double, double* %4, i64 %203
%213 = bitcast double* %212 to <2 x double>*
%214 = load <2 x double>, <2 x double>* %213
%215 = getelementptr inbounds double, double* %49, i64 %203
%216 = bitcast double* %215 to <2 x double>*
store <2 x double> %214, <2 x double>* %216
%217 = add nuw nsw i64 %202, 33554434
%218 = getelementptr inbounds double, double* %4, i64 %217
%219 = bitcast double* %218 to <2 x double>*
%220 = load <2 x double>, <2 x double>* %219
%221 = getelementptr inbounds double, double* %49, i64 %217
%222 = bitcast double* %221 to <2 x double>*
store <2 x double> %220, <2 x double>* %222
%223 = add nuw nsw i64 %202, 33554436
%224 = getelementptr inbounds double, double* %4, i64 %223
%225 = bitcast double* %224 to <2 x double>*
%226 = load <2 x double>, <2 x double>* %225
%227 = getelementptr inbounds double, double* %49, i64 %223
%228 = bitcast double* %227 to <2 x double>*
store <2 x double> %226, <2 x double>* %228
%229 = add nuw nsw i64 %202, 33554438
%230 = getelementptr inbounds double, double* %4, i64 %229
%231 = bitcast double* %230 to <2 x double>*
%232 = load <2 x double>, <2 x double>* %231
%233 = getelementptr inbounds double, double* %49, i64 %229
%234 = bitcast double* %233 to <2 x double>*
store <2 x double> %232, <2 x double>* %234
%235 = add nuw nsw i64 %202, 33554440
%236 = getelementptr inbounds double, double* %4, i64 %235
%237 = bitcast double* %236 to <2 x double>*
%238 = load <2 x double>, <2 x double>* %237
%239 = getelementptr inbounds double, double* %49, i64 %235
%240 = bitcast double* %239 to <2 x double>*
store <2 x double> %238, <2 x double>* %240
%241 = add nuw nsw i64 %202, 33554442
%242 = getelementptr inbounds double, double* %4, i64 %241
%243 = bitcast double* %242 to <2 x double>*
%244 = load <2 x double>, <2 x double>* %243
%245 = getelementptr inbounds double, double* %49, i64 %241
%246 = bitcast double* %245 to <2 x double>*
store <2 x double> %244, <2 x double>* %246
%247 = add nuw nsw i64 %202, 33554444
%248 = getelementptr inbounds double, double* %4, i64 %247
%249 = bitcast double* %248 to <2 x double>*
%250 = load <2 x double>, <2 x double>* %249
%251 = getelementptr inbounds double, double* %49, i64 %247
%252 = bitcast double* %251 to <2 x double>*
store <2 x double> %250, <2 x double>* %252
%253 = add nuw nsw i64 %202, 33554446
%254 = getelementptr inbounds double, double* %4, i64 %253
%255 = bitcast double* %254 to <2 x double>*
%256 = load <2 x double>, <2 x double>* %255
%257 = getelementptr inbounds double, double* %49, i64 %253
%258 = bitcast double* %257 to <2 x double>*
store <2 x double> %256, <2 x double>* %258
%259 = add nuw nsw i64 %202, 33554448
%260 = getelementptr inbounds double, double* %4, i64 %259
%261 = bitcast double* %260 to <2 x double>*
%262 = load <2 x double>, <2 x double>* %261
%263 = getelementptr inbounds double, double* %49, i64 %259
%264 = bitcast double* %263 to <2 x double>*
store <2 x double> %262, <2 x double>* %264
%265 = add nuw nsw i64 %202, 33554450
%266 = getelementptr inbounds double, double* %4, i64 %265
%267 = bitcast double* %266 to <2 x double>*
%268 = load <2 x double>, <2 x double>* %267
%269 = getelementptr inbounds double, double* %49, i64 %265
%270 = bitcast double* %269 to <2 x double>*
store <2 x double> %268, <2 x double>* %270
%271 = add nuw nsw i64 %202, 33554452
%272 = getelementptr inbounds double, double* %4, i64 %271
%273 = bitcast double* %272 to <2 x double>*
%274 = load <2 x double>, <2 x double>* %273
%275 = getelementptr inbounds double, double* %49, i64 %271
%276 = bitcast double* %275 to <2 x double>*
store <2 x double> %274, <2 x double>* %276
%277 = add nuw nsw i64 %202, 33554454
%278 = getelementptr inbounds double, double* %4, i64 %277
%279 = bitcast double* %278 to <2 x double>*
%280 = load <2 x double>, <2 x double>* %279
%281 = getelementptr inbounds double, double* %49, i64 %277
%282 = bitcast double* %281 to <2 x double>*
store <2 x double> %280, <2 x double>* %282
%283 = add nuw nsw i64 %202, 33554456
%284 = getelementptr inbounds double, double* %4, i64 %283
%285 = bitcast double* %284 to <2 x double>*
%286 = load <2 x double>, <2 x double>* %285
%287 = getelementptr inbounds double, double* %49, i64 %283
%288 = bitcast double* %287 to <2 x double>*
store <2 x double> %286, <2 x double>* %288
%289 = add nuw nsw i64 %202, 33554458
%290 = getelementptr inbounds double, double* %4, i64 %289
%291 = bitcast double* %290 to <2 x double>*
%292 = load <2 x double>, <2 x double>* %291
%293 = getelementptr inbounds double, double* %49, i64 %289
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> %292, <2 x double>* %294
%295 = add nuw nsw i64 %202, 33554460
%296 = getelementptr inbounds double, double* %4, i64 %295
%297 = bitcast double* %296 to <2 x double>*
%298 = load <2 x double>, <2 x double>* %297
%299 = getelementptr inbounds double, double* %49, i64 %295
%300 = bitcast double* %299 to <2 x double>*
store <2 x double> %298, <2 x double>* %300
%301 = add nuw nsw i64 %202, 33554462
%302 = getelementptr inbounds double, double* %4, i64 %301
%303 = bitcast double* %302 to <2 x double>*
%304 = load <2 x double>, <2 x double>* %303
%305 = getelementptr inbounds double, double* %49, i64 %301
%306 = bitcast double* %305 to <2 x double>*
store <2 x double> %304, <2 x double>* %306
br label %330
307: ; preds = %196, %307
%308 = phi i64 [ %328, %307 ], [ 0, %196 ]
%309 = add nuw nsw i64 %203, %308
%310 = getelementptr inbounds double, double* %4, i64 %309
%311 = load double, double* %310
%312 = getelementptr inbounds double, double* %49, i64 %309
store double %311, double* %312
%313 = or i64 %308, 1
%314 = add nuw nsw i64 %203, %313
%315 = getelementptr inbounds double, double* %4, i64 %314
%316 = load double, double* %315
%317 = getelementptr inbounds double, double* %49, i64 %314
store double %316, double* %317
%318 = or i64 %308, 2
%319 = add nuw nsw i64 %203, %318
%320 = getelementptr inbounds double, double* %4, i64 %319
%321 = load double, double* %320
%322 = getelementptr inbounds double, double* %49, i64 %319
store double %321, double* %322
%323 = or i64 %308, 3
%324 = add nuw nsw i64 %203, %323
%325 = getelementptr inbounds double, double* %4, i64 %324
%326 = load double, double* %325
%327 = getelementptr inbounds double, double* %49, i64 %324
store double %326, double* %327
%328 = add nuw nsw i64 %308, 4
%329 = icmp eq i64 %328, 32
br i1 %329, label %330, label %307
330: ; preds = %307, %211
%331 = getelementptr inbounds double, double* %49, i64 %203
%332 = load double, double* %331
%333 = fmul double %198, %332
%334 = add nuw nsw i64 %197, 1
%335 = icmp eq i64 %334, 1048576
br i1 %335, label %336, label %196
336: ; preds = %330
%337 = getelementptr inbounds double, double* %49, i64 33554432
store double %333, double* %337
%338 = sitofp i32 %53 to double
%339 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%340 = load i32, i32* %51
%341 = mul nsw i32 %340, 1000
%342 = load double, double* %54
%343 = fdiv double %342, 1.000000e+03
br label %344
344: ; preds = %344, %336
%345 = phi i64 [ 0, %336 ], [ %366, %344 ]
%346 = phi double [ 1.000000e+00, %336 ], [ %365, %344 ]
%347 = shl nuw nsw i64 %345, 5
%348 = getelementptr inbounds double, double* %4, i64 %347
%349 = load double, double* %348
%350 = fmul double %346, %349
%351 = shl i64 %345, 5
%352 = or i64 %351, 32
%353 = getelementptr inbounds double, double* %4, i64 %352
%354 = load double, double* %353
%355 = fmul double %350, %354
%356 = shl i64 %345, 5
%357 = or i64 %356, 64
%358 = getelementptr inbounds double, double* %4, i64 %357
%359 = load double, double* %358
%360 = fmul double %355, %359
%361 = shl i64 %345, 5
%362 = or i64 %361, 96
%363 = getelementptr inbounds double, double* %4, i64 %362
%364 = load double, double* %363
%365 = fmul double %360, %364
%366 = add nuw nsw i64 %345, 4
%367 = icmp eq i64 %366, 1048576
br i1 %367, label %368, label %344
368: ; preds = %344
%369 = load double, double* %49
%370 = fsub double %369, %365
%371 = tail call double @llvm.fabs.f64(double %370)
%372 = fcmp ogt double %371, 1.000000e-09
br i1 %372, label %373, label %375
373: ; preds = %368
%374 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
br label %375
375: ; preds = %373, %368
%376 = phi i32 [ 1, %373 ], [ 0, %368 ]
br label %377
377: ; preds = %377, %375
%378 = phi i64 [ 0, %375 ], [ %400, %377 ]
%379 = phi double [ 1.000000e+00, %375 ], [ %399, %377 ]
%380 = shl nuw nsw i64 %378, 5
%381 = add nuw nsw i64 %380, 33554432
%382 = getelementptr inbounds double, double* %4, i64 %381
%383 = load double, double* %382
%384 = fmul double %379, %383
%385 = shl i64 %378, 5
%386 = add i64 %385, 33554464
%387 = getelementptr inbounds double, double* %4, i64 %386
%388 = load double, double* %387
%389 = fmul double %384, %388
%390 = shl i64 %378, 5
%391 = add i64 %390, 33554496
%392 = getelementptr inbounds double, double* %4, i64 %391
%393 = load double, double* %392
%394 = fmul double %389, %393
%395 = shl i64 %378, 5
%396 = add i64 %395, 33554528
%397 = getelementptr inbounds double, double* %4, i64 %396
%398 = load double, double* %397
%399 = fmul double %394, %398
%400 = add nuw nsw i64 %378, 4
%401 = icmp eq i64 %400, 1048576
br i1 %401, label %402, label %377
402: ; preds = %377
%403 = load double, double* %337
%404 = fsub double %403, %399
%405 = tail call double @llvm.fabs.f64(double %404)
%406 = fcmp ogt double %405, 1.000000e-09
br i1 %406, label %407, label %409
407: ; preds = %402
%408 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
br label %409
409: ; preds = %407, %402
%410 = phi i32 [ 1, %407 ], [ %376, %402 ]
%411 = fadd double %56, %338
%412 = sitofp i32 %341 to double
%413 = fadd double %343, %412
%414 = fsub double %413, %411
%415 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double %414)
%416 = icmp eq i32 %410, 0
br i1 %416, label %417, label %419
417: ; preds = %409
%418 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %419
419: ; preds = %417, %409
%420 = tail call i32 @free(double* %4)
%421 = tail call i32 @free(double* %49)
ret i32 1
}