#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 /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i, j, k;
  double a[62][15], b[15][7], c[62][7];
  printf("Starting serial matrix multiple example...\n");
  printf("Using matrix sizes a[%d][%d], b[%d][%d], c[%d][%d]\n", 62, 15, 15, 7,
         62, 7);
  printf("Initializing matrices...\n");
  for (i = 0; i < 62; i++)
    for (j = 0; j < 15; j++)
      a[i][j] = i + j;
  for (i = 0; i < 15; i++)
    for (j = 0; j < 7; j++)
      b[i][j] = i * j;
  for (i = 0; i < 62; i++)
    for (j = 0; j < 7; j++)
      c[i][j] = 0.0;
  printf("Performing matrix multiply...\n");
  for (i = 0; i < 62; i++)
    for (j = 0; j < 7; j++)
      for (k = 0; k < 15; k++)
        c[i][j] += a[i][k] * b[k][j];
  printf("Here is the result matrix:");
  for (i = 0; i < 62; i++) {
    printf("\n");
    for (j = 0; j < 7; j++)
      printf("%6.2f   ", c[i][j]);
  }
  printf("\nDone.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2e20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x3e,%r9d
mov    $0xf,%ecx
mov    $0x7,%r8d
mov    %r9d,%esi
mov    %ecx,%edx
movl   $0x7,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e,-0x14(%rbp)
jge    11d8 <main+0xc8>
movl   $0x0,-0x18(%rbp)
cmpl   $0xf,-0x18(%rbp)
jge    11c5 <main+0xb5>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x1d30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1188 <main+0x78>
jmp    11ca <main+0xba>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1177 <main+0x67>
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jge    1241 <main+0x131>
movl   $0x0,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jge    122e <main+0x11e>
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x2080(%rbp),%rax
imul   $0x38,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11f0 <main+0xe0>
jmp    1233 <main+0x123>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11df <main+0xcf>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e,-0x14(%rbp)
jge    12a2 <main+0x192>
movl   $0x0,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jge    128f <main+0x17f>
movslq -0x14(%rbp),%rcx
lea    -0x2e10(%rbp),%rax
imul   $0x38,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1259 <main+0x149>
jmp    1294 <main+0x184>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1248 <main+0x138>
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e,-0x14(%rbp)
jge    1375 <main+0x265>
movl   $0x0,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jge    1362 <main+0x252>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf,-0x1c(%rbp)
jge    134f <main+0x23f>
movslq -0x14(%rbp),%rcx
lea    -0x1d30(%rbp),%rax
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x1c(%rbp),%rcx
lea    -0x2080(%rbp),%rax
imul   $0x38,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x14(%rbp),%rcx
lea    -0x2e10(%rbp),%rax
imul   $0x38,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12d9 <main+0x1c9>
jmp    1354 <main+0x244>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12c8 <main+0x1b8>
jmp    1367 <main+0x257>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b7 <main+0x1a7>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x3e,-0x14(%rbp)
jge    13fd <main+0x2ed>
lea    0xc8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x7,-0x18(%rbp)
jge    13ea <main+0x2da>
movslq -0x14(%rbp),%rcx
lea    -0x2e10(%rbp),%rax
imul   $0x38,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xcdf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13a9 <main+0x299>
jmp    13ef <main+0x2df>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    138a <main+0x27a>
lea    0xcb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2e20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x2e18,%rsp
lea    0xf67(%rip),%rdi
call   1040 <puts@plt>
movl   $0x7,(%rsp)
lea    0xefc(%rip),%rdi
xor    %ebx,%ebx
mov    $0x3e,%esi
mov    $0xf,%edx
mov    $0xf,%ecx
mov    $0x7,%r8d
mov    $0x3e,%r9d
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf54(%rip),%rdi
call   1040 <puts@plt>
mov    $0xe,%eax
lea    0x1100(%rsp),%rcx
movdqa 0xe56(%rip),%xmm8
movdqa 0xe5e(%rip),%xmm1
movdqa 0xe66(%rip),%xmm2
movdqa 0xe6e(%rip),%xmm3
movdqa 0xe76(%rip),%xmm4
movdqa 0xe7e(%rip),%xmm5
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0xe(%rax),%edx
xorps  %xmm6,%xmm6
cvtsi2sd %edx,%xmm6
movsd  %xmm6,(%rcx)
movd   %ebx,%xmm6
lea    0x1(%rbx),%rdx
xorps  %xmm7,%xmm7
cvtsi2sd %edx,%xmm7
pshufd $0x50,%xmm6,%xmm0
movdqa %xmm0,%xmm6
paddd  %xmm8,%xmm6
cvtdq2pd %xmm6,%xmm6
movsd  %xmm7,0x8(%rcx)
movdqa %xmm0,%xmm7
paddd  %xmm1,%xmm7
cvtdq2pd %xmm7,%xmm7
movups %xmm6,0x10(%rcx)
movdqa %xmm0,%xmm6
paddd  %xmm2,%xmm6
cvtdq2pd %xmm6,%xmm6
movups %xmm7,0x20(%rcx)
movdqa %xmm0,%xmm7
paddd  %xmm3,%xmm7
cvtdq2pd %xmm7,%xmm7
movups %xmm6,0x30(%rcx)
movdqa %xmm0,%xmm6
paddd  %xmm4,%xmm6
cvtdq2pd %xmm6,%xmm6
movupd %xmm7,0x40(%rcx)
paddd  %xmm5,%xmm0
cvtdq2pd %xmm0,%xmm0
movupd %xmm6,0x50(%rcx)
movups %xmm0,0x60(%rcx)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x70(%rcx)
add    $0x1,%eax
add    $0x78,%rcx
mov    %rdx,%rbx
cmp    $0x3e,%rdx
jne    11e0 <main+0xa0>
xor    %eax,%eax
xor    %r8d,%r8d
xor    %edx,%edx
xor    %esi,%esi
xor    %edi,%edi
xor    %ebx,%ebx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movq   $0x0,0x20(%rsp,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %r8d,%xmm0
movsd  %xmm0,0x28(%rsp,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x30(%rsp,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movsd  %xmm0,0x38(%rsp,%rax,1)
movsd  %xmm1,0x40(%rsp,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x48(%rsp,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x50(%rsp,%rax,1)
add    $0x6,%ecx
add    $0x5,%ebx
add    $0x4,%edi
add    $0x3,%esi
add    $0x2,%edx
add    $0x1,%r8d
add    $0x38,%rax
cmp    $0x348,%rax
jne    12a0 <main+0x160>
lea    0x370(%rsp),%rbx
xor    %r14d,%r14d
mov    $0xd90,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
lea    0xdc4(%rip),%rdi
call   1040 <puts@plt>
nopl   (%rax)
imul   $0x78,%r14,%rax
movsd  0x1100(%rsp,%rax,1),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x1108(%rsp,%rax,1),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x1110(%rsp,%rax,1),%xmm10
movsd  0x1118(%rsp,%rax,1),%xmm11
movsd  0x1120(%rsp,%rax,1),%xmm12
movsd  0x1128(%rsp,%rax,1),%xmm13
movsd  0x1130(%rsp,%rax,1),%xmm14
movsd  0x1138(%rsp,%rax,1),%xmm15
movsd  0x1140(%rsp,%rax,1),%xmm9
movsd  0x1148(%rsp,%rax,1),%xmm1
movsd  0x1150(%rsp,%rax,1),%xmm2
movsd  0x1158(%rsp,%rax,1),%xmm3
movsd  0x1160(%rsp,%rax,1),%xmm4
movsd  0x1168(%rsp,%rax,1),%xmm5
movsd  0x1170(%rsp,%rax,1),%xmm6
xor    %eax,%eax
movsd  0x20(%rsp,%rax,8),%xmm7
mulsd  0x18(%rsp),%xmm7
addsd  (%rbx,%rax,8),%xmm7
movsd  0x58(%rsp,%rax,8),%xmm8
mulsd  0x10(%rsp),%xmm8
addsd  %xmm7,%xmm8
movsd  0x90(%rsp,%rax,8),%xmm7
mulsd  %xmm10,%xmm7
addsd  %xmm8,%xmm7
movsd  0xc8(%rsp,%rax,8),%xmm0
mulsd  %xmm11,%xmm0
addsd  %xmm7,%xmm0
movsd  0x100(%rsp,%rax,8),%xmm7
mulsd  %xmm12,%xmm7
addsd  %xmm0,%xmm7
movsd  0x138(%rsp,%rax,8),%xmm0
mulsd  %xmm13,%xmm0
addsd  %xmm7,%xmm0
movsd  0x170(%rsp,%rax,8),%xmm7
mulsd  %xmm14,%xmm7
addsd  %xmm0,%xmm7
movsd  0x1a8(%rsp,%rax,8),%xmm0
mulsd  %xmm15,%xmm0
addsd  %xmm7,%xmm0
movsd  0x1e0(%rsp,%rax,8),%xmm7
mulsd  %xmm9,%xmm7
addsd  %xmm0,%xmm7
movsd  0x218(%rsp,%rax,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm7,%xmm0
movsd  0x250(%rsp,%rax,8),%xmm7
mulsd  %xmm2,%xmm7
addsd  %xmm0,%xmm7
movsd  0x288(%rsp,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm7,%xmm0
movsd  0x2c0(%rsp,%rax,8),%xmm7
mulsd  %xmm4,%xmm7
addsd  %xmm0,%xmm7
movsd  0x2f8(%rsp,%rax,8),%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm7,%xmm0
movsd  0x330(%rsp,%rax,8),%xmm7
mulsd  %xmm6,%xmm7
addsd  %xmm0,%xmm7
movsd  %xmm7,(%rbx,%rax,8)
add    $0x1,%rax
cmp    $0x7,%rax
jne    13e0 <main+0x2a0>
add    $0x1,%r14
add    $0x38,%rbx
cmp    $0x3e,%r14
jne    1340 <main+0x200>
lea    0xb7f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x30,%ebx
lea    0xb87(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
movsd  0x340(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x348(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x350(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x358(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x360(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x368(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x370(%rsp,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x38,%rbx
cmp    $0xdc0,%rbx
jne    1530 <main+0x3f0>
lea    0xb43(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x2e18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.1 = [52 x i8] c"Using matrix sizes a[%d][%d], b[%d][%d], c[%d][%d]\0A\00"
@.str.4 = [27 x i8] c"Here is the result matrix:\00"
@.str.6 = [9 x i8] c"%6.2f \00"
@str = [43 x i8] c"Starting serial matrix multiple example...\00"
@str.8 = [25 x i8] c"Initializing matrices...\00"
@str.9 = [30 x i8] c"Performing matrix multiply...\00"
@str.10 = [7 x i8] c"\0ADone.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [62 x [15 x double]]
%4 = alloca [15 x [7 x double]]
%5 = alloca [62 x [7 x double]]
%6 = bitcast [62 x [7 x double]]* %5 to i8*
%7 = bitcast [62 x [15 x double]]* %3 to i8*
%8 = bitcast [15 x [7 x double]]* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i32 62, i32 15, i32 15, i32 7, i32 62, i32 7)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.8, i64 0, i64 0))
br label %12
12: ; preds = %2, %12
%13 = phi i64 [ 0, %2 ], [ %17, %12 ]
%14 = trunc i64 %13 to i32
%15 = sitofp i32 %14 to double
%16 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 0
store double %15, double* %16
%17 = add nuw nsw i64 %13, 1
%18 = trunc i64 %17 to i32
%19 = sitofp i32 %18 to double
%20 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 1
store double %19, double* %20
%21 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 2
%22 = insertelement <2 x i64> poison, i64 %13, i64 0
%23 = shufflevector <2 x i64> %22, <2 x i64> poison, <2 x i32> zeroinitializer
%24 = trunc <2 x i64> %23 to <2 x i32>
%25 = add <2 x i32> %24, <i32 2, i32 3>
%26 = sitofp <2 x i32> %25 to <2 x double>
%27 = bitcast double* %21 to <2 x double>*
store <2 x double> %26, <2 x double>* %27
%28 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 4
%29 = trunc <2 x i64> %23 to <2 x i32>
%30 = add <2 x i32> %29, <i32 4, i32 5>
%31 = sitofp <2 x i32> %30 to <2 x double>
%32 = bitcast double* %28 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
%33 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 6
%34 = trunc <2 x i64> %23 to <2 x i32>
%35 = add <2 x i32> %34, <i32 6, i32 7>
%36 = sitofp <2 x i32> %35 to <2 x double>
%37 = bitcast double* %33 to <2 x double>*
store <2 x double> %36, <2 x double>* %37
%38 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 8
%39 = trunc <2 x i64> %23 to <2 x i32>
%40 = add <2 x i32> %39, <i32 8, i32 9>
%41 = sitofp <2 x i32> %40 to <2 x double>
%42 = bitcast double* %38 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 10
%44 = trunc <2 x i64> %23 to <2 x i32>
%45 = add <2 x i32> %44, <i32 10, i32 11>
%46 = sitofp <2 x i32> %45 to <2 x double>
%47 = bitcast double* %43 to <2 x double>*
store <2 x double> %46, <2 x double>* %47
%48 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 12
%49 = trunc <2 x i64> %23 to <2 x i32>
%50 = add <2 x i32> %49, <i32 12, i32 13>
%51 = sitofp <2 x i32> %50 to <2 x double>
%52 = bitcast double* %48 to <2 x double>*
store <2 x double> %51, <2 x double>* %52
%53 = trunc i64 %13 to i32
%54 = add i32 %53, 14
%55 = sitofp i32 %54 to double
%56 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %13, i64 14
store double %55, double* %56
%57 = icmp eq i64 %17, 62
br i1 %57, label %58, label %12
58: ; preds = %12, %58
%59 = phi i64 [ %84, %58 ], [ 0, %12 ]
%60 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 0
store double 0.000000e+00, double* %60
%61 = trunc i64 %59 to i32
%62 = sitofp i32 %61 to double
%63 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 1
store double %62, double* %63
%64 = trunc i64 %59 to i32
%65 = shl i32 %64, 1
%66 = sitofp i32 %65 to double
%67 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 2
store double %66, double* %67
%68 = trunc i64 %59 to i32
%69 = mul i32 %68, 3
%70 = sitofp i32 %69 to double
%71 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 3
store double %70, double* %71
%72 = trunc i64 %59 to i32
%73 = shl i32 %72, 2
%74 = sitofp i32 %73 to double
%75 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 4
store double %74, double* %75
%76 = trunc i64 %59 to i32
%77 = mul i32 %76, 5
%78 = sitofp i32 %77 to double
%79 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 5
store double %78, double* %79
%80 = trunc i64 %59 to i32
%81 = mul i32 %80, 6
%82 = sitofp i32 %81 to double
%83 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 %59, i64 6
store double %82, double* %83
%84 = add nuw nsw i64 %59, 1
%85 = icmp eq i64 %84, 15
br i1 %85, label %86, label %58
86: ; preds = %58
%87 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.9, i64 0, i64 0))
br label %88
88: ; preds = %86, %171
%89 = phi i64 [ 0, %86 ], [ %172, %171 ]
%90 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 0
%91 = load double, double* %90
%92 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 1
%93 = load double, double* %92
%94 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 2
%95 = load double, double* %94
%96 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 3
%97 = load double, double* %96
%98 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 4
%99 = load double, double* %98
%100 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 5
%101 = load double, double* %100
%102 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 6
%103 = load double, double* %102
%104 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 7
%105 = load double, double* %104
%106 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 8
%107 = load double, double* %106
%108 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 9
%109 = load double, double* %108
%110 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 10
%111 = load double, double* %110
%112 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 11
%113 = load double, double* %112
%114 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 12
%115 = load double, double* %114
%116 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 13
%117 = load double, double* %116
%118 = getelementptr inbounds [62 x [15 x double]], [62 x [15 x double]]* %3, i64 0, i64 %89, i64 14
%119 = load double, double* %118
br label %120
120: ; preds = %88, %120
%121 = phi i64 [ 0, %88 ], [ %169, %120 ]
%122 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %89, i64 %121
%123 = load double, double* %122
%124 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 0, i64 %121
%125 = load double, double* %124
%126 = tail call double @llvm.fmuladd.f64(double %91, double %125, double %123)
%127 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 1, i64 %121
%128 = load double, double* %127
%129 = tail call double @llvm.fmuladd.f64(double %93, double %128, double %126)
%130 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 2, i64 %121
%131 = load double, double* %130
%132 = tail call double @llvm.fmuladd.f64(double %95, double %131, double %129)
%133 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 3, i64 %121
%134 = load double, double* %133
%135 = tail call double @llvm.fmuladd.f64(double %97, double %134, double %132)
%136 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 4, i64 %121
%137 = load double, double* %136
%138 = tail call double @llvm.fmuladd.f64(double %99, double %137, double %135)
%139 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 5, i64 %121
%140 = load double, double* %139
%141 = tail call double @llvm.fmuladd.f64(double %101, double %140, double %138)
%142 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 6, i64 %121
%143 = load double, double* %142
%144 = tail call double @llvm.fmuladd.f64(double %103, double %143, double %141)
%145 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 7, i64 %121
%146 = load double, double* %145
%147 = tail call double @llvm.fmuladd.f64(double %105, double %146, double %144)
%148 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 8, i64 %121
%149 = load double, double* %148
%150 = tail call double @llvm.fmuladd.f64(double %107, double %149, double %147)
%151 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 9, i64 %121
%152 = load double, double* %151
%153 = tail call double @llvm.fmuladd.f64(double %109, double %152, double %150)
%154 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 10, i64 %121
%155 = load double, double* %154
%156 = tail call double @llvm.fmuladd.f64(double %111, double %155, double %153)
%157 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 11, i64 %121
%158 = load double, double* %157
%159 = tail call double @llvm.fmuladd.f64(double %113, double %158, double %156)
%160 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 12, i64 %121
%161 = load double, double* %160
%162 = tail call double @llvm.fmuladd.f64(double %115, double %161, double %159)
%163 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 13, i64 %121
%164 = load double, double* %163
%165 = tail call double @llvm.fmuladd.f64(double %117, double %164, double %162)
%166 = getelementptr inbounds [15 x [7 x double]], [15 x [7 x double]]* %4, i64 0, i64 14, i64 %121
%167 = load double, double* %166
%168 = tail call double @llvm.fmuladd.f64(double %119, double %167, double %165)
store double %168, double* %122
%169 = add nuw nsw i64 %121, 1
%170 = icmp eq i64 %169, 7
br i1 %170, label %171, label %120
171: ; preds = %120
%172 = add nuw nsw i64 %89, 1
%173 = icmp eq i64 %172, 62
br i1 %173, label %174, label %88
174: ; preds = %171
%175 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %176
176: ; preds = %174, %176
%177 = phi i64 [ 0, %174 ], [ %200, %176 ]
%178 = tail call i32 @putchar(i32 10)
%179 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 0
%180 = load double, double* %179
%181 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %180)
%182 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 1
%183 = load double, double* %182
%184 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %183)
%185 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 2
%186 = load double, double* %185
%187 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %186)
%188 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 3
%189 = load double, double* %188
%190 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %189)
%191 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 4
%192 = load double, double* %191
%193 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %192)
%194 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 5
%195 = load double, double* %194
%196 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %195)
%197 = getelementptr inbounds [62 x [7 x double]], [62 x [7 x double]]* %5, i64 0, i64 %177, i64 6
%198 = load double, double* %197
%199 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), double %198)
%200 = add nuw nsw i64 %177, 1
%201 = icmp eq i64 %200, 62
br i1 %201, label %202, label %176
202: ; preds = %176
%203 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}