#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*/ pcjoy_assign_Alpha(int);
int /*<<< orphan*/ pcjoy_assign_Beta(int);
int /*<<< orphan*/ pcjoy_assign_Cursor(int);
int /*<<< orphan*/ pcjoy_assign_Gamma(int);
int /*<<< orphan*/ pcjoy_assign_Omega(int);
int /*<<< orphan*/ pcjoy_assign_Opqa(int);
int /*<<< orphan*/ pcjoy_assign_ToTo3(int);
int /*<<< orphan*/ pcjoy_assign_ToTo4(int);
void pcjoy_assign(int joy, int mode) {
  switch (mode) {
  case 0:
    pcjoy_assign_Alpha(joy);
    break;
  case 1:
    pcjoy_assign_Beta(joy);
    break;
  case 2:
    pcjoy_assign_Gamma(joy);
    break;
  case 3:
    pcjoy_assign_Omega(joy);
    break;
  case 4:
    pcjoy_assign_ToTo3(joy);
    break;
  case 5:
    pcjoy_assign_ToTo4(joy);
    break;
  case 7:
    pcjoy_assign_Cursor(joy);
    break;
  case 6:
    pcjoy_assign_Opqa(joy);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<pcjoy_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x7,%rax
ja     121b <pcjoy_assign+0x9b>
mov    -0x10(%rbp),%rax
lea    0xe56(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%edi
call   1070 <pcjoy_assign_Alpha@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1090 <pcjoy_assign_Beta@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1080 <pcjoy_assign_Gamma@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1040 <pcjoy_assign_Omega@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1050 <pcjoy_assign_ToTo3@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   10a0 <pcjoy_assign_ToTo4@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1030 <pcjoy_assign_Cursor@plt>
jmp    1220 <pcjoy_assign+0xa0>
mov    -0x4(%rbp),%edi
call   1060 <pcjoy_assign_Opqa@plt>
jmp    1220 <pcjoy_assign+0xa0>
jmp    1220 <pcjoy_assign+0xa0>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcjoy_assign>:
cmp    $0x7,%esi
ja     119c <pcjoy_assign+0x1c>
mov    %esi,%eax
lea    0xe72(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1070 <pcjoy_assign_Alpha@plt>
ret
jmp    1090 <pcjoy_assign_Beta@plt>
jmp    1080 <pcjoy_assign_Gamma@plt>
jmp    1040 <pcjoy_assign_Omega@plt>
jmp    1050 <pcjoy_assign_ToTo3@plt>
jmp    10a0 <pcjoy_assign_ToTo4@plt>
jmp    1060 <pcjoy_assign_Opqa@plt>
jmp    1030 <pcjoy_assign_Cursor@plt>

LLVM IR (-O0):
define void @pcjoy_assign(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %30 [
i32 0, label %6
i32 1, label %9
i32 2, label %12
i32 3, label %15
i32 4, label %18
i32 5, label %21
i32 7, label %24
i32 6, label %27
]
6: ; preds = %2
%7 = load i32, i32* %3
%8 = call i32 @pcjoy_assign_Alpha(i32 %7)
br label %31
9: ; preds = %2
%10 = load i32, i32* %3
%11 = call i32 @pcjoy_assign_Beta(i32 %10)
br label %31
12: ; preds = %2
%13 = load i32, i32* %3
%14 = call i32 @pcjoy_assign_Gamma(i32 %13)
br label %31
15: ; preds = %2
%16 = load i32, i32* %3
%17 = call i32 @pcjoy_assign_Omega(i32 %16)
br label %31
18: ; preds = %2
%19 = load i32, i32* %3
%20 = call i32 @pcjoy_assign_ToTo3(i32 %19)
br label %31
21: ; preds = %2
%22 = load i32, i32* %3
%23 = call i32 @pcjoy_assign_ToTo4(i32 %22)
br label %31
24: ; preds = %2
%25 = load i32, i32* %3
%26 = call i32 @pcjoy_assign_Cursor(i32 %25)
br label %31
27: ; preds = %2
%28 = load i32, i32* %3
%29 = call i32 @pcjoy_assign_Opqa(i32 %28)
br label %31
30: ; preds = %2
br label %31
31: ; preds = %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
define void @pcjoy_assign(i32 %0, i32 %1) {
switch i32 %1, label %19 [
i32 0, label %3
i32 1, label %5
i32 2, label %7
i32 3, label %9
i32 4, label %11
i32 5, label %13
i32 7, label %15
i32 6, label %17
]
3: ; preds = %2
%4 = tail call i32 @pcjoy_assign_Alpha(i32 %0)
br label %19
5: ; preds = %2
%6 = tail call i32 @pcjoy_assign_Beta(i32 %0)
br label %19
7: ; preds = %2
%8 = tail call i32 @pcjoy_assign_Gamma(i32 %0)
br label %19
9: ; preds = %2
%10 = tail call i32 @pcjoy_assign_Omega(i32 %0)
br label %19
11: ; preds = %2
%12 = tail call i32 @pcjoy_assign_ToTo3(i32 %0)
br label %19
13: ; preds = %2
%14 = tail call i32 @pcjoy_assign_ToTo4(i32 %0)
br label %19
15: ; preds = %2
%16 = tail call i32 @pcjoy_assign_Cursor(i32 %0)
br label %19
17: ; preds = %2
%18 = tail call i32 @pcjoy_assign_Opqa(i32 %0)
br label %19
19: ; preds = %2, %17, %15, %13, %11, %9, %7, %5, %3
ret void
}