#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 atoi(char *);
int /*<<< orphan*/ dgemm_(char *, char *, int *, int *, int *, double *,
                          double *, int *, double *, int *, double *, double *,
                          int *);
int /*<<< orphan*/ init(double *, int, int);
int /*<<< orphan*/ print(char *, double *, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  int rowsA, colsB, common;
  int i, j, k;
  if (argc != 4) {
    printf("Using defaults\n");
    rowsA = 2;
    colsB = 4;
    common = 6;
  } else {
    rowsA = atoi(argv[1]);
    colsB = atoi(argv[2]);
    common = atoi(argv[3]);
  }
  double A[rowsA * common];
  double B[common * colsB];
  double C[rowsA * colsB];
  double D[rowsA * colsB];
  char transA = 'N', transB = 'N';
  double one = 1.0, zero = 0.0;
  srand(time(NULL));
  init(A, rowsA, common);
  init(B, common, colsB);
  dgemm_(&transA, &transB, &rowsA, &colsB, &common, &one, A, &rowsA, B, &common,
         &zero, C, &rowsA);
  for (i = 0; i < colsB; i++) {
    for (j = 0; j < rowsA; j++) {
      D[i * rowsA + j] = 0;
      for (k = 0; k < common; k++) {
        D[i * rowsA + j] += A[k * rowsA + j] * B[k + common * i];
      }
    }
  }
  print("A", A, rowsA, common);
  print("B", B, common, colsB);
  print("C", C, rowsA, colsB);
  print("D", D, rowsA, colsB);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x88,%rsp
movl   $0x0,-0x1c(%rbp)
mov    %edi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
cmpl   $0x4,-0x20(%rbp)
je     11be <main+0x4e>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
movl   $0x2,-0x2c(%rbp)
movl   $0x4,-0x30(%rbp)
movl   $0x6,-0x34(%rbp)
jmp    11ee <main+0x7e>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   %ecx,%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r15
sub    %rcx,%r15
mov    %r15,-0xa0(%rbp)
mov    %r15,%rsp
mov    %rax,-0x50(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r14
sub    %rcx,%r14
mov    %r14,-0x98(%rbp)
mov    %r14,%rsp
mov    %rax,-0x58(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x88(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x30(%rbp),%ecx
imul   %ecx,%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x68(%rbp)
movb   $0x4e,-0x69(%rbp)
movb   $0x4e,-0x6a(%rbp)
movsd  0xd57(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x2c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    %r15,%rdi
call   1070 <init@plt>
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    %r14,%rdi
call   1070 <init@plt>
mov    -0x88(%rbp),%r10
lea    -0x69(%rbp),%rdi
lea    -0x6a(%rbp),%rsi
lea    -0x2c(%rbp),%rax
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%rbx
lea    -0x78(%rbp),%r9
lea    -0x80(%rbp),%r11
sub    $0x40,%rsp
mov    %rax,%rdx
mov    %rbx,%r8
mov    %r15,(%rsp)
mov    %rax,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1030 <dgemm_@plt>
add    $0x40,%rsp
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    141d <main+0x2ad>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    140a <main+0x29a>
mov    -0x90(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    13f7 <main+0x287>
mov    -0x90(%rbp),%rax
mov    -0x98(%rbp),%rcx
mov    -0xa0(%rbp),%rdx
mov    -0x40(%rbp),%esi
imul   -0x2c(%rbp),%esi
add    -0x3c(%rbp),%esi
movslq %esi,%rsi
movsd  (%rdx,%rsi,8),%xmm0
mov    -0x40(%rbp),%edx
mov    -0x34(%rbp),%esi
imul   -0x38(%rbp),%esi
add    %esi,%edx
movslq %edx,%rdx
movsd  (%rcx,%rdx,8),%xmm2
mov    -0x38(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1383 <main+0x213>
jmp    13fc <main+0x28c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1354 <main+0x1e4>
jmp    140f <main+0x29f>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1341 <main+0x1d1>
mov    -0xa0(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    0xbe7(%rip),%rdi
call   1050 <print@plt>
mov    -0x98(%rbp),%rsi
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xbd0(%rip),%rdi
call   1050 <print@plt>
mov    -0x88(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xbb9(%rip),%rdi
call   1050 <print@plt>
mov    -0x90(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xba2(%rip),%rdi
call   1050 <print@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x1c(%rbp),%eax
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
cmp    $0x4,%edi
jne    11b5 <main+0x45>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1090 <atoi@plt>
mov    %eax,%r15d
mov    %eax,-0x34(%rbp)
mov    0x10(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%r14d
mov    %eax,-0x30(%rbp)
mov    0x18(%rbx),%rdi
call   1090 <atoi@plt>
mov    %eax,%r13d
jmp    11e1 <main+0x71>
lea    0xe4c(%rip),%rdi
call   1030 <puts@plt>
movl   $0x2,-0x34(%rbp)
movl   $0x4,-0x30(%rbp)
mov    $0x6,%r13d
mov    $0x2,%r15d
mov    $0x4,%r14d
mov    %rsp,-0x58(%rbp)
mov    %r13d,-0x38(%rbp)
mov    %r15d,%eax
imul   %r13d,%eax
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %r14d,%eax
imul   %r13d,%eax
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %r14d,%ecx
mov    %r14d,-0x40(%rbp)
mov    %r15d,%r14d
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
mov    %r14d,%eax
imul   %ecx,%eax
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
movb   $0x4e,-0x2a(%rbp)
movb   $0x4e,-0x29(%rbp)
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x98(%rbp)
movq   $0x0,-0x90(%rbp)
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    %r12,%rdi
mov    %r14d,%esi
mov    %r13d,%edx
call   1070 <init@plt>
mov    %r15,%rdi
mov    %r13d,%esi
mov    -0x40(%rbp),%edx
call   1070 <init@plt>
sub    $0x8,%rsp
lea    -0x34(%rbp),%rdx
lea    -0x90(%rbp),%rax
lea    -0x38(%rbp),%r8
lea    -0x2a(%rbp),%rdi
lea    -0x29(%rbp),%rsi
lea    -0x30(%rbp),%rcx
lea    -0x98(%rbp),%r9
push   %rdx
mov    %rbx,-0x68(%rbp)
push   %rbx
push   %rax
push   %r8
push   %r15
push   %rdx
mov    %r12,-0x40(%rbp)
push   %r12
call   1040 <dgemm_@plt>
add    $0x40,%rsp
mov    -0x30(%rbp),%eax
movslq -0x34(%rbp),%r12
mov    %r12d,%edx
mov    %rax,-0x80(%rbp)
test   %eax,%eax
jle    1442 <main+0x2d2>
mov    -0x38(%rbp),%ecx
movslq %ecx,%rax
mov    %ecx,%edi
and    $0xfffffffe,%edi
mov    %r12,%rsi
shl    $0x4,%rsi
mov    %r15,-0x60(%rbp)
lea    0x8(%r15),%rbx
mov    %rax,-0x70(%rbp)
lea    0x0(,%rax,8),%rax
mov    %rax,-0x78(%rbp)
xor    %eax,%eax
mov    %rax,-0x48(%rbp)
mov    -0x50(%rbp),%r11
jmp    134d <main+0x1dd>
xchg   %ax,%ax
mov    -0x48(%rbp),%r8
add    $0x1,%r8
add    -0x78(%rbp),%rbx
mov    %r8,%rax
mov    %r8,-0x48(%rbp)
cmp    -0x80(%rbp),%r8
je     1438 <main+0x2c8>
test   %r12d,%r12d
jle    1330 <main+0x1c0>
mov    -0x48(%rbp),%r8
mov    %r8,%r13
imul   %r12,%r13
imul   -0x70(%rbp),%r8
mov    %r8,-0x88(%rbp)
mov    -0x40(%rbp),%r8
xor    %r9d,%r9d
jmp    1393 <main+0x223>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm0,(%r11,%r10,8)
add    $0x1,%r9
add    $0x8,%r8
cmp    %rdx,%r9
je     1330 <main+0x1c0>
lea    (%r9,%r13,1),%r10
movq   $0x0,(%r11,%r10,8)
test   %ecx,%ecx
jle    1386 <main+0x216>
xorpd  %xmm0,%xmm0
cmp    $0x1,%ecx
jne    13c0 <main+0x250>
xor    %r15d,%r15d
jmp    13fc <main+0x28c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r8,%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14),%xmm1
mulsd  -0x8(%rbx,%r15,8),%xmm1
addsd  %xmm0,%xmm1
movsd  (%r14,%r12,8),%xmm0
mulsd  (%rbx,%r15,8),%xmm0
addsd  %xmm1,%xmm0
add    $0x2,%r15
add    %rsi,%r14
cmp    %r15,%rdi
jne    13d0 <main+0x260>
test   $0x1,%cl
je     1380 <main+0x210>
mov    -0x88(%rbp),%rax
lea    (%rax,%r15,1),%r14
imul   %r12,%r15
add    %r9,%r15
mov    -0x40(%rbp),%r11
movsd  (%r11,%r15,8),%xmm1
mov    -0x60(%rbp),%rax
mulsd  (%rax,%r14,8),%xmm1
mov    -0x50(%rbp),%r11
addsd  %xmm1,%xmm0
jmp    1380 <main+0x210>
mov    -0x58(%rbp),%rbx
mov    -0x60(%rbp),%r15
jmp    1449 <main+0x2d9>
mov    -0x38(%rbp),%ecx
mov    -0x58(%rbp),%rbx
lea    0xbb0(%rip),%rdi
mov    -0x40(%rbp),%rsi
call   1050 <print@plt>
mov    -0x38(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xb9c(%rip),%rdi
mov    %r15,%rsi
call   1050 <print@plt>
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xb89(%rip),%rdi
mov    -0x68(%rbp),%rsi
call   1050 <print@plt>
mov    -0x34(%rbp),%edx
mov    -0x30(%rbp),%ecx
lea    0xb75(%rip),%rdi
mov    -0x50(%rbp),%rsi
call   1050 <print@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Using defaults\0A\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [2 x i8] c"D\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 i8*
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8
%18 = alloca i8
%19 = alloca double
%20 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 4
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %6
store i32 4, i32* %7
store i32 6, i32* %8
br label %38
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %6
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @atoi(i8* %32)
store i32 %33, i32* %7
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
%37 = call i32 @atoi(i8* %36)
store i32 %37, i32* %8
br label %38
38: ; preds = %25, %23
%39 = load i32, i32* %6
%40 = load i32, i32* %8
%41 = mul nsw i32 %39, %40
%42 = zext i32 %41 to i64
%43 = call i8* @llvm.stacksave()
store i8* %43, i8** %12
%44 = alloca double, i64 %42
store i64 %42, i64* %13
%45 = load i32, i32* %8
%46 = load i32, i32* %7
%47 = mul nsw i32 %45, %46
%48 = zext i32 %47 to i64
%49 = alloca double, i64 %48
store i64 %48, i64* %14
%50 = load i32, i32* %6
%51 = load i32, i32* %7
%52 = mul nsw i32 %50, %51
%53 = zext i32 %52 to i64
%54 = alloca double, i64 %53
store i64 %53, i64* %15
%55 = load i32, i32* %6
%56 = load i32, i32* %7
%57 = mul nsw i32 %55, %56
%58 = zext i32 %57 to i64
%59 = alloca double, i64 %58
store i64 %58, i64* %16
store i8 78, i8* %17
store i8 78, i8* %18
store double 1.000000e+00, double* %19
store double 0.000000e+00, double* %20
%60 = call i32 @time(i32* null)
%61 = call i32 @srand(i32 %60)
%62 = load i32, i32* %6
%63 = load i32, i32* %8
%64 = call i32 @init(double* %44, i32 %62, i32 %63)
%65 = load i32, i32* %8
%66 = load i32, i32* %7
%67 = call i32 @init(double* %49, i32 %65, i32 %66)
%68 = call i32 @dgemm_(i8* %17, i8* %18, i32* %6, i32* %7, i32* %8, double* %19, double* %44, i32* %6, double* %49, i32* %8, double* %20, double* %54, i32* %6)
store i32 0, i32* %9
br label %69
69: ; preds = %124, %38
%70 = load i32, i32* %9
%71 = load i32, i32* %7
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %127
73: ; preds = %69
store i32 0, i32* %10
br label %74
74: ; preds = %120, %73
%75 = load i32, i32* %10
%76 = load i32, i32* %6
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %123
78: ; preds = %74
%79 = load i32, i32* %9
%80 = load i32, i32* %6
%81 = mul nsw i32 %79, %80
%82 = load i32, i32* %10
%83 = add nsw i32 %81, %82
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %59, i64 %84
store double 0.000000e+00, double* %85
store i32 0, i32* %11
br label %86
86: ; preds = %116, %78
%87 = load i32, i32* %11
%88 = load i32, i32* %8
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %119
90: ; preds = %86
%91 = load i32, i32* %11
%92 = load i32, i32* %6
%93 = mul nsw i32 %91, %92
%94 = load i32, i32* %10
%95 = add nsw i32 %93, %94
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %44, i64 %96
%98 = load double, double* %97
%99 = load i32, i32* %11
%100 = load i32, i32* %8
%101 = load i32, i32* %9
%102 = mul nsw i32 %100, %101
%103 = add nsw i32 %99, %102
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %49, i64 %104
%106 = load double, double* %105
%107 = load i32, i32* %9
%108 = load i32, i32* %6
%109 = mul nsw i32 %107, %108
%110 = load i32, i32* %10
%111 = add nsw i32 %109, %110
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %59, i64 %112
%114 = load double, double* %113
%115 = call double @llvm.fmuladd.f64(double %98, double %106, double %114)
store double %115, double* %113
br label %116
116: ; preds = %90
%117 = load i32, i32* %11
%118 = add nsw i32 %117, 1
store i32 %118, i32* %11
br label %86
119: ; preds = %86
br label %120
120: ; preds = %119
%121 = load i32, i32* %10
%122 = add nsw i32 %121, 1
store i32 %122, i32* %10
br label %74
123: ; preds = %74
br label %124
124: ; preds = %123
%125 = load i32, i32* %9
%126 = add nsw i32 %125, 1
store i32 %126, i32* %9
br label %69
127: ; preds = %69
%128 = load i32, i32* %6
%129 = load i32, i32* %8
%130 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), double* %44, i32 %128, i32 %129)
%131 = load i32, i32* %8
%132 = load i32, i32* %7
%133 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double* %49, i32 %131, i32 %132)
%134 = load i32, i32* %6
%135 = load i32, i32* %7
%136 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), double* %54, i32 %134, i32 %135)
%137 = load i32, i32* %6
%138 = load i32, i32* %7
%139 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), double* %59, i32 %137, i32 %138)
store i32 0, i32* %3
%140 = load i8*, i8** %12
%141 = load i32, i32* %3
ret i32 %141
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [2 x i8] c"D\00"
@str = [15 x i8] c"Using defaults\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca double
%9 = alloca double
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = icmp eq i32 %0, 4
br i1 %13, label %16, label %14
14: ; preds = %2
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
store i32 2, i32* %3
store i32 4, i32* %4
br label %26
16: ; preds = %2
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = tail call i32 @atoi(i8* %18)
store i32 %19, i32* %3
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
store i32 %22, i32* %4
%23 = getelementptr inbounds i8*, i8** %1, i64 3
%24 = load i8*, i8** %23
%25 = tail call i32 @atoi(i8* %24)
br label %26
26: ; preds = %16, %14
%27 = phi i32 [ %22, %16 ], [ 4, %14 ]
%28 = phi i32 [ %19, %16 ], [ 2, %14 ]
%29 = phi i32 [ %25, %16 ], [ 6, %14 ]
store i32 %29, i32* %5
%30 = mul nsw i32 %28, %29
%31 = zext i32 %30 to i64
%32 = tail call i8* @llvm.stacksave()
%33 = alloca double, i64 %31
%34 = mul nsw i32 %27, %29
%35 = zext i32 %34 to i64
%36 = alloca double, i64 %35
%37 = mul nsw i32 %28, %27
%38 = zext i32 %37 to i64
%39 = alloca double, i64 %38
%40 = alloca double, i64 %38
store i8 78, i8* %6
store i8 78, i8* %7
%41 = bitcast double* %8 to i8*
store double 1.000000e+00, double* %8
%42 = bitcast double* %9 to i8*
store double 0.000000e+00, double* %9
%43 = tail call i32 @time(i32* null)
%44 = tail call i32 @srand(i32 %43)
%45 = call i32 @init(double* %33, i32 %28, i32 %29)
%46 = call i32 @init(double* %36, i32 %29, i32 %27)
%47 = call i32 @dgemm_(i8* %6, i8* %7, i32* %3, i32* %4, i32* %5, double* %8, double* %33, i32* %3, double* %36, i32* %5, double* %9, double* %39, i32* %3)
%48 = load i32, i32* %4
%49 = icmp sgt i32 %48, 0
%50 = load i32, i32* %3
br i1 %49, label %53, label %51
51: ; preds = %26
%52 = load i32, i32* %5
br label %121
53: ; preds = %26
%54 = icmp sgt i32 %50, 0
%55 = load i32, i32* %5
%56 = icmp sgt i32 %55, 0
%57 = sext i32 %50 to i64
%58 = sext i32 %55 to i64
%59 = zext i32 %48 to i64
%60 = zext i32 %50 to i64
%61 = zext i32 %55 to i64
%62 = and i64 %61, 1
%63 = icmp eq i32 %55, 1
%64 = and i64 %61, 4294967294
%65 = icmp eq i64 %62, 0
br label %66
66: ; preds = %53, %118
%67 = phi i64 [ 0, %53 ], [ %119, %118 ]
br i1 %54, label %68, label %118
68: ; preds = %66
%69 = mul nsw i64 %67, %57
%70 = mul nsw i64 %67, %58
br label %71
71: ; preds = %68, %115
%72 = phi i64 [ 0, %68 ], [ %116, %115 ]
%73 = add nsw i64 %69, %72
%74 = getelementptr inbounds double, double* %40, i64 %73
store double 0.000000e+00, double* %74
br i1 %56, label %75, label %115
75: ; preds = %71
br i1 %63, label %100, label %76
76: ; preds = %75, %76
%77 = phi i64 [ %97, %76 ], [ 0, %75 ]
%78 = phi double [ %96, %76 ], [ 0.000000e+00, %75 ]
%79 = phi i64 [ %98, %76 ], [ 0, %75 ]
%80 = mul nsw i64 %77, %57
%81 = add nsw i64 %80, %72
%82 = getelementptr inbounds double, double* %33, i64 %81
%83 = load double, double* %82
%84 = add nsw i64 %70, %77
%85 = getelementptr inbounds double, double* %36, i64 %84
%86 = load double, double* %85
%87 = call double @llvm.fmuladd.f64(double %83, double %86, double %78)
%88 = or i64 %77, 1
%89 = mul nsw i64 %88, %57
%90 = add nsw i64 %89, %72
%91 = getelementptr inbounds double, double* %33, i64 %90
%92 = load double, double* %91
%93 = add nsw i64 %70, %88
%94 = getelementptr inbounds double, double* %36, i64 %93
%95 = load double, double* %94
%96 = call double @llvm.fmuladd.f64(double %92, double %95, double %87)
%97 = add nuw nsw i64 %77, 2
%98 = add i64 %79, 2
%99 = icmp eq i64 %98, %64
br i1 %99, label %100, label %76
100: ; preds = %76, %75
%101 = phi double [ undef, %75 ], [ %96, %76 ]
%102 = phi i64 [ 0, %75 ], [ %97, %76 ]
%103 = phi double [ 0.000000e+00, %75 ], [ %96, %76 ]
br i1 %65, label %113, label %104
104: ; preds = %100
%105 = mul nsw i64 %102, %57
%106 = add nsw i64 %105, %72
%107 = getelementptr inbounds double, double* %33, i64 %106
%108 = load double, double* %107
%109 = add nsw i64 %70, %102
%110 = getelementptr inbounds double, double* %36, i64 %109
%111 = load double, double* %110
%112 = call double @llvm.fmuladd.f64(double %108, double %111, double %103)
br label %113
113: ; preds = %100, %104
%114 = phi double [ %101, %100 ], [ %112, %104 ]
store double %114, double* %74
br label %115
115: ; preds = %113, %71
%116 = add nuw nsw i64 %72, 1
%117 = icmp eq i64 %116, %60
br i1 %117, label %118, label %71
118: ; preds = %115, %66
%119 = add nuw nsw i64 %67, 1
%120 = icmp eq i64 %119, %59
br i1 %120, label %121, label %66
121: ; preds = %118, %51
%122 = phi i32 [ %52, %51 ], [ %55, %118 ]
%123 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), double* %33, i32 %50, i32 %122)
%124 = load i32, i32* %5
%125 = load i32, i32* %4
%126 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), double* %36, i32 %124, i32 %125)
%127 = load i32, i32* %3
%128 = load i32, i32* %4
%129 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), double* %39, i32 %127, i32 %128)
%130 = load i32, i32* %3
%131 = load i32, i32* %4
%132 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), double* %40, i32 %130, i32 %131)
ret i32 0
}