char f2a(char c) {
  switch (c) {
  case '\201':
    return '+';
  case '\202':
    return '-';
  case '\203':
    return '/';
  case '\204':
    return '*';
  case '\205':
    return '^';
  case '\206':
    return '(';
  case '\207':
    return '[';
  case '\210':
    return '<';
  case '\211':
    return ')';
  case '\212':
    return ']';
  case '\213':
    return '>';
  case '\214':
    return ',';
  case '\215':
    return ';';
  case '\217':
    return '=';
  default:
    return c;
  }
}


x86 assembly (clang, -O0):
<f2a>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0x7f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xe,%eax
ja     11b2 <f2a+0xb2>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2b,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x2d,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x2f,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x2a,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x5e,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x28,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x5b,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x3c,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x29,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x5d,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x3e,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x2c,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x3b,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
movb   $0x3d,-0x1(%rbp)
jmp    11b8 <f2a+0xb8>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2a>:
mov    %edi,%eax
movslq %edi,%rcx
add    $0x7f,%rcx
cmp    $0xe,%ecx
ja     1122 <f2a+0x22>
mov    $0x5fff,%edx
bt     %ecx,%edx
jae    1122 <f2a+0x22>
lea    0xee1(%rip),%rax
mov    (%rcx,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @f2a(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %20 [
i32 -127, label %6
i32 -126, label %7
i32 -125, label %8
i32 -124, label %9
i32 -123, label %10
i32 -122, label %11
i32 -121, label %12
i32 -120, label %13
i32 -119, label %14
i32 -118, label %15
i32 -117, label %16
i32 -116, label %17
i32 -115, label %18
i32 -113, label %19
]
6: ; preds = %1
store i8 43, i8* %2
br label %22
7: ; preds = %1
store i8 45, i8* %2
br label %22
8: ; preds = %1
store i8 47, i8* %2
br label %22
9: ; preds = %1
store i8 42, i8* %2
br label %22
10: ; preds = %1
store i8 94, i8* %2
br label %22
11: ; preds = %1
store i8 40, i8* %2
br label %22
12: ; preds = %1
store i8 91, i8* %2
br label %22
13: ; preds = %1
store i8 60, i8* %2
br label %22
14: ; preds = %1
store i8 41, i8* %2
br label %22
15: ; preds = %1
store i8 93, i8* %2
br label %22
16: ; preds = %1
store i8 62, i8* %2
br label %22
17: ; preds = %1
store i8 44, i8* %2
br label %22
18: ; preds = %1
store i8 59, i8* %2
br label %22
19: ; preds = %1
store i8 61, i8* %2
br label %22
20: ; preds = %1
%21 = load i8, i8* %3
store i8 %21, i8* %2
br label %22
22: ; preds = %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%23 = load i8, i8* %2
ret i8 %23
}

LLVM IR (-O2):
@switch.table.f2a = [15 x i8] c"+-/*^([<)]>,;+="
define signext i8 @f2a(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, 127
%4 = icmp ult i32 %3, 15
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = trunc i32 %3 to i16
%7 = lshr i16 24575, %6
%8 = and i16 %7, 1
%9 = icmp eq i16 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = sext i32 %3 to i64
%12 = getelementptr inbounds [15 x i8], [15 x i8]* @switch.table.f2a, i64 0, i64 %11
%13 = load i8, i8* %12
br label %14
14: ; preds = %1, %5, %10
%15 = phi i8 [ %13, %10 ], [ %0, %5 ], [ %0, %1 ]
ret i8 %15
}