#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ ion_cmd_copy(char *);
int /*<<< orphan*/ ion_cmd_help();
int /*<<< orphan*/ ion_cmd_history();
int /*<<< orphan*/ ion_cmd_ls(char *);
int /*<<< orphan*/ ion_cmd_mode(char *);
int /*<<< orphan*/ ion_cmd_ping(char *);
int /*<<< orphan*/ ion_cmd_restart(char *);
int /*<<< orphan*/ ion_cmd_set(char *);
int /*<<< orphan*/ ion_cmd_show(char *);
int /*<<< orphan*/ ion_cmd_ssh(char *);
int /*<<< orphan*/ ion_cmd_stats(char *);
int /*<<< orphan*/ ion_cmd_telnet(char *);
int /*<<< orphan*/ ion_cmd_traceroute(char *);
int /*<<< orphan*/ ion_cmd_who();
int /*<<< orphan*/ ion_cmd_write();
int /*<<< orphan*/ ion_exit(int /*<<< orphan*/);
int /*<<< orphan*/ strcasecmp(char *, char *);
void ion_process_cmd(char *cmd) {
  unsigned char c;
  int a = 0;
  c = cmd[0];
  switch (c) {
  case 'c':
    if (!strcasecmp(cmd, "copy"))
      ion_cmd_copy(cmd);
    break;
  case 'e':
    if (!strcasecmp(cmd, "exit"))
      ion_exit(EXIT_SUCCESS);
    break;
  case 'h':
    if (!strcasecmp(cmd, "help"))
      ion_cmd_help();
    if (!strcasecmp(cmd, "history"))
      ion_cmd_history();
    break;
  case 'l':
    if (!strcasecmp(cmd, "logoff"))
      ion_exit(EXIT_SUCCESS);
    if (!strcasecmp(cmd, "logout"))
      ion_exit(EXIT_SUCCESS);
    if (!strcasecmp(cmd, "ls"))
      ion_cmd_ls(cmd);
    break;
  case 'm':
    if (!strcasecmp(cmd, "mode"))
      ion_cmd_mode(cmd);
    break;
  case 'p':
    if (!strcasecmp(cmd, "ping"))
      ion_cmd_ping(cmd);
    break;
  case 'q':
    if (!strcasecmp(cmd, "quit"))
      ion_exit(EXIT_SUCCESS);
    break;
  case 'r':
    if (!strcasecmp(cmd, "reboot"))
      ion_cmd_restart(cmd);
    if (!strcasecmp(cmd, "restart"))
      ion_cmd_restart(cmd);
    break;
  case 's':
    if (!strcasecmp(cmd, "set"))
      ion_cmd_set(cmd);
    if (!strcasecmp(cmd, "show"))
      ion_cmd_show(cmd);
    if (!strcasecmp(cmd, "ssh"))
      ion_cmd_ssh(cmd);
    if (!strcasecmp(cmd, "stats"))
      ion_cmd_stats(cmd);
    break;
  case 't':
    if (!strcasecmp(cmd, "telnet"))
      ion_cmd_telnet(cmd);
    if (!strcasecmp(cmd, "trace"))
      ion_cmd_traceroute(cmd);
    break;
  case 'w':
    if (!strcasecmp(cmd, "who"))
      ion_cmd_who();
    if (!strcasecmp(cmd, "write"))
      ion_cmd_write();
    break;
  }
}


