#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 esmDump(float *M, const char *name) {
  if (!M) {
    fprintf(stderr, "ESM: undefined matrix\n");
    return;
  }
  fprintf(stderr, "+----------+----------+----------+----------+ %s\n", name);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", M[0], M[1], M[2],
          M[3]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", M[4], M[5], M[6],
          M[7]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", M[8], M[9], M[10],
          M[11]);
  fprintf(stderr, "| %8.4f | %8.4f | %8.4f | %8.4f |\n", M[12], M[13], M[14],
          M[15]);
  fprintf(stderr, "+----------+----------+----------+----------+\n");
  fprintf(stderr, "   trans1     trans2     trans3\n");
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<esmDump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1147 <esmDump+0x37>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    12d2 <esmDump+0x1c2>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e77(%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    0xea4(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2e2d(%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    0xe59(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2de2(%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    0xe0e(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2d97(%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    0xdc3(%rip),%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%edi
lea    0xde7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
lea    0xdce(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esmDump>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2ec1(%rip),%r15
mov    (%r15),%edi
test   %rbx,%rbx
je     1234 <esmDump+0x124>
mov    %rsi,%rdx
lea    0xee2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%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),%r14
mov    %r14,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r15),%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    %r14,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r15),%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    %r14,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r15),%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    %r14,%rsi
mov    $0x4,%al
call   1030 <fprintf@plt>
mov    (%r15),%edi
lea    0xe5c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
lea    0xe7a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
lea    0xe67(%rip),%rsi
jmp    123b <esmDump+0x12b>
lea    0xdc5(%rip),%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

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

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