#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
double omp_get_wtime();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int tid, nthreads, i, j, k, chunk;
  double elapsed_time = 0.0;
  double a[500][500], b[500][500], c[500][500];
  chunk = 10;
  elapsed_time = -omp_get_wtime();
#pragma omp parallel shared(a, b, c, nthreads, chunk) private(tid, i, j, k)
  {
    tid = omp_get_thread_num();
    if (tid == 0) {
      nthreads = omp_get_num_threads();
      printf("Starting matrix multiple example with %d threads\n", nthreads);
      printf("Initializing matrices...\n");
    }
#pragma omp for schedule(static, chunk)
    for (i = 0; i < 500; i++)
      for (j = 0; j < 500; j++)
        a[i][j] = i + j;
#pragma omp for schedule(static, chunk)
    for (i = 0; i < 500; i++)
      for (j = 0; j < 500; j++)
        b[i][j] = i * j;
#pragma omp for schedule(static, chunk)
    for (i = 0; i < 500; i++)
      for (j = 0; j < 500; j++)
        c[i][j] = 0;
    printf("Thread %d starting matrix multiply...\n", tid);
#pragma omp for schedule(static, chunk)
    for (i = 0; i < 500; i++) {
      if (500 <= 100)
        printf("Thread=%d did row=%d\n", tid, i);
      for (j = 0; j < 500; j++)
        for (k = 0; k < 500; k++)
          c[i][j] += a[i][k] * b[k][j];
    }
  }
  elapsed_time += omp_get_wtime();
  if (500 <= 100) {
    printf("******************************************************\n");
    printf("Result Matrix:\n");
    for (i = 0; i < 500; i++) {
      for (j = 0; j < 500; j++)
        printf("%6.2f   ", c[i][j]);
      printf("\n");
    }
    printf("******************************************************\n");
  }
  printf("Global Elapsed time: %2f s\n", elapsed_time);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5b8db0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0xa,-0x28(%rbp)
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    11c8 <main+0x88>
mov    $0x0,%al
call   1060 <omp_get_num_threads@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    1239 <main+0xf9>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    1226 <main+0xe6>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0x1e84b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11e3 <main+0xa3>
jmp    122b <main+0xeb>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cf <main+0x8f>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    12ab <main+0x16b>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    1298 <main+0x158>
mov    -0x1c(%rbp),%eax
imul   -0x20(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0x3d0930(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1254 <main+0x114>
jmp    129d <main+0x15d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1240 <main+0x100>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    1315 <main+0x1d5>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    1302 <main+0x1c2>
movslq -0x1c(%rbp),%rcx
lea    -0x5b8db0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12c6 <main+0x186>
jmp    1307 <main+0x1c7>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b2 <main+0x172>
mov    -0x14(%rbp),%esi
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    13fd <main+0x2bd>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    13ea <main+0x2aa>
movl   $0x0,-0x24(%rbp)
cmpl   $0x1f4,-0x24(%rbp)
jge    13d7 <main+0x297>
movslq -0x1c(%rbp),%rcx
lea    -0x1e84b0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x24(%rbp),%rcx
lea    -0x3d0930(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x1c(%rbp),%rcx
lea    -0x5b8db0(%rbp),%rax
imul   $0xfa0,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1355 <main+0x215>
jmp    13dc <main+0x29c>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1341 <main+0x201>
jmp    13ef <main+0x2af>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    132d <main+0x1ed>
mov    $0x0,%al
call   1040 <omp_get_wtime@plt>
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xc59(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x5b8db0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x5b8d90,%rsp
xor    %eax,%eax
call   1050 <omp_get_wtime@plt>
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
mov    %eax,%r14d
test   %eax,%eax
jne    11a9 <main+0x49>
xor    %eax,%eax
call   1080 <omp_get_num_threads@plt>
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0x3d0910(%rsp),%rax
xor    %ecx,%ecx
movdqa 0xe45(%rip),%xmm0
movdqa 0xe4d(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movq   %rcx,%xmm2
pshufd $0x44,%xmm2,%xmm2
lea    0x2(%rcx),%rdx
movq   %rdx,%xmm3
pshufd $0x44,%xmm3,%xmm3
mov    $0x2,%edx
movdqa %xmm0,%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqa %xmm4,%xmm5
paddq  %xmm2,%xmm5
movdqa %xmm3,%xmm6
paddq  %xmm4,%xmm6
pshufd $0xe8,%xmm5,%xmm5
cvtdq2pd %xmm5,%xmm5
pshufd $0xe8,%xmm6,%xmm6
cvtdq2pd %xmm6,%xmm6
movaps %xmm5,-0x10(%rax,%rdx,8)
movaps %xmm6,(%rax,%rdx,8)
paddq  %xmm1,%xmm4
add    $0x4,%rdx
cmp    $0x1f6,%rdx
jne    1200 <main+0xa0>
add    $0x1,%rcx
add    $0xfa0,%rax
cmp    $0x1f4,%rcx
jne    11d0 <main+0x70>
lea    0x1e8490(%rsp),%rax
xor    %r8d,%r8d
xor    %edx,%edx
xor    %esi,%esi
xor    %edi,%edi
mov    $0x3,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,-0x18(%rax,%rbx,8)
lea    (%rdi,%rbp,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x10(%rax,%rbx,8)
lea    (%rsi,%rbp,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x8(%rax,%rbx,8)
lea    (%r8,%rbp,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,(%rax,%rbx,8)
add    %edx,%ebp
add    $0x4,%rbx
cmp    $0x1f7,%rbx
jne    1270 <main+0x110>
add    $0x1,%rdi
add    $0x2,%esi
add    $0x4,%edx
add    $0xfa0,%rax
add    $0x3,%r8d
cmp    $0x1f4,%rdi
jne    1260 <main+0x100>
lea    0x10(%rsp),%rdi
xor    %ebx,%ebx
mov    $0x1e8480,%edx
xor    %esi,%esi
call   1070 <memset@plt>
lea    0xd5f(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x3d0910(%rsp),%rax
lea    0x1e8490(%rsp),%r8
nopl   (%rax)
mov    %r8,%rcx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
imul   $0xfa0,%rbx,%rdx
add    %rsp,%rdx
add    $0x10,%rdx
lea    (%rdx,%rsi,8),%rdi
movsd  (%rdx,%rsi,8),%xmm0
mov    $0x1,%ebp
mov    %rcx,%rdx
nop
movsd  -0x8(%rax,%rbp,8),%xmm1
mulsd  (%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  (%rax,%rbp,8),%xmm0
mulsd  0xfa0(%rdx),%xmm0
addsd  %xmm1,%xmm0
add    $0x2,%rbp
add    $0x1f40,%rdx
cmp    $0x1f5,%rbp
jne    1340 <main+0x1e0>
movsd  %xmm0,(%rdi)
add    $0x1,%rsi
add    $0x8,%rcx
cmp    $0x1f4,%rsi
jne    1320 <main+0x1c0>
add    $0x1,%rbx
add    $0xfa0,%rax
cmp    $0x1f4,%rbx
jne    1310 <main+0x1b0>
xor    %eax,%eax
call   1050 <omp_get_wtime@plt>
subsd  0x8(%rsp),%xmm0
lea    0xcc6(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x5b8d90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"Starting matrix multiple example with %d threads\0A\00"
@.str.1 = [26 x i8] c"Initializing matrices...\0A\00"
@.str.2 = [39 x i8] c"Thread %d starting matrix multiply...\0A\00"
@.str.3 = [28 x i8] c"Global Elapsed time: %2f s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca [500 x [500 x double]]
%14 = alloca [500 x [500 x double]]
%15 = alloca [500 x [500 x double]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %12
store i32 10, i32* %11
%16 = call double (...) @omp_get_wtime()
%17 = fneg double %16
store double %17, double* %12
%18 = call i32 (...) @omp_get_thread_num()
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %2
%22 = call i32 (...) @omp_get_num_threads()
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %21, %2
store i32 0, i32* %8
br label %27
27: ; preds = %49, %26
%28 = load i32, i32* %8
%29 = icmp slt i32 %28, 500
br i1 %29, label %30, label %52
30: ; preds = %27
store i32 0, i32* %9
br label %31
31: ; preds = %45, %30
%32 = load i32, i32* %9
%33 = icmp slt i32 %32, 500
br i1 %33, label %34, label %48
34: ; preds = %31
%35 = load i32, i32* %8
%36 = load i32, i32* %9
%37 = add nsw i32 %35, %36
%38 = sitofp i32 %37 to double
%39 = load i32, i32* %8
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %13, i64 0, i64 %40
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [500 x double], [500 x double]* %41, i64 0, i64 %43
store double %38, double* %44
br label %45
45: ; preds = %34
%46 = load i32, i32* %9
%47 = add nsw i32 %46, 1
store i32 %47, i32* %9
br label %31
48: ; preds = %31
br label %49
49: ; preds = %48
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %27
52: ; preds = %27
store i32 0, i32* %8
br label %53
53: ; preds = %75, %52
%54 = load i32, i32* %8
%55 = icmp slt i32 %54, 500
br i1 %55, label %56, label %78
56: ; preds = %53
store i32 0, i32* %9
br label %57
57: ; preds = %71, %56
%58 = load i32, i32* %9
%59 = icmp slt i32 %58, 500
br i1 %59, label %60, label %74
60: ; preds = %57
%61 = load i32, i32* %8
%62 = load i32, i32* %9
%63 = mul nsw i32 %61, %62
%64 = sitofp i32 %63 to double
%65 = load i32, i32* %8
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %14, i64 0, i64 %66
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [500 x double], [500 x double]* %67, i64 0, i64 %69
store double %64, double* %70
br label %71
71: ; preds = %60
%72 = load i32, i32* %9
%73 = add nsw i32 %72, 1
store i32 %73, i32* %9
br label %57
74: ; preds = %57
br label %75
75: ; preds = %74
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 1
store i32 %77, i32* %8
br label %53
78: ; preds = %53
store i32 0, i32* %8
br label %79
79: ; preds = %97, %78
%80 = load i32, i32* %8
%81 = icmp slt i32 %80, 500
br i1 %81, label %82, label %100
82: ; preds = %79
store i32 0, i32* %9
br label %83
83: ; preds = %93, %82
%84 = load i32, i32* %9
%85 = icmp slt i32 %84, 500
br i1 %85, label %86, label %96
86: ; preds = %83
%87 = load i32, i32* %8
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %15, i64 0, i64 %88
%90 = load i32, i32* %9
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [500 x double], [500 x double]* %89, i64 0, i64 %91
store double 0.000000e+00, double* %92
br label %93
93: ; preds = %86
%94 = load i32, i32* %9
%95 = add nsw i32 %94, 1
store i32 %95, i32* %9
br label %83
96: ; preds = %83
br label %97
97: ; preds = %96
%98 = load i32, i32* %8
%99 = add nsw i32 %98, 1
store i32 %99, i32* %8
br label %79
100: ; preds = %79
%101 = load i32, i32* %6
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %101)
store i32 0, i32* %8
br label %103
103: ; preds = %145, %100
%104 = load i32, i32* %8
%105 = icmp slt i32 %104, 500
br i1 %105, label %106, label %148
106: ; preds = %103
store i32 0, i32* %9
br label %107
107: ; preds = %141, %106
%108 = load i32, i32* %9
%109 = icmp slt i32 %108, 500
br i1 %109, label %110, label %144
110: ; preds = %107
store i32 0, i32* %10
br label %111
111: ; preds = %137, %110
%112 = load i32, i32* %10
%113 = icmp slt i32 %112, 500
br i1 %113, label %114, label %140
114: ; preds = %111
%115 = load i32, i32* %8
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %13, i64 0, i64 %116
%118 = load i32, i32* %10
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [500 x double], [500 x double]* %117, i64 0, i64 %119
%121 = load double, double* %120
%122 = load i32, i32* %10
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %14, i64 0, i64 %123
%125 = load i32, i32* %9
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [500 x double], [500 x double]* %124, i64 0, i64 %126
%128 = load double, double* %127
%129 = load i32, i32* %8
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %15, i64 0, i64 %130
%132 = load i32, i32* %9
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [500 x double], [500 x double]* %131, i64 0, i64 %133
%135 = load double, double* %134
%136 = call double @llvm.fmuladd.f64(double %121, double %128, double %135)
store double %136, double* %134
br label %137
137: ; preds = %114
%138 = load i32, i32* %10
%139 = add nsw i32 %138, 1
store i32 %139, i32* %10
br label %111
140: ; preds = %111
br label %141
141: ; preds = %140
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
store i32 %143, i32* %9
br label %107
144: ; preds = %107
br label %145
145: ; preds = %144
%146 = load i32, i32* %8
%147 = add nsw i32 %146, 1
store i32 %147, i32* %8
br label %103
148: ; preds = %103
%149 = call double (...) @omp_get_wtime()
%150 = load double, double* %12
%151 = fadd double %150, %149
store double %151, double* %12
%152 = load double, double* %12
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), double %152)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"Starting matrix multiple example with %d threads\0A\00"
@.str.2 = [39 x i8] c"Thread %d starting matrix multiply...\0A\00"
@.str.3 = [28 x i8] c"Global Elapsed time: %2f s\0A\00"
@str = [25 x i8] c"Initializing matrices...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [500 x [500 x double]]
%4 = alloca [500 x [500 x double]]
%5 = alloca [500 x [500 x double]]
%6 = bitcast [500 x [500 x double]]* %5 to i8*
%7 = bitcast [500 x [500 x double]]* %3 to i8*
%8 = bitcast [500 x [500 x double]]* %4 to i8*
%9 = tail call double (...) @omp_get_wtime()
%10 = tail call i32 (...) @omp_get_thread_num()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = tail call i32 (...) @omp_get_num_threads()
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %2, %12
br label %17
17: ; preds = %16, %40
%18 = phi i64 [ %41, %40 ], [ 0, %16 ]
%19 = insertelement <2 x i64> poison, i64 %18, i64 0
%20 = shufflevector <2 x i64> %19, <2 x i64> poison, <2 x i32> zeroinitializer
%21 = add nuw i64 %18, 2
%22 = insertelement <2 x i64> poison, i64 %21, i64 0
%23 = shufflevector <2 x i64> %22, <2 x i64> poison, <2 x i32> zeroinitializer
br label %24
24: ; preds = %24, %17
%25 = phi i64 [ 0, %17 ], [ %37, %24 ]
%26 = phi <2 x i64> [ <i64 0, i64 1>, %17 ], [ %38, %24 ]
%27 = add nuw nsw <2 x i64> %26, %20
%28 = add <2 x i64> %23, %26
%29 = trunc <2 x i64> %27 to <2 x i32>
%30 = trunc <2 x i64> %28 to <2 x i32>
%31 = sitofp <2 x i32> %29 to <2 x double>
%32 = sitofp <2 x i32> %30 to <2 x double>
%33 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %3, i64 0, i64 %18, i64 %25
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> %31, <2 x double>* %34
%35 = getelementptr inbounds double, double* %33, i64 2
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> %32, <2 x double>* %36
%37 = add nuw i64 %25, 4
%38 = add <2 x i64> %26, <i64 4, i64 4>
%39 = icmp eq i64 %37, 500
br i1 %39, label %40, label %24
40: ; preds = %24
%41 = add nuw nsw i64 %18, 1
%42 = icmp eq i64 %41, 500
br i1 %42, label %43, label %17
43: ; preds = %40, %68
%44 = phi i64 [ %69, %68 ], [ 0, %40 ]
br label %45
45: ; preds = %45, %43
%46 = phi i64 [ 0, %43 ], [ %66, %45 ]
%47 = mul nuw nsw i64 %46, %44
%48 = trunc i64 %47 to i32
%49 = sitofp i32 %48 to double
%50 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %44, i64 %46
store double %49, double* %50
%51 = or i64 %46, 1
%52 = mul nuw nsw i64 %51, %44
%53 = trunc i64 %52 to i32
%54 = sitofp i32 %53 to double
%55 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %44, i64 %51
store double %54, double* %55
%56 = or i64 %46, 2
%57 = mul nuw nsw i64 %56, %44
%58 = trunc i64 %57 to i32
%59 = sitofp i32 %58 to double
%60 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %44, i64 %56
store double %59, double* %60
%61 = or i64 %46, 3
%62 = mul nuw nsw i64 %61, %44
%63 = trunc i64 %62 to i32
%64 = sitofp i32 %63 to double
%65 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %44, i64 %61
store double %64, double* %65
%66 = add nuw nsw i64 %46, 4
%67 = icmp eq i64 %66, 500
br i1 %67, label %68, label %45
68: ; preds = %45
%69 = add nuw nsw i64 %44, 1
%70 = icmp eq i64 %69, 500
br i1 %70, label %71, label %43
71: ; preds = %68
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %73
73: ; preds = %71, %98
%74 = phi i64 [ 0, %71 ], [ %99, %98 ]
br label %75
75: ; preds = %73, %95
%76 = phi i64 [ 0, %73 ], [ %96, %95 ]
%77 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %5, i64 0, i64 %74, i64 %76
%78 = load double, double* %77
br label %79
79: ; preds = %79, %75
%80 = phi i64 [ 0, %75 ], [ %93, %79 ]
%81 = phi double [ %78, %75 ], [ %92, %79 ]
%82 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %3, i64 0, i64 %74, i64 %80
%83 = load double, double* %82
%84 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %80, i64 %76
%85 = load double, double* %84
%86 = tail call double @llvm.fmuladd.f64(double %83, double %85, double %81)
%87 = or i64 %80, 1
%88 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %3, i64 0, i64 %74, i64 %87
%89 = load double, double* %88
%90 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %4, i64 0, i64 %87, i64 %76
%91 = load double, double* %90
%92 = tail call double @llvm.fmuladd.f64(double %89, double %91, double %86)
%93 = add nuw nsw i64 %80, 2
%94 = icmp eq i64 %93, 500
br i1 %94, label %95, label %79
95: ; preds = %79
store double %92, double* %77
%96 = add nuw nsw i64 %76, 1
%97 = icmp eq i64 %96, 500
br i1 %97, label %98, label %75
98: ; preds = %95
%99 = add nuw nsw i64 %74, 1
%100 = icmp eq i64 %99, 500
br i1 %100, label %101, label %73
101: ; preds = %98
%102 = tail call double (...) @omp_get_wtime()
%103 = fsub double %102, %9
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), double %103)
ret i32 0
}