#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*/ fatal(char *, char *);
char *skip_nonwhite(char *p) {
  if (p != NULL) {
    while (*p != ' ' && *p != '\t')
      p++;
  } else {
    fatal("bad format - 2", (char *)0);
  }
  return p;
}


x86 assembly (clang, -O0):
<skip_nonwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1177 <skip_nonwhite+0x67>
jmp    112c <skip_nonwhite+0x1c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1151 <skip_nonwhite+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1161 <skip_nonwhite+0x51>
jmp    1172 <skip_nonwhite+0x62>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <skip_nonwhite+0x1c>
jmp    1187 <skip_nonwhite+0x77>
lea    0xe82(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <fatal@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_nonwhite>:
push   %rbx
test   %rdi,%rdi
je     1131 <skip_nonwhite+0x21>
mov    %rdi,%rbx
nopl   0x0(%rax)
movzbl (%rbx),%eax
cmp    $0x9,%al
je     1141 <skip_nonwhite+0x31>
cmp    $0x20,%al
je     1141 <skip_nonwhite+0x31>
add    $0x1,%rbx
jmp    1120 <skip_nonwhite+0x10>
lea    0xec8(%rip),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"bad format - 2\00"
define i8* @skip_nonwhite(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %22
5: ; preds = %1
br label %6
6: ; preds = %18, %5
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 32
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 9
br label %16
16: ; preds = %11, %6
%17 = phi i1 [ false, %6 ], [ %15, %11 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
br label %6
21: ; preds = %16
br label %24
22: ; preds = %1
%23 = call i32 @fatal(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* null)
br label %24
24: ; preds = %22, %21
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
@.str = [15 x i8] c"bad format - 2\00"
define i8* @skip_nonwhite(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %6
%4 = phi i8* [ %7, %6 ], [ %0, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 32, label %10
i8 9, label %10
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %1
%9 = tail call i32 @fatal(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* null)
br label %10
10: ; preds = %3, %3, %8
%11 = phi i8* [ null, %8 ], [ %4, %3 ], [ %4, %3 ]
ret i8* %11
}