#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*/ isascii(int);
int isspace(int c) {
  if (!isascii(c))
    return 0;
  if (' ' == (unsigned char)c)
    return 1;
  if ('\n' == (unsigned char)c)
    return 1;
  if ('\r' == (unsigned char)c)
    return 1;
  if ('\t' == (unsigned char)c)
    return 1;
  if ('\v' == (unsigned char)c)
    return 1;
  if ('\f' == (unsigned char)c)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isascii@plt>
cmp    $0x0,%eax
jne    1138 <isspace+0x28>
movl   $0x0,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0x20,%eax
cmp    %ecx,%eax
jne    1157 <isspace+0x47>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0xa,%eax
cmp    %ecx,%eax
jne    1176 <isspace+0x66>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0xd,%eax
cmp    %ecx,%eax
jne    1195 <isspace+0x85>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0x9,%eax
cmp    %ecx,%eax
jne    11b4 <isspace+0xa4>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0xb,%eax
cmp    %ecx,%eax
jne    11d3 <isspace+0xc3>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
mov    -0x8(%rbp),%eax
movzbl %al,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
jne    11f2 <isspace+0xe2>
movl   $0x1,-0x4(%rbp)
jmp    11f9 <isspace+0xe9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
xor    %eax,%eax
cmp    $0x7f,%edi
ja     1114 <isspace+0x14>
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%ecx
jae    1115 <isspace+0x15>
ret
cmp    $0x20,%edi
je     1114 <isspace+0x14>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = icmp ult i32 %0, 128
br i1 %2, label %3, label %5
3: ; preds = %1
switch i32 %0, label %4 [
i32 32, label %5
i32 10, label %5
i32 13, label %5
i32 9, label %5
i32 11, label %5
i32 12, label %5
]
4: ; preds = %3
br label %5
5: ; preds = %3, %3, %3, %3, %3, %3, %1, %4
%6 = phi i32 [ 0, %4 ], [ 0, %1 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ]
ret i32 %6
}