#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*/ isspace(char const);
char *next_token(char const *);
char *skip_token(const char *p) {
  p = next_token(p);
  while (*p && !isspace(*p))
    p++;
  p = next_token(p);
  return (char *)p;
}


x86 assembly (clang, -O0):
<skip_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <next_token@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1165 <skip_token+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1175 <skip_token+0x55>
jmp    1186 <skip_token+0x66>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1139 <skip_token+0x19>
mov    -0x8(%rbp),%rdi
call   1040 <next_token@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_token>:
push   %rbx
call   1040 <next_token@plt>
mov    %rax,%rbx
mov    (%rax),%al
test   %al,%al
je     1148 <skip_token+0x28>
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1148 <skip_token+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <skip_token+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <next_token@plt>

LLVM IR (-O0):
define i8* @skip_token(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @next_token(i8* %3)
store i8* %4, i8** %2
br label %5
5: ; preds = %18, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = call i32 @isspace(i8 signext %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
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 %5
21: ; preds = %16
%22 = load i8*, i8** %2
%23 = call i8* @next_token(i8* %22)
store i8* %23, i8** %2
%24 = load i8*, i8** %2
ret i8* %24
}

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