#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*/ fillMatrix(int **, int);
int /*<<< orphan*/ free(int **);
float multiplyMatrixes(int **, int **, int);
int /*<<< orphan*/ printf(char *, float);
int **setMatrix(int);
void generateMatrixMultiplation(int matrixSize) {
  int **matrix1 = NULL, **matrix2 = NULL;
  int i, j;
  float time;
  matrix1 = setMatrix(matrixSize);
  fillMatrix(matrix1, matrixSize);
  matrix2 = setMatrix(matrixSize);
  fillMatrix(matrix2, matrixSize);
  time = multiplyMatrixes(matrix1, matrix2, matrixSize);
  free(matrix1);
  free(matrix2);
  printf("%-10.2f", time);
}


x86 assembly (clang, -O0):
<generateMatrixMultiplation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <setMatrix@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1070 <fillMatrix@plt>
mov    -0x4(%rbp),%edi
call   1060 <setMatrix@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1070 <fillMatrix@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1040 <multiplyMatrixes@plt>
movss  %xmm0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movss  -0x24(%rbp),%xmm0
lea    0xe32(%rip),%rdi
call   1050 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateMatrixMultiplation>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
call   1060 <setMatrix@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
call   1070 <fillMatrix@plt>
mov    %ebx,%edi
call   1060 <setMatrix@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %ebx,%esi
call   1070 <fillMatrix@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1040 <multiplyMatrixes@plt>
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0xe55(%rip),%rdi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%-10.2f\00"
define void @generateMatrixMultiplation(i32 %0) {
%2 = alloca i32
%3 = alloca i32**
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %2
store i32** null, i32*** %3
store i32** null, i32*** %4
%8 = load i32, i32* %2
%9 = call i32** @setMatrix(i32 %8)
store i32** %9, i32*** %3
%10 = load i32**, i32*** %3
%11 = load i32, i32* %2
%12 = call i32 @fillMatrix(i32** %10, i32 %11)
%13 = load i32, i32* %2
%14 = call i32** @setMatrix(i32 %13)
store i32** %14, i32*** %4
%15 = load i32**, i32*** %4
%16 = load i32, i32* %2
%17 = call i32 @fillMatrix(i32** %15, i32 %16)
%18 = load i32**, i32*** %3
%19 = load i32**, i32*** %4
%20 = load i32, i32* %2
%21 = call float @multiplyMatrixes(i32** %18, i32** %19, i32 %20)
store float %21, float* %7
%22 = load i32**, i32*** %3
%23 = call i32 @free(i32** %22)
%24 = load i32**, i32*** %4
%25 = call i32 @free(i32** %24)
%26 = load float, float* %7
%27 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %26)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%-10.2f\00"
define void @generateMatrixMultiplation(i32 %0) {
%2 = tail call i32** @setMatrix(i32 %0)
%3 = tail call i32 @fillMatrix(i32** %2, i32 %0)
%4 = tail call i32** @setMatrix(i32 %0)
%5 = tail call i32 @fillMatrix(i32** %4, i32 %0)
%6 = tail call float @multiplyMatrixes(i32** %2, i32** %4, i32 %0)
%7 = tail call i32 @free(i32** %2)
%8 = tail call i32 @free(i32** %4)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), float %6)
ret void
}