#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 */
void cpintern_parseutil_string_ds(void *const src_, char *restrict tgt,
                                  size_t const length) {
  char const *restrict src = src_;
  char *const stop = tgt + length;
  do {
    *tgt++ = *src;
    if (*src == '\'')
      src += 2u;
    else
      ++src;
  } while (tgt < stop);
}


x86 assembly (clang, -O0):
<cpintern_parseutil_string_ds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    115c <cpintern_parseutil_string_ds+0x5c>
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1168 <cpintern_parseutil_string_ds+0x68>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    116d <cpintern_parseutil_string_ds+0x6d>
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jb     1124 <cpintern_parseutil_string_ds+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpintern_parseutil_string_ds>:
add    %rsi,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi),%eax
mov    %al,(%rsi)
add    $0x1,%rsi
xor    %ecx,%ecx
cmp    $0x27,%al
sete   %cl
add    %rcx,%rdi
add    $0x1,%rdi
cmp    %rdx,%rsi
jb     1110 <cpintern_parseutil_string_ds+0x10>
ret

LLVM IR (-O0):
define void @cpintern_parseutil_string_ds(i8* %0, i8* noalias %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %8
br label %13
13: ; preds = %29, %3
%14 = load i8*, i8** %7
%15 = load i8, i8* %14
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %5
store i8 %15, i8* %16
%18 = load i8*, i8** %7
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 39
br i1 %21, label %22, label %25
22: ; preds = %13
%23 = load i8*, i8** %7
%24 = getelementptr inbounds i8, i8* %23, i64 2
store i8* %24, i8** %7
br label %28
25: ; preds = %13
%26 = load i8*, i8** %7
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %7
br label %28
28: ; preds = %25, %22
br label %29
29: ; preds = %28
%30 = load i8*, i8** %5
%31 = load i8*, i8** %8
%32 = icmp ult i8* %30, %31
br i1 %32, label %13, label %33
33: ; preds = %29
ret void
}

LLVM IR (-O2):
define void @cpintern_parseutil_string_ds(i8* nocapture %0, i8* noalias writeonly %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %1, i64 %2
br label %5
5: ; preds = %5, %3
%6 = phi i8* [ %0, %3 ], [ %12, %5 ]
%7 = phi i8* [ %1, %3 ], [ %9, %5 ]
%8 = load i8, i8* %6
%9 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %8, i8* %7
%10 = icmp eq i8 %8, 39
%11 = select i1 %10, i64 2, i64 1
%12 = getelementptr inbounds i8, i8* %6, i64 %11
%13 = icmp ult i8* %9, %4
br i1 %13, label %5, label %14
14: ; preds = %5
ret void
}