#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 strlen(char *);
void suppress_quotes(char *string) {
  int l;
  int i;
  l = strlen(string);
  if (l >= 2) {
    if ((string[0] == '"') && (string[l - 1] == '"')) {
      for (i = 0; i < l - 2; i++) {
        string[i] = string[i + 1];
      }
      string[l - 2] = '\0';
    }
  }
}


x86 assembly (clang, -O0):
<suppress_quotes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jl     11b3 <suppress_quotes+0xa3>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    11ae <suppress_quotes+0x9e>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x22,%eax
jne    11ae <suppress_quotes+0x9e>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    119d <suppress_quotes+0x8d>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1163 <suppress_quotes+0x53>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    11b3 <suppress_quotes+0xa3>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suppress_quotes>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     115e <suppress_quotes+0x3e>
cmpb   $0x22,(%rbx)
jne    115e <suppress_quotes+0x3e>
lea    -0x1(%rax),%ecx
cmpb   $0x22,(%rbx,%rcx,1)
jne    115e <suppress_quotes+0x3e>
lea    -0x2(%rax),%ecx
mov    %ecx,%r14d
cmp    $0x3,%eax
jb     1159 <suppress_quotes+0x39>
lea    0x1(%rbx),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <memmove@plt>
movb   $0x0,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @suppress_quotes(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %22
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 34
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = add nsw i32 %2, -1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 34
br i1 %12, label %13, label %22
13: ; preds = %7
%14 = add nsw i32 %2, -2
%15 = icmp ugt i32 %2, 2
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = getelementptr i8, i8* %0, i64 1
%18 = zext i32 %14 to i64
br label %19
19: ; preds = %16, %13
%20 = zext i32 %14 to i64
%21 = getelementptr inbounds i8, i8* %0, i64 %20
store i8 0, i8* %21
br label %22
22: ; preds = %4, %7, %19, %1
ret void
}