x86 assembly (clang, -O0):
<ion_process_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x14,%eax
ja     1541 <ion_process_cmd+0x331>
mov    -0x18(%rbp),%rax
lea    0xdb3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
lea    0xdf3(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1278 <ion_process_cmd+0x68>
mov    -0x8(%rbp),%rdi
call   1070 <ion_cmd_copy@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xdd1(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12a4 <ion_process_cmd+0x94>
mov    0x2d43(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xdaa(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12c9 <ion_process_cmd+0xb9>
mov    $0x0,%al
call   10c0 <ion_cmd_help@plt>
mov    -0x8(%rbp),%rdi
lea    0xd8f(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12e9 <ion_process_cmd+0xd9>
mov    $0x0,%al
call   1050 <ion_cmd_history@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xd72(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1315 <ion_process_cmd+0x105>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
mov    -0x8(%rbp),%rdi
lea    0xd52(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    133c <ion_process_cmd+0x12c>
mov    0x2cab(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
mov    -0x8(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    135e <ion_process_cmd+0x14e>
mov    -0x8(%rbp),%rdi
call   1080 <ion_cmd_ls@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xd0e(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1385 <ion_process_cmd+0x175>
mov    -0x8(%rbp),%rdi
call   1110 <ion_cmd_mode@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xcec(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13ac <ion_process_cmd+0x19c>
mov    -0x8(%rbp),%rdi
call   10b0 <ion_cmd_ping@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xcca(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13d8 <ion_process_cmd+0x1c8>
mov    0x2c0f(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xca3(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13ff <ion_process_cmd+0x1ef>
mov    -0x8(%rbp),%rdi
call   1130 <ion_cmd_restart@plt>
mov    -0x8(%rbp),%rdi
lea    0xc88(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1421 <ion_process_cmd+0x211>
mov    -0x8(%rbp),%rdi
call   1130 <ion_cmd_restart@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xc69(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1448 <ion_process_cmd+0x238>
mov    -0x8(%rbp),%rdi
call   1030 <ion_cmd_set@plt>
mov    -0x8(%rbp),%rdi
lea    0xc4b(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    146a <ion_process_cmd+0x25a>
mov    -0x8(%rbp),%rdi
call   10f0 <ion_cmd_show@plt>
mov    -0x8(%rbp),%rdi
lea    0xc2e(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    148c <ion_process_cmd+0x27c>
mov    -0x8(%rbp),%rdi
call   1090 <ion_cmd_ssh@plt>
mov    -0x8(%rbp),%rdi
lea    0xc10(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14ae <ion_process_cmd+0x29e>
mov    -0x8(%rbp),%rdi
call   1060 <ion_cmd_stats@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xbef(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14d5 <ion_process_cmd+0x2c5>
mov    -0x8(%rbp),%rdi
call   10d0 <ion_cmd_telnet@plt>
mov    -0x8(%rbp),%rdi
lea    0xbd4(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14f7 <ion_process_cmd+0x2e7>
mov    -0x8(%rbp),%rdi
call   1120 <ion_cmd_traceroute@plt>
jmp    1541 <ion_process_cmd+0x331>
mov    -0x8(%rbp),%rdi
lea    0xbb3(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    151c <ion_process_cmd+0x30c>
mov    $0x0,%al
call   10e0 <ion_cmd_who@plt>
mov    -0x8(%rbp),%rdi
lea    0xb97(%rip),%rsi
call   1040 <strcasecmp@plt>
cmp    $0x0,%eax
jne    153c <ion_process_cmd+0x32c>
mov    $0x0,%al
call   10a0 <ion_cmd_write@plt>
jmp    1541 <ion_process_cmd+0x331>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ion_process_cmd>:
push   %rbx
mov    (%rdi),%al
add    $0x9d,%al
cmp    $0x14,%al
ja     146c <ion_process_cmd+0x25c>
mov    %rdi,%rbx
movzbl %al,%eax
lea    0xdd6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe1a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1070 <ion_cmd_copy@plt>
lea    0xdff(%rip),%rsi
jmp    1341 <ion_process_cmd+0x131>
lea    0xdf8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    1279 <ion_process_cmd+0x69>
xor    %eax,%eax
call   10c0 <ion_cmd_help@plt>
lea    0xde3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
xor    %eax,%eax
pop    %rbx
jmp    1050 <ion_cmd_history@plt>
lea    0xdcc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    12b9 <ion_process_cmd+0xa9>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
lea    0xdb2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    12da <ion_process_cmd+0xca>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
call   1100 <ion_exit@plt>
lea    0xd98(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1080 <ion_cmd_ls@plt>
lea    0xd7b(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1110 <ion_cmd_mode@plt>
lea    0xd60(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    10b0 <ion_cmd_ping@plt>
lea    0xd45(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1100 <ion_exit@plt>
lea    0xd24(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    137b <ion_process_cmd+0x16b>
mov    %rbx,%rdi
call   1130 <ion_cmd_restart@plt>
lea    0xd10(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1130 <ion_cmd_restart@plt>
lea    0xcf8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    13b6 <ion_process_cmd+0x1a6>
mov    %rbx,%rdi
call   1030 <ion_cmd_set@plt>
lea    0xce1(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    13d1 <ion_process_cmd+0x1c1>
mov    %rbx,%rdi
call   10f0 <ion_cmd_show@plt>
lea    0xccb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    13ec <ion_process_cmd+0x1dc>
mov    %rbx,%rdi
call   1090 <ion_cmd_ssh@plt>
lea    0xcb4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <ion_cmd_stats@plt>
lea    0xc9e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    1423 <ion_process_cmd+0x213>
mov    %rbx,%rdi
call   10d0 <ion_cmd_telnet@plt>
lea    0xc8a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    146c <ion_process_cmd+0x25c>
mov    %rbx,%rdi
pop    %rbx
jmp    1120 <ion_cmd_traceroute@plt>
lea    0xc74(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
jne    1459 <ion_process_cmd+0x249>
xor    %eax,%eax
call   10e0 <ion_cmd_who@plt>
lea    0xc5e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcasecmp@plt>
test   %eax,%eax
je     146e <ion_process_cmd+0x25e>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    10a0 <ion_cmd_write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"copy\00"
@.str.1 = [5 x i8] c"exit\00"
@EXIT_SUCCESS = global i32 0
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [8 x i8] c"history\00"
@.str.4 = [7 x i8] c"logoff\00"
@.str.5 = [7 x i8] c"logout\00"
@.str.6 = [3 x i8] c"ls\00"
@.str.7 = [5 x i8] c"mode\00"
@.str.8 = [5 x i8] c"ping\00"
@.str.9 = [5 x i8] c"quit\00"
@.str.10 = [7 x i8] c"reboot\00"
@.str.11 = [8 x i8] c"restart\00"
@.str.12 = [4 x i8] c"set\00"
@.str.13 = [5 x i8] c"show\00"
@.str.14 = [4 x i8] c"ssh\00"
@.str.15 = [6 x i8] c"stats\00"
@.str.16 = [7 x i8] c"telnet\00"
@.str.17 = [6 x i8] c"trace\00"
@.str.18 = [4 x i8] c"who\00"
@.str.19 = [6 x i8] c"write\00"
define void @ion_process_cmd(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
switch i32 %9, label %157 [
i32 99, label %10
i32 101, label %18
i32 104, label %26
i32 108, label %39
i32 109, label %61
i32 112, label %69
i32 113, label %77
i32 114, label %85
i32 115, label %100
i32 116, label %129
i32 119, label %144
]
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @strcasecmp(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i32 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i32 @ion_cmd_copy(i8* %15)
br label %17
17: ; preds = %14, %10
br label %157
18: ; preds = %1
%19 = load i8*, i8** %2
%20 = call i32 @strcasecmp(i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %18
%23 = load i32, i32* @EXIT_SUCCESS
%24 = call i32 @ion_exit(i32 %23)
br label %25
25: ; preds = %22, %18
br label %157
26: ; preds = %1
%27 = load i8*, i8** %2
%28 = call i32 @strcasecmp(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %26
%31 = call i32 (...) @ion_cmd_help()
br label %32
32: ; preds = %30, %26
%33 = load i8*, i8** %2
%34 = call i32 @strcasecmp(i8* %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = call i32 (...) @ion_cmd_history()
br label %38
38: ; preds = %36, %32
br label %157
39: ; preds = %1
%40 = load i8*, i8** %2
%41 = call i32 @strcasecmp(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %46, label %43
43: ; preds = %39
%44 = load i32, i32* @EXIT_SUCCESS
%45 = call i32 @ion_exit(i32 %44)
br label %46
46: ; preds = %43, %39
%47 = load i8*, i8** %2
%48 = call i32 @strcasecmp(i8* %47, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%49 = icmp ne i32 %48, 0
br i1 %49, label %53, label %50
50: ; preds = %46
%51 = load i32, i32* @EXIT_SUCCESS
%52 = call i32 @ion_exit(i32 %51)
br label %53
53: ; preds = %50, %46
%54 = load i8*, i8** %2
%55 = call i32 @strcasecmp(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%56 = icmp ne i32 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %53
%58 = load i8*, i8** %2
%59 = call i32 @ion_cmd_ls(i8* %58)
br label %60
60: ; preds = %57, %53
br label %157
61: ; preds = %1
%62 = load i8*, i8** %2
%63 = call i32 @strcasecmp(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i8*, i8** %2
%67 = call i32 @ion_cmd_mode(i8* %66)
br label %68
68: ; preds = %65, %61
br label %157
69: ; preds = %1
%70 = load i8*, i8** %2
%71 = call i32 @strcasecmp(i8* %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%72 = icmp ne i32 %71, 0
br i1 %72, label %76, label %73
73: ; preds = %69
%74 = load i8*, i8** %2
%75 = call i32 @ion_cmd_ping(i8* %74)
br label %76
76: ; preds = %73, %69
br label %157
77: ; preds = %1
%78 = load i8*, i8** %2
%79 = call i32 @strcasecmp(i8* %78, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%80 = icmp ne i32 %79, 0
br i1 %80, label %84, label %81
81: ; preds = %77
%82 = load i32, i32* @EXIT_SUCCESS
%83 = call i32 @ion_exit(i32 %82)
br label %84
84: ; preds = %81, %77
br label %157
85: ; preds = %1
%86 = load i8*, i8** %2
%87 = call i32 @strcasecmp(i8* %86, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%88 = icmp ne i32 %87, 0
br i1 %88, label %92, label %89
89: ; preds = %85
%90 = load i8*, i8** %2
%91 = call i32 @ion_cmd_restart(i8* %90)
br label %92
92: ; preds = %89, %85
%93 = load i8*, i8** %2
%94 = call i32 @strcasecmp(i8* %93, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%95 = icmp ne i32 %94, 0
br i1 %95, label %99, label %96
96: ; preds = %92
%97 = load i8*, i8** %2
%98 = call i32 @ion_cmd_restart(i8* %97)
br label %99
99: ; preds = %96, %92
br label %157
100: ; preds = %1
%101 = load i8*, i8** %2
%102 = call i32 @strcasecmp(i8* %101, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%103 = icmp ne i32 %102, 0
br i1 %103, label %107, label %104
104: ; preds = %100
%105 = load i8*, i8** %2
%106 = call i32 @ion_cmd_set(i8* %105)
br label %107
107: ; preds = %104, %100
%108 = load i8*, i8** %2
%109 = call i32 @strcasecmp(i8* %108, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%110 = icmp ne i32 %109, 0
br i1 %110, label %114, label %111
111: ; preds = %107
%112 = load i8*, i8** %2
%113 = call i32 @ion_cmd_show(i8* %112)
br label %114
114: ; preds = %111, %107
%115 = load i8*, i8** %2
%116 = call i32 @strcasecmp(i8* %115, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%117 = icmp ne i32 %116, 0
br i1 %117, label %121, label %118
118: ; preds = %114
%119 = load i8*, i8** %2
%120 = call i32 @ion_cmd_ssh(i8* %119)
br label %121
121: ; preds = %118, %114
%122 = load i8*, i8** %2
%123 = call i32 @strcasecmp(i8* %122, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%124 = icmp ne i32 %123, 0
br i1 %124, label %128, label %125
125: ; preds = %121
%126 = load i8*, i8** %2
%127 = call i32 @ion_cmd_stats(i8* %126)
br label %128
128: ; preds = %125, %121
br label %157
129: ; preds = %1
%130 = load i8*, i8** %2
%131 = call i32 @strcasecmp(i8* %130, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%132 = icmp ne i32 %131, 0
br i1 %132, label %136, label %133
133: ; preds = %129
%134 = load i8*, i8** %2
%135 = call i32 @ion_cmd_telnet(i8* %134)
br label %136
136: ; preds = %133, %129
%137 = load i8*, i8** %2
%138 = call i32 @strcasecmp(i8* %137, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%139 = icmp ne i32 %138, 0
br i1 %139, label %143, label %140
140: ; preds = %136
%141 = load i8*, i8** %2
%142 = call i32 @ion_cmd_traceroute(i8* %141)
br label %143
143: ; preds = %140, %136
br label %157
144: ; preds = %1
%145 = load i8*, i8** %2
%146 = call i32 @strcasecmp(i8* %145, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%147 = icmp ne i32 %146, 0
br i1 %147, label %150, label %148
148: ; preds = %144
%149 = call i32 (...) @ion_cmd_who()
br label %150
150: ; preds = %148, %144
%151 = load i8*, i8** %2
%152 = call i32 @strcasecmp(i8* %151, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
%153 = icmp ne i32 %152, 0
br i1 %153, label %156, label %154
154: ; preds = %150
%155 = call i32 (...) @ion_cmd_write()
br label %156
156: ; preds = %154, %150
br label %157
157: ; preds = %1, %156, %143, %128, %99, %84, %76, %68, %60, %38, %25, %17
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"copy\00"
@.str.1 = [5 x i8] c"exit\00"
@EXIT_SUCCESS = global i32 0
@.str.2 = [5 x i8] c"help\00"
@.str.3 = [8 x i8] c"history\00"
@.str.4 = [7 x i8] c"logoff\00"
@.str.5 = [7 x i8] c"logout\00"
@.str.6 = [3 x i8] c"ls\00"
@.str.7 = [5 x i8] c"mode\00"
@.str.8 = [5 x i8] c"ping\00"
@.str.9 = [5 x i8] c"quit\00"
@.str.10 = [7 x i8] c"reboot\00"
@.str.11 = [8 x i8] c"restart\00"
@.str.12 = [4 x i8] c"set\00"
@.str.13 = [5 x i8] c"show\00"
@.str.14 = [4 x i8] c"ssh\00"
@.str.15 = [6 x i8] c"stats\00"
@.str.16 = [7 x i8] c"telnet\00"
@.str.17 = [6 x i8] c"trace\00"
@.str.18 = [4 x i8] c"who\00"
@.str.19 = [6 x i8] c"write\00"
define void @ion_process_cmd(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %107 [
i8 99, label %3
i8 101, label %8
i8 104, label %14
i8 108, label %24
i8 109, label %41
i8 112, label %46
i8 113, label %51
i8 114, label %57
i8 115, label %67
i8 116, label %87
i8 119, label %97
]
3: ; preds = %1
%4 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %107
6: ; preds = %3
%7 = tail call i32 @ion_cmd_copy(i8* %0)
br label %107
8: ; preds = %1
%9 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %107
11: ; preds = %8
%12 = load i32, i32* @EXIT_SUCCESS
%13 = tail call i32 @ion_exit(i32 %12)
br label %107
14: ; preds = %1
%15 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = tail call i32 (...) @ion_cmd_help()
br label %19
19: ; preds = %17, %14
%20 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %107
22: ; preds = %19
%23 = tail call i32 (...) @ion_cmd_history()
br label %107
24: ; preds = %1
%25 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* @EXIT_SUCCESS
%29 = tail call i32 @ion_exit(i32 %28)
br label %30
30: ; preds = %27, %24
%31 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = load i32, i32* @EXIT_SUCCESS
%35 = tail call i32 @ion_exit(i32 %34)
br label %36
36: ; preds = %33, %30
%37 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %107
39: ; preds = %36
%40 = tail call i32 @ion_cmd_ls(i8* %0)
br label %107
41: ; preds = %1
%42 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %107
44: ; preds = %41
%45 = tail call i32 @ion_cmd_mode(i8* %0)
br label %107
46: ; preds = %1
%47 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %107
49: ; preds = %46
%50 = tail call i32 @ion_cmd_ping(i8* %0)
br label %107
51: ; preds = %1
%52 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %107
54: ; preds = %51
%55 = load i32, i32* @EXIT_SUCCESS
%56 = tail call i32 @ion_exit(i32 %55)
br label %107
57: ; preds = %1
%58 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = tail call i32 @ion_cmd_restart(i8* %0)
br label %62
62: ; preds = %60, %57
%63 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %107
65: ; preds = %62
%66 = tail call i32 @ion_cmd_restart(i8* %0)
br label %107
67: ; preds = %1
%68 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = tail call i32 @ion_cmd_set(i8* %0)
br label %72
72: ; preds = %70, %67
%73 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call i32 @ion_cmd_show(i8* %0)
br label %77
77: ; preds = %75, %72
%78 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = tail call i32 @ion_cmd_ssh(i8* %0)
br label %82
82: ; preds = %80, %77
%83 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %107
85: ; preds = %82
%86 = tail call i32 @ion_cmd_stats(i8* %0)
br label %107
87: ; preds = %1
%88 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = tail call i32 @ion_cmd_telnet(i8* %0)
br label %92
92: ; preds = %90, %87
%93 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %107
95: ; preds = %92
%96 = tail call i32 @ion_cmd_traceroute(i8* %0)
br label %107
97: ; preds = %1
%98 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = tail call i32 (...) @ion_cmd_who()
br label %102
102: ; preds = %100, %97
%103 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0))
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %107
105: ; preds = %102
%106 = tail call i32 (...) @ion_cmd_write()
br label %107
107: ; preds = %102, %105, %92, %95, %82, %85, %62, %65, %51, %54, %46, %49, %41, %44, %36, %39, %19, %22, %8, %11, %3, %6, %1
ret void
}