#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 int /*<<< orphan*/ myMatrix;

/* Variables and functions */
int /*<<< orphan*/ mat22Print(double **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ thrice(double **);
int /*<<< orphan*/ twice(double **);
int /*<<< orphan*/ vec2Print(double *);
int main(void) {
  double myMatrix[2][2] = {{14.2, -3.0}, {2.2, 1.6}};
  printf("myMatrix:\n");
  mat22Print(myMatrix);
  twice(myMatrix);
  printf("myMatrix:\n");
  mat22Print(myMatrix);
  thrice(myMatrix);
  printf("myMatrix:\n");
  mat22Print(myMatrix);
  printf("myMatrix[0]:\n");
  vec2Print(myMatrix[0]);
  printf("myMatrix[1]:\n");
  vec2Print(myMatrix[1]);
  printf("sizeof(myMatrix) = %d, sizeof(myMatrix[0][0]) = %d.\n",
         (int)sizeof(myMatrix), (int)sizeof(myMatrix[0][0]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe97(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe94(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe91(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <mat22Print@plt>
lea    -0x30(%rbp),%rdi
call   1040 <twice@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <mat22Print@plt>
lea    -0x30(%rbp),%rdi
call   1060 <thrice@plt>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <mat22Print@plt>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1070 <vec2Print@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x30(%rbp),%rdi
add    $0x10,%rdi
call   1070 <vec2Print@plt>
lea    0xe2c(%rip),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe84(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r14
lea    0xec9(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <mat22Print@plt>
mov    %rbx,%rdi
call   1050 <twice@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <mat22Print@plt>
mov    %rbx,%rdi
call   1070 <thrice@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <mat22Print@plt>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1080 <vec2Print@plt>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1080 <vec2Print@plt>
lea    0xe22(%rip),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.myMatrix = [2 x [2 x double]] [[2 x double] [double 1.420000e+01, double -3.000000e+00], [2 x double] [double 2.200000e+00, double 1.600000e+00]]
@.str = [11 x i8] c"myMatrix:\0A\00"
@.str.1 = [14 x i8] c"myMatrix[0]:\0A\00"
@.str.2 = [14 x i8] c"myMatrix[1]:\0A\00"
@.str.3 = [53 x i8] c"sizeof(myMatrix) = %d, sizeof(myMatrix[0][0]) = %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [2 x double]]
store i32 0, i32* %1
%3 = bitcast [2 x [2 x double]]* %2 to i8*
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%6 = bitcast [2 x double]* %5 to double**
%7 = call i32 @mat22Print(double** %6)
%8 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%9 = bitcast [2 x double]* %8 to double**
%10 = call i32 @twice(double** %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%13 = bitcast [2 x double]* %12 to double**
%14 = call i32 @mat22Print(double** %13)
%15 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%16 = bitcast [2 x double]* %15 to double**
%17 = call i32 @thrice(double** %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%19 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%20 = bitcast [2 x double]* %19 to double**
%21 = call i32 @mat22Print(double** %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%23 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 0
%24 = getelementptr inbounds [2 x double], [2 x double]* %23, i64 0, i64 0
%25 = call i32 @vec2Print(double* %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%27 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %2, i64 0, i64 1
%28 = getelementptr inbounds [2 x double], [2 x double]* %27, i64 0, i64 0
%29 = call i32 @vec2Print(double* %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 32, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.myMatrix = [2 x [2 x double]] [[2 x double] [double 1.420000e+01, double -3.000000e+00], [2 x double] [double 2.200000e+00, double 1.600000e+00]]
@.str.3 = [53 x i8] c"sizeof(myMatrix) = %d, sizeof(myMatrix[0][0]) = %d.\0A\00"
@str.5 = [10 x i8] c"myMatrix:\00"
@str.6 = [13 x i8] c"myMatrix[0]:\00"
@str.7 = [13 x i8] c"myMatrix[1]:\00"
define i32 @main() {
%1 = alloca [2 x [2 x double]]
%2 = bitcast [2 x [2 x double]]* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
%4 = bitcast [2 x [2 x double]]* %1 to double**
%5 = call i32 @mat22Print(double** %4)
%6 = call i32 @twice(double** %4)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
%8 = call i32 @mat22Print(double** %4)
%9 = call i32 @thrice(double** %4)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
%11 = call i32 @mat22Print(double** %4)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%13 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %1, i64 0, i64 0, i64 0
%14 = call i32 @vec2Print(double* %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0))
%16 = getelementptr inbounds [2 x [2 x double]], [2 x [2 x double]]* %1, i64 0, i64 1, i64 0
%17 = call i32 @vec2Print(double* %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0), i32 32, i32 8)
ret i32 0
}