int rew_alt(int tok) {
  switch (tok) {
  case 52:
    return 53;
  case 56:
    return 58;
  case 112:
    return 111;
  case 63:
    return 64;
  case 66:
    return 69;
  case 10:
    return 9;
  case 67:
    return 57;
  case 101:
    return 100;
  case 12:
    return 11;
  case 97:
    return 96;
  case 99:
    return 98;
  case 76:
    return 78;
  case 80:
    return 82;
  case 84:
    return 85;
  case 86:
    return 87;
  case 94:
    return 95;
  default:
    return tok;
  }
}


x86 assembly (clang, -O0):
<rew_alt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x66,%eax
ja     11f0 <rew_alt+0xf0>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x35,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x3a,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x6f,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x40,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x45,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x9,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x39,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x64,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0xb,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x60,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x62,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x4e,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x52,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x55,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x57,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
movl   $0x5f,-0x4(%rbp)
jmp    11f6 <rew_alt+0xf6>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rew_alt>:
lea    -0xa(%rdi),%ecx
cmp    $0x66,%ecx
ja     1177 <rew_alt+0x77>
mov    $0x35,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x9,%eax
ret
mov    $0xb,%eax
ret
mov    $0x3a,%eax
ret
mov    $0x40,%eax
ret
mov    $0x45,%eax
ret
mov    $0x39,%eax
ret
mov    $0x4e,%eax
ret
mov    $0x52,%eax
ret
mov    $0x55,%eax
ret
mov    $0x57,%eax
ret
mov    $0x5f,%eax
ret
mov    $0x60,%eax
ret
mov    $0x62,%eax
ret
mov    $0x64,%eax
ret
mov    $0x6f,%eax
ret
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @rew_alt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %21 [
i32 52, label %5
i32 56, label %6
i32 112, label %7
i32 63, label %8
i32 66, label %9
i32 10, label %10
i32 67, label %11
i32 101, label %12
i32 12, label %13
i32 97, label %14
i32 99, label %15
i32 76, label %16
i32 80, label %17
i32 84, label %18
i32 86, label %19
i32 94, label %20
]
5: ; preds = %1
store i32 53, i32* %2
br label %23
6: ; preds = %1
store i32 58, i32* %2
br label %23
7: ; preds = %1
store i32 111, i32* %2
br label %23
8: ; preds = %1
store i32 64, i32* %2
br label %23
9: ; preds = %1
store i32 69, i32* %2
br label %23
10: ; preds = %1
store i32 9, i32* %2
br label %23
11: ; preds = %1
store i32 57, i32* %2
br label %23
12: ; preds = %1
store i32 100, i32* %2
br label %23
13: ; preds = %1
store i32 11, i32* %2
br label %23
14: ; preds = %1
store i32 96, i32* %2
br label %23
15: ; preds = %1
store i32 98, i32* %2
br label %23
16: ; preds = %1
store i32 78, i32* %2
br label %23
17: ; preds = %1
store i32 82, i32* %2
br label %23
18: ; preds = %1
store i32 85, i32* %2
br label %23
19: ; preds = %1
store i32 87, i32* %2
br label %23
20: ; preds = %1
store i32 95, i32* %2
br label %23
21: ; preds = %1
%22 = load i32, i32* %3
store i32 %22, i32* %2
br label %23
23: ; preds = %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @rew_alt(i32 %0) {
switch i32 %0, label %17 [
i32 52, label %18
i32 56, label %2
i32 112, label %3
i32 63, label %4
i32 66, label %5
i32 10, label %6
i32 67, label %7
i32 101, label %8
i32 12, label %9
i32 97, label %10
i32 99, label %11
i32 76, label %12
i32 80, label %13
i32 84, label %14
i32 86, label %15
i32 94, label %16
]
2: ; preds = %1
br label %18
3: ; preds = %1
br label %18
4: ; preds = %1
br label %18
5: ; preds = %1
br label %18
6: ; preds = %1
br label %18
7: ; preds = %1
br label %18
8: ; preds = %1
br label %18
9: ; preds = %1
br label %18
10: ; preds = %1
br label %18
11: ; preds = %1
br label %18
12: ; preds = %1
br label %18
13: ; preds = %1
br label %18
14: ; preds = %1
br label %18
15: ; preds = %1
br label %18
16: ; preds = %1
br label %18
17: ; preds = %1
br label %18
18: ; preds = %1, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%19 = phi i32 [ %0, %17 ], [ 95, %16 ], [ 87, %15 ], [ 85, %14 ], [ 82, %13 ], [ 78, %12 ], [ 98, %11 ], [ 96, %10 ], [ 11, %9 ], [ 100, %8 ], [ 57, %7 ], [ 9, %6 ], [ 69, %5 ], [ 64, %4 ], [ 111, %3 ], [ 58, %2 ], [ 53, %1 ]
ret i32 %19
}