#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 */
int /*<<< orphan*/ acc_device_default;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/);
int main() {
  int i, j, k;
  int sum, known_sum;
  int NI, NJ, NK;
  int error;
  int *input, *temp;
  struct timeval tim;
  double start, end;
  NK = 2;
  NJ = 32;
  NI = 1 << 20;
  error = 0;
  input = (int *)malloc(NK * NJ * NI * sizeof(int));
  temp = (int *)malloc(NK * NJ * NI * sizeof(int));
  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++) {
        input[k * NJ * NI + j * NI + i] = rand() % 5 + 1;
      }
    }
  }
  gettimeofday(&tim, NULL);
  start = tim.tv_sec * 1000 + (tim.tv_usec / 1000.0);
#pragma acc parallel copyin(input [0:NK * NJ * NI])                            \
    copyout(temp [0:NK * NJ * NI]) num_gangs(192) num_workers(8)               \
        vector_length(128)
  {
#pragma acc loop gang
    for (k = 0; k < NK; k++) {
#pragma acc loop worker
      for (j = 0; j < NJ; j++) {
        int product = 1;
#pragma acc loop vector reduction(* : product)
        for (i = 0; i < NI; i++)
          product *= input[k * NJ * NI + j * NI + i];
        temp[k * NJ * NI + j * NI] = product;
      }
    }
  }
  gettimeofday(&tim, NULL);
  end = tim.tv_sec * 1000 + (tim.tv_usec / 1000.0);
  for (k = 0; k < NK; k++) {
    for (j = 0; j < NJ; j++) {
      int product = 1;
      for (i = 0; i < NI; i++)
        product *= input[k * NJ * NI + j * NI + i];
      if (temp[k * NJ * NI + j * NI] != product) {
        error++;
        printf("vecotr * FAILED!\n");
      }
    }
  }
  printf("vector * execution time is :%.2lf: ms\n", end - start);
  if (error == 0)
    printf("vector * SUCCESS!\n");
  free(input);
  free(temp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x24(%rbp)
movl   $0x20,-0x20(%rbp)
movl   $0x100000,-0x1c(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x20(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x20(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    0x2df6(%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    -0x24(%rbp),%eax
jge    129f <main+0x11f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    128c <main+0x10c>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1279 <main+0xf9>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
mov    -0xc(%rbp),%esi
imul   -0x1c(%rbp),%esi
add    %esi,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    122c <main+0xac>
jmp    127e <main+0xfe>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1219 <main+0x99>
jmp    1291 <main+0x111>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1206 <main+0x86>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x48(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xd3c(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1389 <main+0x209>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1376 <main+0x1f6>
movl   $0x1,-0x5c(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1347 <main+0x1c7>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1305 <main+0x185>
mov    -0x5c(%rbp),%edx
mov    -0x38(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
mov    -0xc(%rbp),%esi
imul   -0x1c(%rbp),%esi
add    %esi,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12eb <main+0x16b>
jmp    137b <main+0x1fb>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12d8 <main+0x158>
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x48(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xc52(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1495 <main+0x315>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1482 <main+0x302>
movl   $0x1,-0x60(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1431 <main+0x2b1>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
add    -0x8(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
imul   -0x60(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13ef <main+0x26f>
mov    -0x38(%rbp),%rax
mov    -0x10(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x60(%rbp),%eax
je     146f <main+0x2ef>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
lea    0xba0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1474 <main+0x2f4>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13d5 <main+0x255>
jmp    1487 <main+0x307>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13c2 <main+0x242>
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
lea    0xb74(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x28(%rbp)
jne    14c5 <main+0x345>
lea    0xb83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x10000000,%edi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    $0x10000000,%edi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    0x2e21(%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    %r12,%rbx
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    $0x100000,%rbp
jne    11f0 <main+0x60>
add    $0x1,%r14
add    $0x400000,%rbx
cmp    $0x20,%r14
jne    11e0 <main+0x50>
lea    0x8000000(%r12),%rbx
08
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    $0x100000,%rbp
jne    1260 <main+0xd0>
add    $0x1,%r14
add    $0x400000,%rbx
cmp    $0x20,%r14
jne    1250 <main+0xc0>
xor    %ebx,%ebx
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%eax
movsd  0x18(%rsp),%xmm0
divsd  0xd34(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0x70(%r12),%rcx
movdqa 0xd30(%rip),%xmm8
mov    %rbx,%rdx
shl    $0x14,%rdx
xor    %esi,%esi
movdqa %xmm8,%xmm2
movdqa %xmm8,%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqu -0x70(%rcx,%rsi,4),%xmm4
movdqu -0x60(%rcx,%rsi,4),%xmm1
movdqu -0x50(%rcx,%rsi,4),%xmm5
movdqu -0x40(%rcx,%rsi,4),%xmm6
pshufd $0xf5,%xmm4,%xmm7
pshufd $0xf5,%xmm2,%xmm0
pmuludq %xmm7,%xmm0
pmuludq %xmm2,%xmm4
pshufd $0xf5,%xmm1,%xmm2
pshufd $0xf5,%xmm3,%xmm7
pmuludq %xmm2,%xmm7
pmuludq %xmm3,%xmm1
pmuludq %xmm5,%xmm4
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm0,%xmm2
pmuludq %xmm6,%xmm1
pshufd $0xf5,%xmm6,%xmm0
pmuludq %xmm7,%xmm0
movdqu -0x30(%rcx,%rsi,4),%xmm3
movdqu -0x20(%rcx,%rsi,4),%xmm5
pshufd $0xf5,%xmm3,%xmm6
pmuludq %xmm2,%xmm6
pmuludq %xmm3,%xmm4
pshufd $0xf5,%xmm5,%xmm7
pmuludq %xmm0,%xmm7
pmuludq %xmm5,%xmm1
movdqu -0x10(%rcx,%rsi,4),%xmm0
movdqu (%rcx,%rsi,4),%xmm5
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm2
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm6,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm2
pmuludq %xmm5,%xmm1
pshufd $0xe8,%xmm1,%xmm3
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm7,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm3
add    $0x20,%rsi
cmp    $0x100000,%rsi
jne    1300 <main+0x170>
pshufd $0xf5,%xmm2,%xmm0
pshufd $0xf5,%xmm3,%xmm1
pmuludq %xmm0,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xee,%xmm3,%xmm0
pmuludq %xmm3,%xmm0
pshufd $0xaa,%xmm1,%xmm2
pmuludq %xmm1,%xmm2
pmuludq %xmm0,%xmm2
movd   %xmm2,0x0(%r13,%rdx,4)
add    $0x1,%rbx
add    $0x400000,%rcx
cmp    $0x20,%rbx
jne    12e0 <main+0x150>
lea    0x8000070(%r12),%rcx
08
xor    %edx,%edx
movdqa 0xbeb(%rip),%xmm8
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdx,%rsi
shl    $0x14,%rsi
xor    %edi,%edi
movdqa %xmm8,%xmm2
movdqa %xmm8,%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqu -0x70(%rcx,%rdi,4),%xmm4
movdqu -0x60(%rcx,%rdi,4),%xmm1
movdqu -0x50(%rcx,%rdi,4),%xmm5
movdqu -0x40(%rcx,%rdi,4),%xmm6
pshufd $0xf5,%xmm4,%xmm7
pshufd $0xf5,%xmm2,%xmm0
pmuludq %xmm7,%xmm0
pmuludq %xmm2,%xmm4
pshufd $0xf5,%xmm1,%xmm2
pshufd $0xf5,%xmm3,%xmm7
pmuludq %xmm2,%xmm7
pmuludq %xmm3,%xmm1
pmuludq %xmm5,%xmm4
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm0,%xmm2
pmuludq %xmm6,%xmm1
pshufd $0xf5,%xmm6,%xmm0
pmuludq %xmm7,%xmm0
movdqu -0x30(%rcx,%rdi,4),%xmm3
movdqu -0x20(%rcx,%rdi,4),%xmm5
pshufd $0xf5,%xmm3,%xmm6
pmuludq %xmm2,%xmm6
pmuludq %xmm3,%xmm4
pshufd $0xf5,%xmm5,%xmm7
pmuludq %xmm0,%xmm7
pmuludq %xmm5,%xmm1
movdqu -0x10(%rcx,%rdi,4),%xmm0
movdqu (%rcx,%rdi,4),%xmm5
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm2
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm6,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm2
pmuludq %xmm5,%xmm1
pshufd $0xe8,%xmm1,%xmm3
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm7,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm3
add    $0x20,%rdi
cmp    $0x100000,%rdi
jne    1450 <main+0x2c0>
pshufd $0xf5,%xmm2,%xmm0
pshufd $0xf5,%xmm3,%xmm1
pmuludq %xmm0,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xee,%xmm3,%xmm0
pmuludq %xmm3,%xmm0
pshufd $0xaa,%xmm1,%xmm2
pmuludq %xmm1,%xmm2
pmuludq %xmm0,%xmm2
movd   %xmm2,0x8000000(%r13,%rsi,4)
add    $0x1,%rdx
add    $0x400000,%rcx
cmp    $0x20,%rdx
jne    1430 <main+0x2a0>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %ebx,%ebx
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0xa66(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x70(%r12),%rbp
movdqa 0xa62(%rip),%xmm8
lea    0xaa4(%rip),%r15
xor    %r14d,%r14d
jmp    15d5 <main+0x445>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0x400000,%rbp
cmp    $0x20,%rbx
je     1710 <main+0x580>
mov    %rbx,%rax
shl    $0x14,%rax
xor    %ecx,%ecx
movdqa %xmm8,%xmm1
movdqa %xmm8,%xmm2
nopl   0x0(%rax,%rax,1)
movdqu -0x70(%rbp,%rcx,4),%xmm3
movdqu -0x60(%rbp,%rcx,4),%xmm0
movdqu -0x50(%rbp,%rcx,4),%xmm4
movdqu -0x40(%rbp,%rcx,4),%xmm5
pshufd $0xf5,%xmm3,%xmm6
pshufd $0xf5,%xmm1,%xmm7
pmuludq %xmm6,%xmm7
pmuludq %xmm1,%xmm3
pshufd $0xf5,%xmm0,%xmm1
pshufd $0xf5,%xmm2,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm2,%xmm0
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm4,%xmm1
pmuludq %xmm7,%xmm1
pmuludq %xmm5,%xmm0
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm6,%xmm2
movdqu -0x30(%rbp,%rcx,4),%xmm4
movdqu -0x20(%rbp,%rcx,4),%xmm5
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm2,%xmm4
pmuludq %xmm5,%xmm0
movdqu -0x10(%rbp,%rcx,4),%xmm2
movdqu 0x0(%rbp,%rcx,4),%xmm5
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
pmuludq %xmm5,%xmm0
pshufd $0xe8,%xmm0,%xmm2
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm4,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm2
add    $0x20,%rcx
cmp    $0x100000,%rcx
jne    15f0 <main+0x460>
pshufd $0xf5,%xmm1,%xmm0
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm0,%xmm3
pmuludq %xmm1,%xmm2
pshufd $0xee,%xmm2,%xmm0
pmuludq %xmm2,%xmm0
pshufd $0xaa,%xmm3,%xmm1
pmuludq %xmm3,%xmm1
pmuludq %xmm0,%xmm1
movd   %xmm1,%ecx
cmp    %ecx,0x0(%r13,%rax,4)
je     15c0 <main+0x430>
add    $0x1,%r14d
mov    %r15,%rdi
call   1040 <puts@plt>
movdqa 0x905(%rip),%xmm8
jmp    15c0 <main+0x430>
mov    %r12,%rbp
mov    %r12,%rbx
add    $0x8000070,%rbx
xor    %r12d,%r12d
movdqa 0x8e7(%rip),%xmm8
lea    0x929(%rip),%r15
jmp    1755 <main+0x5c5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r12
add    $0x400000,%rbx
cmp    $0x20,%r12
je     1892 <main+0x702>
mov    %r12,%rax
shl    $0x14,%rax
xor    %ecx,%ecx
movdqa %xmm8,%xmm1
movdqa %xmm8,%xmm2
nopl   0x0(%rax,%rax,1)
movdqu -0x70(%rbx,%rcx,4),%xmm3
movdqu -0x60(%rbx,%rcx,4),%xmm0
movdqu -0x50(%rbx,%rcx,4),%xmm4
movdqu -0x40(%rbx,%rcx,4),%xmm5
pshufd $0xf5,%xmm3,%xmm6
pshufd $0xf5,%xmm1,%xmm7
pmuludq %xmm6,%xmm7
pmuludq %xmm1,%xmm3
pshufd $0xf5,%xmm0,%xmm1
pshufd $0xf5,%xmm2,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm2,%xmm0
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm4,%xmm1
pmuludq %xmm7,%xmm1
pmuludq %xmm5,%xmm0
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm6,%xmm2
movdqu -0x30(%rbx,%rcx,4),%xmm4
movdqu -0x20(%rbx,%rcx,4),%xmm5
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm2,%xmm4
pmuludq %xmm5,%xmm0
movdqu -0x10(%rbx,%rcx,4),%xmm2
movdqu (%rbx,%rcx,4),%xmm5
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
pmuludq %xmm5,%xmm0
pshufd $0xe8,%xmm0,%xmm2
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm4,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm2
add    $0x20,%rcx
cmp    $0x100000,%rcx
jne    1770 <main+0x5e0>
pshufd $0xf5,%xmm1,%xmm0
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm0,%xmm3
pmuludq %xmm1,%xmm2
pshufd $0xee,%xmm2,%xmm0
pmuludq %xmm2,%xmm0
pshufd $0xaa,%xmm3,%xmm1
pmuludq %xmm3,%xmm1
pmuludq %xmm0,%xmm1
movd   %xmm1,%ecx
cmp    %ecx,0x8000000(%r13,%rax,4)
08
je     1740 <main+0x5b0>
add    $0x1,%r14d
mov    %r15,%rdi
call   1040 <puts@plt>
movdqa 0x783(%rip),%xmm8
jmp    1740 <main+0x5b0>
movsd  0x30(%rsp),%xmm1
addsd  0x28(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sdl 0xc(%rsp),%xmm2
movsd  0x20(%rsp),%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
lea    0x764(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
test   %r14d,%r14d
jne    18d4 <main+0x744>
lea    0x778(%rip),%rdi
call   1040 <puts@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x38,%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
@.str = [18 x i8] c"vecotr * FAILED!\0A\00"
@.str.1 = [39 x i8] c"vector * execution time is :%.2lf: ms\0A\00"
@.str.2 = [19 x i8] c"vector * 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 i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca %struct.timeval
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %9
store i32 32, i32* %8
store i32 1048576, i32* %7
store i32 0, i32* %10
%18 = load i32, i32* %9
%19 = load i32, i32* %8
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %7
%22 = mul nsw i32 %20, %21
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 4
%25 = trunc i64 %24 to i32
%26 = call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to i32*
store i32* %27, i32** %11
%28 = load i32, i32* %9
%29 = load i32, i32* %8
%30 = mul nsw i32 %28, %29
%31 = load i32, i32* %7
%32 = mul nsw i32 %30, %31
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 4
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to i32*
store i32* %37, i32** %12
%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 = %83, %0
%44 = load i32, i32* %4
%45 = load i32, i32* %9
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %86
47: ; preds = %43
store i32 0, i32* %3
br label %48
48: ; preds = %79, %47
%49 = load i32, i32* %3
%50 = load i32, i32* %8
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %82
52: ; preds = %48
store i32 0, i32* %2
br label %53
53: ; preds = %75, %52
%54 = load i32, i32* %2
%55 = load i32, i32* %7
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %78
57: ; preds = %53
%58 = call i32 (...) @rand()
%59 = srem i32 %58, 5
%60 = add nsw i32 %59, 1
%61 = load i32*, i32** %11
%62 = load i32, i32* %4
%63 = load i32, i32* %8
%64 = mul nsw i32 %62, %63
%65 = load i32, i32* %7
%66 = mul nsw i32 %64, %65
%67 = load i32, i32* %3
%68 = load i32, i32* %7
%69 = mul nsw i32 %67, %68
%70 = add nsw i32 %66, %69
%71 = load i32, i32* %2
%72 = add nsw i32 %70, %71
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %61, i64 %73
store i32 %60, i32* %74
br label %75
75: ; preds = %57
%76 = load i32, i32* %2
%77 = add nsw i32 %76, 1
store i32 %77, i32* %2
br label %53
78: ; preds = %53
br label %79
79: ; preds = %78
%80 = load i32, i32* %3
%81 = add nsw i32 %80, 1
store i32 %81, i32* %3
br label %48
82: ; preds = %48
br label %83
83: ; preds = %82
%84 = load i32, i32* %4
%85 = add nsw i32 %84, 1
store i32 %85, i32* %4
br label %43
86: ; preds = %43
%87 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%88 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%89 = load i32, i32* %88
%90 = mul nsw i32 %89, 1000
%91 = sitofp i32 %90 to double
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%93 = load double, double* %92
%94 = fdiv double %93, 1.000000e+03
%95 = fadd double %91, %94
store double %95, double* %14
store i32 0, i32* %4
br label %96
96: ; preds = %149, %86
%97 = load i32, i32* %4
%98 = load i32, i32* %9
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %152
100: ; preds = %96
store i32 0, i32* %3
br label %101
101: ; preds = %145, %100
%102 = load i32, i32* %3
%103 = load i32, i32* %8
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %148
105: ; preds = %101
store i32 1, i32* %16
store i32 0, i32* %2
br label %106
106: ; preds = %128, %105
%107 = load i32, i32* %2
%108 = load i32, i32* %7
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %131
110: ; preds = %106
%111 = load i32*, i32** %11
%112 = load i32, i32* %4
%113 = load i32, i32* %8
%114 = mul nsw i32 %112, %113
%115 = load i32, i32* %7
%116 = mul nsw i32 %114, %115
%117 = load i32, i32* %3
%118 = load i32, i32* %7
%119 = mul nsw i32 %117, %118
%120 = add nsw i32 %116, %119
%121 = load i32, i32* %2
%122 = add nsw i32 %120, %121
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %111, i64 %123
%125 = load i32, i32* %124
%126 = load i32, i32* %16
%127 = mul nsw i32 %126, %125
store i32 %127, i32* %16
br label %128
128: ; preds = %110
%129 = load i32, i32* %2
%130 = add nsw i32 %129, 1
store i32 %130, i32* %2
br label %106
131: ; preds = %106
%132 = load i32, i32* %16
%133 = load i32*, i32** %12
%134 = load i32, i32* %4
%135 = load i32, i32* %8
%136 = mul nsw i32 %134, %135
%137 = load i32, i32* %7
%138 = mul nsw i32 %136, %137
%139 = load i32, i32* %3
%140 = load i32, i32* %7
%141 = mul nsw i32 %139, %140
%142 = add nsw i32 %138, %141
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i32, i32* %133, i64 %143
store i32 %132, i32* %144
br label %145
145: ; preds = %131
%146 = load i32, i32* %3
%147 = add nsw i32 %146, 1
store i32 %147, i32* %3
br label %101
148: ; preds = %101
br label %149
149: ; preds = %148
%150 = load i32, i32* %4
%151 = add nsw i32 %150, 1
store i32 %151, i32* %4
br label %96
152: ; preds = %96
%153 = call i32 @gettimeofday(%struct.timeval* %13, i32* null)
%154 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 0
%155 = load i32, i32* %154
%156 = mul nsw i32 %155, 1000
%157 = sitofp i32 %156 to double
%158 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%159 = load double, double* %158
%160 = fdiv double %159, 1.000000e+03
%161 = fadd double %157, %160
store double %161, double* %15
store i32 0, i32* %4
br label %162
162: ; preds = %222, %152
%163 = load i32, i32* %4
%164 = load i32, i32* %9
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %225
166: ; preds = %162
store i32 0, i32* %3
br label %167
167: ; preds = %218, %166
%168 = load i32, i32* %3
%169 = load i32, i32* %8
%170 = icmp slt i32 %168, %169
br i1 %170, label %171, label %221
171: ; preds = %167
store i32 1, i32* %17
store i32 0, i32* %2
br label %172
172: ; preds = %194, %171
%173 = load i32, i32* %2
%174 = load i32, i32* %7
%175 = icmp slt i32 %173, %174
br i1 %175, label %176, label %197
176: ; preds = %172
%177 = load i32*, i32** %11
%178 = load i32, i32* %4
%179 = load i32, i32* %8
%180 = mul nsw i32 %178, %179
%181 = load i32, i32* %7
%182 = mul nsw i32 %180, %181
%183 = load i32, i32* %3
%184 = load i32, i32* %7
%185 = mul nsw i32 %183, %184
%186 = add nsw i32 %182, %185
%187 = load i32, i32* %2
%188 = add nsw i32 %186, %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i32, i32* %177, i64 %189
%191 = load i32, i32* %190
%192 = load i32, i32* %17
%193 = mul nsw i32 %192, %191
store i32 %193, i32* %17
br label %194
194: ; preds = %176
%195 = load i32, i32* %2
%196 = add nsw i32 %195, 1
store i32 %196, i32* %2
br label %172
197: ; preds = %172
%198 = load i32*, i32** %12
%199 = load i32, i32* %4
%200 = load i32, i32* %8
%201 = mul nsw i32 %199, %200
%202 = load i32, i32* %7
%203 = mul nsw i32 %201, %202
%204 = load i32, i32* %3
%205 = load i32, i32* %7
%206 = mul nsw i32 %204, %205
%207 = add nsw i32 %203, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %198, i64 %208
%210 = load i32, i32* %209
%211 = load i32, i32* %17
%212 = icmp ne i32 %210, %211
br i1 %212, label %213, label %217
213: ; preds = %197
%214 = load i32, i32* %10
%215 = add nsw i32 %214, 1
store i32 %215, i32* %10
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %217
217: ; preds = %213, %197
br label %218
218: ; preds = %217
%219 = load i32, i32* %3
%220 = add nsw i32 %219, 1
store i32 %220, i32* %3
br label %167
221: ; preds = %167
br label %222
222: ; preds = %221
%223 = load i32, i32* %4
%224 = add nsw i32 %223, 1
store i32 %224, i32* %4
br label %162
225: ; preds = %162
%226 = load double, double* %15
%227 = load double, double* %14
%228 = fsub double %226, %227
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double %228)
%230 = load i32, i32* %10
%231 = icmp eq i32 %230, 0
br i1 %231, label %232, label %234
232: ; preds = %225
%233 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %234
234: ; preds = %232, %225
%235 = load i32*, i32** %11
%236 = call i32 @free(i32* %235)
%237 = load i32*, i32** %12
%238 = call i32 @free(i32* %237)
%239 = load i32, i32* %1
ret i32 %239
}

LLVM IR (-O2):
%struct.timeval = type { i32, double }
@acc_device_default = global i32 0
@.str.1 = [39 x i8] c"vector * execution time is :%.2lf: ms\0A\00"
@str = [18 x i8] c"vector * SUCCESS!\00"
@str.3 = [17 x i8] c"vecotr * FAILED!\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = tail call i64 @malloc(i32 268435456)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i64 @malloc(i32 268435456)
%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, %23
%12 = phi i64 [ 0, %0 ], [ %24, %23 ]
%13 = shl nsw i64 %12, 20
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 0, %11 ], [ %21, %14 ]
%16 = tail call i32 (...) @rand()
%17 = srem i32 %16, 5
%18 = add nsw i32 %17, 1
%19 = add nuw nsw i64 %13, %15
%20 = getelementptr inbounds i32, i32* %4, i64 %19
store i32 %18, i32* %20
%21 = add nuw nsw i64 %15, 1
%22 = icmp eq i64 %21, 1048576
br i1 %22, label %23, label %14
23: ; preds = %14
%24 = add nuw nsw i64 %12, 1
%25 = icmp eq i64 %24, 32
br i1 %25, label %26, label %11
26: ; preds = %23, %39
%27 = phi i64 [ %40, %39 ], [ 0, %23 ]
%28 = shl nsw i64 %27, 20
%29 = add nuw nsw i64 %28, 33554432
br label %30
30: ; preds = %30, %26
%31 = phi i64 [ 0, %26 ], [ %37, %30 ]
%32 = tail call i32 (...) @rand()
%33 = srem i32 %32, 5
%34 = add nsw i32 %33, 1
%35 = add nuw nsw i64 %29, %31
%36 = getelementptr inbounds i32, i32* %4, i64 %35
store i32 %34, i32* %36
%37 = add nuw nsw i64 %31, 1
%38 = icmp eq i64 %37, 1048576
br i1 %38, label %39, label %30
39: ; preds = %30
%40 = add nuw nsw i64 %27, 1
%41 = icmp eq i64 %40, 32
br i1 %41, label %42, label %26
42: ; preds = %39
%43 = inttoptr i64 %5 to i32*
%44 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%45 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%46 = load i32, i32* %45
%47 = mul nsw i32 %46, 1000
%48 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%49 = load double, double* %48
%50 = fdiv double %49, 1.000000e+03
br label %51
51: ; preds = %42, %99
%52 = phi i64 [ 0, %42 ], [ %103, %99 ]
%53 = shl nsw i64 %52, 20
br label %54
54: ; preds = %54, %51
%55 = phi i64 [ 0, %51 ], [ %97, %54 ]
%56 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %51 ], [ %95, %54 ]
%57 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %51 ], [ %96, %54 ]
%58 = add nuw nsw i64 %53, %55
%59 = getelementptr inbounds i32, i32* %4, i64 %58
%60 = bitcast i32* %59 to <4 x i32>*
%61 = load <4 x i32>, <4 x i32>* %60
%62 = getelementptr inbounds i32, i32* %59, i64 4
%63 = bitcast i32* %62 to <4 x i32>*
%64 = load <4 x i32>, <4 x i32>* %63
%65 = mul <4 x i32> %61, %56
%66 = mul <4 x i32> %64, %57
%67 = or i64 %55, 8
%68 = add nuw nsw i64 %53, %67
%69 = getelementptr inbounds i32, i32* %4, i64 %68
%70 = bitcast i32* %69 to <4 x i32>*
%71 = load <4 x i32>, <4 x i32>* %70
%72 = getelementptr inbounds i32, i32* %69, i64 4
%73 = bitcast i32* %72 to <4 x i32>*
%74 = load <4 x i32>, <4 x i32>* %73
%75 = mul <4 x i32> %71, %65
%76 = mul <4 x i32> %74, %66
%77 = or i64 %55, 16
%78 = add nuw nsw i64 %53, %77
%79 = getelementptr inbounds i32, i32* %4, i64 %78
%80 = bitcast i32* %79 to <4 x i32>*
%81 = load <4 x i32>, <4 x i32>* %80
%82 = getelementptr inbounds i32, i32* %79, i64 4
%83 = bitcast i32* %82 to <4 x i32>*
%84 = load <4 x i32>, <4 x i32>* %83
%85 = mul <4 x i32> %81, %75
%86 = mul <4 x i32> %84, %76
%87 = or i64 %55, 24
%88 = add nuw nsw i64 %53, %87
%89 = getelementptr inbounds i32, i32* %4, i64 %88
%90 = bitcast i32* %89 to <4 x i32>*
%91 = load <4 x i32>, <4 x i32>* %90
%92 = getelementptr inbounds i32, i32* %89, i64 4
%93 = bitcast i32* %92 to <4 x i32>*
%94 = load <4 x i32>, <4 x i32>* %93
%95 = mul <4 x i32> %91, %85
%96 = mul <4 x i32> %94, %86
%97 = add nuw nsw i64 %55, 32
%98 = icmp eq i64 %97, 1048576
br i1 %98, label %99, label %54
99: ; preds = %54
%100 = mul <4 x i32> %96, %95
%101 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %100)
%102 = getelementptr inbounds i32, i32* %43, i64 %53
store i32 %101, i32* %102
%103 = add nuw nsw i64 %52, 1
%104 = icmp eq i64 %103, 32
br i1 %104, label %105, label %51
105: ; preds = %99, %154
%106 = phi i64 [ %158, %154 ], [ 0, %99 ]
%107 = shl nsw i64 %106, 20
%108 = add nuw nsw i64 %107, 33554432
br label %109
109: ; preds = %109, %105
%110 = phi i64 [ 0, %105 ], [ %152, %109 ]
%111 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %105 ], [ %150, %109 ]
%112 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %105 ], [ %151, %109 ]
%113 = add nuw nsw i64 %108, %110
%114 = getelementptr inbounds i32, i32* %4, i64 %113
%115 = bitcast i32* %114 to <4 x i32>*
%116 = load <4 x i32>, <4 x i32>* %115
%117 = getelementptr inbounds i32, i32* %114, i64 4
%118 = bitcast i32* %117 to <4 x i32>*
%119 = load <4 x i32>, <4 x i32>* %118
%120 = mul <4 x i32> %116, %111
%121 = mul <4 x i32> %119, %112
%122 = or i64 %110, 8
%123 = add nuw nsw i64 %108, %122
%124 = getelementptr inbounds i32, i32* %4, i64 %123
%125 = bitcast i32* %124 to <4 x i32>*
%126 = load <4 x i32>, <4 x i32>* %125
%127 = getelementptr inbounds i32, i32* %124, i64 4
%128 = bitcast i32* %127 to <4 x i32>*
%129 = load <4 x i32>, <4 x i32>* %128
%130 = mul <4 x i32> %126, %120
%131 = mul <4 x i32> %129, %121
%132 = or i64 %110, 16
%133 = add nuw nsw i64 %108, %132
%134 = getelementptr inbounds i32, i32* %4, i64 %133
%135 = bitcast i32* %134 to <4 x i32>*
%136 = load <4 x i32>, <4 x i32>* %135
%137 = getelementptr inbounds i32, i32* %134, i64 4
%138 = bitcast i32* %137 to <4 x i32>*
%139 = load <4 x i32>, <4 x i32>* %138
%140 = mul <4 x i32> %136, %130
%141 = mul <4 x i32> %139, %131
%142 = or i64 %110, 24
%143 = add nuw nsw i64 %108, %142
%144 = getelementptr inbounds i32, i32* %4, i64 %143
%145 = bitcast i32* %144 to <4 x i32>*
%146 = load <4 x i32>, <4 x i32>* %145
%147 = getelementptr inbounds i32, i32* %144, i64 4
%148 = bitcast i32* %147 to <4 x i32>*
%149 = load <4 x i32>, <4 x i32>* %148
%150 = mul <4 x i32> %146, %140
%151 = mul <4 x i32> %149, %141
%152 = add nuw nsw i64 %110, 32
%153 = icmp eq i64 %152, 1048576
br i1 %153, label %154, label %109
154: ; preds = %109
%155 = mul <4 x i32> %151, %150
%156 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %155)
%157 = getelementptr inbounds i32, i32* %43, i64 %108
store i32 %156, i32* %157
%158 = add nuw nsw i64 %106, 1
%159 = icmp eq i64 %158, 32
br i1 %159, label %160, label %105
160: ; preds = %154
%161 = sitofp i32 %47 to double
%162 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%163 = load i32, i32* %45
%164 = mul nsw i32 %163, 1000
%165 = load double, double* %48
%166 = fdiv double %165, 1.000000e+03
br label %167
167: ; preds = %160, %225
%168 = phi i64 [ 0, %160 ], [ %227, %225 ]
%169 = phi i32 [ 0, %160 ], [ %226, %225 ]
%170 = shl nsw i64 %168, 20
br label %171
171: ; preds = %171, %167
%172 = phi i64 [ 0, %167 ], [ %214, %171 ]
%173 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %167 ], [ %212, %171 ]
%174 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %167 ], [ %213, %171 ]
%175 = add nuw nsw i64 %170, %172
%176 = getelementptr inbounds i32, i32* %4, i64 %175
%177 = bitcast i32* %176 to <4 x i32>*
%178 = load <4 x i32>, <4 x i32>* %177
%179 = getelementptr inbounds i32, i32* %176, i64 4
%180 = bitcast i32* %179 to <4 x i32>*
%181 = load <4 x i32>, <4 x i32>* %180
%182 = mul <4 x i32> %178, %173
%183 = mul <4 x i32> %181, %174
%184 = or i64 %172, 8
%185 = add nuw nsw i64 %170, %184
%186 = getelementptr inbounds i32, i32* %4, i64 %185
%187 = bitcast i32* %186 to <4 x i32>*
%188 = load <4 x i32>, <4 x i32>* %187
%189 = getelementptr inbounds i32, i32* %186, i64 4
%190 = bitcast i32* %189 to <4 x i32>*
%191 = load <4 x i32>, <4 x i32>* %190
%192 = mul <4 x i32> %188, %182
%193 = mul <4 x i32> %191, %183
%194 = or i64 %172, 16
%195 = add nuw nsw i64 %170, %194
%196 = getelementptr inbounds i32, i32* %4, i64 %195
%197 = bitcast i32* %196 to <4 x i32>*
%198 = load <4 x i32>, <4 x i32>* %197
%199 = getelementptr inbounds i32, i32* %196, i64 4
%200 = bitcast i32* %199 to <4 x i32>*
%201 = load <4 x i32>, <4 x i32>* %200
%202 = mul <4 x i32> %198, %192
%203 = mul <4 x i32> %201, %193
%204 = or i64 %172, 24
%205 = add nuw nsw i64 %170, %204
%206 = getelementptr inbounds i32, i32* %4, i64 %205
%207 = bitcast i32* %206 to <4 x i32>*
%208 = load <4 x i32>, <4 x i32>* %207
%209 = getelementptr inbounds i32, i32* %206, i64 4
%210 = bitcast i32* %209 to <4 x i32>*
%211 = load <4 x i32>, <4 x i32>* %210
%212 = mul <4 x i32> %208, %202
%213 = mul <4 x i32> %211, %203
%214 = add nuw nsw i64 %172, 32
%215 = icmp eq i64 %214, 1048576
br i1 %215, label %216, label %171
216: ; preds = %171
%217 = mul <4 x i32> %213, %212
%218 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %217)
%219 = getelementptr inbounds i32, i32* %43, i64 %170
%220 = load i32, i32* %219
%221 = icmp eq i32 %220, %218
br i1 %221, label %225, label %222
222: ; preds = %216
%223 = add nsw i32 %169, 1
%224 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
br label %225
225: ; preds = %222, %216
%226 = phi i32 [ %223, %222 ], [ %169, %216 ]
%227 = add nuw nsw i64 %168, 1
%228 = icmp eq i64 %227, 32
br i1 %228, label %229, label %167
229: ; preds = %225, %288
%230 = phi i64 [ %290, %288 ], [ 0, %225 ]
%231 = phi i32 [ %289, %288 ], [ %226, %225 ]
%232 = shl nsw i64 %230, 20
%233 = add nuw nsw i64 %232, 33554432
br label %234
234: ; preds = %234, %229
%235 = phi i64 [ 0, %229 ], [ %277, %234 ]
%236 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %229 ], [ %275, %234 ]
%237 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %229 ], [ %276, %234 ]
%238 = add nuw nsw i64 %233, %235
%239 = getelementptr inbounds i32, i32* %4, i64 %238
%240 = bitcast i32* %239 to <4 x i32>*
%241 = load <4 x i32>, <4 x i32>* %240
%242 = getelementptr inbounds i32, i32* %239, i64 4
%243 = bitcast i32* %242 to <4 x i32>*
%244 = load <4 x i32>, <4 x i32>* %243
%245 = mul <4 x i32> %241, %236
%246 = mul <4 x i32> %244, %237
%247 = or i64 %235, 8
%248 = add nuw nsw i64 %233, %247
%249 = getelementptr inbounds i32, i32* %4, i64 %248
%250 = bitcast i32* %249 to <4 x i32>*
%251 = load <4 x i32>, <4 x i32>* %250
%252 = getelementptr inbounds i32, i32* %249, i64 4
%253 = bitcast i32* %252 to <4 x i32>*
%254 = load <4 x i32>, <4 x i32>* %253
%255 = mul <4 x i32> %251, %245
%256 = mul <4 x i32> %254, %246
%257 = or i64 %235, 16
%258 = add nuw nsw i64 %233, %257
%259 = getelementptr inbounds i32, i32* %4, i64 %258
%260 = bitcast i32* %259 to <4 x i32>*
%261 = load <4 x i32>, <4 x i32>* %260
%262 = getelementptr inbounds i32, i32* %259, i64 4
%263 = bitcast i32* %262 to <4 x i32>*
%264 = load <4 x i32>, <4 x i32>* %263
%265 = mul <4 x i32> %261, %255
%266 = mul <4 x i32> %264, %256
%267 = or i64 %235, 24
%268 = add nuw nsw i64 %233, %267
%269 = getelementptr inbounds i32, i32* %4, i64 %268
%270 = bitcast i32* %269 to <4 x i32>*
%271 = load <4 x i32>, <4 x i32>* %270
%272 = getelementptr inbounds i32, i32* %269, i64 4
%273 = bitcast i32* %272 to <4 x i32>*
%274 = load <4 x i32>, <4 x i32>* %273
%275 = mul <4 x i32> %271, %265
%276 = mul <4 x i32> %274, %266
%277 = add nuw nsw i64 %235, 32
%278 = icmp eq i64 %277, 1048576
br i1 %278, label %279, label %234
279: ; preds = %234
%280 = mul <4 x i32> %276, %275
%281 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %280)
%282 = getelementptr inbounds i32, i32* %43, i64 %233
%283 = load i32, i32* %282
%284 = icmp eq i32 %283, %281
br i1 %284, label %288, label %285
285: ; preds = %279
%286 = add nsw i32 %231, 1
%287 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
br label %288
288: ; preds = %285, %279
%289 = phi i32 [ %286, %285 ], [ %231, %279 ]
%290 = add nuw nsw i64 %230, 1
%291 = icmp eq i64 %290, 32
br i1 %291, label %292, label %229
292: ; preds = %288
%293 = fadd double %50, %161
%294 = sitofp i32 %164 to double
%295 = fadd double %166, %294
%296 = fsub double %295, %293
%297 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double %296)
%298 = icmp eq i32 %289, 0
br i1 %298, label %299, label %301
299: ; preds = %292
%300 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %301
301: ; preds = %299, %292
%302 = tail call i32 @free(i32* %4)
%303 = tail call i32 @free(i32* %43)
ret i32 0
}