char int_to_operator(int i) {
  switch (i) {
  case 0:
    return '-';
  case 1:
    return '+';
  case 2:
    return '-';
  case 3:
    return '*';
  case 4:
    return '/';
  case 5:
    return '%';
  case 6:
    return 'I';
  case 7:
    return 'D';
  case 8:
    return 'E';
  case 9:
    return 'Q';
  case 10:
    return '>';
  case 11:
    return '<';
  case 12:
    return 'G';
  case 13:
    return 'L';
  case 14:
    return '|';
  case 15:
    return '&';
  case 16:
    return '!';
  case 17:
    return '(';
  case 18:
    return ')';
  case 19:
    return ',';
  case 20:
    return 'i';
  case 21:
    return 'f';
  case 22:
    return '$';
  case 25:
    return 'n';
  case 30:
    return '=';
  case 31:
    return '<';
  }
  return 'F';
}


x86 assembly (clang, -O0):
<int_to_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x1f,%rax
ja     1216 <int_to_operator+0x116>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2d,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x2b,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x2d,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x2a,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x2f,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x25,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x49,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x44,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x45,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x51,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x3e,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x3c,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x47,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x4c,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x7c,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x26,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x21,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x28,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x29,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x2c,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x69,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x66,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x24,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x6e,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x3d,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x3c,-0x1(%rbp)
jmp    121a <int_to_operator+0x11a>
movb   $0x46,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_operator>:
mov    $0x46,%al
cmp    $0x1f,%edi
ja     1114 <int_to_operator+0x14>
movslq %edi,%rax
lea    0xeef(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define signext i8 @int_to_operator(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %31 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 10, label %15
i32 11, label %16
i32 12, label %17
i32 13, label %18
i32 14, label %19
i32 15, label %20
i32 16, label %21
i32 17, label %22
i32 18, label %23
i32 19, label %24
i32 20, label %25
i32 21, label %26
i32 22, label %27
i32 25, label %28
i32 30, label %29
i32 31, label %30
]
5: ; preds = %1
store i8 45, i8* %2
br label %32
6: ; preds = %1
store i8 43, i8* %2
br label %32
7: ; preds = %1
store i8 45, i8* %2
br label %32
8: ; preds = %1
store i8 42, i8* %2
br label %32
9: ; preds = %1
store i8 47, i8* %2
br label %32
10: ; preds = %1
store i8 37, i8* %2
br label %32
11: ; preds = %1
store i8 73, i8* %2
br label %32
12: ; preds = %1
store i8 68, i8* %2
br label %32
13: ; preds = %1
store i8 69, i8* %2
br label %32
14: ; preds = %1
store i8 81, i8* %2
br label %32
15: ; preds = %1
store i8 62, i8* %2
br label %32
16: ; preds = %1
store i8 60, i8* %2
br label %32
17: ; preds = %1
store i8 71, i8* %2
br label %32
18: ; preds = %1
store i8 76, i8* %2
br label %32
19: ; preds = %1
store i8 124, i8* %2
br label %32
20: ; preds = %1
store i8 38, i8* %2
br label %32
21: ; preds = %1
store i8 33, i8* %2
br label %32
22: ; preds = %1
store i8 40, i8* %2
br label %32
23: ; preds = %1
store i8 41, i8* %2
br label %32
24: ; preds = %1
store i8 44, i8* %2
br label %32
25: ; preds = %1
store i8 105, i8* %2
br label %32
26: ; preds = %1
store i8 102, i8* %2
br label %32
27: ; preds = %1
store i8 36, i8* %2
br label %32
28: ; preds = %1
store i8 110, i8* %2
br label %32
29: ; preds = %1
store i8 61, i8* %2
br label %32
30: ; preds = %1
store i8 60, i8* %2
br label %32
31: ; preds = %1
store i8 70, i8* %2
br label %32
32: ; preds = %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%33 = load i8, i8* %2
ret i8 %33
}

LLVM IR (-O2):
@switch.table.int_to_operator = [32 x i8] c"-+-*/%IDEQ><GL|&!(),if$FFnFFFF=<"
define signext i8 @int_to_operator(i32 %0) {
%2 = icmp ult i32 %0, 32
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [32 x i8], [32 x i8]* @switch.table.int_to_operator, i64 0, i64 %4
%6 = load i8, i8* %5
br label %7
7: ; preds = %1, %3
%8 = phi i8 [ %6, %3 ], [ 70, %1 ]
ret i8 %8
}