#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*/ memmove(char *, char *, size_t);
size_t strlen(char *);
char *strrchr(char *, char);
void RemoveQuotationMarks(char *String) {
  size_t strLen;
  char *endQMark;
  if (String[0] != '\'')
    return;
  strLen = strlen(String);
  memmove(String, String + 1, strLen);
  endQMark = strrchr(String, '\'');
  if (endQMark != NULL)
    *endQMark = '\0';
  return;
}


x86 assembly (clang, -O0):
<RemoveQuotationMarks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
je     1151 <RemoveQuotationMarks+0x21>
jmp    119c <RemoveQuotationMarks+0x6c>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1,%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memmove@plt>
mov    -0x8(%rbp),%rdi
mov    $0x27,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1197 <RemoveQuotationMarks+0x67>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
jmp    119c <RemoveQuotationMarks+0x6c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveQuotationMarks>:
push   %rbx
cmpb   $0x27,(%rdi)
jne    1162 <RemoveQuotationMarks+0x32>
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rbx),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <memmove@plt>
mov    %rbx,%rdi
mov    $0x27,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1162 <RemoveQuotationMarks+0x32>
movb   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @RemoveQuotationMarks(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 39
br i1 %9, label %10, label %11
10: ; preds = %1
br label %26
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i64 @strlen(i8* %12)
store i64 %13, i64* %3
%14 = load i8*, i8** %2
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i64, i64* %3
%18 = call i32 @memmove(i8* %14, i8* %16, i64 %17)
%19 = load i8*, i8** %2
%20 = call i8* @strrchr(i8* %19, i8 signext 39)
store i8* %20, i8** %4
%21 = load i8*, i8** %4
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %25
23: ; preds = %11
%24 = load i8*, i8** %4
store i8 0, i8* %24
br label %25
25: ; preds = %23, %11
br label %26
26: ; preds = %25, %10
ret void
}

LLVM IR (-O2):
define void @RemoveQuotationMarks(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 39
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @strlen(i8* %0)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = tail call i32 @memmove(i8* %0, i8* %6, i64 %5)
%8 = tail call i8* @strrchr(i8* %0, i8 signext 39)
%9 = icmp eq i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %4
store i8 0, i8* %8
br label %11
11: ; preds = %4, %10, %1
ret void
}