#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 /*<<< orphan*/ a(int);
int /*<<< orphan*/ b(int);
int /*<<< orphan*/ c(int);
int /*<<< orphan*/ d(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ f(int /*<<< orphan*/);
int /*<<< orphan*/ g(int);
int /*<<< orphan*/ h(int);
int /*<<< orphan*/ i(int);
int /*<<< orphan*/ j(int);
int /*<<< orphan*/ k(int);
int /*<<< orphan*/ l(int);
int /*<<< orphan*/ m(int);
int /*<<< orphan*/ n(int);
int /*<<< orphan*/ o(int);
int /*<<< orphan*/ p(int /*<<< orphan*/);
int /*<<< orphan*/ q(int);
int /*<<< orphan*/ r(int);
int /*<<< orphan*/ s(int);
int /*<<< orphan*/ t(int);
int /*<<< orphan*/ u(int);
int /*<<< orphan*/ v(int);
int /*<<< orphan*/ w(int);
int /*<<< orphan*/ x(int);
int /*<<< orphan*/ y(int);
int /*<<< orphan*/ z(int /*<<< orphan*/);
void switcher(char ch) {
  switch (ch) {
  case 'a':
    a(5);
  case 'b':
    b(4);
  case 'c':
    c(3);
  case 'd':
    d(2);
  case 'e':
    r(1);
  case 'f':
    f(0);
  case 'g':
    g(9);
  case 'h':
    h(8);
  case 'i':
    i(7);
  case 'j':
    j(6);
  case 'k':
    k(5);
  case 'l':
    l(4);
  case 'm':
    m(3);
  case 'n':
    n(2);
  case 'o':
    o(1);
  case 'p':
    p(0);
  case 'q':
    q(9);
  case 'r':
    r(8);
  case 's':
    s(7);
  case 't':
    t(6);
  case 'u':
    u(5);
  case 'v':
    v(4);
  case 'w':
    w(3);
  case 'x':
    x(2);
  case 'y':
    y(1);
  case 'z':
    z(0);
  default:
    exit(1);
  }
}


x86 assembly (clang, -O0):
<switcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x19,%eax
ja     13d3 <switcher+0x133>
mov    -0x10(%rbp),%rax
lea    0xd31(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x5,%edi
call   1120 <a@plt>
mov    $0x4,%edi
call   1040 <b@plt>
mov    $0x3,%edi
call   1110 <c@plt>
mov    $0x2,%edi
call   1030 <d@plt>
mov    $0x1,%edi
call   10a0 <r@plt>
xor    %edi,%edi
call   10f0 <f@plt>
mov    $0x9,%edi
call   1100 <g@plt>
mov    $0x8,%edi
call   1080 <h@plt>
mov    $0x7,%edi
call   1140 <i@plt>
mov    $0x6,%edi
call   1070 <j@plt>
mov    $0x5,%edi
call   1170 <k@plt>
mov    $0x4,%edi
call   1050 <l@plt>
mov    $0x3,%edi
call   1150 <m@plt>
mov    $0x2,%edi
call   1060 <n@plt>
mov    $0x1,%edi
call   1130 <o@plt>
xor    %edi,%edi
call   10b0 <p@plt>
mov    $0x9,%edi
call   11b0 <q@plt>
mov    $0x8,%edi
call   10a0 <r@plt>
mov    $0x7,%edi
call   1160 <s@plt>
mov    $0x6,%edi
call   1090 <t@plt>
mov    $0x5,%edi
call   11a0 <u@plt>
mov    $0x4,%edi
call   10c0 <v@plt>
mov    $0x3,%edi
call   1180 <w@plt>
mov    $0x2,%edi
call   10e0 <x@plt>
mov    $0x1,%edi
call   1190 <y@plt>
xor    %edi,%edi
call   10d0 <z@plt>
mov    $0x1,%edi
call   11c0 <exit@plt>

x86 assembly (clang, -O2):
<switcher>:
push   %rax
add    $0xffffff9f,%edi
cmp    $0x19,%edi
ja     13b8 <switcher+0x118>
lea    0xd4c(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x5,%edi
call   1120 <a@plt>
mov    $0x4,%edi
call   1040 <b@plt>
mov    $0x3,%edi
call   1110 <c@plt>
mov    $0x2,%edi
call   1030 <d@plt>
mov    $0x1,%edi
call   10a0 <r@plt>
xor    %edi,%edi
call   10f0 <f@plt>
mov    $0x9,%edi
call   1100 <g@plt>
mov    $0x8,%edi
call   1080 <h@plt>
mov    $0x7,%edi
call   1140 <i@plt>
mov    $0x6,%edi
call   1070 <j@plt>
mov    $0x5,%edi
call   1170 <k@plt>
mov    $0x4,%edi
call   1050 <l@plt>
mov    $0x3,%edi
call   1150 <m@plt>
mov    $0x2,%edi
call   1060 <n@plt>
mov    $0x1,%edi
call   1130 <o@plt>
xor    %edi,%edi
call   10b0 <p@plt>
mov    $0x9,%edi
call   11b0 <q@plt>
mov    $0x8,%edi
call   10a0 <r@plt>
mov    $0x7,%edi
call   1160 <s@plt>
mov    $0x6,%edi
call   1090 <t@plt>
mov    $0x5,%edi
call   11a0 <u@plt>
mov    $0x4,%edi
call   10c0 <v@plt>
mov    $0x3,%edi
call   1180 <w@plt>
mov    $0x2,%edi
call   10e0 <x@plt>
mov    $0x1,%edi
call   1190 <y@plt>
xor    %edi,%edi
call   10d0 <z@plt>
mov    $0x1,%edi
call   11c0 <exit@plt>

LLVM IR (-O0):
define void @switcher(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %57 [
i32 97, label %5
i32 98, label %7
i32 99, label %9
i32 100, label %11
i32 101, label %13
i32 102, label %15
i32 103, label %17
i32 104, label %19
i32 105, label %21
i32 106, label %23
i32 107, label %25
i32 108, label %27
i32 109, label %29
i32 110, label %31
i32 111, label %33
i32 112, label %35
i32 113, label %37
i32 114, label %39
i32 115, label %41
i32 116, label %43
i32 117, label %45
i32 118, label %47
i32 119, label %49
i32 120, label %51
i32 121, label %53
i32 122, label %55
]
5: ; preds = %1
%6 = call i32 @a(i32 5)
br label %7
7: ; preds = %1, %5
%8 = call i32 @b(i32 4)
br label %9
9: ; preds = %1, %7
%10 = call i32 @c(i32 3)
br label %11
11: ; preds = %1, %9
%12 = call i32 @d(i32 2)
br label %13
13: ; preds = %1, %11
%14 = call i32 @r(i32 1)
br label %15
15: ; preds = %1, %13
%16 = call i32 @f(i32 0)
br label %17
17: ; preds = %1, %15
%18 = call i32 @g(i32 9)
br label %19
19: ; preds = %1, %17
%20 = call i32 @h(i32 8)
br label %21
21: ; preds = %1, %19
%22 = call i32 @i(i32 7)
br label %23
23: ; preds = %1, %21
%24 = call i32 @j(i32 6)
br label %25
25: ; preds = %1, %23
%26 = call i32 @k(i32 5)
br label %27
27: ; preds = %1, %25
%28 = call i32 @l(i32 4)
br label %29
29: ; preds = %1, %27
%30 = call i32 @m(i32 3)
br label %31
31: ; preds = %1, %29
%32 = call i32 @n(i32 2)
br label %33
33: ; preds = %1, %31
%34 = call i32 @o(i32 1)
br label %35
35: ; preds = %1, %33
%36 = call i32 @p(i32 0)
br label %37
37: ; preds = %1, %35
%38 = call i32 @q(i32 9)
br label %39
39: ; preds = %1, %37
%40 = call i32 @r(i32 8)
br label %41
41: ; preds = %1, %39
%42 = call i32 @s(i32 7)
br label %43
43: ; preds = %1, %41
%44 = call i32 @t(i32 6)
br label %45
45: ; preds = %1, %43
%46 = call i32 @u(i32 5)
br label %47
47: ; preds = %1, %45
%48 = call i32 @v(i32 4)
br label %49
49: ; preds = %1, %47
%50 = call i32 @w(i32 3)
br label %51
51: ; preds = %1, %49
%52 = call i32 @x(i32 2)
br label %53
53: ; preds = %1, %51
%54 = call i32 @y(i32 1)
br label %55
55: ; preds = %1, %53
%56 = call i32 @z(i32 0)
br label %57
57: ; preds = %1, %55
%58 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @switcher(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %55 [
i32 97, label %3
i32 98, label %5
i32 99, label %7
i32 100, label %9
i32 101, label %11
i32 102, label %13
i32 103, label %15
i32 104, label %17
i32 105, label %19
i32 106, label %21
i32 107, label %23
i32 108, label %25
i32 109, label %27
i32 110, label %29
i32 111, label %31
i32 112, label %33
i32 113, label %35
i32 114, label %37
i32 115, label %39
i32 116, label %41
i32 117, label %43
i32 118, label %45
i32 119, label %47
i32 120, label %49
i32 121, label %51
i32 122, label %53
]
3: ; preds = %1
%4 = tail call i32 @a(i32 5)
br label %5
5: ; preds = %1, %3
%6 = tail call i32 @b(i32 4)
br label %7
7: ; preds = %1, %5
%8 = tail call i32 @c(i32 3)
br label %9
9: ; preds = %1, %7
%10 = tail call i32 @d(i32 2)
br label %11
11: ; preds = %1, %9
%12 = tail call i32 @r(i32 1)
br label %13
13: ; preds = %1, %11
%14 = tail call i32 @f(i32 0)
br label %15
15: ; preds = %1, %13
%16 = tail call i32 @g(i32 9)
br label %17
17: ; preds = %1, %15
%18 = tail call i32 @h(i32 8)
br label %19
19: ; preds = %1, %17
%20 = tail call i32 @i(i32 7)
br label %21
21: ; preds = %1, %19
%22 = tail call i32 @j(i32 6)
br label %23
23: ; preds = %1, %21
%24 = tail call i32 @k(i32 5)
br label %25
25: ; preds = %1, %23
%26 = tail call i32 @l(i32 4)
br label %27
27: ; preds = %1, %25
%28 = tail call i32 @m(i32 3)
br label %29
29: ; preds = %1, %27
%30 = tail call i32 @n(i32 2)
br label %31
31: ; preds = %1, %29
%32 = tail call i32 @o(i32 1)
br label %33
33: ; preds = %1, %31
%34 = tail call i32 @p(i32 0)
br label %35
35: ; preds = %1, %33
%36 = tail call i32 @q(i32 9)
br label %37
37: ; preds = %1, %35
%38 = tail call i32 @r(i32 8)
br label %39
39: ; preds = %1, %37
%40 = tail call i32 @s(i32 7)
br label %41
41: ; preds = %1, %39
%42 = tail call i32 @t(i32 6)
br label %43
43: ; preds = %1, %41
%44 = tail call i32 @u(i32 5)
br label %45
45: ; preds = %1, %43
%46 = tail call i32 @v(i32 4)
br label %47
47: ; preds = %1, %45
%48 = tail call i32 @w(i32 3)
br label %49
49: ; preds = %1, %47
%50 = tail call i32 @x(i32 2)
br label %51
51: ; preds = %1, %49
%52 = tail call i32 @y(i32 1)
br label %53
53: ; preds = %1, %51
%54 = tail call i32 @z(i32 0)
br label %55
55: ; preds = %1, %53
%56 = tail call i32 @exit(i32 1)
unreachable
}