#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*/ Log(char *, char *);
int /*<<< orphan*/ SkipSpaces(char **);
void SkipQuotes(char **s) {
  char *t;
  SkipSpaces(s);
  if (**s == '\"') {
    (*s)++;
    t = *s;
    while (*t != '\0' && *t != '\"')
      t++;
    if (*t != '\"')
      Log("SkipQuotes: Mismatched double-quote in '%s'\n", *s);
    *t = '\0';
  } else {
    Log("SkipQuuotes: Expected double-quote in '%s'", *s);
  }
}


x86 assembly (clang, -O0):
<SkipQuotes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SkipSpaces@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    11d6 <SkipQuotes+0xb6>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1186 <SkipQuotes+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1196 <SkipQuotes+0x76>
jmp    11a7 <SkipQuotes+0x87>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1161 <SkipQuotes+0x41>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
je     11ca <SkipQuotes+0xaa>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xe3b(%rip),%rdi
call   1030 <Log@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    11e9 <SkipQuotes+0xc9>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xe49(%rip),%rdi
call   1030 <Log@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipQuotes>:
push   %rbx
mov    %rdi,%rbx
call   1040 <SkipSpaces@plt>
mov    (%rbx),%rsi
cmpb   $0x22,(%rsi)
jne    1151 <SkipQuotes+0x31>
add    $0x1,%rsi
mov    %rsi,(%rbx)
mov    %rsi,%rbx
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
test   %al,%al
je     115e <SkipQuotes+0x3e>
cmp    $0x22,%al
je     116a <SkipQuotes+0x4a>
add    $0x1,%rbx
jmp    1140 <SkipQuotes+0x20>
lea    0xed5(%rip),%rdi
pop    %rbx
jmp    1030 <Log@plt>
lea    0xe9b(%rip),%rdi
call   1030 <Log@plt>
movb   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"SkipQuotes: Mismatched double-quote in '%s'\0A\00"
@.str.1 = [43 x i8] c"SkipQuuotes: Expected double-quote in '%s'\00"
define void @SkipQuotes(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 @SkipSpaces(i8** %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 34
br i1 %10, label %11, label %43
11: ; preds = %1
%12 = load i8**, i8*** %2
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %12
%15 = load i8**, i8*** %2
%16 = load i8*, i8** %15
store i8* %16, i8** %3
br label %17
17: ; preds = %29, %11
%18 = load i8*, i8** %3
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 34
br label %27
27: ; preds = %22, %17
%28 = phi i1 [ false, %17 ], [ %26, %22 ]
br i1 %28, label %29, label %32
29: ; preds = %27
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %3
br label %17
32: ; preds = %27
%33 = load i8*, i8** %3
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 34
br i1 %36, label %37, label %41
37: ; preds = %32
%38 = load i8**, i8*** %2
%39 = load i8*, i8** %38
%40 = call i32 @Log(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %39)
br label %41
41: ; preds = %37, %32
%42 = load i8*, i8** %3
store i8 0, i8* %42
br label %47
43: ; preds = %1
%44 = load i8**, i8*** %2
%45 = load i8*, i8** %44
%46 = call i32 @Log(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %43, %41
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"SkipQuotes: Mismatched double-quote in '%s'\0A\00"
@.str.1 = [43 x i8] c"SkipQuuotes: Expected double-quote in '%s'\00"
define void @SkipQuotes(i8** %0) {
%2 = tail call i32 @SkipSpaces(i8** %0)
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 34
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %0
br label %8
8: ; preds = %11, %6
%9 = phi i8* [ %7, %6 ], [ %12, %11 ]
%10 = load i8, i8* %9
switch i8 %10, label %11 [
i8 34, label %15
i8 0, label %13
]
11: ; preds = %8
%12 = getelementptr inbounds i8, i8* %9, i64 1
br label %8
13: ; preds = %8
%14 = tail call i32 @Log(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %15
15: ; preds = %8, %13
store i8 0, i8* %9
br label %18
16: ; preds = %1
%17 = tail call i32 @Log(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %3)
br label %18
18: ; preds = %16, %15
ret void
}