#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*/ mMultiply(int *, int *, int *);
int /*<<< orphan*/ printMatrix(int *);
int main(void) {
  int matrix1[] = {1, 0, 0, 0, 1, 0, 0, 0, 1};
  int matrix2[] = {2, 4, 5, 0, 2, 0, 0, 0, 2};
  int rotateMatrix[9];
  int i;
  int j;
  mMultiply(matrix1, matrix1, matrix2);
  printMatrix(matrix1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1040 <memset@plt>
movl   $0x2,-0x60(%rbp)
movl   $0x4,-0x5c(%rbp)
movl   $0x5,-0x58(%rbp)
movl   $0x2,-0x50(%rbp)
movl   $0x2,-0x40(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1030 <mMultiply@plt>
lea    -0x30(%rbp),%rdi
call   1050 <printMatrix@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movl   $0x1,0x30(%rsp)
movl   $0x1,0x40(%rsp)
movl   $0x1,0x50(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movabs $0x400000002,%rax
mov    %rax,(%rsp)
movl   $0x5,0x8(%rsp)
movl   $0x2,0x10(%rsp)
movl   $0x2,0x20(%rsp)
lea    0x30(%rsp),%rbx
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <mMultiply@plt>
mov    %rbx,%rdi
call   1040 <printMatrix@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i32]
%3 = alloca [9 x i32]
%4 = alloca [9 x i32]
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [9 x i32]* %2 to i8*
%8 = bitcast i8* %7 to [9 x i32]*
%9 = getelementptr inbounds [9 x i32], [9 x i32]* %8, i32 0, i32 0
store i32 1, i32* %9
%10 = getelementptr inbounds [9 x i32], [9 x i32]* %8, i32 0, i32 4
store i32 1, i32* %10
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %8, i32 0, i32 8
store i32 1, i32* %11
%12 = bitcast [9 x i32]* %3 to i8*
%13 = bitcast i8* %12 to [9 x i32]*
%14 = getelementptr inbounds [9 x i32], [9 x i32]* %13, i32 0, i32 0
store i32 2, i32* %14
%15 = getelementptr inbounds [9 x i32], [9 x i32]* %13, i32 0, i32 1
store i32 4, i32* %15
%16 = getelementptr inbounds [9 x i32], [9 x i32]* %13, i32 0, i32 2
store i32 5, i32* %16
%17 = getelementptr inbounds [9 x i32], [9 x i32]* %13, i32 0, i32 4
store i32 2, i32* %17
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %13, i32 0, i32 8
store i32 2, i32* %18
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%21 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%22 = call i32 @mMultiply(i32* %19, i32* %20, i32* %21)
%23 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%24 = call i32 @printMatrix(i32* %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [9 x i32]
%2 = alloca [9 x i32]
%3 = bitcast [9 x i32]* %1 to i8*
%4 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 0
store i32 1, i32* %4
%5 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 4
store i32 1, i32* %5
%6 = getelementptr inbounds [9 x i32], [9 x i32]* %1, i64 0, i64 8
store i32 1, i32* %6
%7 = bitcast [9 x i32]* %2 to i8*
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
store i32 2, i32* %8
%9 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 1
store i32 4, i32* %9
%10 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 2
store i32 5, i32* %10
%11 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 4
store i32 2, i32* %11
%12 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 8
store i32 2, i32* %12
%13 = call i32 @mMultiply(i32* %4, i32* %4, i32* %8)
%14 = call i32 @printMatrix(i32* %4)
ret i32 0
}