#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 */
typedef int uint32_t;

/* Variables and functions */
const char *rcpProcExecutable(uint32_t proc) {
  switch (proc) {
  case 1:
    return "cli";
  case (1 << 1):
    return "rcpservicesd";
  case (1 << 2):
    return "rcprouterd";
  case (1 << 3):
    return "rcpdhcpd";
  case (1 << 4):
    return "rcpripd";
  case (1 << 6):
    return "rcpsecd";
  case (1 << 5):
    return "TESTPROC";
  case (1 << 7):
    return "rcpdnsd";
  case (1 << 8):
    return "ntpd";
  case (1 << 9):
    return "rcpacld";
  case (1 << 10):
    return "rcpnetmond";
  case (1 << 11):
    return "rcpospfd";
  }
  return "";
}


x86 assembly (clang, -O0):
<rcpProcExecutable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     11e0 <rcpProcExecutable+0xe0>
jmp    111b <rcpProcExecutable+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     11f0 <rcpProcExecutable+0xf0>
jmp    112c <rcpProcExecutable+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     1200 <rcpProcExecutable+0x100>
jmp    113d <rcpProcExecutable+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     1210 <rcpProcExecutable+0x110>
jmp    114e <rcpProcExecutable+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     1220 <rcpProcExecutable+0x120>
jmp    115f <rcpProcExecutable+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
je     1240 <rcpProcExecutable+0x140>
jmp    1170 <rcpProcExecutable+0x70>
mov    -0x10(%rbp),%eax
sub    $0x40,%eax
je     1230 <rcpProcExecutable+0x130>
jmp    1181 <rcpProcExecutable+0x81>
mov    -0x10(%rbp),%eax
sub    $0x80,%eax
je     1250 <rcpProcExecutable+0x150>
jmp    1194 <rcpProcExecutable+0x94>
mov    -0x10(%rbp),%eax
sub    $0x100,%eax
je     1260 <rcpProcExecutable+0x160>
jmp    11a7 <rcpProcExecutable+0xa7>
mov    -0x10(%rbp),%eax
sub    $0x200,%eax
je     1270 <rcpProcExecutable+0x170>
jmp    11ba <rcpProcExecutable+0xba>
mov    -0x10(%rbp),%eax
sub    $0x400,%eax
je     1280 <rcpProcExecutable+0x180>
jmp    11cd <rcpProcExecutable+0xcd>
mov    -0x10(%rbp),%eax
sub    $0x800,%eax
je     1290 <rcpProcExecutable+0x190>
jmp    12a0 <rcpProcExecutable+0x1a0>
lea    0xe19(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xe0d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xe0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xe05(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdfe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdf6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xde7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xddf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xdc7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <rcpProcExecutable+0x1ab>
lea    0xd96(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcpProcExecutable>:
cmp    $0x7f,%edi
jg     1130 <rcpProcExecutable+0x30>
add    $0xffffffff,%edi
cmp    $0x3f,%edi
ja     11b0 <rcpProcExecutable+0xb0>
lea    0xfe8(%rip),%rax
lea    0xee1(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xfd5(%rip),%rax
ret
cmp    $0x1ff,%edi
jle    1158 <rcpProcExecutable+0x58>
cmp    $0x200,%edi
je     1198 <rcpProcExecutable+0x98>
cmp    $0x400,%edi
je     11a0 <rcpProcExecutable+0xa0>
cmp    $0x800,%edi
jne    11b0 <rcpProcExecutable+0xb0>
lea    0x1007(%rip),%rax
ret
cmp    $0x80,%edi
je     11a8 <rcpProcExecutable+0xa8>
cmp    $0x100,%edi
jne    11b0 <rcpProcExecutable+0xb0>
lea    0xfd7(%rip),%rax
ret
lea    0xf9a(%rip),%rax
ret
lea    0xf9d(%rip),%rax
ret
lea    0xf9e(%rip),%rax
ret
lea    0xfa6(%rip),%rax
ret
lea    0xf96(%rip),%rax
ret
lea    0xfac(%rip),%rax
ret
lea    0xfac(%rip),%rax
ret
lea    0xf8f(%rip),%rax
ret
lea    0xf86(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cli\00"
@.str.1 = [13 x i8] c"rcpservicesd\00"
@.str.2 = [11 x i8] c"rcprouterd\00"
@.str.3 = [9 x i8] c"rcpdhcpd\00"
@.str.4 = [8 x i8] c"rcpripd\00"
@.str.5 = [8 x i8] c"rcpsecd\00"
@.str.6 = [9 x i8] c"TESTPROC\00"
@.str.7 = [8 x i8] c"rcpdnsd\00"
@.str.8 = [5 x i8] c"ntpd\00"
@.str.9 = [8 x i8] c"rcpacld\00"
@.str.10 = [11 x i8] c"rcpnetmond\00"
@.str.11 = [9 x i8] c"rcpospfd\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @rcpProcExecutable(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %17 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 8, label %8
i32 16, label %9
i32 64, label %10
i32 32, label %11
i32 128, label %12
i32 256, label %13
i32 512, label %14
i32 1024, label %15
i32 2048, label %16
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %18
6: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %18
7: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %18
8: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %18
9: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %18
10: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %18
11: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %18
12: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %18
13: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %18
14: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %18
15: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %18
16: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %18
17: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %18
18: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"cli\00"
@.str.1 = [13 x i8] c"rcpservicesd\00"
@.str.2 = [11 x i8] c"rcprouterd\00"
@.str.3 = [9 x i8] c"rcpdhcpd\00"
@.str.4 = [8 x i8] c"rcpripd\00"
@.str.5 = [8 x i8] c"rcpsecd\00"
@.str.6 = [9 x i8] c"TESTPROC\00"
@.str.7 = [8 x i8] c"rcpdnsd\00"
@.str.8 = [5 x i8] c"ntpd\00"
@.str.9 = [8 x i8] c"rcpacld\00"
@.str.10 = [11 x i8] c"rcpnetmond\00"
@.str.11 = [9 x i8] c"rcpospfd\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @rcpProcExecutable(i32 %0) {
switch i32 %0, label %13 [
i32 1, label %14
i32 2, label %2
i32 4, label %3
i32 8, label %4
i32 16, label %5
i32 64, label %6
i32 32, label %7
i32 128, label %8
i32 256, label %9
i32 512, label %10
i32 1024, label %11
i32 2048, label %12
]
2: ; preds = %1
br label %14
3: ; preds = %1
br label %14
4: ; preds = %1
br label %14
5: ; preds = %1
br label %14
6: ; preds = %1
br label %14
7: ; preds = %1
br label %14
8: ; preds = %1
br label %14
9: ; preds = %1
br label %14
10: ; preds = %1
br label %14
11: ; preds = %1
br label %14
12: ; preds = %1
br label %14
13: ; preds = %1
br label %14
14: ; preds = %1, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%15 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %15
}