#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 */
float **createMatrix(int, int);
int /*<<< orphan*/ fillMatrix(float **, int, int, int);
int /*<<< orphan*/ sleep(int);
int main() {
  char i = 0;
  char j = 0;
  float **a;
  float **b;
  float **c;
  float **d;
  float **e;
  float arr[20];
  a = createMatrix(4, 4);
  b = createMatrix(4, 4);
  c = createMatrix(4, 5);
  fillMatrix(a, 4, 4, 1);
  sleep(1);
  fillMatrix(b, 4, 4, 2);
  b[0][0] = 1;
  b[0][1] = 0;
  b[0][2] = 0;
  b[0][3] = 1;
  b[1][0] = 0;
  b[1][1] = 2;
  b[1][2] = 1;
  b[1][3] = 2;
  b[2][0] = 2;
  b[2][1] = 1;
  b[2][2] = 0;
  b[2][3] = 1;
  b[3][0] = 2;
  b[3][1] = 0;
  b[3][2] = 1;
  b[3][3] = 4;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movb   $0x0,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <createMatrix@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <createMatrix@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <createMatrix@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4,%edx
mov    $0x1,%ecx
mov    %edx,%esi
call   1040 <fillMatrix@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x18(%rbp),%rdi
mov    $0x4,%edx
mov    $0x2,%ecx
mov    %edx,%esi
call   1040 <fillMatrix@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movss  0xe4b(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movss  0xe1a(%rip),%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
movss  0xdfa(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
movss  0xde1(%rip),%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
movss  0xdd0(%rip),%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
movss  0xdbb(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
movss  0xda3(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
movss  0xd7e(%rip),%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
movss  0xd6d(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
movss  0xd45(%rip),%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rax
movss  0xd2c(%rip),%xmm0
movss  %xmm0,0xc(%rax)
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <createMatrix@plt>
mov    %rax,%r14
mov    $0x4,%edi
mov    $0x4,%esi
call   1030 <createMatrix@plt>
mov    %rax,%rbx
mov    $0x4,%edi
mov    $0x5,%esi
call   1030 <createMatrix@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1040 <fillMatrix@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x2,%ecx
call   1040 <fillMatrix@plt>
mov    (%rbx),%rax
movaps 0xe57(%rip),%xmm0
movups %xmm0,(%rax)
mov    0x8(%rbx),%rax
movaps 0xe59(%rip),%xmm0
movups %xmm0,(%rax)
mov    0x10(%rbx),%rax
movaps 0xe5b(%rip),%xmm0
movups %xmm0,(%rax)
mov    0x18(%rbx),%rax
movaps 0xe5d(%rip),%xmm0
movups %xmm0,(%rax)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca float**
%4 = alloca float**
%5 = alloca float**
%6 = alloca float**
%7 = alloca float**
%8 = alloca [20 x float]
store i8 0, i8* %1
store i8 0, i8* %2
%9 = call float** @createMatrix(i32 4, i32 4)
store float** %9, float*** %3
%10 = call float** @createMatrix(i32 4, i32 4)
store float** %10, float*** %4
%11 = call float** @createMatrix(i32 4, i32 5)
store float** %11, float*** %5
%12 = load float**, float*** %3
%13 = call i32 @fillMatrix(float** %12, i32 4, i32 4, i32 1)
%14 = call i32 @sleep(i32 1)
%15 = load float**, float*** %4
%16 = call i32 @fillMatrix(float** %15, i32 4, i32 4, i32 2)
%17 = load float**, float*** %4
%18 = getelementptr inbounds float*, float** %17, i64 0
%19 = load float*, float** %18
%20 = getelementptr inbounds float, float* %19, i64 0
store float 1.000000e+00, float* %20
%21 = load float**, float*** %4
%22 = getelementptr inbounds float*, float** %21, i64 0
%23 = load float*, float** %22
%24 = getelementptr inbounds float, float* %23, i64 1
store float 0.000000e+00, float* %24
%25 = load float**, float*** %4
%26 = getelementptr inbounds float*, float** %25, i64 0
%27 = load float*, float** %26
%28 = getelementptr inbounds float, float* %27, i64 2
store float 0.000000e+00, float* %28
%29 = load float**, float*** %4
%30 = getelementptr inbounds float*, float** %29, i64 0
%31 = load float*, float** %30
%32 = getelementptr inbounds float, float* %31, i64 3
store float 1.000000e+00, float* %32
%33 = load float**, float*** %4
%34 = getelementptr inbounds float*, float** %33, i64 1
%35 = load float*, float** %34
%36 = getelementptr inbounds float, float* %35, i64 0
store float 0.000000e+00, float* %36
%37 = load float**, float*** %4
%38 = getelementptr inbounds float*, float** %37, i64 1
%39 = load float*, float** %38
%40 = getelementptr inbounds float, float* %39, i64 1
store float 2.000000e+00, float* %40
%41 = load float**, float*** %4
%42 = getelementptr inbounds float*, float** %41, i64 1
%43 = load float*, float** %42
%44 = getelementptr inbounds float, float* %43, i64 2
store float 1.000000e+00, float* %44
%45 = load float**, float*** %4
%46 = getelementptr inbounds float*, float** %45, i64 1
%47 = load float*, float** %46
%48 = getelementptr inbounds float, float* %47, i64 3
store float 2.000000e+00, float* %48
%49 = load float**, float*** %4
%50 = getelementptr inbounds float*, float** %49, i64 2
%51 = load float*, float** %50
%52 = getelementptr inbounds float, float* %51, i64 0
store float 2.000000e+00, float* %52
%53 = load float**, float*** %4
%54 = getelementptr inbounds float*, float** %53, i64 2
%55 = load float*, float** %54
%56 = getelementptr inbounds float, float* %55, i64 1
store float 1.000000e+00, float* %56
%57 = load float**, float*** %4
%58 = getelementptr inbounds float*, float** %57, i64 2
%59 = load float*, float** %58
%60 = getelementptr inbounds float, float* %59, i64 2
store float 0.000000e+00, float* %60
%61 = load float**, float*** %4
%62 = getelementptr inbounds float*, float** %61, i64 2
%63 = load float*, float** %62
%64 = getelementptr inbounds float, float* %63, i64 3
store float 1.000000e+00, float* %64
%65 = load float**, float*** %4
%66 = getelementptr inbounds float*, float** %65, i64 3
%67 = load float*, float** %66
%68 = getelementptr inbounds float, float* %67, i64 0
store float 2.000000e+00, float* %68
%69 = load float**, float*** %4
%70 = getelementptr inbounds float*, float** %69, i64 3
%71 = load float*, float** %70
%72 = getelementptr inbounds float, float* %71, i64 1
store float 0.000000e+00, float* %72
%73 = load float**, float*** %4
%74 = getelementptr inbounds float*, float** %73, i64 3
%75 = load float*, float** %74
%76 = getelementptr inbounds float, float* %75, i64 2
store float 1.000000e+00, float* %76
%77 = load float**, float*** %4
%78 = getelementptr inbounds float*, float** %77, i64 3
%79 = load float*, float** %78
%80 = getelementptr inbounds float, float* %79, i64 3
store float 4.000000e+00, float* %80
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float** @createMatrix(i32 4, i32 4)
%2 = tail call float** @createMatrix(i32 4, i32 4)
%3 = tail call float** @createMatrix(i32 4, i32 5)
%4 = tail call i32 @fillMatrix(float** %1, i32 4, i32 4, i32 1)
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @fillMatrix(float** %2, i32 4, i32 4, i32 2)
%7 = bitcast float** %2 to <4 x float>**
%8 = load <4 x float>*, <4 x float>** %7
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float>* %8
%9 = getelementptr inbounds float*, float** %2, i64 1
%10 = bitcast float** %9 to <4 x float>**
%11 = load <4 x float>*, <4 x float>** %10
store <4 x float> <float 0.000000e+00, float 2.000000e+00, float 1.000000e+00, float 2.000000e+00>, <4 x float>* %11
%12 = getelementptr inbounds float*, float** %2, i64 2
%13 = bitcast float** %12 to <4 x float>**
%14 = load <4 x float>*, <4 x float>** %13
store <4 x float> <float 2.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float>* %14
%15 = getelementptr inbounds float*, float** %2, i64 3
%16 = bitcast float** %15 to <4 x float>**
%17 = load <4 x float>*, <4 x float>** %16
store <4 x float> <float 2.000000e+00, float 0.000000e+00, float 1.000000e+00, float 4.000000e+00>, <4 x float>* %17
ret i32 0
}