#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*/ abort();
void nan_abort(unsigned char *p) {
  if ((*(p + 0) == 0xff) && (*(p + 1) == 0xff) && (*(p + 2) == 0xff) &&
      (*(p + 3) == 0xff) && (*(p + 4) == 0xff) && (*(p + 5) == 0xff) &&
      (*(p + 6) == 0xff) && (*(p + 7) == 0xff))
    abort();
  return;
}


x86 assembly (clang, -O0):
<nan_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x4(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x5(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x6(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    -0x8(%rbp),%rax
movzbl 0x7(%rax),%eax
cmp    $0xff,%eax
jne    11ba <nan_abort+0xaa>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nan_abort>:
push   %rax
cmpb   $0xff,(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x1(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x2(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x3(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x4(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x5(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x6(%rdi)
jne    1140 <nan_abort+0x30>
cmpb   $0xff,0x7(%rdi)
je     1142 <nan_abort+0x32>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @nan_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 255
br i1 %7, label %8, label %52
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 255
br i1 %13, label %14, label %52
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 255
br i1 %19, label %20, label %52
20: ; preds = %14
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 3
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = icmp eq i32 %24, 255
br i1 %25, label %26, label %52
26: ; preds = %20
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i64 4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = icmp eq i32 %30, 255
br i1 %31, label %32, label %52
32: ; preds = %26
%33 = load i8*, i8** %2
%34 = getelementptr inbounds i8, i8* %33, i64 5
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = icmp eq i32 %36, 255
br i1 %37, label %38, label %52
38: ; preds = %32
%39 = load i8*, i8** %2
%40 = getelementptr inbounds i8, i8* %39, i64 6
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = icmp eq i32 %42, 255
br i1 %43, label %44, label %52
44: ; preds = %38
%45 = load i8*, i8** %2
%46 = getelementptr inbounds i8, i8* %45, i64 7
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = icmp eq i32 %48, 255
br i1 %49, label %50, label %52
50: ; preds = %44
%51 = call i32 (...) @abort()
unreachable
52: ; preds = %44, %38, %32, %26, %20, %14, %8, %1
ret void
}

LLVM IR (-O2):
define void @nan_abort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, -1
br i1 %3, label %4, label %34
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, -1
br i1 %7, label %8, label %34
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, -1
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, -1
br i1 %15, label %16, label %34
16: ; preds = %12
%17 = getelementptr inbounds i8, i8* %0, i64 4
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, -1
br i1 %19, label %20, label %34
20: ; preds = %16
%21 = getelementptr inbounds i8, i8* %0, i64 5
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, -1
br i1 %23, label %24, label %34
24: ; preds = %20
%25 = getelementptr inbounds i8, i8* %0, i64 6
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, -1
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = getelementptr inbounds i8, i8* %0, i64 7
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, -1
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = tail call i32 (...) @abort()
unreachable
34: ; preds = %28, %24, %20, %16, %12, %8, %4, %1
ret void
}