#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*/ parse_b(char *);
int /*<<< orphan*/ parse_e(char *);
int /*<<< orphan*/ parse_g(char *);
int /*<<< orphan*/ parse_m(char *);
int /*<<< orphan*/ parse_n(char *);
int /*<<< orphan*/ parse_r(char *);
int /*<<< orphan*/ parse_s(char *);
int /*<<< orphan*/ parse_t(char *);
int /*<<< orphan*/ parse_w(char *);
void parse(char *msg) {
  switch (msg[0]) {
  case 'g':
    parse_g(msg + 2);
    break;
  case 't':
    parse_t(msg + 2);
    break;
  case 'm':
    parse_m(msg + 2);
    break;
  case 'b':
    parse_b(msg + 2);
    break;
  case 'w':
    parse_w(msg + 2);
    break;
  case 'r':
    parse_r(msg + 2);
    break;
  case 's':
    parse_s(msg + 2);
    break;
  case 'e':
    parse_e(msg + 2);
    break;
  case 'n':
    parse_n(msg + 2);
    break;
  }
}


x86 assembly (clang, -O0):
<parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffff9e,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     1266 <parse+0xd6>
mov    -0x10(%rbp),%rax
lea    0xe40(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1040 <parse_g@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   10a0 <parse_t@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1060 <parse_m@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1080 <parse_b@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1030 <parse_w@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1090 <parse_r@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1050 <parse_s@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   1070 <parse_e@plt>
jmp    1266 <parse+0xd6>
mov    -0x8(%rbp),%rdi
add    $0x2,%rdi
call   10b0 <parse_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse>:
movsbl (%rdi),%eax
add    $0xffffff9e,%eax
cmp    $0x15,%eax
ja     11b4 <parse+0x24>
lea    0xe5e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
add    $0x2,%rdi
jmp    1080 <parse_b@plt>
ret
add    $0x2,%rdi
jmp    1070 <parse_e@plt>
add    $0x2,%rdi
jmp    1040 <parse_g@plt>
add    $0x2,%rdi
jmp    1060 <parse_m@plt>
add    $0x2,%rdi
jmp    10b0 <parse_n@plt>
add    $0x2,%rdi
jmp    1090 <parse_r@plt>
add    $0x2,%rdi
jmp    1050 <parse_s@plt>
add    $0x2,%rdi
jmp    10a0 <parse_t@plt>
add    $0x2,%rdi
jmp    1030 <parse_w@plt>

LLVM IR (-O0):
define void @parse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %43 [
i32 103, label %7
i32 116, label %11
i32 109, label %15
i32 98, label %19
i32 119, label %23
i32 114, label %27
i32 115, label %31
i32 101, label %35
i32 110, label %39
]
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 2
%10 = call i32 @parse_g(i8* %9)
br label %43
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = call i32 @parse_t(i8* %13)
br label %43
15: ; preds = %1
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = call i32 @parse_m(i8* %17)
br label %43
19: ; preds = %1
%20 = load i8*, i8** %2
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = call i32 @parse_b(i8* %21)
br label %43
23: ; preds = %1
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 2
%26 = call i32 @parse_w(i8* %25)
br label %43
27: ; preds = %1
%28 = load i8*, i8** %2
%29 = getelementptr inbounds i8, i8* %28, i64 2
%30 = call i32 @parse_r(i8* %29)
br label %43
31: ; preds = %1
%32 = load i8*, i8** %2
%33 = getelementptr inbounds i8, i8* %32, i64 2
%34 = call i32 @parse_s(i8* %33)
br label %43
35: ; preds = %1
%36 = load i8*, i8** %2
%37 = getelementptr inbounds i8, i8* %36, i64 2
%38 = call i32 @parse_e(i8* %37)
br label %43
39: ; preds = %1
%40 = load i8*, i8** %2
%41 = getelementptr inbounds i8, i8* %40, i64 2
%42 = call i32 @parse_n(i8* %41)
br label %43
43: ; preds = %1, %39, %35, %31, %27, %23, %19, %15, %11, %7
ret void
}

LLVM IR (-O2):
define void @parse(i8* %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %31 [
i32 103, label %4
i32 116, label %7
i32 109, label %10
i32 98, label %13
i32 119, label %16
i32 114, label %19
i32 115, label %22
i32 101, label %25
i32 110, label %28
]
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = tail call i32 @parse_g(i8* %5)
br label %31
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = tail call i32 @parse_t(i8* %8)
br label %31
10: ; preds = %1
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = tail call i32 @parse_m(i8* %11)
br label %31
13: ; preds = %1
%14 = getelementptr inbounds i8, i8* %0, i64 2
%15 = tail call i32 @parse_b(i8* %14)
br label %31
16: ; preds = %1
%17 = getelementptr inbounds i8, i8* %0, i64 2
%18 = tail call i32 @parse_w(i8* %17)
br label %31
19: ; preds = %1
%20 = getelementptr inbounds i8, i8* %0, i64 2
%21 = tail call i32 @parse_r(i8* %20)
br label %31
22: ; preds = %1
%23 = getelementptr inbounds i8, i8* %0, i64 2
%24 = tail call i32 @parse_s(i8* %23)
br label %31
25: ; preds = %1
%26 = getelementptr inbounds i8, i8* %0, i64 2
%27 = tail call i32 @parse_e(i8* %26)
br label %31
28: ; preds = %1
%29 = getelementptr inbounds i8, i8* %0, i64 2
%30 = tail call i32 @parse_n(i8* %29)
br label %31
31: ; preds = %1, %28, %25, %22, %19, %16, %13, %10, %7, %4
ret void
}