#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__ ISORegexp__white_space(char);
int ISORegexp__string_is_white_space(char *p) {
  for (int i = 0; p[i]; i++)
    if (ISORegexp__white_space(p[i]) == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ISORegexp__string_is_white_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116f <ISORegexp__string_is_white_space+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ISORegexp__white_space@plt>
cmp    $0x0,%rax
jne    115c <ISORegexp__string_is_white_space+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1176 <ISORegexp__string_is_white_space+0x66>
jmp    1161 <ISORegexp__string_is_white_space+0x51>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <ISORegexp__string_is_white_space+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISORegexp__string_is_white_space>:
push   %rbx
mov    (%rdi),%cl
test   %cl,%cl
je     1142 <ISORegexp__string_is_white_space+0x32>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %cl,%edi
call   1030 <ISORegexp__white_space@plt>
test   %rax,%rax
je     1138 <ISORegexp__string_is_white_space+0x28>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1120 <ISORegexp__string_is_white_space+0x10>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
jmp    1147 <ISORegexp__string_is_white_space+0x37>
mov    $0x1,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ISORegexp__string_is_white_space(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %22, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i64 @ISORegexp__white_space(i8 signext %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %12
store i32 0, i32* %2
br label %26
21: ; preds = %12
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %5
25: ; preds = %5
store i32 1, i32* %2
br label %26
26: ; preds = %25, %20
%27 = load i32, i32* %2
ret i32 %27
}

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