#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 const *, char const);
const char *stripQualifiersAndComments(const char *decl) {
  static const char *qualifiersAndComments = "nNoOrRV\"";
  while (*decl != 0 && strchr(qualifiersAndComments, *decl)) {
    if (*decl == '"') {
      decl++;
      while (*decl++ != '"')
        ;
    } else {
      decl++;
    }
  }
  return decl;
}


x86 assembly (clang, -O0):
<stripQualifiersAndComments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     114e <stripQualifiersAndComments+0x3e>
mov    0x2ef0(%rip),%rdi
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115e <stripQualifiersAndComments+0x4e>
jmp    11b0 <stripQualifiersAndComments+0xa0>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    119f <stripQualifiersAndComments+0x8f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x22,%eax
je     119a <stripQualifiersAndComments+0x8a>
jmp    117a <stripQualifiersAndComments+0x6a>
jmp    11ab <stripQualifiersAndComments+0x9b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <stripQualifiersAndComments+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripQualifiersAndComments>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     116e <stripQualifiersAndComments+0x5e>
lea    0xedc(%rip),%r14
jmp    1139 <stripQualifiersAndComments+0x29>
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%rbx
mov    (%rbx),%al
test   %al,%al
je     116e <stripQualifiersAndComments+0x5e>
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     116e <stripQualifiersAndComments+0x5e>
lea    0x1(%rbx),%rax
cmpb   $0x22,(%rbx)
jne    1130 <stripQualifiersAndComments+0x20>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rax),%rbx
cmpb   $0x22,(%rax)
mov    %rbx,%rax
jne    1160 <stripQualifiersAndComments+0x50>
jmp    1133 <stripQualifiersAndComments+0x23>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"nNoOrRV\22\00"
define i8* @stripQualifiersAndComments(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %22, label %4
4: ; preds = %1, %18
%5 = phi i8 [ %20, %18 ], [ %2, %1 ]
%6 = phi i8* [ %19, %18 ], [ %0, %1 ]
%7 = tail call i64 @strchr(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %22, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = icmp eq i8 %10, 34
%12 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %11, label %13, label %18
13: ; preds = %9, %13
%14 = phi i8* [ %15, %13 ], [ %12, %9 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 34
br i1 %17, label %18, label %13
18: ; preds = %13, %9
%19 = phi i8* [ %12, %9 ], [ %15, %13 ]
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 0
br i1 %21, label %22, label %4
22: ; preds = %4, %18, %1
%23 = phi i8* [ %0, %1 ], [ %19, %18 ], [ %6, %4 ]
ret i8* %23
}