#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*/ printf(char *, double, double, double, double, double,
                          double, double, double, double);
void mat3_print(double M[3][3]) {
  printf("   % 3.3f % 3.3f % 3.3f\n"
         "   % 3.3f % 3.3f % 3.3f\n"
         "   % 3.3f % 3.3f % 3.3f\n",
         M[0][0], M[0][1], M[0][2], M[1][0], M[1][1], M[1][2], M[2][0], M[2][1],
         M[2][2]);
}


x86 assembly (clang, -O0):
<mat3_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm4
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm5
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm6
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm7
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm8
lea    0xe8c(%rip),%rdi
movsd  %xmm8,(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3_print>:
push   %rax
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm3
movsd  0x20(%rdi),%xmm4
movsd  0x28(%rdi),%xmm5
movsd  0x30(%rdi),%xmm6
movsd  0x38(%rdi),%xmm7
movsd  0x40(%rdi),%xmm8
movsd  %xmm8,(%rsp)
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [73 x i8] c" % 3.3f % 3.3f % 3.3f\0A % 3.3f % 3.3f % 3.3f\0A % 3.3f % 3.3f % 3.3f\0A\00"
define void @mat3_print([3 x double]* %0) {
%2 = alloca [3 x double]*
store [3 x double]* %0, [3 x double]** %2
%3 = load [3 x double]*, [3 x double]** %2
%4 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0
%5 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%6 = load double, double* %5
%7 = load [3 x double]*, [3 x double]** %2
%8 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%10 = load double, double* %9
%11 = load [3 x double]*, [3 x double]** %2
%12 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0
%13 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
%14 = load double, double* %13
%15 = load [3 x double]*, [3 x double]** %2
%16 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 1
%17 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 0, i64 0
%18 = load double, double* %17
%19 = load [3 x double]*, [3 x double]** %2
%20 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 1
%21 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 1
%22 = load double, double* %21
%23 = load [3 x double]*, [3 x double]** %2
%24 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 1
%25 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 2
%26 = load double, double* %25
%27 = load [3 x double]*, [3 x double]** %2
%28 = getelementptr inbounds [3 x double], [3 x double]* %27, i64 2
%29 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 0
%30 = load double, double* %29
%31 = load [3 x double]*, [3 x double]** %2
%32 = getelementptr inbounds [3 x double], [3 x double]* %31, i64 2
%33 = getelementptr inbounds [3 x double], [3 x double]* %32, i64 0, i64 1
%34 = load double, double* %33
%35 = load [3 x double]*, [3 x double]** %2
%36 = getelementptr inbounds [3 x double], [3 x double]* %35, i64 2
%37 = getelementptr inbounds [3 x double], [3 x double]* %36, i64 0, i64 2
%38 = load double, double* %37
%39 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), double %6, double %10, double %14, double %18, double %22, double %26, double %30, double %34, double %38)
ret void
}

LLVM IR (-O2):
@.str = [73 x i8] c" % 3.3f % 3.3f % 3.3f\0A % 3.3f % 3.3f % 3.3f\0A % 3.3f % 3.3f % 3.3f\0A\00"
define void @mat3_print([3 x double]* nocapture %0) {
%2 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%3 = load double, double* %2
%4 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%7 = load double, double* %6
%8 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%9 = load double, double* %8
%10 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%13 = load double, double* %12
%14 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%15 = load double, double* %14
%16 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%17 = load double, double* %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%19 = load double, double* %18
%20 = tail call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), double %3, double %5, double %7, double %9, double %11, double %13, double %15, double %17, double %19)
ret void
}