#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();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int tid, nthreads, i, j, k, chunk;
  double a[500][500], b[500][500], c[500][500];
  chunk = 10;
#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++) {
      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];
    }
  }
  printf("Done.\n");
}


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)
movl   $0xa,-0x28(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    118d <main+0x5d>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    11fe <main+0xce>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    11eb <main+0xbb>
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    11a8 <main+0x78>
jmp    11f0 <main+0xc0>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1194 <main+0x64>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    1270 <main+0x140>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    125d <main+0x12d>
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    1219 <main+0xe9>
jmp    1262 <main+0x132>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1205 <main+0xd5>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    12da <main+0x1aa>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    12c7 <main+0x197>
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    128b <main+0x15b>
jmp    12cc <main+0x19c>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1277 <main+0x147>
mov    -0x14(%rbp),%esi
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1f4,-0x1c(%rbp)
jge    13d6 <main+0x2a6>
mov    -0x14(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xd67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x1f4,-0x20(%rbp)
jge    13c3 <main+0x293>
movl   $0x0,-0x24(%rbp)
cmpl   $0x1f4,-0x24(%rbp)
jge    13b0 <main+0x280>
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    132e <main+0x1fe>
jmp    13b5 <main+0x285>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    131a <main+0x1ea>
jmp    13c8 <main+0x298>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12f2 <main+0x1c2>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x5b8db0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x5b8d80,%rsp
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
mov    %eax,%r14d
test   %eax,%eax
jne    1190 <main+0x40>
xor    %eax,%eax
call   1070 <omp_get_num_threads@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0x3d0900(%rsp),%rax
xor    %ecx,%ecx
movdqa 0xe5e(%rip),%xmm0
movdqa 0xe66(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
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    11e0 <main+0x90>
add    $0x1,%rcx
add    $0xfa0,%rax
cmp    $0x1f4,%rcx
jne    11b0 <main+0x60>
lea    0x1e8480(%rsp),%rax
xor    %r8d,%r8d
xor    %edx,%edx
xor    %esi,%esi
xor    %edi,%edi
mov    $0x3,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,-0x18(%rax,%rbp,8)
lea    (%rdi,%rbx,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x10(%rax,%rbp,8)
lea    (%rsi,%rbx,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,-0x8(%rax,%rbp,8)
lea    (%r8,%rbx,1),%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,(%rax,%rbp,8)
add    %edx,%ebx
add    $0x4,%rbp
cmp    $0x1f7,%rbp
jne    1250 <main+0x100>
add    $0x1,%rdi
add    $0x2,%esi
add    $0x4,%edx
add    $0xfa0,%rax
add    $0x3,%r8d
cmp    $0x1f4,%rdi
jne    1240 <main+0xf0>
mov    %rsp,%rdi
mov    $0x1e8480,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    0xd83(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x3d0900(%rsp),%rbx
lea    0xd91(%rip),%r15
lea    0x1e8480(%rsp),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
imul   $0xfa0,%rbp,%rdx
lea    (%rsp,%rdx,1),%rsi
lea    (%rsi,%rcx,8),%rdx
movsd  (%rsi,%rcx,8),%xmm0
mov    $0x1,%esi
mov    %rax,%rdi
nopl   0x0(%rax)
movsd  -0x8(%rbx,%rsi,8),%xmm1
mulsd  (%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  (%rbx,%rsi,8),%xmm0
mulsd  0xfa0(%rdi),%xmm0
addsd  %xmm1,%xmm0
add    $0x2,%rsi
add    $0x1f40,%rdi
cmp    $0x1f5,%rsi
jne    1340 <main+0x1f0>
movsd  %xmm0,(%rdx)
add    $0x1,%rcx
add    $0x8,%rax
cmp    $0x1f4,%rcx
jne    1320 <main+0x1d0>
add    $0x1,%rbp
add    $0xfa0,%rbx
cmp    $0x1f4,%rbp
jne    1300 <main+0x1b0>
lea    0xce8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x5b8d80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
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 = [22 x i8] c"Thread=%d did row=%d\0A\00"
@.str.4 = [7 x i8] c"Done.\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 [500 x [500 x double]]
%13 = alloca [500 x [500 x double]]
%14 = alloca [500 x [500 x double]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %11
%15 = call i32 (...) @omp_get_thread_num()
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = call i32 (...) @omp_get_num_threads()
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %18, %2
store i32 0, i32* %8
br label %24
24: ; preds = %46, %23
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 500
br i1 %26, label %27, label %49
27: ; preds = %24
store i32 0, i32* %9
br label %28
28: ; preds = %42, %27
%29 = load i32, i32* %9
%30 = icmp slt i32 %29, 500
br i1 %30, label %31, label %45
31: ; preds = %28
%32 = load i32, i32* %8
%33 = load i32, i32* %9
%34 = add nsw i32 %32, %33
%35 = sitofp i32 %34 to double
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %12, i64 0, i64 %37
%39 = load i32, i32* %9
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [500 x double], [500 x double]* %38, i64 0, i64 %40
store double %35, double* %41
br label %42
42: ; preds = %31
%43 = load i32, i32* %9
%44 = add nsw i32 %43, 1
store i32 %44, i32* %9
br label %28
45: ; preds = %28
br label %46
46: ; preds = %45
%47 = load i32, i32* %8
%48 = add nsw i32 %47, 1
store i32 %48, i32* %8
br label %24
49: ; preds = %24
store i32 0, i32* %8
br label %50
50: ; preds = %72, %49
%51 = load i32, i32* %8
%52 = icmp slt i32 %51, 500
br i1 %52, label %53, label %75
53: ; preds = %50
store i32 0, i32* %9
br label %54
54: ; preds = %68, %53
%55 = load i32, i32* %9
%56 = icmp slt i32 %55, 500
br i1 %56, label %57, label %71
57: ; preds = %54
%58 = load i32, i32* %8
%59 = load i32, i32* %9
%60 = mul nsw i32 %58, %59
%61 = sitofp i32 %60 to double
%62 = load i32, i32* %8
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %13, i64 0, i64 %63
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [500 x double], [500 x double]* %64, i64 0, i64 %66
store double %61, double* %67
br label %68
68: ; preds = %57
%69 = load i32, i32* %9
%70 = add nsw i32 %69, 1
store i32 %70, i32* %9
br label %54
71: ; preds = %54
br label %72
72: ; preds = %71
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
store i32 %74, i32* %8
br label %50
75: ; preds = %50
store i32 0, i32* %8
br label %76
76: ; preds = %94, %75
%77 = load i32, i32* %8
%78 = icmp slt i32 %77, 500
br i1 %78, label %79, label %97
79: ; preds = %76
store i32 0, i32* %9
br label %80
80: ; preds = %90, %79
%81 = load i32, i32* %9
%82 = icmp slt i32 %81, 500
br i1 %82, label %83, label %93
83: ; preds = %80
%84 = load i32, i32* %8
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [500 x [500 x double]], [500 x [500 x double]]* %14, i64 0, i64 %85
%87 = load i32, i32* %9
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [500 x double], [500 x double]* %86, i64 0, i64 %88
store double 0.000000e+00, double* %89
br label %90
90: ; preds = %83
%91 = load i32, i32* %9
%92 = add nsw i32 %91, 1
store i32 %92, i32* %9
br label %80
93: ; preds = %80
br label %94
94: ; preds = %93
%95 = load i32, i32* %8
%96 = add nsw i32 %95, 1
store i32 %96, i32* %8
br label %76
97: ; preds = %76
%98 = load i32, i32* %6
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %98)
store i32 0, i32* %8
br label %100
100: ; preds = %145, %97
%101 = load i32, i32* %8
%102 = icmp slt i32 %101, 500
br i1 %102, label %103, label %148
103: ; preds = %100
%104 = load i32, i32* %6
%105 = load i32, i32* %8
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %104, i32 %105)
store i32 0, i32* %9
br label %107
107: ; preds = %141, %103
%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]]* %12, 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]]* %13, 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]]* %14, 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 %100
148: ; preds = %100
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%150 = load i32, i32* %3
ret i32 %150
}

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