#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 */
char *nextWord(char **);
int /*<<< orphan*/ parseQuotedString(char *, char *, char **);
char *skipLeadingSpaces(char *);
char *nextQuotedWord(char **pLine) {
  char *line, c;
  line = skipLeadingSpaces(*pLine);
  if (line == NULL || line[0] == 0)
    return NULL;
  c = *line;
  if (c == '"' || c == '\'') {
    if (!parseQuotedString(line, line, pLine))
      return NULL;
    return line;
  } else {
    return nextWord(pLine);
  }
}


x86 assembly (clang, -O0):
<nextQuotedWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <skipLeadingSpaces@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1167 <nextQuotedWord+0x37>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1174 <nextQuotedWord+0x44>
movq   $0x0,-0x8(%rbp)
jmp    11d8 <nextQuotedWord+0xa8>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x22,%eax
je     1197 <nextQuotedWord+0x67>
movsbl -0x19(%rbp),%eax
cmp    $0x27,%eax
jne    11cb <nextQuotedWord+0x9b>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <parseQuotedString@plt>
cmp    $0x0,%eax
jne    11be <nextQuotedWord+0x8e>
movq   $0x0,-0x8(%rbp)
jmp    11d8 <nextQuotedWord+0xa8>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11d8 <nextQuotedWord+0xa8>
mov    -0x10(%rbp),%rdi
call   1050 <nextWord@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextQuotedWord>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1030 <skipLeadingSpaces@plt>
test   %rax,%rax
je     116d <nextQuotedWord+0x3d>
mov    %rax,%rbx
mov    (%rax),%al
test   %al,%al
je     116d <nextQuotedWord+0x3d>
cmp    $0x27,%al
je     1155 <nextQuotedWord+0x25>
cmp    $0x22,%al
jne    117a <nextQuotedWord+0x4a>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <parseQuotedString@plt>
xor    %ecx,%ecx
test   %eax,%eax
cmove  %rcx,%rbx
jmp    116f <nextQuotedWord+0x3f>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <nextWord@plt>

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

LLVM IR (-O2):
define i8* @nextQuotedWord(i8** %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @skipLeadingSpaces(i8* %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = load i8, i8* %3
switch i8 %6, label %11 [
i8 0, label %13
i8 39, label %7
i8 34, label %7
]
7: ; preds = %5, %5
%8 = tail call i32 @parseQuotedString(i8* %3, i8* %3, i8** %0)
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8* null, i8* %3
br label %13
11: ; preds = %5
%12 = tail call i8* @nextWord(i8** %0)
br label %13
13: ; preds = %5, %7, %1, %11
%14 = phi i8* [ %12, %11 ], [ null, %5 ], [ null, %1 ], [ %10, %7 ]
ret i8* %14
}