#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 */
scalar_t__ strchr(char *, char);
char *skipString(char *p) {
  if (strchr("\"\'", *p)) {
    ++p;
    while (!strchr("\"\'", *p))
      if (*p == '\\') {
        if (p[1])
          ++p;
      } else
        ++p;
    if (*p)
      ++p;
  }
  return p;
}


x86 assembly (clang, -O0):
<skipString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xed9(%rip),%rdi
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11cc <skipString+0xbc>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xeb0(%rip),%rdi
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    116e <skipString+0x5e>
jmp    11ae <skipString+0x9e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    119d <skipString+0x8d>
mov    -0x8(%rbp),%rax
cmpb   $0x0,0x1(%rax)
je     1198 <skipString+0x88>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11a9 <skipString+0x99>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1145 <skipString+0x35>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     11c7 <skipString+0xb7>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11cc <skipString+0xbc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipString>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
movsbl (%rdi),%esi
lea    0xede(%rip),%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     1153 <skipString+0x43>
movsbl 0x1(%r15),%esi
add    $0x1,%r15
lea    0xec4(%rip),%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     115c <skipString+0x4c>
mov    %r15,%rbx
cmpb   $0x1,(%rbx)
sbb    $0xffffffffffffffff,%rbx
mov    %rbx,%r15
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xe9d(%rip),%r14
jmp    1183 <skipString+0x73>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rbx
movsbl (%rbx),%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1149 <skipString+0x39>
lea    0x1(%r15),%rbx
cmpb   $0x5c,(%r15)
jne    11a0 <skipString+0x90>
cmpb   $0x0,0x1(%r15)
je     1170 <skipString+0x60>
mov    %rbx,%r15
jmp    1170 <skipString+0x60>
nopl   0x0(%rax)
mov    %rbx,%r15
jmp    1173 <skipString+0x63>

LLVM IR (-O0):
@.str = [3 x i8] c"\22'\00"
define i8* @skipString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call i64 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %42
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
br label %10
10: ; preds = %33, %7
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = call i64 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %12)
%14 = icmp ne i64 %13, 0
%15 = xor i1 %14, true
br i1 %15, label %16, label %34
16: ; preds = %10
%17 = load i8*, i8** %2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 92
br i1 %20, label %21, label %30
21: ; preds = %16
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = load i8, i8* %23
%25 = icmp ne i8 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %21
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %2
br label %29
29: ; preds = %26, %21
br label %33
30: ; preds = %16
%31 = load i8*, i8** %2
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %2
br label %33
33: ; preds = %30, %29
br label %10
34: ; preds = %10
%35 = load i8*, i8** %2
%36 = load i8, i8* %35
%37 = icmp ne i8 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %34
%39 = load i8*, i8** %2
%40 = getelementptr inbounds i8, i8* %39, i32 1
store i8* %40, i8** %2
br label %41
41: ; preds = %38, %34
br label %42
42: ; preds = %41, %1
%43 = load i8*, i8** %2
ret i8* %43
}

LLVM IR (-O2):
@.str = [3 x i8] c"\22'\00"
define i8* @skipString(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %30, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = tail call i64 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %5, %19
%11 = phi i8* [ %20, %19 ], [ %6, %5 ]
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 92
%14 = getelementptr inbounds i8, i8* %11, i64 1
br i1 %13, label %15, label %19
15: ; preds = %10
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
%18 = select i1 %17, i8* %11, i8* %14
br label %19
19: ; preds = %10, %15
%20 = phi i8* [ %18, %15 ], [ %14, %10 ]
%21 = load i8, i8* %20
%22 = tail call i64 @strchr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %21)
%23 = icmp eq i64 %22, 0
br i1 %23, label %10, label %24
24: ; preds = %19, %5
%25 = phi i8* [ %6, %5 ], [ %20, %19 ]
%26 = load i8, i8* %25
%27 = icmp ne i8 %26, 0
%28 = zext i1 %27 to i64
%29 = getelementptr i8, i8* %25, i64 %28
br label %30
30: ; preds = %24, %1
%31 = phi i8* [ %0, %1 ], [ %29, %24 ]
ret i8* %31
}