#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 *);
scalar_t__ strncmp(char *, char *, int);
void unescape(char *str, char *output) {
  char *c = str;
  char *o = output;
  char *end = (str + strlen(str));
  while (c < end) {
    if (strncmp(c, "%20", 3) == 0) {
      *o = ' ';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%24", 3) == 0) {
      *o = '$';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%26", 3) == 0) {
      *o = '&';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%2B", 3) == 0) {
      *o = '+';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%2C", 3) == 0) {
      *o = ',';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%2F", 3) == 0) {
      *o = '/';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%3A", 3) == 0) {
      *o = ':';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%3B", 3) == 0) {
      *o = ';';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%3D", 3) == 0) {
      *o = '=';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%3F", 3) == 0) {
      *o = '?';
      c++;
      c++;
      o++;
    } else if (strncmp(c, "%40", 3) == 0) {
      *o = '@';
      c++;
      c++;
      o++;
    } else {
      *o = *c;
      o++;
    }
    c++;
  }
  *o = '\0';
}


x86 assembly (clang, -O0):
<unescape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    152f <unescape+0x40f>
mov    -0x18(%rbp),%rdi
lea    0xe86(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11be <unescape+0x9e>
mov    -0x20(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    151e <unescape+0x3fe>
mov    -0x18(%rbp),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    120d <unescape+0xed>
mov    -0x20(%rbp),%rax
movb   $0x24,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1519 <unescape+0x3f9>
mov    -0x18(%rbp),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    125c <unescape+0x13c>
mov    -0x20(%rbp),%rax
movb   $0x26,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1514 <unescape+0x3f4>
mov    -0x18(%rbp),%rdi
lea    0xda5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12ab <unescape+0x18b>
mov    -0x20(%rbp),%rax
movb   $0x2b,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    150f <unescape+0x3ef>
mov    -0x18(%rbp),%rdi
lea    0xd5a(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12fa <unescape+0x1da>
mov    -0x20(%rbp),%rax
movb   $0x2c,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    150a <unescape+0x3ea>
mov    -0x18(%rbp),%rdi
lea    0xd0f(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1349 <unescape+0x229>
mov    -0x20(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1505 <unescape+0x3e5>
mov    -0x18(%rbp),%rdi
lea    0xcc4(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1398 <unescape+0x278>
mov    -0x20(%rbp),%rax
movb   $0x3a,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1500 <unescape+0x3e0>
mov    -0x18(%rbp),%rdi
lea    0xc79(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13e7 <unescape+0x2c7>
mov    -0x20(%rbp),%rax
movb   $0x3b,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14fb <unescape+0x3db>
mov    -0x18(%rbp),%rdi
lea    0xc2e(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1436 <unescape+0x316>
mov    -0x20(%rbp),%rax
movb   $0x3d,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14f6 <unescape+0x3d6>
mov    -0x18(%rbp),%rdi
lea    0xbe3(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1485 <unescape+0x365>
mov    -0x20(%rbp),%rax
movb   $0x3f,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14f1 <unescape+0x3d1>
mov    -0x18(%rbp),%rdi
lea    0xb98(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14d4 <unescape+0x3b4>
mov    -0x20(%rbp),%rax
movb   $0x40,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14ec <unescape+0x3cc>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14f1 <unescape+0x3d1>
jmp    14f6 <unescape+0x3d6>
jmp    14fb <unescape+0x3db>
jmp    1500 <unescape+0x3e0>
jmp    1505 <unescape+0x3e5>
jmp    150a <unescape+0x3ea>
jmp    150f <unescape+0x3ef>
jmp    1514 <unescape+0x3f4>
jmp    1519 <unescape+0x3f9>
jmp    151e <unescape+0x3fe>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1161 <unescape+0x41>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unescape>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
test   %eax,%eax
jle    12f5 <unescape+0x1d5>
movslq %eax,%rbp
add    %rbx,%rbp
lea    0xeb5(%rip),%r15
lea    0xeb2(%rip),%r12
lea    0xeaf(%rip),%r13
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1290 <unescape+0x170>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12a0 <unescape+0x180>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12a6 <unescape+0x186>
mov    %rbx,%rdi
lea    0xe57(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12ac <unescape+0x18c>
mov    %rbx,%rdi
lea    0xe3e(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12b2 <unescape+0x192>
mov    %rbx,%rdi
lea    0xe25(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12b8 <unescape+0x198>
mov    %rbx,%rdi
lea    0xe0c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12be <unescape+0x19e>
mov    %rbx,%rdi
lea    0xdf3(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12c4 <unescape+0x1a4>
mov    %rbx,%rdi
lea    0xdda(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12ca <unescape+0x1aa>
mov    %rbx,%rdi
lea    0xdc5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12d0 <unescape+0x1b0>
mov    %rbx,%rdi
lea    0xdb0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12d6 <unescape+0x1b6>
movzbl (%rbx),%eax
mov    %al,(%r14)
jmp    12e4 <unescape+0x1c4>
nop
movb   $0x20,(%r14)
jmp    12e0 <unescape+0x1c0>
cs nopw 0x0(%rax,%rax,1)
movb   $0x24,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x26,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x2b,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x2c,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x2f,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x3a,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x3b,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x3d,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x3f,(%r14)
jmp    12e0 <unescape+0x1c0>
movb   $0x40,(%r14)
nopw   0x0(%rax,%rax,1)
add    $0x2,%rbx
add    $0x1,%r14
add    $0x1,%rbx
cmp    %rbp,%rbx
jb     1160 <unescape+0x40>
movb   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%20\00"
@.str.1 = [4 x i8] c"%24\00"
@.str.2 = [4 x i8] c"%26\00"
@.str.3 = [4 x i8] c"%2B\00"
@.str.4 = [4 x i8] c"%2C\00"
@.str.5 = [4 x i8] c"%2F\00"
@.str.6 = [4 x i8] c"%3A\00"
@.str.7 = [4 x i8] c"%3B\00"
@.str.8 = [4 x i8] c"%3D\00"
@.str.9 = [4 x i8] c"%3F\00"
@.str.10 = [4 x i8] c"%40\00"
define void @unescape(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
store i8* %8, i8** %5
%9 = load i8*, i8** %4
store i8* %9, i8** %6
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %10, i64 %13
store i8* %14, i8** %7
br label %15
15: ; preds = %167, %2
%16 = load i8*, i8** %5
%17 = load i8*, i8** %7
%18 = icmp ult i8* %16, %17
br i1 %18, label %19, label %170
19: ; preds = %15
%20 = load i8*, i8** %5
%21 = call i64 @strncmp(i8* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %31
23: ; preds = %19
%24 = load i8*, i8** %6
store i8 32, i8* %24
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %5
%27 = load i8*, i8** %5
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %5
%29 = load i8*, i8** %6
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %6
br label %167
31: ; preds = %19
%32 = load i8*, i8** %5
%33 = call i64 @strncmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %43
35: ; preds = %31
%36 = load i8*, i8** %6
store i8 36, i8* %36
%37 = load i8*, i8** %5
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %5
%39 = load i8*, i8** %5
%40 = getelementptr inbounds i8, i8* %39, i32 1
store i8* %40, i8** %5
%41 = load i8*, i8** %6
%42 = getelementptr inbounds i8, i8* %41, i32 1
store i8* %42, i8** %6
br label %166
43: ; preds = %31
%44 = load i8*, i8** %5
%45 = call i64 @strncmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %55
47: ; preds = %43
%48 = load i8*, i8** %6
store i8 38, i8* %48
%49 = load i8*, i8** %5
%50 = getelementptr inbounds i8, i8* %49, i32 1
store i8* %50, i8** %5
%51 = load i8*, i8** %5
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %5
%53 = load i8*, i8** %6
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %6
br label %165
55: ; preds = %43
%56 = load i8*, i8** %5
%57 = call i64 @strncmp(i8* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %55
%60 = load i8*, i8** %6
store i8 43, i8* %60
%61 = load i8*, i8** %5
%62 = getelementptr inbounds i8, i8* %61, i32 1
store i8* %62, i8** %5
%63 = load i8*, i8** %5
%64 = getelementptr inbounds i8, i8* %63, i32 1
store i8* %64, i8** %5
%65 = load i8*, i8** %6
%66 = getelementptr inbounds i8, i8* %65, i32 1
store i8* %66, i8** %6
br label %164
67: ; preds = %55
%68 = load i8*, i8** %5
%69 = call i64 @strncmp(i8* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %67
%72 = load i8*, i8** %6
store i8 44, i8* %72
%73 = load i8*, i8** %5
%74 = getelementptr inbounds i8, i8* %73, i32 1
store i8* %74, i8** %5
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i32 1
store i8* %76, i8** %5
%77 = load i8*, i8** %6
%78 = getelementptr inbounds i8, i8* %77, i32 1
store i8* %78, i8** %6
br label %163
79: ; preds = %67
%80 = load i8*, i8** %5
%81 = call i64 @strncmp(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %91
83: ; preds = %79
%84 = load i8*, i8** %6
store i8 47, i8* %84
%85 = load i8*, i8** %5
%86 = getelementptr inbounds i8, i8* %85, i32 1
store i8* %86, i8** %5
%87 = load i8*, i8** %5
%88 = getelementptr inbounds i8, i8* %87, i32 1
store i8* %88, i8** %5
%89 = load i8*, i8** %6
%90 = getelementptr inbounds i8, i8* %89, i32 1
store i8* %90, i8** %6
br label %162
91: ; preds = %79
%92 = load i8*, i8** %5
%93 = call i64 @strncmp(i8* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %103
95: ; preds = %91
%96 = load i8*, i8** %6
store i8 58, i8* %96
%97 = load i8*, i8** %5
%98 = getelementptr inbounds i8, i8* %97, i32 1
store i8* %98, i8** %5
%99 = load i8*, i8** %5
%100 = getelementptr inbounds i8, i8* %99, i32 1
store i8* %100, i8** %5
%101 = load i8*, i8** %6
%102 = getelementptr inbounds i8, i8* %101, i32 1
store i8* %102, i8** %6
br label %161
103: ; preds = %91
%104 = load i8*, i8** %5
%105 = call i64 @strncmp(i8* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%106 = icmp eq i64 %105, 0
br i1 %106, label %107, label %115
107: ; preds = %103
%108 = load i8*, i8** %6
store i8 59, i8* %108
%109 = load i8*, i8** %5
%110 = getelementptr inbounds i8, i8* %109, i32 1
store i8* %110, i8** %5
%111 = load i8*, i8** %5
%112 = getelementptr inbounds i8, i8* %111, i32 1
store i8* %112, i8** %5
%113 = load i8*, i8** %6
%114 = getelementptr inbounds i8, i8* %113, i32 1
store i8* %114, i8** %6
br label %160
115: ; preds = %103
%116 = load i8*, i8** %5
%117 = call i64 @strncmp(i8* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%118 = icmp eq i64 %117, 0
br i1 %118, label %119, label %127
119: ; preds = %115
%120 = load i8*, i8** %6
store i8 61, i8* %120
%121 = load i8*, i8** %5
%122 = getelementptr inbounds i8, i8* %121, i32 1
store i8* %122, i8** %5
%123 = load i8*, i8** %5
%124 = getelementptr inbounds i8, i8* %123, i32 1
store i8* %124, i8** %5
%125 = load i8*, i8** %6
%126 = getelementptr inbounds i8, i8* %125, i32 1
store i8* %126, i8** %6
br label %159
127: ; preds = %115
%128 = load i8*, i8** %5
%129 = call i64 @strncmp(i8* %128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%130 = icmp eq i64 %129, 0
br i1 %130, label %131, label %139
131: ; preds = %127
%132 = load i8*, i8** %6
store i8 63, i8* %132
%133 = load i8*, i8** %5
%134 = getelementptr inbounds i8, i8* %133, i32 1
store i8* %134, i8** %5
%135 = load i8*, i8** %5
%136 = getelementptr inbounds i8, i8* %135, i32 1
store i8* %136, i8** %5
%137 = load i8*, i8** %6
%138 = getelementptr inbounds i8, i8* %137, i32 1
store i8* %138, i8** %6
br label %158
139: ; preds = %127
%140 = load i8*, i8** %5
%141 = call i64 @strncmp(i8* %140, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%142 = icmp eq i64 %141, 0
br i1 %142, label %143, label %151
143: ; preds = %139
%144 = load i8*, i8** %6
store i8 64, i8* %144
%145 = load i8*, i8** %5
%146 = getelementptr inbounds i8, i8* %145, i32 1
store i8* %146, i8** %5
%147 = load i8*, i8** %5
%148 = getelementptr inbounds i8, i8* %147, i32 1
store i8* %148, i8** %5
%149 = load i8*, i8** %6
%150 = getelementptr inbounds i8, i8* %149, i32 1
store i8* %150, i8** %6
br label %157
151: ; preds = %139
%152 = load i8*, i8** %5
%153 = load i8, i8* %152
%154 = load i8*, i8** %6
store i8 %153, i8* %154
%155 = load i8*, i8** %6
%156 = getelementptr inbounds i8, i8* %155, i32 1
store i8* %156, i8** %6
br label %157
157: ; preds = %151, %143
br label %158
158: ; preds = %157, %131
br label %159
159: ; preds = %158, %119
br label %160
160: ; preds = %159, %107
br label %161
161: ; preds = %160, %95
br label %162
162: ; preds = %161, %83
br label %163
163: ; preds = %162, %71
br label %164
164: ; preds = %163, %59
br label %165
165: ; preds = %164, %47
br label %166
166: ; preds = %165, %35
br label %167
167: ; preds = %166, %23
%168 = load i8*, i8** %5
%169 = getelementptr inbounds i8, i8* %168, i32 1
store i8* %169, i8** %5
br label %15
170: ; preds = %15
%171 = load i8*, i8** %6
store i8 0, i8* %171
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%20\00"
@.str.1 = [4 x i8] c"%24\00"
@.str.2 = [4 x i8] c"%26\00"
@.str.3 = [4 x i8] c"%2B\00"
@.str.4 = [4 x i8] c"%2C\00"
@.str.5 = [4 x i8] c"%2F\00"
@.str.6 = [4 x i8] c"%3A\00"
@.str.7 = [4 x i8] c"%3B\00"
@.str.8 = [4 x i8] c"%3D\00"
@.str.9 = [4 x i8] c"%3F\00"
@.str.10 = [4 x i8] c"%40\00"
define void @unescape(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = icmp sgt i32 %3, 0
br i1 %6, label %7, label %71
7: ; preds = %2, %66
%8 = phi i8* [ %69, %66 ], [ %0, %2 ]
%9 = phi i8* [ %68, %66 ], [ %1, %2 ]
%10 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
store i8 32, i8* %9
%13 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
14: ; preds = %7
%15 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
store i8 36, i8* %9
%18 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
19: ; preds = %14
%20 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
store i8 38, i8* %9
%23 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
24: ; preds = %19
%25 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
store i8 43, i8* %9
%28 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
29: ; preds = %24
%30 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
store i8 44, i8* %9
%33 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
34: ; preds = %29
%35 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
store i8 47, i8* %9
%38 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
39: ; preds = %34
%40 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
store i8 58, i8* %9
%43 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
44: ; preds = %39
%45 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44
store i8 59, i8* %9
%48 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
49: ; preds = %44
%50 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %49
store i8 61, i8* %9
%53 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
54: ; preds = %49
%55 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %54
store i8 63, i8* %9
%58 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
59: ; preds = %54
%60 = tail call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
store i8 64, i8* %9
%63 = getelementptr inbounds i8, i8* %8, i64 2
br label %66
64: ; preds = %59
%65 = load i8, i8* %8
store i8 %65, i8* %9
br label %66
66: ; preds = %17, %27, %37, %47, %57, %64, %62, %52, %42, %32, %22, %12
%67 = phi i8* [ %13, %12 ], [ %18, %17 ], [ %23, %22 ], [ %28, %27 ], [ %33, %32 ], [ %38, %37 ], [ %43, %42 ], [ %48, %47 ], [ %53, %52 ], [ %58, %57 ], [ %63, %62 ], [ %8, %64 ]
%68 = getelementptr inbounds i8, i8* %9, i64 1
%69 = getelementptr inbounds i8, i8* %67, i64 1
%70 = icmp ult i8* %69, %5
br i1 %70, label %7, label %71
71: ; preds = %66, %2
%72 = phi i8* [ %1, %2 ], [ %68, %66 ]
store i8 0, i8* %72
ret void
}