#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*/ assert(int);
int fossil_isspace(char);
int /*<<< orphan*/ fossil_print(char *);
void isspace_cmd(void) {
  int i;
  for (i = 0; i <= 255; i++) {
    if (i == ' ' || i == '\n' || i == '\t' || i == '\v' || i == '\f' ||
        i == '\r') {
      assert(fossil_isspace((char)i));
    } else {
      assert(!fossil_isspace((char)i));
    }
  }
  fossil_print("All 256 characters OK\n");
}


x86 assembly (clang, -O0):
<isspace_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     11cf <isspace_cmd+0x9f>
cmpl   $0x20,-0x4(%rbp)
je     1188 <isspace_cmd+0x58>
cmpl   $0xa,-0x4(%rbp)
je     1188 <isspace_cmd+0x58>
cmpl   $0x9,-0x4(%rbp)
je     1188 <isspace_cmd+0x58>
cmpl   $0xb,-0x4(%rbp)
je     1188 <isspace_cmd+0x58>
cmpl   $0xc,-0x4(%rbp)
je     1188 <isspace_cmd+0x58>
cmpl   $0xd,-0x4(%rbp)
jne    119f <isspace_cmd+0x6f>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <fossil_isspace@plt>
mov    %eax,%edi
call   1040 <assert@plt>
jmp    11bc <isspace_cmd+0x8c>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <fossil_isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11c1 <isspace_cmd+0x91>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <isspace_cmd+0xf>
lea    0xe2a(%rip),%rdi
call   1050 <fossil_print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace_cmd>:
push   %rbx
xor    %ebx,%ebx
jmp    115a <isspace_cmd+0x2a>
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %bl,%edi
call   1030 <fossil_isspace@plt>
mov    %eax,%edi
call   1040 <assert@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
je     1179 <isspace_cmd+0x49>
lea    -0x9(%rbx),%eax
cmp    $0x5,%eax
jb     1140 <isspace_cmd+0x10>
cmp    $0x20,%ebx
je     1140 <isspace_cmd+0x10>
movsbl %bl,%edi
call   1030 <fossil_isspace@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
jmp    114a <isspace_cmd+0x1a>
lea    0xe80(%rip),%rdi
pop    %rbx
jmp    1050 <fossil_print@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"All 256 characters OK\0A\00"
define void @isspace_cmd() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %37, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %40
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 32
br i1 %7, label %23, label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 10
br i1 %10, label %23, label %11
11: ; preds = %8
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, 9
br i1 %13, label %23, label %14
14: ; preds = %11
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 11
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = load i32, i32* %1
%19 = icmp eq i32 %18, 12
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %1
%22 = icmp eq i32 %21, 13
br i1 %22, label %23, label %28
23: ; preds = %20, %17, %14, %11, %8, %5
%24 = load i32, i32* %1
%25 = trunc i32 %24 to i8
%26 = call i32 @fossil_isspace(i8 signext %25)
%27 = call i32 @assert(i32 %26)
br label %36
28: ; preds = %20
%29 = load i32, i32* %1
%30 = trunc i32 %29 to i8
%31 = call i32 @fossil_isspace(i8 signext %30)
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
br label %36
36: ; preds = %28, %23
br label %37
37: ; preds = %36
%38 = load i32, i32* %1
%39 = add nsw i32 %38, 1
store i32 %39, i32* %1
br label %2
40: ; preds = %2
%41 = call i32 @fossil_print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"All 256 characters OK\0A\00"
define void @isspace_cmd() {
br label %1
1: ; preds = %0, %11
%2 = phi i32 [ 0, %0 ], [ %14, %11 ]
switch i32 %2, label %6 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 11, label %3
i32 10, label %3
i32 9, label %3
]
3: ; preds = %1, %1, %1, %1, %1, %1
%4 = trunc i32 %2 to i8
%5 = tail call i32 @fossil_isspace(i8 signext %4)
br label %11
6: ; preds = %1
%7 = trunc i32 %2 to i8
%8 = tail call i32 @fossil_isspace(i8 signext %7)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ %5, %3 ], [ %10, %6 ]
%13 = tail call i32 @assert(i32 %12)
%14 = add nuw nsw i32 %2, 1
%15 = icmp eq i32 %14, 256
br i1 %15, label %16, label %1
16: ; preds = %11
%17 = tail call i32 @fossil_print(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}