#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 get_escaped(int c) {
  switch (c) {
  case 'n':
    return ('\n');
  case 'r':
    return ('\r');
  case 't':
    return ('\t');
  case 'f':
    return ('\f');
  case 'v':
    return ('\v');
  case 'b':
    return ('\b');
  case 'a':
    return ('\a');
  default:
    return (c);
  }
}


x86 assembly (clang, -O0):
<get_escaped>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1184 <get_escaped+0x84>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xa,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0xd,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0x9,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0xc,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0xb,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0x8,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
movl   $0x7,-0x4(%rbp)
jmp    118a <get_escaped+0x8a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_escaped>:
lea    -0x61(%rdi),%ecx
cmp    $0x15,%ecx
ja     1129 <get_escaped+0x29>
mov    $0xa,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x7,%eax
ret
mov    $0x8,%eax
ret
mov    %edi,%eax
ret
mov    $0xc,%eax
ret
mov    $0x9,%eax
ret
mov    $0xb,%eax
ret
mov    $0xd,%eax
ret

LLVM IR (-O0):
define i32 @get_escaped(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 110, label %5
i32 114, label %6
i32 116, label %7
i32 102, label %8
i32 118, label %9
i32 98, label %10
i32 97, label %11
]
5: ; preds = %1
store i32 10, i32* %2
br label %14
6: ; preds = %1
store i32 13, i32* %2
br label %14
7: ; preds = %1
store i32 9, i32* %2
br label %14
8: ; preds = %1
store i32 12, i32* %2
br label %14
9: ; preds = %1
store i32 11, i32* %2
br label %14
10: ; preds = %1
store i32 8, i32* %2
br label %14
11: ; preds = %1
store i32 7, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_escaped(i32 %0) {
switch i32 %0, label %8 [
i32 110, label %9
i32 114, label %2
i32 116, label %3
i32 102, label %4
i32 118, label %5
i32 98, label %6
i32 97, label %7
]
2: ; preds = %1
br label %9
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6, %5, %4, %3, %2
%10 = phi i32 [ %0, %8 ], [ 7, %7 ], [ 8, %6 ], [ 11, %5 ], [ 12, %4 ], [ 9, %3 ], [ 13, %2 ], [ 10, %1 ]
ret i32 %10
}