#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 strcspn(char *, char const *);
int strspn(char *, char const *);
char *skip_quoted(char **buf, const char *delimiters, const char *whitespace) {
  char *p, *begin_word, *end_word, *end_whitespace;
  begin_word = *buf;
  end_word = begin_word + strcspn(begin_word, delimiters);
  if (*end_word == '\0') {
    *buf = end_word;
  } else {
    end_whitespace = end_word + 1 + strspn(end_word + 1, whitespace);
    for (p = end_word; p < end_whitespace; p++) {
      *p = '\0';
    }
    *buf = end_whitespace;
  }
  return begin_word;
}


x86 assembly (clang, -O0):
<skip_quoted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcspn@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1184 <skip_quoted+0x64>
mov    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    11ea <skip_quoted+0xca>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x38(%rbp),%rax
jae    11df <skip_quoted+0xbf>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11b9 <skip_quoted+0x99>
mov    -0x38(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_quoted>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rdi,%r14
mov    (%rdi),%r15
mov    %r15,%rdi
call   1050 <strcspn@plt>
cltq
lea    (%r15,%rax,1),%rbx
cmpb   $0x0,(%r15,%rax,1)
je     1182 <skip_quoted+0x52>
lea    0x1(%rbx),%rdi
mov    %r12,%rsi
call   1040 <strspn@plt>
movslq %eax,%rdx
lea    (%rbx,%rdx,1),%r12
add    $0x1,%r12
cmp    %r12,%rbx
jae    1185 <skip_quoted+0x55>
add    $0x1,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
jmp    1185 <skip_quoted+0x55>
mov    %rbx,%r12
mov    %r12,(%r14)
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @skip_quoted(i8** %0, i8* %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = load i8*, i8** %8
%15 = load i8*, i8** %5
%16 = call i32 @strcspn(i8* %14, i8* %15)
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %13, i64 %17
store i8* %18, i8** %9
%19 = load i8*, i8** %9
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %3
%24 = load i8*, i8** %9
%25 = load i8**, i8*** %4
store i8* %24, i8** %25
br label %48
26: ; preds = %3
%27 = load i8*, i8** %9
%28 = getelementptr inbounds i8, i8* %27, i64 1
%29 = load i8*, i8** %9
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8*, i8** %6
%32 = call i32 @strspn(i8* %30, i8* %31)
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %28, i64 %33
store i8* %34, i8** %10
%35 = load i8*, i8** %9
store i8* %35, i8** %7
br label %36
36: ; preds = %42, %26
%37 = load i8*, i8** %7
%38 = load i8*, i8** %10
%39 = icmp ult i8* %37, %38
br i1 %39, label %40, label %45
40: ; preds = %36
%41 = load i8*, i8** %7
store i8 0, i8* %41
br label %42
42: ; preds = %40
%43 = load i8*, i8** %7
%44 = getelementptr inbounds i8, i8* %43, i32 1
store i8* %44, i8** %7
br label %36
45: ; preds = %36
%46 = load i8*, i8** %10
%47 = load i8**, i8*** %4
store i8* %46, i8** %47
br label %48
48: ; preds = %45, %23
%49 = load i8*, i8** %8
ret i8* %49
}

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