#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 */
scalar_t__ iswhite(char);
int iswhitesep(char *s) {
  while (iswhite(*s) || (*s == '\001') || (*s == '\002') || (*s == '\003') ||
         (*s == '\004'))
    s++;
  return (*s == 0);
}


x86 assembly (clang, -O0):
<iswhitesep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <iswhite@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1189 <iswhitesep+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
mov    %al,-0x9(%rbp)
je     1189 <iswhitesep+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x2,%ecx
mov    %al,-0x9(%rbp)
je     1189 <iswhitesep+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3,%ecx
mov    %al,-0x9(%rbp)
je     1189 <iswhitesep+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1199 <iswhitesep+0x89>
jmp    11aa <iswhitesep+0x9a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <iswhitesep+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhitesep>:
push   %rbx
mov    %rdi,%rbx
jmp    1124 <iswhitesep+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <iswhite@plt>
test   %rax,%rax
jne    1120 <iswhitesep+0x10>
movzbl (%rbx),%ecx
lea    -0x1(%rcx),%eax
cmp    $0x3,%al
jbe    1120 <iswhitesep+0x10>
xor    %eax,%eax
test   %cl,%cl
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @iswhitesep(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %30, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @iswhite(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %28, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 1
br i1 %12, label %28, label %13
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 2
br i1 %17, label %28, label %18
18: ; preds = %13
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 3
br i1 %22, label %28, label %23
23: ; preds = %18
%24 = load i8*, i8** %2
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 4
br label %28
28: ; preds = %23, %18, %13, %8, %3
%29 = phi i1 [ true, %18 ], [ true, %13 ], [ true, %8 ], [ true, %3 ], [ %27, %23 ]
br i1 %29, label %30, label %33
30: ; preds = %28
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %2
br label %3
33: ; preds = %28
%34 = load i8*, i8** %2
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 0
%38 = zext i1 %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @iswhitesep(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
%5 = tail call i64 @iswhite(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8, i8* %3
%9 = add i8 %8, -1
%10 = icmp ult i8 %9, 4
br i1 %10, label %11, label %13
11: ; preds = %7, %2
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %7
%14 = icmp eq i8 %8, 0
%15 = zext i1 %14 to i32
ret i32 %15
}