#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 */
bool identityP(double A[9]) {
  return A[0] == 1 && A[1] == 0 && A[2] == 0 && A[3] == 0 && A[4] == 1 &&
         A[5] == 0 && A[6] == 0 && A[7] == 0 && A[8] == 1;
}


x86 assembly (clang, -O0):
<identityP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
movsd  0xee6(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
xor    %eax,%eax
movsd  0xe5d(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1239 <identityP+0x139>
jp     1239 <identityP+0x139>
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  0xdd6(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<identityP>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
ucomisd 0xef2(%rip),%xmm0
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x8(%rdi),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x10(%rdi),%xmm1
ucomisd %xmm0,%xmm1
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x18(%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x20(%rdi),%xmm0
ucomisd 0xeaa(%rip),%xmm0
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x28(%rdi),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x30(%rdi),%xmm1
ucomisd %xmm0,%xmm1
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0x38(%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    119f <identityP+0x9f>
jp     119f <identityP+0x9f>
movsd  0xe6f(%rip),%xmm0
cmpeqsd 0x40(%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @identityP(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fcmp oeq double %5, 1.000000e+00
br i1 %6, label %7, label %47
7: ; preds = %1
%8 = load double*, double** %2
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
%11 = fcmp oeq double %10, 0.000000e+00
br i1 %11, label %12, label %47
12: ; preds = %7
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 2
%15 = load double, double* %14
%16 = fcmp oeq double %15, 0.000000e+00
br i1 %16, label %17, label %47
17: ; preds = %12
%18 = load double*, double** %2
%19 = getelementptr inbounds double, double* %18, i64 3
%20 = load double, double* %19
%21 = fcmp oeq double %20, 0.000000e+00
br i1 %21, label %22, label %47
22: ; preds = %17
%23 = load double*, double** %2
%24 = getelementptr inbounds double, double* %23, i64 4
%25 = load double, double* %24
%26 = fcmp oeq double %25, 1.000000e+00
br i1 %26, label %27, label %47
27: ; preds = %22
%28 = load double*, double** %2
%29 = getelementptr inbounds double, double* %28, i64 5
%30 = load double, double* %29
%31 = fcmp oeq double %30, 0.000000e+00
br i1 %31, label %32, label %47
32: ; preds = %27
%33 = load double*, double** %2
%34 = getelementptr inbounds double, double* %33, i64 6
%35 = load double, double* %34
%36 = fcmp oeq double %35, 0.000000e+00
br i1 %36, label %37, label %47
37: ; preds = %32
%38 = load double*, double** %2
%39 = getelementptr inbounds double, double* %38, i64 7
%40 = load double, double* %39
%41 = fcmp oeq double %40, 0.000000e+00
br i1 %41, label %42, label %47
42: ; preds = %37
%43 = load double*, double** %2
%44 = getelementptr inbounds double, double* %43, i64 8
%45 = load double, double* %44
%46 = fcmp oeq double %45, 1.000000e+00
br label %47
47: ; preds = %42, %37, %32, %27, %22, %17, %12, %7, %1
%48 = phi i1 [ false, %37 ], [ false, %32 ], [ false, %27 ], [ false, %22 ], [ false, %17 ], [ false, %12 ], [ false, %7 ], [ false, %1 ], [ %46, %42 ]
%49 = zext i1 %48 to i32
ret i32 %49
}

LLVM IR (-O2):
define i32 @identityP(double* nocapture %0) {
%2 = load double, double* %0
%3 = fcmp oeq double %2, 1.000000e+00
br i1 %3, label %4, label %37
4: ; preds = %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %37
8: ; preds = %4
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fcmp oeq double %10, 0.000000e+00
br i1 %11, label %12, label %37
12: ; preds = %8
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = fcmp oeq double %14, 0.000000e+00
br i1 %15, label %16, label %37
16: ; preds = %12
%17 = getelementptr inbounds double, double* %0, i64 4
%18 = load double, double* %17
%19 = fcmp oeq double %18, 1.000000e+00
br i1 %19, label %20, label %37
20: ; preds = %16
%21 = getelementptr inbounds double, double* %0, i64 5
%22 = load double, double* %21
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %37
24: ; preds = %20
%25 = getelementptr inbounds double, double* %0, i64 6
%26 = load double, double* %25
%27 = fcmp oeq double %26, 0.000000e+00
br i1 %27, label %28, label %37
28: ; preds = %24
%29 = getelementptr inbounds double, double* %0, i64 7
%30 = load double, double* %29
%31 = fcmp oeq double %30, 0.000000e+00
br i1 %31, label %32, label %37
32: ; preds = %28
%33 = getelementptr inbounds double, double* %0, i64 8
%34 = load double, double* %33
%35 = fcmp oeq double %34, 1.000000e+00
%36 = zext i1 %35 to i32
br label %37
37: ; preds = %32, %28, %24, %20, %16, %12, %8, %4, %1
%38 = phi i32 [ 0, %28 ], [ 0, %24 ], [ 0, %20 ], [ 0, %16 ], [ 0, %12 ], [ 0, %8 ], [ 0, %4 ], [ 0, %1 ], [ %36, %32 ]
ret i32 %38
}