char *chabbrev(ch)
int ch;
{
  switch (ch) {
  case 0:
    return "NUL";
  case 1:
    return "SOH";
  case 2:
    return "STX";
  case 3:
    return "ETX";
  case 4:
    return "EOT";
  case 5:
    return "ENQ";
  case 6:
    return "ACK";
  case 7:
    return "BEL";
  case 8:
    return "BS";
  case 9:
    return "HT";
  case 10:
    return "LF";
  case 11:
    return "VT";
  case 12:
    return "FF";
  case 13:
    return "CR";
  case 14:
    return "SO";
  case 15:
    return "SI";
  case 16:
    return "DLE";
  case 17:
    return "DC1";
  case 18:
    return "DC2";
  case 19:
    return "DC3";
  case 20:
    return "DC4";
  case 21:
    return "NAK";
  case 22:
    return "SYN";
  case 23:
    return "ETB";
  case 24:
    return "CAN";
  case 25:
    return "EM";
  case 26:
    return "SUB";
  case 27:
    return "ESC";
  case 28:
    return "FS";
  case 29:
    return "GS";
  case 30:
    return "RS";
  case 31:
    return "US";
  case 127:
    return "DEL";
  default:
    return "";
  }
}


x86 assembly (clang, -O0):
<chabbrev>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x7f,%rax
ja     133c <chabbrev+0x23c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x10cd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x10c1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x10b5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x10a9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x109d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1091(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1085(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1079(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x106d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1060(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1053(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1046(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1039(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x102c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x101f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1012(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0x1005(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xff9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfe1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfd5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfc9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfbd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xfa5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf80(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf74(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf67(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf5a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf4d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xf40(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1347 <chabbrev+0x247>
lea    0xefc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chabbrev>:
cmp    $0x7f,%edi
ja     1222 <chabbrev+0x122>
lea    0x10f0(%rip),%rax
mov    %edi,%ecx
lea    0xee7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x10db(%rip),%rax
ret
lea    0x10d7(%rip),%rax
ret
lea    0x10d3(%rip),%rax
ret
lea    0x10cf(%rip),%rax
ret
lea    0x10cb(%rip),%rax
ret
lea    0x10c7(%rip),%rax
ret
lea    0x10c3(%rip),%rax
ret
lea    0x10bf(%rip),%rax
ret
lea    0x10ba(%rip),%rax
ret
lea    0x10b5(%rip),%rax
ret
lea    0x10b0(%rip),%rax
ret
lea    0x10ab(%rip),%rax
ret
lea    0x10a6(%rip),%rax
ret
lea    0x10a1(%rip),%rax
ret
lea    0x109c(%rip),%rax
ret
lea    0x1097(%rip),%rax
ret
lea    0x1093(%rip),%rax
ret
lea    0x108f(%rip),%rax
ret
lea    0x108b(%rip),%rax
ret
lea    0x1087(%rip),%rax
ret
lea    0x1083(%rip),%rax
ret
lea    0x107f(%rip),%rax
ret
lea    0x107b(%rip),%rax
ret
lea    0x1077(%rip),%rax
ret
lea    0x1073(%rip),%rax
ret
lea    0x106e(%rip),%rax
ret
lea    0x106a(%rip),%rax
ret
lea    0x1066(%rip),%rax
ret
lea    0x1061(%rip),%rax
ret
lea    0x105c(%rip),%rax
ret
lea    0x1057(%rip),%rax
ret
lea    0x1052(%rip),%rax
ret
lea    0x1016(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"NUL\00"
@.str.1 = [4 x i8] c"SOH\00"
@.str.2 = [4 x i8] c"STX\00"
@.str.3 = [4 x i8] c"ETX\00"
@.str.4 = [4 x i8] c"EOT\00"
@.str.5 = [4 x i8] c"ENQ\00"
@.str.6 = [4 x i8] c"ACK\00"
@.str.7 = [4 x i8] c"BEL\00"
@.str.8 = [3 x i8] c"BS\00"
@.str.9 = [3 x i8] c"HT\00"
@.str.10 = [3 x i8] c"LF\00"
@.str.11 = [3 x i8] c"VT\00"
@.str.12 = [3 x i8] c"FF\00"
@.str.13 = [3 x i8] c"CR\00"
@.str.14 = [3 x i8] c"SO\00"
@.str.15 = [3 x i8] c"SI\00"
@.str.16 = [4 x i8] c"DLE\00"
@.str.17 = [4 x i8] c"DC1\00"
@.str.18 = [4 x i8] c"DC2\00"
@.str.19 = [4 x i8] c"DC3\00"
@.str.20 = [4 x i8] c"DC4\00"
@.str.21 = [4 x i8] c"NAK\00"
@.str.22 = [4 x i8] c"SYN\00"
@.str.23 = [4 x i8] c"ETB\00"
@.str.24 = [4 x i8] c"CAN\00"
@.str.25 = [3 x i8] c"EM\00"
@.str.26 = [4 x i8] c"SUB\00"
@.str.27 = [4 x i8] c"ESC\00"
@.str.28 = [3 x i8] c"FS\00"
@.str.29 = [3 x i8] c"GS\00"
@.str.30 = [3 x i8] c"RS\00"
@.str.31 = [3 x i8] c"US\00"
@.str.32 = [4 x i8] c"DEL\00"
@.str.33 = [1 x i8] zeroinitializer
define i8* @chabbrev(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %38 [
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 23, label %28
i32 24, label %29
i32 25, label %30
i32 26, label %31
i32 27, label %32
i32 28, label %33
i32 29, label %34
i32 30, label %35
i32 31, label %36
i32 127, label %37
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %39
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %39
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %39
8: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %39
9: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %39
10: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %39
11: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %39
12: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %39
13: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %39
14: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %39
15: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %39
16: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %39
17: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %39
18: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %39
19: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %39
20: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %39
21: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %39
22: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %39
23: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %39
24: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %39
25: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %39
26: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %39
27: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %39
28: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %39
29: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %39
30: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %39
31: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %39
32: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %39
33: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %39
34: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %39
35: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %39
36: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %39
37: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %39
38: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %39
39: ; preds = %38, %37, %36, %35, %34, %33, %32, %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
%40 = load i8*, i8** %2
ret i8* %40
}

LLVM IR (-O2):
@.str = [4 x i8] c"NUL\00"
@.str.1 = [4 x i8] c"SOH\00"
@.str.2 = [4 x i8] c"STX\00"
@.str.3 = [4 x i8] c"ETX\00"
@.str.4 = [4 x i8] c"EOT\00"
@.str.5 = [4 x i8] c"ENQ\00"
@.str.6 = [4 x i8] c"ACK\00"
@.str.7 = [4 x i8] c"BEL\00"
@.str.8 = [3 x i8] c"BS\00"
@.str.9 = [3 x i8] c"HT\00"
@.str.10 = [3 x i8] c"LF\00"
@.str.11 = [3 x i8] c"VT\00"
@.str.12 = [3 x i8] c"FF\00"
@.str.13 = [3 x i8] c"CR\00"
@.str.14 = [3 x i8] c"SO\00"
@.str.15 = [3 x i8] c"SI\00"
@.str.16 = [4 x i8] c"DLE\00"
@.str.17 = [4 x i8] c"DC1\00"
@.str.18 = [4 x i8] c"DC2\00"
@.str.19 = [4 x i8] c"DC3\00"
@.str.20 = [4 x i8] c"DC4\00"
@.str.21 = [4 x i8] c"NAK\00"
@.str.22 = [4 x i8] c"SYN\00"
@.str.23 = [4 x i8] c"ETB\00"
@.str.24 = [4 x i8] c"CAN\00"
@.str.25 = [3 x i8] c"EM\00"
@.str.26 = [4 x i8] c"SUB\00"
@.str.27 = [4 x i8] c"ESC\00"
@.str.28 = [3 x i8] c"FS\00"
@.str.29 = [3 x i8] c"GS\00"
@.str.30 = [3 x i8] c"RS\00"
@.str.31 = [3 x i8] c"US\00"
@.str.32 = [4 x i8] c"DEL\00"
@.str.33 = [1 x i8] zeroinitializer
define i8* @chabbrev(i32 %0) {
switch i32 %0, label %34 [
i32 0, label %35
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 5, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
i32 10, label %11
i32 11, label %12
i32 12, label %13
i32 13, label %14
i32 14, label %15
i32 15, label %16
i32 16, label %17
i32 17, label %18
i32 18, label %19
i32 19, label %20
i32 20, label %21
i32 21, label %22
i32 22, label %23
i32 23, label %24
i32 24, label %25
i32 25, label %26
i32 26, label %27
i32 27, label %28
i32 28, label %29
i32 29, label %30
i32 30, label %31
i32 31, label %32
i32 127, label %33
]
2: ; preds = %1
br label %35
3: ; preds = %1
br label %35
4: ; preds = %1
br label %35
5: ; preds = %1
br label %35
6: ; preds = %1
br label %35
7: ; preds = %1
br label %35
8: ; preds = %1
br label %35
9: ; preds = %1
br label %35
10: ; preds = %1
br label %35
11: ; preds = %1
br label %35
12: ; preds = %1
br label %35
13: ; preds = %1
br label %35
14: ; preds = %1
br label %35
15: ; preds = %1
br label %35
16: ; preds = %1
br label %35
17: ; preds = %1
br label %35
18: ; preds = %1
br label %35
19: ; preds = %1
br label %35
20: ; preds = %1
br label %35
21: ; preds = %1
br label %35
22: ; preds = %1
br label %35
23: ; preds = %1
br label %35
24: ; preds = %1
br label %35
25: ; preds = %1
br label %35
26: ; preds = %1
br label %35
27: ; preds = %1
br label %35
28: ; preds = %1
br label %35
29: ; preds = %1
br label %35
30: ; preds = %1
br label %35
31: ; preds = %1
br label %35
32: ; preds = %1
br label %35
33: ; preds = %1
br label %35
34: ; preds = %1
br label %35
35: ; preds = %1, %34, %33, %32, %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, %4, %3, %2
%36 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.33, i64 0, i64 0), %34 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i64 0, i64 0), %33 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), %32 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0), %31 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), %30 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), %29 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0), %28 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i64 0, i64 0), %27 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %36
}