#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 *, ...);
void printMat(double mat[16]) {
  printf("\n*********** Matix ************\n");
  printf("%.2f, %.2f, %.2f, %.2f\n", mat[0], mat[4], mat[8], mat[12]);
  printf("%.2f, %.2f, %.2f, %.2f\n", mat[1], mat[5], mat[9], mat[13]);
  printf("%.2f, %.2f, %.2f, %.2f\n", mat[2], mat[6], mat[10], mat[14]);
  printf("%.2f, %.2f, %.2f, %.2f\n", mat[3], mat[7], mat[11], mat[15]);
}


x86 assembly (clang, -O0):
<printMat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm3
lea    0xecd(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm3
lea    0xe9b(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm3
lea    0xe69(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm3
lea    0xe37(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMat>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
movsd  (%rbx),%xmm0
movsd  0x20(%rbx),%xmm1
movsd  0x40(%rbx),%xmm2
movsd  0x60(%rbx),%xmm3
lea    0xeb3(%rip),%r14
mov    %r14,%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x8(%rbx),%xmm0
movsd  0x28(%rbx),%xmm1
movsd  0x48(%rbx),%xmm2
movsd  0x68(%rbx),%xmm3
mov    %r14,%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x10(%rbx),%xmm0
movsd  0x30(%rbx),%xmm1
movsd  0x50(%rbx),%xmm2
movsd  0x70(%rbx),%xmm3
mov    %r14,%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x18(%rbx),%xmm0
movsd  0x38(%rbx),%xmm1
movsd  0x58(%rbx),%xmm2
movsd  0x78(%rbx),%xmm3
mov    %r14,%rdi
mov    $0x4,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"\0A*********** Matix ************\0A\00"
@.str.1 = [24 x i8] c"%.2f, %.2f, %.2f, %.2f\0A\00"
define void @printMat(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 4
%9 = load double, double* %8
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 8
%12 = load double, double* %11
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 12
%15 = load double, double* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %6, double %9, double %12, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 5
%22 = load double, double* %21
%23 = load double*, double** %2
%24 = getelementptr inbounds double, double* %23, i64 9
%25 = load double, double* %24
%26 = load double*, double** %2
%27 = getelementptr inbounds double, double* %26, i64 13
%28 = load double, double* %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %19, double %22, double %25, double %28)
%30 = load double*, double** %2
%31 = getelementptr inbounds double, double* %30, i64 2
%32 = load double, double* %31
%33 = load double*, double** %2
%34 = getelementptr inbounds double, double* %33, i64 6
%35 = load double, double* %34
%36 = load double*, double** %2
%37 = getelementptr inbounds double, double* %36, i64 10
%38 = load double, double* %37
%39 = load double*, double** %2
%40 = getelementptr inbounds double, double* %39, i64 14
%41 = load double, double* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %32, double %35, double %38, double %41)
%43 = load double*, double** %2
%44 = getelementptr inbounds double, double* %43, i64 3
%45 = load double, double* %44
%46 = load double*, double** %2
%47 = getelementptr inbounds double, double* %46, i64 7
%48 = load double, double* %47
%49 = load double*, double** %2
%50 = getelementptr inbounds double, double* %49, i64 11
%51 = load double, double* %50
%52 = load double*, double** %2
%53 = getelementptr inbounds double, double* %52, i64 15
%54 = load double, double* %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), double %45, double %48, double %51, double %54)
ret void
}

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