#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 */
typedef double uint64_t;
struct timespec {
  long tv_sec;
  double tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int atoi(char *);
scalar_t__ calloc(int, int);
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ dgemm0(double *, double *, double *, int);
int /*<<< orphan*/ dgemm1(double *, double *, double *, int);
int /*<<< orphan*/ printf(char *, ...);
double rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
double verification(double *, double *, double *, double *, int);
int main(int argc, char *argv[]) {
  int n = atoi(argv[1]);
  uint64_t t0;
  float t;
  struct timespec begin, end;
  double *a, *b;
  double *c0, *c1;
  double diff;
  int i;
  srand(time(NULL));
  printf("Creating matrices %dx%d...\n\n", n, n);
  a = (double *)calloc(sizeof(double), n * n);
  for (i = 0; i < n * n; i++) {
    a[i] = rand() / 1000000.0;
  }
  b = (double *)calloc(sizeof(double), n * n);
  for (i = 0; i < n * n; i++) {
    b[i] = rand() / 1000000.0;
  }
  c0 = (double *)calloc(sizeof(double), n * n);
  c1 = (double *)calloc(sizeof(double), n * n);
  printf("Calling dgemm0...\n");
  clock_gettime(CLOCK_MONOTONIC, &begin);
  dgemm0(a, b, c0, n);
  printf("Done!\n");
  clock_gettime(CLOCK_MONOTONIC, &end);
  t0 = 1000000000L * (end.tv_sec - begin.tv_sec) + end.tv_nsec - begin.tv_nsec;
  t = t0 / 1000000000.0;
  printf("Elapsed time for dgemm0: %fs\n", t);
  printf("\nCalling dgemm1...\n");
  clock_gettime(CLOCK_MONOTONIC, &begin);
  dgemm1(a, b, c1, n);
  printf("Done!\n");
  clock_gettime(CLOCK_MONOTONIC, &end);
  t0 = 1000000000L * (end.tv_sec - begin.tv_sec) + end.tv_nsec - begin.tv_nsec;
  t = t0 / 1000000000.0;
  printf("Elapsed time for dgemm1: %fs\n", t);
  printf("\nRuning verification...\n");
  diff = verification(a, b, c0, c1, n);
  printf("Maximum difference: %f\n\n", diff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%esi
imul   -0x14(%rbp),%esi
mov    $0x8,%edi
call   1070 <calloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    1249 <main+0xa9>
mov    $0x0,%al
call   10c0 <rand@plt>
movsd  0xdde(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1209 <main+0x69>
mov    -0x14(%rbp),%esi
imul   -0x14(%rbp),%esi
mov    $0x8,%edi
call   1070 <calloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    12a5 <main+0x105>
mov    $0x0,%al
call   10c0 <rand@plt>
movsd  0xd82(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1265 <main+0xc5>
mov    -0x14(%rbp),%esi
imul   -0x14(%rbp),%esi
mov    $0x8,%edi
call   1070 <calloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x14(%rbp),%esi
imul   -0x14(%rbp),%esi
mov    $0x8,%edi
call   1070 <calloc@plt>
mov    %rax,-0x68(%rbp)
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   10a0 <dgemm0@plt>
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x48(%rbp),%rax
sub    -0x38(%rbp),%rax
imul   $0x3b9aca00,%rax,%rax
cvtsi2sd %rax,%xmm0
addsd  -0x40(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xcad(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd7(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
lea    -0x38(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <dgemm1@plt>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    -0x48(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x48(%rbp),%rax
sub    -0x38(%rbp),%rax
imul   $0x3b9aca00,%rax,%rax
cvtsi2sd %rax,%xmm0
addsd  -0x40(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xc05(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc61(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xc71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x68(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   1090 <verification@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
lea    0xc59(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    0x8(%rsi),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r14d
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    0xe31(%rip),%rdi
mov    %r14d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14d,%r12d
imul   %r14d,%r12d
mov    $0x8,%edi
mov    %r12d,%esi
call   1080 <calloc@plt>
mov    %rax,%r13
test   %r12d,%r12d
je     1270 <main+0xc0>
mov    %r12d,%ebp
xor    %ebx,%ebx
nopl   (%rax)
xor    %eax,%eax
call   10d0 <rand@plt>
divsd  0xde1(%rip),%xmm0
movsd  %xmm0,0x0(%r13,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1210 <main+0x60>
mov    $0x8,%edi
mov    %r12d,%esi
call   1080 <calloc@plt>
mov    %rax,%r15
test   %r12d,%r12d
je     1280 <main+0xd0>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   10d0 <rand@plt>
divsd  0xda1(%rip),%xmm0
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1250 <main+0xa0>
jmp    1280 <main+0xd0>
mov    $0x8,%edi
mov    %r12d,%esi
call   1080 <calloc@plt>
mov    %rax,%r15
mov    $0x8,%edi
mov    %r12d,%esi
call   1080 <calloc@plt>
mov    %rax,%rbp
mov    $0x8,%edi
mov    %r12d,%esi
call   1080 <calloc@plt>
mov    %rax,%r12
lea    0xddb(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d35(%rip),%rbx
mov    (%rbx),%edi
lea    0x18(%rsp),%rsi
call   1040 <clock_gettime@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r14d,%ecx
call   10b0 <dgemm0@plt>
lea    0xdd0(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edi
lea    0x8(%rsp),%rsi
call   1040 <clock_gettime@plt>
mov    0x8(%rsp),%rax
sub    0x18(%rsp),%rax
imul   $0x3b9aca00,%rax,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
divsd  0xcf3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd09(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xd62(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edi
lea    0x18(%rsp),%rsi
call   1040 <clock_gettime@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r14d,%ecx
call   1050 <dgemm1@plt>
lea    0xd4c(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edi
lea    0x8(%rsp),%rsi
call   1040 <clock_gettime@plt>
mov    0x8(%rsp),%rax
sub    0x18(%rsp),%rax
imul   $0x3b9aca00,%rax,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x10(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
divsd  0xc6f(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xca3(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xcf7(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
mov    %r14d,%r8d
call   10a0 <verification@plt>
lea    0xc93(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, double }
@.str = [29 x i8] c"Creating matrices %dx%d...\0A\0A\00"
@.str.1 = [19 x i8] c"Calling dgemm0...\0A\00"
@CLOCK_MONOTONIC = global i32 0
@.str.2 = [7 x i8] c"Done!\0A\00"
@.str.3 = [30 x i8] c"Elapsed time for dgemm0: %fs\0A\00"
@.str.4 = [20 x i8] c"\0ACalling dgemm1...\0A\00"
@.str.5 = [30 x i8] c"Elapsed time for dgemm1: %fs\0A\00"
@.str.6 = [25 x i8] c"\0ARuning verification...\0A\00"
@.str.7 = [25 x i8] c"Maximum difference: %f\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca float
%9 = alloca %struct.timespec
%10 = alloca %struct.timespec
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %6
%21 = call i32 @time(i32* null)
%22 = call i32 @srand(i32 %21)
%23 = load i32, i32* %6
%24 = load i32, i32* %6
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %23, i32 %24)
%26 = load i32, i32* %6
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = call i64 @calloc(i32 8, i32 %28)
%30 = inttoptr i64 %29 to double*
store double* %30, double** %11
store i32 0, i32* %16
br label %31
31: ; preds = %44, %2
%32 = load i32, i32* %16
%33 = load i32, i32* %6
%34 = load i32, i32* %6
%35 = mul nsw i32 %33, %34
%36 = icmp slt i32 %32, %35
br i1 %36, label %37, label %47
37: ; preds = %31
%38 = call double (...) @rand()
%39 = fdiv double %38, 1.000000e+06
%40 = load double*, double** %11
%41 = load i32, i32* %16
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
store double %39, double* %43
br label %44
44: ; preds = %37
%45 = load i32, i32* %16
%46 = add nsw i32 %45, 1
store i32 %46, i32* %16
br label %31
47: ; preds = %31
%48 = load i32, i32* %6
%49 = load i32, i32* %6
%50 = mul nsw i32 %48, %49
%51 = call i64 @calloc(i32 8, i32 %50)
%52 = inttoptr i64 %51 to double*
store double* %52, double** %12
store i32 0, i32* %16
br label %53
53: ; preds = %66, %47
%54 = load i32, i32* %16
%55 = load i32, i32* %6
%56 = load i32, i32* %6
%57 = mul nsw i32 %55, %56
%58 = icmp slt i32 %54, %57
br i1 %58, label %59, label %69
59: ; preds = %53
%60 = call double (...) @rand()
%61 = fdiv double %60, 1.000000e+06
%62 = load double*, double** %12
%63 = load i32, i32* %16
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
store double %61, double* %65
br label %66
66: ; preds = %59
%67 = load i32, i32* %16
%68 = add nsw i32 %67, 1
store i32 %68, i32* %16
br label %53
69: ; preds = %53
%70 = load i32, i32* %6
%71 = load i32, i32* %6
%72 = mul nsw i32 %70, %71
%73 = call i64 @calloc(i32 8, i32 %72)
%74 = inttoptr i64 %73 to double*
store double* %74, double** %13
%75 = load i32, i32* %6
%76 = load i32, i32* %6
%77 = mul nsw i32 %75, %76
%78 = call i64 @calloc(i32 8, i32 %77)
%79 = inttoptr i64 %78 to double*
store double* %79, double** %14
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%81 = load i32, i32* @CLOCK_MONOTONIC
%82 = call i32 @clock_gettime(i32 %81, %struct.timespec* %9)
%83 = load double*, double** %11
%84 = load double*, double** %12
%85 = load double*, double** %13
%86 = load i32, i32* %6
%87 = call i32 @dgemm0(double* %83, double* %84, double* %85, i32 %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%89 = load i32, i32* @CLOCK_MONOTONIC
%90 = call i32 @clock_gettime(i32 %89, %struct.timespec* %10)
%91 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%92 = load i64, i64* %91
%93 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 0
%94 = load i64, i64* %93
%95 = sub nsw i64 %92, %94
%96 = mul nsw i64 1000000000, %95
%97 = sitofp i64 %96 to double
%98 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 1
%99 = load double, double* %98
%100 = fadd double %97, %99
%101 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 1
%102 = load double, double* %101
%103 = fsub double %100, %102
store double %103, double* %7
%104 = load double, double* %7
%105 = fdiv double %104, 1.000000e+09
%106 = fptrunc double %105 to float
store float %106, float* %8
%107 = load float, float* %8
%108 = fpext float %107 to double
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), double %108)
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%111 = load i32, i32* @CLOCK_MONOTONIC
%112 = call i32 @clock_gettime(i32 %111, %struct.timespec* %9)
%113 = load double*, double** %11
%114 = load double*, double** %12
%115 = load double*, double** %14
%116 = load i32, i32* %6
%117 = call i32 @dgemm1(double* %113, double* %114, double* %115, i32 %116)
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%119 = load i32, i32* @CLOCK_MONOTONIC
%120 = call i32 @clock_gettime(i32 %119, %struct.timespec* %10)
%121 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%122 = load i64, i64* %121
%123 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 0
%124 = load i64, i64* %123
%125 = sub nsw i64 %122, %124
%126 = mul nsw i64 1000000000, %125
%127 = sitofp i64 %126 to double
%128 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 1
%129 = load double, double* %128
%130 = fadd double %127, %129
%131 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 1
%132 = load double, double* %131
%133 = fsub double %130, %132
store double %133, double* %7
%134 = load double, double* %7
%135 = fdiv double %134, 1.000000e+09
%136 = fptrunc double %135 to float
store float %136, float* %8
%137 = load float, float* %8
%138 = fpext float %137 to double
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), double %138)
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%141 = load double*, double** %11
%142 = load double*, double** %12
%143 = load double*, double** %13
%144 = load double*, double** %14
%145 = load i32, i32* %6
%146 = call double @verification(double* %141, double* %142, double* %143, double* %144, i32 %145)
store double %146, double* %15
%147 = load double, double* %15
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), double %147)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i64, double }
@.str = [29 x i8] c"Creating matrices %dx%d...\0A\0A\00"
@CLOCK_MONOTONIC = global i32 0
@.str.3 = [30 x i8] c"Elapsed time for dgemm0: %fs\0A\00"
@.str.5 = [30 x i8] c"Elapsed time for dgemm1: %fs\0A\00"
@.str.7 = [25 x i8] c"Maximum difference: %f\0A\0A\00"
@str = [18 x i8] c"Calling dgemm0...\00"
@str.9 = [19 x i8] c"\0ACalling dgemm1...\00"
@str.10 = [6 x i8] c"Done!\00"
@str.11 = [24 x i8] c"\0ARuning verification...\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = bitcast %struct.timespec* %3 to i8*
%9 = bitcast %struct.timespec* %4 to i8*
%10 = tail call i32 @time(i32* null)
%11 = tail call i32 @srand(i32 %10)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %7)
%13 = mul nsw i32 %7, %7
%14 = tail call i64 @calloc(i32 8, i32 %13)
%15 = inttoptr i64 %14 to double*
%16 = icmp eq i32 %13, 0
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = tail call i64 @calloc(i32 8, i32 %13)
%19 = inttoptr i64 %18 to double*
br label %41
20: ; preds = %2
%21 = zext i32 %13 to i64
br label %22
22: ; preds = %20, %22
%23 = phi i64 [ 0, %20 ], [ %27, %22 ]
%24 = tail call double (...) @rand()
%25 = fdiv double %24, 1.000000e+06
%26 = getelementptr inbounds double, double* %15, i64 %23
store double %25, double* %26
%27 = add nuw nsw i64 %23, 1
%28 = icmp eq i64 %27, %21
br i1 %28, label %29, label %22
29: ; preds = %22
%30 = tail call i64 @calloc(i32 8, i32 %13)
%31 = inttoptr i64 %30 to double*
br i1 %16, label %41, label %32
32: ; preds = %29
%33 = zext i32 %13 to i64
br label %34
34: ; preds = %32, %34
%35 = phi i64 [ 0, %32 ], [ %39, %34 ]
%36 = tail call double (...) @rand()
%37 = fdiv double %36, 1.000000e+06
%38 = getelementptr inbounds double, double* %31, i64 %35
store double %37, double* %38
%39 = add nuw nsw i64 %35, 1
%40 = icmp eq i64 %39, %33
br i1 %40, label %41, label %34
41: ; preds = %34, %17, %29
%42 = phi double* [ %19, %17 ], [ %31, %29 ], [ %31, %34 ]
%43 = tail call i64 @calloc(i32 8, i32 %13)
%44 = inttoptr i64 %43 to double*
%45 = tail call i64 @calloc(i32 8, i32 %13)
%46 = inttoptr i64 %45 to double*
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%48 = load i32, i32* @CLOCK_MONOTONIC
%49 = call i32 @clock_gettime(i32 %48, %struct.timespec* %3)
%50 = call i32 @dgemm0(double* %15, double* %42, double* %44, i32 %7)
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0))
%52 = load i32, i32* @CLOCK_MONOTONIC
%53 = call i32 @clock_gettime(i32 %52, %struct.timespec* %4)
%54 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i64 0, i32 0
%55 = load i64, i64* %54
%56 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
%57 = load i64, i64* %56
%58 = sub nsw i64 %55, %57
%59 = mul nsw i64 %58, 1000000000
%60 = sitofp i64 %59 to double
%61 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i64 0, i32 1
%62 = load double, double* %61
%63 = fadd double %62, %60
%64 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
%65 = load double, double* %64
%66 = fsub double %63, %65
%67 = fdiv double %66, 1.000000e+09
%68 = fptrunc double %67 to float
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), double %69)
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
%72 = load i32, i32* @CLOCK_MONOTONIC
%73 = call i32 @clock_gettime(i32 %72, %struct.timespec* %3)
%74 = call i32 @dgemm1(double* %15, double* %42, double* %46, i32 %7)
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0))
%76 = load i32, i32* @CLOCK_MONOTONIC
%77 = call i32 @clock_gettime(i32 %76, %struct.timespec* %4)
%78 = load i64, i64* %54
%79 = load i64, i64* %56
%80 = sub nsw i64 %78, %79
%81 = mul nsw i64 %80, 1000000000
%82 = sitofp i64 %81 to double
%83 = load double, double* %61
%84 = fadd double %83, %82
%85 = load double, double* %64
%86 = fsub double %84, %85
%87 = fdiv double %86, 1.000000e+09
%88 = fptrunc double %87 to float
%89 = fpext float %88 to double
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), double %89)
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.11, i64 0, i64 0))
%92 = call double @verification(double* %15, double* %42, double* %44, double* %46, i32 %7)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), double %92)
ret i32 0
}