#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 uint16_t;

/* Variables and functions */
const char *ns_classname(uint16_t cls) {
  switch (cls) {
  case 1:
    return "IN";
  case 2:
    return "CS";
  case 3:
    return "CH";
  case 4:
    return "HS";
  case 255:
    return "ANY";
  default:
    return "";
  }
}


x86 assembly (clang, -O0):
<ns_classname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1161 <ns_classname+0x61>
jmp    111b <ns_classname+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1171 <ns_classname+0x71>
jmp    112c <ns_classname+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1181 <ns_classname+0x81>
jmp    113d <ns_classname+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     1191 <ns_classname+0x91>
jmp    114e <ns_classname+0x4e>
mov    -0x10(%rbp),%eax
sub    $0xff,%eax
je     11a1 <ns_classname+0xa1>
jmp    11b1 <ns_classname+0xb1>
lea    0xe98(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11bc <ns_classname+0xbc>
lea    0xe8b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11bc <ns_classname+0xbc>
lea    0xe7e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11bc <ns_classname+0xbc>
lea    0xe71(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11bc <ns_classname+0xbc>
lea    0xe64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11bc <ns_classname+0xbc>
lea    0xe50(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_classname>:
lea    -0x1(%rdi),%ecx
cmp    $0x3,%ecx
ja     1127 <ns_classname+0x27>
lea    0xf01(%rip),%rax
lea    0xeea(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xeed(%rip),%rax
ret
cmp    $0xff,%edi
jne    1147 <ns_classname+0x47>
lea    0xee6(%rip),%rax
ret
lea    0xed8(%rip),%rax
ret
lea    0xed3(%rip),%rax
ret
lea    0xeca(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"IN\00"
@.str.1 = [3 x i8] c"CS\00"
@.str.2 = [3 x i8] c"CH\00"
@.str.3 = [3 x i8] c"HS\00"
@.str.4 = [4 x i8] c"ANY\00"
@.str.5 = [1 x i8] zeroinitializer
define i8* @ns_classname(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 255, label %9
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %11
9: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %11
10: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"IN\00"
@.str.1 = [3 x i8] c"CS\00"
@.str.2 = [3 x i8] c"CH\00"
@.str.3 = [3 x i8] c"HS\00"
@.str.4 = [4 x i8] c"ANY\00"
@.str.5 = [1 x i8] zeroinitializer
define i8* @ns_classname(i32 %0) {
switch i32 %0, label %6 [
i32 1, label %7
i32 2, label %2
i32 3, label %3
i32 4, label %4
i32 255, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %8
}