#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 *, ...);
void dump44d(double *m, char *prefix) {
  if (m) {
    printf("%s:0 %8.3f %8.3f %8.3f %8.3f\n", prefix, m[0], m[1], m[2], m[3]);
    printf("%s:1 %8.3f %8.3f %8.3f %8.3f\n", prefix, m[4], m[5], m[6], m[7]);
    printf("%s:2 %8.3f %8.3f %8.3f %8.3f\n", prefix, m[8], m[9], m[10], m[11]);
    printf("%s:3 %8.3f %8.3f %8.3f %8.3f\n", prefix, m[12], m[13], m[14],
           m[15]);
  } else {
    printf("%s: (null matrix pointer)\n", prefix);
  }
}


x86 assembly (clang, -O0):
<dump44d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1207 <dump44d+0xf7>
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
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
lea    0xea7(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
lea    0xe8f(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm3
lea    0xe77(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm3
lea    0xe5f(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
jmp    1219 <dump44d+0x109>
mov    -0x10(%rbp),%rsi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump44d>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
test   %rdi,%rdi
je     11bd <dump44d+0xad>
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm3
lea    0xec3(%rip),%rdi
mov    %r14,%rsi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0x20(%rbx),%xmm0
movsd  0x28(%rbx),%xmm1
movsd  0x30(%rbx),%xmm2
movsd  0x38(%rbx),%xmm3
lea    0xebc(%rip),%rdi
mov    %r14,%rsi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0x40(%rbx),%xmm0
movsd  0x48(%rbx),%xmm1
movsd  0x50(%rbx),%xmm2
movsd  0x58(%rbx),%xmm3
lea    0xeb5(%rip),%rdi
mov    %r14,%rsi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0x60(%rbx),%xmm0
movsd  0x68(%rbx),%xmm1
movsd  0x70(%rbx),%xmm2
movsd  0x78(%rbx),%xmm3
lea    0xeae(%rip),%rdi
mov    %r14,%rsi
mov    $0x4,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"%s:0 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.1 = [30 x i8] c"%s:1 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.2 = [30 x i8] c"%s:2 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.3 = [30 x i8] c"%s:3 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.4 = [27 x i8] c"%s: (null matrix pointer)\0A\00"
define void @dump44d(double* %0, i8* %1) {
%3 = alloca double*
%4 = alloca i8*
store double* %0, double** %3
store i8* %1, i8** %4
%5 = load double*, double** %3
%6 = icmp ne double* %5, null
br i1 %6, label %7, label %64
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = load double*, double** %3
%19 = getelementptr inbounds double, double* %18, i64 3
%20 = load double, double* %19
%21 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %8, double %11, double %14, double %17, double %20)
%22 = load i8*, i8** %4
%23 = load double*, double** %3
%24 = getelementptr inbounds double, double* %23, i64 4
%25 = load double, double* %24
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i64 5
%28 = load double, double* %27
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 6
%31 = load double, double* %30
%32 = load double*, double** %3
%33 = getelementptr inbounds double, double* %32, i64 7
%34 = load double, double* %33
%35 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %22, double %25, double %28, double %31, double %34)
%36 = load i8*, i8** %4
%37 = load double*, double** %3
%38 = getelementptr inbounds double, double* %37, i64 8
%39 = load double, double* %38
%40 = load double*, double** %3
%41 = getelementptr inbounds double, double* %40, i64 9
%42 = load double, double* %41
%43 = load double*, double** %3
%44 = getelementptr inbounds double, double* %43, i64 10
%45 = load double, double* %44
%46 = load double*, double** %3
%47 = getelementptr inbounds double, double* %46, i64 11
%48 = load double, double* %47
%49 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %36, double %39, double %42, double %45, double %48)
%50 = load i8*, i8** %4
%51 = load double*, double** %3
%52 = getelementptr inbounds double, double* %51, i64 12
%53 = load double, double* %52
%54 = load double*, double** %3
%55 = getelementptr inbounds double, double* %54, i64 13
%56 = load double, double* %55
%57 = load double*, double** %3
%58 = getelementptr inbounds double, double* %57, i64 14
%59 = load double, double* %58
%60 = load double*, double** %3
%61 = getelementptr inbounds double, double* %60, i64 15
%62 = load double, double* %61
%63 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %50, double %53, double %56, double %59, double %62)
br label %67
64: ; preds = %2
%65 = load i8*, i8** %4
%66 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %65)
br label %67
67: ; preds = %64, %7
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"%s:0 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.1 = [30 x i8] c"%s:1 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.2 = [30 x i8] c"%s:2 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.3 = [30 x i8] c"%s:3 %8.3f %8.3f %8.3f %8.3f\0A\00"
@.str.4 = [27 x i8] c"%s: (null matrix pointer)\0A\00"
define void @dump44d(double* %0, i8* %1) {
%3 = icmp eq double* %0, null
br i1 %3, label %40, label %4
4: ; preds = %2
%5 = load double, double* %0
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %0, i64 3
%11 = load double, double* %10
%12 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %1, double %5, double %7, double %9, double %11)
%13 = getelementptr inbounds double, double* %0, i64 4
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %0, i64 5
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %0, i64 6
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %0, i64 7
%20 = load double, double* %19
%21 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %1, double %14, double %16, double %18, double %20)
%22 = getelementptr inbounds double, double* %0, i64 8
%23 = load double, double* %22
%24 = getelementptr inbounds double, double* %0, i64 9
%25 = load double, double* %24
%26 = getelementptr inbounds double, double* %0, i64 10
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %0, i64 11
%29 = load double, double* %28
%30 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %1, double %23, double %25, double %27, double %29)
%31 = getelementptr inbounds double, double* %0, i64 12
%32 = load double, double* %31
%33 = getelementptr inbounds double, double* %0, i64 13
%34 = load double, double* %33
%35 = getelementptr inbounds double, double* %0, i64 14
%36 = load double, double* %35
%37 = getelementptr inbounds double, double* %0, i64 15
%38 = load double, double* %37
%39 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %1, double %32, double %34, double %36, double %38)
br label %42
40: ; preds = %2
%41 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %42
42: ; preds = %40, %4
ret void
}