#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 *, char *, double, double, double);
void dump33d(double *m, char *prefix) {
  printf("%s:0 %8.3f %8.3f %8.3f\n", prefix, m[0], m[1], m[2]);
  printf("%s:1 %8.3f %8.3f %8.3f\n", prefix, m[3], m[4], m[5]);
  printf("%s:2 %8.3f %8.3f %8.3f\n", prefix, m[6], m[7], m[8]);
}


x86 assembly (clang, -O0):
<dump33d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump33d>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
movsd  0x18(%rbx),%xmm0
movsd  0x20(%rbx),%xmm1
movsd  0x28(%rbx),%xmm2
lea    0xece(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
movsd  0x30(%rbx),%xmm0
movsd  0x38(%rbx),%xmm1
movsd  0x40(%rbx),%xmm2
lea    0xec8(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

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