#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 strlen(char *);
int strspn(char *, char *);
void skipWhitespace(char **s) {
  char *e;
  e = *s + strspn(*s, " \n\t\r\v");
  if (e) {
    *s = e;
    return;
  }
  *s = *s + strlen(*s);
}


x86 assembly (clang, -O0):
<skipWhitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xebb(%rip),%rsi
call   1040 <strspn@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1175 <skipWhitespace+0x55>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    119c <skipWhitespace+0x7c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rcx
cltq
add    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWhitespace>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
test   %rbx,%rbx
je     1140 <skipWhitespace+0x20>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strspn@plt>
jmp    1147 <skipWhitespace+0x27>
xor    %edi,%edi
call   1030 <strlen@plt>
cltq
add    %rax,%rbx
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c" \0A\09\0D\0B\00"
define void @skipWhitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strspn(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @strlen(i8* null)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %7, %6 ], [ %5, %4 ]
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %2, i64 %10
store i8* %11, i8** %0
ret void
}