#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__ strtoul(char *, char **, int);
char charDecode_C_Escape(char *s, char **se) {
  char c, *se2;
  if (*s != '\\') {
    c = *s;
  } else {
    switch (*(++s)) {
    case 'a':
      c = '\a';
      break;
    case 'b':
      c = '\b';
      break;
    case 'f':
      c = '\f';
      break;
    case 'n':
      c = '\n';
      break;
    case 'r':
      c = '\r';
      break;
    case 't':
      c = '\t';
      break;
    case 'v':
      c = '\v';
      break;
    case 'x':
      c = (char)strtoul(++s, &se2, 16);
      s = --se2;
      break;
    case '0':
      c = (char)strtoul(s, &se2, 8);
      s = --se2;
      break;
    case '\0':
      s--;
    default:
      c = *s;
      break;
    }
  }
  if (se)
    *se = s + 1;
  return c;
}


x86 assembly (clang, -O0):
<charDecode_C_Escape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     113e <charDecode_C_Escape+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
jmp    12af <charDecode_C_Escape+0x19f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl 0x1(%rax),%eax
mov    %eax,-0x24(%rbp)
test   %eax,%eax
je     1295 <charDecode_C_Escape+0x185>
jmp    1161 <charDecode_C_Escape+0x51>
mov    -0x24(%rbp),%eax
sub    $0x30,%eax
je     126b <charDecode_C_Escape+0x15b>
jmp    1172 <charDecode_C_Escape+0x62>
mov    -0x24(%rbp),%eax
sub    $0x61,%eax
je     11fa <charDecode_C_Escape+0xea>
jmp    1183 <charDecode_C_Escape+0x73>
mov    -0x24(%rbp),%eax
sub    $0x62,%eax
je     1203 <charDecode_C_Escape+0xf3>
jmp    1194 <charDecode_C_Escape+0x84>
mov    -0x24(%rbp),%eax
sub    $0x66,%eax
je     120c <charDecode_C_Escape+0xfc>
jmp    11a5 <charDecode_C_Escape+0x95>
mov    -0x24(%rbp),%eax
sub    $0x6e,%eax
je     1215 <charDecode_C_Escape+0x105>
jmp    11b6 <charDecode_C_Escape+0xa6>
mov    -0x24(%rbp),%eax
sub    $0x72,%eax
je     121e <charDecode_C_Escape+0x10e>
jmp    11c7 <charDecode_C_Escape+0xb7>
mov    -0x24(%rbp),%eax
sub    $0x74,%eax
je     1227 <charDecode_C_Escape+0x117>
jmp    11d8 <charDecode_C_Escape+0xc8>
mov    -0x24(%rbp),%eax
sub    $0x76,%eax
je     1230 <charDecode_C_Escape+0x120>
jmp    11e9 <charDecode_C_Escape+0xd9>
mov    -0x24(%rbp),%eax
sub    $0x78,%eax
je     1239 <charDecode_C_Escape+0x129>
jmp    12a1 <charDecode_C_Escape+0x191>
movb   $0x7,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0x8,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0xc,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0xa,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0xd,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0x9,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
movb   $0xb,-0x11(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x10,%edx
call   1030 <strtoul@plt>
mov    %al,-0x11(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    %rax,-0x8(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strtoul@plt>
mov    %al,-0x11(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    %rax,-0x8(%rbp)
jmp    12aa <charDecode_C_Escape+0x19a>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
jmp    12af <charDecode_C_Escape+0x19f>
cmpq   $0x0,-0x10(%rbp)
je     12c9 <charDecode_C_Escape+0x1b9>
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movsbl -0x11(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charDecode_C_Escape>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rcx
mov    (%rdi),%al
cmp    $0x5c,%al
jne    114e <charDecode_C_Escape+0x3e>
lea    0x1(%rcx),%rdi
mov    0x1(%rcx),%dl
movsbl %dl,%eax
lea    -0x30(%rax),%esi
cmp    $0x48,%esi
ja     1165 <charDecode_C_Escape+0x55>
mov    $0x7,%al
lea    0xec5(%rip),%rbx
movslq (%rbx,%rsi,4),%rsi
add    %rbx,%rsi
jmp    *%rsi
mov    %rsp,%rsi
mov    $0x8,%edx
jmp    1199 <charDecode_C_Escape+0x89>
mov    %rcx,%rdi
test   %r14,%r14
je     115d <charDecode_C_Escape+0x4d>
add    $0x1,%rdi
mov    %rdi,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
test   %eax,%eax
jne    116e <charDecode_C_Escape+0x5e>
mov    $0x5c,%dl
mov    %rcx,%rdi
mov    %edx,%eax
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0x8,%al
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0xc,%al
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0xa,%al
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0xd,%al
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0x9,%al
jmp    1151 <charDecode_C_Escape+0x41>
mov    $0xb,%al
jmp    1151 <charDecode_C_Escape+0x41>
add    $0x2,%rcx
mov    %rsp,%rsi
mov    %rcx,%rdi
mov    $0x10,%edx
call   1030 <strtoul@plt>
mov    (%rsp),%rdi
add    $0xffffffffffffffff,%rdi
jmp    1151 <charDecode_C_Escape+0x41>

LLVM IR (-O0):
define signext i8 @charDecode_C_Escape(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i8*
store i8* %0, i8** %3
store i8** %1, i8*** %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 92
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
store i8 %13, i8* %5
br label %46
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
switch i32 %18, label %42 [
i32 97, label %19
i32 98, label %20
i32 102, label %21
i32 110, label %22
i32 114, label %23
i32 116, label %24
i32 118, label %25
i32 120, label %26
i32 48, label %33
i32 0, label %39
]
19: ; preds = %14
store i8 7, i8* %5
br label %45
20: ; preds = %14
store i8 8, i8* %5
br label %45
21: ; preds = %14
store i8 12, i8* %5
br label %45
22: ; preds = %14
store i8 10, i8* %5
br label %45
23: ; preds = %14
store i8 13, i8* %5
br label %45
24: ; preds = %14
store i8 9, i8* %5
br label %45
25: ; preds = %14
store i8 11, i8* %5
br label %45
26: ; preds = %14
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
%29 = call i64 @strtoul(i8* %28, i8** %6, i32 16)
%30 = trunc i64 %29 to i8
store i8 %30, i8* %5
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i32 -1
store i8* %32, i8** %6
store i8* %32, i8** %3
br label %45
33: ; preds = %14
%34 = load i8*, i8** %3
%35 = call i64 @strtoul(i8* %34, i8** %6, i32 8)
%36 = trunc i64 %35 to i8
store i8 %36, i8* %5
%37 = load i8*, i8** %6
%38 = getelementptr inbounds i8, i8* %37, i32 -1
store i8* %38, i8** %6
store i8* %38, i8** %3
br label %45
39: ; preds = %14
%40 = load i8*, i8** %3
%41 = getelementptr inbounds i8, i8* %40, i32 -1
store i8* %41, i8** %3
br label %42
42: ; preds = %14, %39
%43 = load i8*, i8** %3
%44 = load i8, i8* %43
store i8 %44, i8* %5
br label %45
45: ; preds = %42, %33, %26, %25, %24, %23, %22, %21, %20, %19
br label %46
46: ; preds = %45, %11
%47 = load i8**, i8*** %4
%48 = icmp ne i8** %47, null
br i1 %48, label %49, label %53
49: ; preds = %46
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 1
%52 = load i8**, i8*** %4
store i8* %51, i8** %52
br label %53
53: ; preds = %49, %46
%54 = load i8, i8* %5
ret i8 %54
}

LLVM IR (-O2):
define signext i8 @charDecode_C_Escape(i8* %0, i8** writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 92
br i1 %6, label %7, label %32
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
switch i32 %10, label %29 [
i32 97, label %32
i32 98, label %11
i32 102, label %12
i32 110, label %13
i32 114, label %14
i32 116, label %15
i32 118, label %16
i32 120, label %17
i32 48, label %23
i32 0, label %28
]
11: ; preds = %7
br label %32
12: ; preds = %7
br label %32
13: ; preds = %7
br label %32
14: ; preds = %7
br label %32
15: ; preds = %7
br label %32
16: ; preds = %7
br label %32
17: ; preds = %7
%18 = getelementptr inbounds i8, i8* %0, i64 2
%19 = call i64 @strtoul(i8* %18, i8** %3, i32 16)
%20 = trunc i64 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 -1
br label %32
23: ; preds = %7
%24 = call i64 @strtoul(i8* %8, i8** %3, i32 8)
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 -1
br label %32
28: ; preds = %7
br label %29
29: ; preds = %7, %28
%30 = phi i8 [ %9, %7 ], [ 92, %28 ]
%31 = phi i8* [ %8, %7 ], [ %0, %28 ]
br label %32
32: ; preds = %7, %2, %11, %12, %13, %14, %15, %16, %17, %23, %29
%33 = phi i8* [ %31, %29 ], [ %27, %23 ], [ %22, %17 ], [ %8, %16 ], [ %8, %15 ], [ %8, %14 ], [ %8, %13 ], [ %8, %12 ], [ %8, %11 ], [ %0, %2 ], [ %8, %7 ]
%34 = phi i8 [ %30, %29 ], [ %25, %23 ], [ %20, %17 ], [ 11, %16 ], [ 9, %15 ], [ 13, %14 ], [ 10, %13 ], [ 12, %12 ], [ 8, %11 ], [ %5, %2 ], [ 7, %7 ]
%35 = icmp eq i8** %1, null
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = getelementptr inbounds i8, i8* %33, i64 1
store i8* %37, i8** %1
br label %38
38: ; preds = %36, %32
ret i8 %34
}