#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 CS5;
int CS6;
int CS7;
int CS8;
int ser_number_of_bits_to_id(int nb) {
  switch (nb) {
  case 5:
    return CS5;
  case 6:
    return CS6;
  case 7:
    return CS7;
  case 8:
    return CS8;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ser_number_of_bits_to_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1174 <ser_number_of_bits_to_id+0x74>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ser_number_of_bits_to_id+0x7b>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ser_number_of_bits_to_id+0x7b>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ser_number_of_bits_to_id+0x7b>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ser_number_of_bits_to_id+0x7b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ser_number_of_bits_to_id>:
add    $0xfffffffb,%edi
cmp    $0x3,%edi
ja     1122 <ser_number_of_bits_to_id+0x22>
lea    0xef1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
ret
xor    %eax,%eax
ret
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@CS5 = global i32 0
@CS6 = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
define i32 @ser_number_of_bits_to_id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 5, label %5
i32 6, label %7
i32 7, label %9
i32 8, label %11
]
5: ; preds = %1
%6 = load i32, i32* @CS5
store i32 %6, i32* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* @CS6
store i32 %8, i32* %2
br label %14
9: ; preds = %1
%10 = load i32, i32* @CS7
store i32 %10, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* @CS8
store i32 %12, i32* %2
br label %14
13: ; preds = %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %9, %7, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@CS5 = global i32 0
@CS6 = global i32 0
@CS7 = global i32 0
@CS8 = global i32 0
define i32 @ser_number_of_bits_to_id(i32 %0) {
switch i32 %0, label %10 [
i32 5, label %2
i32 6, label %4
i32 7, label %6
i32 8, label %8
]
2: ; preds = %1
%3 = load i32, i32* @CS5
br label %10
4: ; preds = %1
%5 = load i32, i32* @CS6
br label %10
6: ; preds = %1
%7 = load i32, i32* @CS7
br label %10
8: ; preds = %1
%9 = load i32, i32* @CS8
br label %10
10: ; preds = %1, %8, %6, %4, %2
%11 = phi i32 [ %9, %8 ], [ %7, %6 ], [ %5, %4 ], [ %3, %2 ], [ 0, %1 ]
ret i32 %11
}