#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void mat4_dump(float dst[16]) {
  if (!dst) {
    fprintf(stderr, "mat4_dump(): undefined matrix\n");
    return;
  }
  fprintf(stderr, "+----------+----------+----------+----------+\n");
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", dst[0], dst[1], dst[2],
          dst[3]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", dst[4], dst[5], dst[6],
          dst[7]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", dst[8], dst[9],
          dst[10], dst[11]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", dst[12], dst[13],
          dst[14], dst[15]);
  fprintf(stderr, "+----------+----------+----------+----------+\n");
  fprintf(stderr, "   trans1     trans2     trans3\n");
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<mat4_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <mat4_dump+0x33>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    12ca <mat4_dump+0x1ba>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xeb1(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe66(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x8(%rbp),%rax
movss  0x2c(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe1b(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movss  0x30(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  0x34(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%rax
movss  0x38(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x8(%rbp),%rax
movss  0x3c(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xdd0(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2d54(%rip),%rax
mov    (%rax),%edi
lea    0xd8a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edi
lea    0xdc5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
lea    0xd89(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4_dump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ebe(%rip),%r12
mov    (%r12),%edi
test   %rbx,%rbx
je     123b <mat4_dump+0x12b>
lea    0xee9(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r12),%edi
movss  (%rbx),%xmm0
movss  0x4(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x8(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0xc(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xee0(%rip),%r15
mov    %r15,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r12),%edi
movss  0x10(%rbx),%xmm0
movss  0x14(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x18(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x1c(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
mov    %r15,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r12),%edi
movss  0x20(%rbx),%xmm0
movss  0x24(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x28(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x2c(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
mov    %r15,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r12),%edi
movss  0x30(%rbx),%xmm0
movss  0x34(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x38(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x3c(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
mov    %r15,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r12),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r12),%edi
lea    0xe4a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r12),%edi
lea    0xe13(%rip),%rsi
jmp    1242 <mat4_dump+0x132>
lea    0xdbe(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"mat4_dump(): undefined matrix\0A\00"
@.str.1 = [47 x i8] c"+----------+----------+----------+----------+\0A\00"
@.str.2 = [35 x i8] c"| %8.4f | %8.4f | %8.4f | %8.4f |\0A\00"
@.str.3 = [33 x i8] c" trans1 trans2 trans3\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @mat4_dump(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = icmp ne float* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %89
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 0
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = load float*, float** %2
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = fpext float %18 to double
%20 = load float*, float** %2
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = fpext float %22 to double
%24 = load float*, float** %2
%25 = getelementptr inbounds float, float* %24, i64 3
%26 = load float, float* %25
%27 = fpext float %26 to double
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %15, double %19, double %23, double %27)
%29 = load i32, i32* @stderr
%30 = load float*, float** %2
%31 = getelementptr inbounds float, float* %30, i64 4
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = load float*, float** %2
%35 = getelementptr inbounds float, float* %34, i64 5
%36 = load float, float* %35
%37 = fpext float %36 to double
%38 = load float*, float** %2
%39 = getelementptr inbounds float, float* %38, i64 6
%40 = load float, float* %39
%41 = fpext float %40 to double
%42 = load float*, float** %2
%43 = getelementptr inbounds float, float* %42, i64 7
%44 = load float, float* %43
%45 = fpext float %44 to double
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %33, double %37, double %41, double %45)
%47 = load i32, i32* @stderr
%48 = load float*, float** %2
%49 = getelementptr inbounds float, float* %48, i64 8
%50 = load float, float* %49
%51 = fpext float %50 to double
%52 = load float*, float** %2
%53 = getelementptr inbounds float, float* %52, i64 9
%54 = load float, float* %53
%55 = fpext float %54 to double
%56 = load float*, float** %2
%57 = getelementptr inbounds float, float* %56, i64 10
%58 = load float, float* %57
%59 = fpext float %58 to double
%60 = load float*, float** %2
%61 = getelementptr inbounds float, float* %60, i64 11
%62 = load float, float* %61
%63 = fpext float %62 to double
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %51, double %55, double %59, double %63)
%65 = load i32, i32* @stderr
%66 = load float*, float** %2
%67 = getelementptr inbounds float, float* %66, i64 12
%68 = load float, float* %67
%69 = fpext float %68 to double
%70 = load float*, float** %2
%71 = getelementptr inbounds float, float* %70, i64 13
%72 = load float, float* %71
%73 = fpext float %72 to double
%74 = load float*, float** %2
%75 = getelementptr inbounds float, float* %74, i64 14
%76 = load float, float* %75
%77 = fpext float %76 to double
%78 = load float*, float** %2
%79 = getelementptr inbounds float, float* %78, i64 15
%80 = load float, float* %79
%81 = fpext float %80 to double
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %69, double %73, double %77, double %81)
%83 = load i32, i32* @stderr
%84 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%87 = load i32, i32* @stderr
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %89
89: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"mat4_dump(): undefined matrix\0A\00"
@.str.1 = [47 x i8] c"+----------+----------+----------+----------+\0A\00"
@.str.2 = [35 x i8] c"| %8.4f | %8.4f | %8.4f | %8.4f |\0A\00"
@.str.3 = [33 x i8] c" trans1 trans2 trans3\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @mat4_dump(float* %0) {
%2 = icmp eq float* %0, null
%3 = load i32, i32* @stderr
br i1 %2, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %69
6: ; preds = %1
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = load float, float* %0
%10 = fpext float %9 to double
%11 = getelementptr inbounds float, float* %0, i64 1
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = getelementptr inbounds float, float* %0, i64 2
%15 = load float, float* %14
%16 = fpext float %15 to double
%17 = getelementptr inbounds float, float* %0, i64 3
%18 = load float, float* %17
%19 = fpext float %18 to double
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %10, double %13, double %16, double %19)
%21 = load i32, i32* @stderr
%22 = getelementptr inbounds float, float* %0, i64 4
%23 = load float, float* %22
%24 = fpext float %23 to double
%25 = getelementptr inbounds float, float* %0, i64 5
%26 = load float, float* %25
%27 = fpext float %26 to double
%28 = getelementptr inbounds float, float* %0, i64 6
%29 = load float, float* %28
%30 = fpext float %29 to double
%31 = getelementptr inbounds float, float* %0, i64 7
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %24, double %27, double %30, double %33)
%35 = load i32, i32* @stderr
%36 = getelementptr inbounds float, float* %0, i64 8
%37 = load float, float* %36
%38 = fpext float %37 to double
%39 = getelementptr inbounds float, float* %0, i64 9
%40 = load float, float* %39
%41 = fpext float %40 to double
%42 = getelementptr inbounds float, float* %0, i64 10
%43 = load float, float* %42
%44 = fpext float %43 to double
%45 = getelementptr inbounds float, float* %0, i64 11
%46 = load float, float* %45
%47 = fpext float %46 to double
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %38, double %41, double %44, double %47)
%49 = load i32, i32* @stderr
%50 = getelementptr inbounds float, float* %0, i64 12
%51 = load float, float* %50
%52 = fpext float %51 to double
%53 = getelementptr inbounds float, float* %0, i64 13
%54 = load float, float* %53
%55 = fpext float %54 to double
%56 = getelementptr inbounds float, float* %0, i64 14
%57 = load float, float* %56
%58 = fpext float %57 to double
%59 = getelementptr inbounds float, float* %0, i64 15
%60 = load float, float* %59
%61 = fpext float %60 to double
%62 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %52, double %55, double %58, double %61)
%63 = load i32, i32* @stderr
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%65 = load i32, i32* @stderr
%66 = tail call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%67 = load i32, i32* @stderr
%68 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %69
69: ; preds = %6, %4
ret void
}