#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*/ compute(int **, int **, int **);
int **createMatrix();
int /*<<< orphan*/ freeMatrix(int **);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  int **matrixA = createMatrix();
  int **matrixB = createMatrix();
  int **matrixC = createMatrix();
  compute(matrixA, matrixB, matrixC);
  freeMatrix(matrixA);
  freeMatrix(matrixB);
  freeMatrix(matrixC);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <createMatrix@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <createMatrix@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <createMatrix@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1070 <compute@plt>
mov    -0x8(%rbp),%rdi
call   1060 <freeMatrix@plt>
mov    -0x10(%rbp),%rdi
call   1060 <freeMatrix@plt>
mov    -0x18(%rbp),%rdi
call   1060 <freeMatrix@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <createMatrix@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1050 <createMatrix@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1050 <createMatrix@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
call   1070 <compute@plt>
mov    %r14,%rdi
call   1060 <freeMatrix@plt>
mov    %r15,%rdi
call   1060 <freeMatrix@plt>
mov    %rbx,%rdi
call   1060 <freeMatrix@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32**
%2 = alloca i32**
%3 = alloca i32**
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
%6 = call i32** (...) @createMatrix()
store i32** %6, i32*** %1
%7 = call i32** (...) @createMatrix()
store i32** %7, i32*** %2
%8 = call i32** (...) @createMatrix()
store i32** %8, i32*** %3
%9 = load i32**, i32*** %1
%10 = load i32**, i32*** %2
%11 = load i32**, i32*** %3
%12 = call i32 @compute(i32** %9, i32** %10, i32** %11)
%13 = load i32**, i32*** %1
%14 = call i32 @freeMatrix(i32** %13)
%15 = load i32**, i32*** %2
%16 = call i32 @freeMatrix(i32** %15)
%17 = load i32**, i32*** %3
%18 = call i32 @freeMatrix(i32** %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32** (...) @createMatrix()
%4 = tail call i32** (...) @createMatrix()
%5 = tail call i32** (...) @createMatrix()
%6 = tail call i32 @compute(i32** %3, i32** %4, i32** %5)
%7 = tail call i32 @freeMatrix(i32** %3)
%8 = tail call i32 @freeMatrix(i32** %4)
%9 = tail call i32 @freeMatrix(i32** %5)
ret i32 0
}