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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x100000,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    0x2e29(%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,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    120a <main+0x8a>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d3 <main+0x53>
movl   $0x1,-0x14(%rbp)
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x38(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xdca(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1276 <main+0xf6>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    124a <main+0xca>
lea    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
imul   $0x3e8,-0x38(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xd65(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12e2 <main+0x162>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12b6 <main+0x136>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     130b <main+0x18b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
lea    0xd25(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
jne    133b <main+0x1bb>
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    $0x400000,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
call   10a0 <acc_init@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
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    11d0 <main+0x40>
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x18(%rsp),%eax
movsd  0x20(%rsp),%xmm0
divsd  0xdd7(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movdqa 0xdd9(%rip),%xmm1
mov    $0x1c,%ecx
movdqa %xmm1,%xmm2
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    $0x10001c,%rcx
jne    1240 <main+0xb0>
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,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
imul   $0x3e8,0x18(%rsp),%eax
movsd  0x20(%rsp),%xmm0
divsd  0xc97(%rip),%xmm0
movdqa 0xc9f(%rip),%xmm1
mov    $0x1c,%ecx
movdqa %xmm1,%xmm2
nopw   0x0(%rax,%rax,1)
movdqu -0x70(%rbx,%rcx,4),%xmm3
movdqu -0x60(%rbx,%rcx,4),%xmm5
movdqu -0x50(%rbx,%rcx,4),%xmm4
movdqu -0x40(%rbx,%rcx,4),%xmm8
pshufd $0xf5,%xmm3,%xmm6
pshufd $0xf5,%xmm1,%xmm7
pmuludq %xmm6,%xmm7
pmuludq %xmm1,%xmm3
pshufd $0xf5,%xmm5,%xmm1
pshufd $0xf5,%xmm2,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm2,%xmm5
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm4,%xmm1
pmuludq %xmm7,%xmm1
pmuludq %xmm8,%xmm5
pshufd $0xf5,%xmm8,%xmm2
pmuludq %xmm6,%xmm2
movdqu -0x30(%rbx,%rcx,4),%xmm4
movdqu -0x20(%rbx,%rcx,4),%xmm7
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm1,%xmm6
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm7,%xmm4
pmuludq %xmm2,%xmm4
pmuludq %xmm7,%xmm5
movdqu -0x10(%rbx,%rcx,4),%xmm2
movdqu (%rbx,%rcx,4),%xmm7
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm1
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm2
pshufd $0xf5,%xmm7,%xmm3
pmuludq %xmm4,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm3,%xmm2
add    $0x20,%rcx
cmp    $0x10001c,%rcx
jne    1380 <main+0x1f0>
pshufd $0xf5,%xmm1,%xmm4
pshufd $0xf5,%xmm2,%xmm3
pmuludq %xmm4,%xmm3
pmuludq %xmm1,%xmm2
pshufd $0xee,%xmm2,%xmm4
pmuludq %xmm2,%xmm4
pshufd $0xaa,%xmm3,%xmm1
pmuludq %xmm3,%xmm1
pmuludq %xmm4,%xmm1
movd   %xmm1,%edx
movsd  0x10(%rsp),%xmm1
addsd  0x8(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
addsd  %xmm2,%xmm0
cmp    %edx,%ebp
jne    14b8 <main+0x328>
subsd  %xmm1,%xmm0
lea    0xbb6(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xbd9(%rip),%rdi
call   1040 <puts@plt>
jmp    14ee <main+0x35e>
lea    0xb61(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
lea    0xb72(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, double }
@acc_device_default = global i32 0
@.str = [57 x i8] c"same_gang_worker + FAILED! product=%d, known_product=%d\0A\00"
@.str.1 = [49 x i8] c"same_gang_worker + execution time is :%.2lf: ms\0A\00"
@.str.2 = [29 x i8] c"same_gang_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 i32*
%10 = alloca %struct.timeval
%11 = alloca double
%12 = alloca double
store i32 0, i32* %1
store i32 1048576, i32* %7
store i32 0, i32* %8
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to i32*
store i32* %18, i32** %9
%19 = load i32, i32* @acc_device_default
%20 = call i32 @acc_init(i32 %19)
%21 = call i64 @time(i32 0)
%22 = trunc i64 %21 to i32
%23 = call i32 @srand(i32 %22)
store i32 0, i32* %2
br label %24
24: ; preds = %36, %0
%25 = load i32, i32* %2
%26 = load i32, i32* %7
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %39
28: ; preds = %24
%29 = call i32 (...) @rand()
%30 = srem i32 %29, 5
%31 = add nsw i32 %30, 1
%32 = load i32*, i32** %9
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
store i32 %31, i32* %35
br label %36
36: ; preds = %28
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %24
39: ; preds = %24
store i32 1, i32* %5
%40 = call i32 @gettimeofday(%struct.timeval* %10, i32* null)
%41 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 0
%42 = load i32, i32* %41
%43 = mul nsw i32 %42, 1000
%44 = sitofp i32 %43 to double
%45 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 1
%46 = load double, double* %45
%47 = fdiv double %46, 1.000000e+03
%48 = fadd double %44, %47
store double %48, double* %11
store i32 0, i32* %2
br label %49
49: ; preds = %61, %39
%50 = load i32, i32* %2
%51 = load i32, i32* %7
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %64
53: ; preds = %49
%54 = load i32*, i32** %9
%55 = load i32, i32* %2
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %54, i64 %56
%58 = load i32, i32* %57
%59 = load i32, i32* %5
%60 = mul nsw i32 %59, %58
store i32 %60, i32* %5
br label %61
61: ; preds = %53
%62 = load i32, i32* %2
%63 = add nsw i32 %62, 1
store i32 %63, i32* %2
br label %49
64: ; preds = %49
%65 = call i32 @gettimeofday(%struct.timeval* %10, i32* null)
%66 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 0
%67 = load i32, i32* %66
%68 = mul nsw i32 %67, 1000
%69 = sitofp i32 %68 to double
%70 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 1
%71 = load double, double* %70
%72 = fdiv double %71, 1.000000e+03
%73 = fadd double %69, %72
store double %73, double* %12
store i32 1, i32* %6
store i32 0, i32* %2
br label %74
74: ; preds = %86, %64
%75 = load i32, i32* %2
%76 = load i32, i32* %7
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %89
78: ; preds = %74
%79 = load i32*, i32** %9
%80 = load i32, i32* %2
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i32, i32* %79, i64 %81
%83 = load i32, i32* %82
%84 = load i32, i32* %6
%85 = mul nsw i32 %84, %83
store i32 %85, i32* %6
br label %86
86: ; preds = %78
%87 = load i32, i32* %2
%88 = add nsw i32 %87, 1
store i32 %88, i32* %2
br label %74
89: ; preds = %74
%90 = load i32, i32* %5
%91 = load i32, i32* %6
%92 = icmp ne i32 %90, %91
br i1 %92, label %93, label %99
93: ; preds = %89
%94 = load i32, i32* %8
%95 = add nsw i32 %94, 1
store i32 %95, i32* %8
%96 = load i32, i32* %5
%97 = load i32, i32* %6
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %96, i32 %97)
br label %99
99: ; preds = %93, %89
%100 = load double, double* %12
%101 = load double, double* %11
%102 = fsub double %100, %101
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), double %102)
%104 = load i32, i32* %8
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %108
106: ; preds = %99
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %108
108: ; preds = %106, %99
%109 = load i32*, i32** %9
%110 = call i32 @free(i32* %109)
%111 = load i32, i32* %1
ret i32 %111
}

LLVM IR (-O2):
%struct.timeval = type { i32, double }
@acc_device_default = global i32 0
@.str = [57 x i8] c"same_gang_worker + FAILED! product=%d, known_product=%d\0A\00"
@.str.1 = [49 x i8] c"same_gang_worker + execution time is :%.2lf: ms\0A\00"
@str = [28 x i8] c"same_gang_worker + SUCCESS!\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = tail call i64 @malloc(i32 4194304)
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @acc_device_default
%6 = tail call i32 @acc_init(i32 %5)
%7 = tail call i64 @time(i32 0)
%8 = trunc i64 %7 to i32
%9 = tail call i32 @srand(i32 %8)
br label %10
10: ; preds = %0, %10
%11 = phi i64 [ 0, %0 ], [ %16, %10 ]
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 5
%14 = add nsw i32 %13, 1
%15 = getelementptr inbounds i32, i32* %4, i64 %11
store i32 %14, i32* %15
%16 = add nuw nsw i64 %11, 1
%17 = icmp eq i64 %16, 1048576
br i1 %17, label %18, label %10
18: ; preds = %10
%19 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%21 = load i32, i32* %20
%22 = mul nsw i32 %21, 1000
%23 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%24 = load double, double* %23
%25 = fdiv double %24, 1.000000e+03
br label %26
26: ; preds = %26, %18
%27 = phi i64 [ 0, %18 ], [ %65, %26 ]
%28 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %18 ], [ %63, %26 ]
%29 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %18 ], [ %64, %26 ]
%30 = getelementptr inbounds i32, i32* %4, i64 %27
%31 = bitcast i32* %30 to <4 x i32>*
%32 = load <4 x i32>, <4 x i32>* %31
%33 = getelementptr inbounds i32, i32* %30, i64 4
%34 = bitcast i32* %33 to <4 x i32>*
%35 = load <4 x i32>, <4 x i32>* %34
%36 = mul <4 x i32> %32, %28
%37 = mul <4 x i32> %35, %29
%38 = or i64 %27, 8
%39 = getelementptr inbounds i32, i32* %4, i64 %38
%40 = bitcast i32* %39 to <4 x i32>*
%41 = load <4 x i32>, <4 x i32>* %40
%42 = getelementptr inbounds i32, i32* %39, i64 4
%43 = bitcast i32* %42 to <4 x i32>*
%44 = load <4 x i32>, <4 x i32>* %43
%45 = mul <4 x i32> %41, %36
%46 = mul <4 x i32> %44, %37
%47 = or i64 %27, 16
%48 = getelementptr inbounds i32, i32* %4, i64 %47
%49 = bitcast i32* %48 to <4 x i32>*
%50 = load <4 x i32>, <4 x i32>* %49
%51 = getelementptr inbounds i32, i32* %48, i64 4
%52 = bitcast i32* %51 to <4 x i32>*
%53 = load <4 x i32>, <4 x i32>* %52
%54 = mul <4 x i32> %50, %45
%55 = mul <4 x i32> %53, %46
%56 = or i64 %27, 24
%57 = getelementptr inbounds i32, i32* %4, i64 %56
%58 = bitcast i32* %57 to <4 x i32>*
%59 = load <4 x i32>, <4 x i32>* %58
%60 = getelementptr inbounds i32, i32* %57, i64 4
%61 = bitcast i32* %60 to <4 x i32>*
%62 = load <4 x i32>, <4 x i32>* %61
%63 = mul <4 x i32> %59, %54
%64 = mul <4 x i32> %62, %55
%65 = add nuw nsw i64 %27, 32
%66 = icmp eq i64 %65, 1048576
br i1 %66, label %67, label %26
67: ; preds = %26
%68 = mul <4 x i32> %64, %63
%69 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %68)
%70 = sitofp i32 %22 to double
%71 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%72 = load i32, i32* %20
%73 = mul nsw i32 %72, 1000
%74 = load double, double* %23
%75 = fdiv double %74, 1.000000e+03
br label %76
76: ; preds = %76, %67
%77 = phi i64 [ 0, %67 ], [ %115, %76 ]
%78 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %67 ], [ %113, %76 ]
%79 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %67 ], [ %114, %76 ]
%80 = getelementptr inbounds i32, i32* %4, i64 %77
%81 = bitcast i32* %80 to <4 x i32>*
%82 = load <4 x i32>, <4 x i32>* %81
%83 = getelementptr inbounds i32, i32* %80, i64 4
%84 = bitcast i32* %83 to <4 x i32>*
%85 = load <4 x i32>, <4 x i32>* %84
%86 = mul <4 x i32> %82, %78
%87 = mul <4 x i32> %85, %79
%88 = or i64 %77, 8
%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, %86
%96 = mul <4 x i32> %94, %87
%97 = or i64 %77, 16
%98 = getelementptr inbounds i32, i32* %4, i64 %97
%99 = bitcast i32* %98 to <4 x i32>*
%100 = load <4 x i32>, <4 x i32>* %99
%101 = getelementptr inbounds i32, i32* %98, i64 4
%102 = bitcast i32* %101 to <4 x i32>*
%103 = load <4 x i32>, <4 x i32>* %102
%104 = mul <4 x i32> %100, %95
%105 = mul <4 x i32> %103, %96
%106 = or i64 %77, 24
%107 = getelementptr inbounds i32, i32* %4, i64 %106
%108 = bitcast i32* %107 to <4 x i32>*
%109 = load <4 x i32>, <4 x i32>* %108
%110 = getelementptr inbounds i32, i32* %107, i64 4
%111 = bitcast i32* %110 to <4 x i32>*
%112 = load <4 x i32>, <4 x i32>* %111
%113 = mul <4 x i32> %109, %104
%114 = mul <4 x i32> %112, %105
%115 = add nuw nsw i64 %77, 32
%116 = icmp eq i64 %115, 1048576
br i1 %116, label %117, label %76
117: ; preds = %76
%118 = mul <4 x i32> %114, %113
%119 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %118)
%120 = fadd double %25, %70
%121 = sitofp i32 %73 to double
%122 = fadd double %75, %121
%123 = icmp eq i32 %69, %119
br i1 %123, label %128, label %124
124: ; preds = %117
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %69, i32 %119)
%126 = fsub double %122, %120
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), double %126)
br label %132
128: ; preds = %117
%129 = fsub double %122, %120
%130 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), double %129)
%131 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %132
132: ; preds = %124, %128
%133 = tail call i32 @free(i32* %4)
ret i32 0
}