#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__ white_space(char);
char *skip_first(char *str) {
  for (; !white_space(*str) && *str != '\0'; str++)
    ;
  for (; white_space(*str) && *str != '\0'; str++)
    ;
  return (str);
}


x86 assembly (clang, -O0):
<skip_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <white_space@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    114a <skip_first+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <skip_first+0x4a>
jmp    1170 <skip_first+0x60>
jmp    115f <skip_first+0x4f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_first+0xc>
jmp    1175 <skip_first+0x65>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <white_space@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
je     11a3 <skip_first+0x93>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    11b3 <skip_first+0xa3>
jmp    11c9 <skip_first+0xb9>
jmp    11b8 <skip_first+0xa8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <skip_first+0x65>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_first>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <white_space@plt>
test   %rax,%rax
jne    1139 <skip_first+0x29>
cmpb   $0x0,(%rbx)
je     1139 <skip_first+0x29>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <skip_first+0x10>
movsbl (%rbx),%edi
nopl   0x0(%rax)
call   1030 <white_space@plt>
test   %rax,%rax
je     1159 <skip_first+0x49>
cmpb   $0x0,(%rbx)
je     1159 <skip_first+0x49>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1140 <skip_first+0x30>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_first(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @white_space(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i64 @white_space(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %5, label %14
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
%16 = load i8, i8* %15
%17 = tail call i64 @white_space(i8 signext %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %28, label %19
19: ; preds = %14, %23
%20 = phi i8* [ %24, %23 ], [ %15, %14 ]
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %28, label %23
23: ; preds = %19
%24 = getelementptr inbounds i8, i8* %20, i64 1
%25 = load i8, i8* %24
%26 = tail call i64 @white_space(i8 signext %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %19
28: ; preds = %19, %23, %14
%29 = phi i8* [ %15, %14 ], [ %24, %23 ], [ %20, %19 ]
ret i8* %29
}