#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_typename(uint16_t type) {
  switch (type) {
  case 1:
    return "A";
  case 2:
    return "NS";
  case 3:
    return "MD";
  case 4:
    return "MF";
  case 5:
    return "CNAME";
  case 6:
    return "SOA";
  case 7:
    return "MB";
  case 8:
    return "MG";
  case 9:
    return "MR";
  case 10:
    return "NULL";
  case 11:
    return "WKS";
  case 12:
    return "PTR";
  case 13:
    return "HINFO";
  case 14:
    return "MINFO";
  case 15:
    return "MX";
  case 16:
    return "TXT";
  case 28:
    return "AAAA";
  case 41:
    return "OPT";
  case 252:
    return "AXFR";
  case 253:
    return "MAILB";
  case 254:
    return "MAILA";
  case 255:
    return "ANY";
  default:
    return "";
  }
}


x86 assembly (clang, -O0):
<ns_typename>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1288 <ns_typename+0x188>
jmp    111b <ns_typename+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1298 <ns_typename+0x198>
jmp    112c <ns_typename+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     12a8 <ns_typename+0x1a8>
jmp    113d <ns_typename+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     12b8 <ns_typename+0x1b8>
jmp    114e <ns_typename+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     12c8 <ns_typename+0x1c8>
jmp    115f <ns_typename+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     12d8 <ns_typename+0x1d8>
jmp    1170 <ns_typename+0x70>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     12e8 <ns_typename+0x1e8>
jmp    1181 <ns_typename+0x81>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     12f8 <ns_typename+0x1f8>
jmp    1192 <ns_typename+0x92>
mov    -0x10(%rbp),%eax
sub    $0x9,%eax
je     1308 <ns_typename+0x208>
jmp    11a3 <ns_typename+0xa3>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
je     1318 <ns_typename+0x218>
jmp    11b4 <ns_typename+0xb4>
mov    -0x10(%rbp),%eax
sub    $0xb,%eax
je     1328 <ns_typename+0x228>
jmp    11c5 <ns_typename+0xc5>
mov    -0x10(%rbp),%eax
sub    $0xc,%eax
je     1338 <ns_typename+0x238>
jmp    11d6 <ns_typename+0xd6>
mov    -0x10(%rbp),%eax
sub    $0xd,%eax
je     1348 <ns_typename+0x248>
jmp    11e7 <ns_typename+0xe7>
mov    -0x10(%rbp),%eax
sub    $0xe,%eax
je     1358 <ns_typename+0x258>
jmp    11f8 <ns_typename+0xf8>
mov    -0x10(%rbp),%eax
sub    $0xf,%eax
je     1368 <ns_typename+0x268>
jmp    1209 <ns_typename+0x109>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     1378 <ns_typename+0x278>
jmp    121a <ns_typename+0x11a>
mov    -0x10(%rbp),%eax
sub    $0x1c,%eax
je     1388 <ns_typename+0x288>
jmp    122b <ns_typename+0x12b>
mov    -0x10(%rbp),%eax
sub    $0x29,%eax
je     1398 <ns_typename+0x298>
jmp    123c <ns_typename+0x13c>
mov    -0x10(%rbp),%eax
sub    $0xfc,%eax
je     13a8 <ns_typename+0x2a8>
jmp    124f <ns_typename+0x14f>
mov    -0x10(%rbp),%eax
sub    $0xfd,%eax
je     13b8 <ns_typename+0x2b8>
jmp    1262 <ns_typename+0x162>
mov    -0x10(%rbp),%eax
sub    $0xfe,%eax
je     13c8 <ns_typename+0x2c8>
jmp    1275 <ns_typename+0x175>
mov    -0x10(%rbp),%eax
sub    $0xff,%eax
je     13d8 <ns_typename+0x2d8>
jmp    13e8 <ns_typename+0x2e8>
lea    0xdb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd61(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd54(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd3a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd30(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd24(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd17(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xd0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcfd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcf2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xce6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcda(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcd0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xcad(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xca2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xc96(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xc8b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xc81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xc77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13f3 <ns_typename+0x2f3>
lea    0xc51(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_typename>:
lea    -0x1(%rdi),%ecx
cmp    $0x28,%ecx
ja     1127 <ns_typename+0x27>
lea    0xfe4(%rip),%rax
lea    0xeea(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf8e(%rip),%rax
ret
add    $0xffffff04,%edi
cmp    $0x3,%edi
ja     114a <ns_typename+0x4a>
lea    0xf6b(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xfb0(%rip),%rax
ret
lea    0xfa3(%rip),%rax
ret
lea    0xf5e(%rip),%rax
ret
lea    0xf59(%rip),%rax
ret
lea    0xf54(%rip),%rax
ret
lea    0xf52(%rip),%rax
ret
lea    0xf4e(%rip),%rax
ret
lea    0xf49(%rip),%rax
ret
lea    0xf44(%rip),%rax
ret
lea    0xf3f(%rip),%rax
ret
lea    0xf3c(%rip),%rax
ret
lea    0xf38(%rip),%rax
ret
lea    0xf34(%rip),%rax
ret
lea    0xf32(%rip),%rax
ret
lea    0xf30(%rip),%rax
ret
lea    0xf2b(%rip),%rax
ret
lea    0xf27(%rip),%rax
ret
lea    0xf24(%rip),%rax
ret
lea    0xf25(%rip),%rax
ret
lea    0xf23(%rip),%rax
ret
lea    0xf21(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [3 x i8] c"NS\00"
@.str.2 = [3 x i8] c"MD\00"
@.str.3 = [3 x i8] c"MF\00"
@.str.4 = [6 x i8] c"CNAME\00"
@.str.5 = [4 x i8] c"SOA\00"
@.str.6 = [3 x i8] c"MB\00"
@.str.7 = [3 x i8] c"MG\00"
@.str.8 = [3 x i8] c"MR\00"
@.str.9 = [5 x i8] c"NULL\00"
@.str.10 = [4 x i8] c"WKS\00"
@.str.11 = [4 x i8] c"PTR\00"
@.str.12 = [6 x i8] c"HINFO\00"
@.str.13 = [6 x i8] c"MINFO\00"
@.str.14 = [3 x i8] c"MX\00"
@.str.15 = [4 x i8] c"TXT\00"
@.str.16 = [5 x i8] c"AAAA\00"
@.str.17 = [4 x i8] c"OPT\00"
@.str.18 = [5 x i8] c"AXFR\00"
@.str.19 = [6 x i8] c"MAILB\00"
@.str.20 = [6 x i8] c"MAILA\00"
@.str.21 = [4 x i8] c"ANY\00"
@.str.22 = [1 x i8] zeroinitializer
define i8* @ns_typename(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %27 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
i32 6, label %10
i32 7, label %11
i32 8, label %12
i32 9, label %13
i32 10, label %14
i32 11, label %15
i32 12, label %16
i32 13, label %17
i32 14, label %18
i32 15, label %19
i32 16, label %20
i32 28, label %21
i32 41, label %22
i32 252, label %23
i32 253, label %24
i32 254, label %25
i32 255, label %26
]
5: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %28
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %28
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %28
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %28
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %28
10: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %28
11: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %28
12: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %28
13: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %28
14: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %28
15: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %28
16: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %28
17: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %28
18: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %28
19: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %28
20: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %28
21: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %28
22: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %28
23: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %28
24: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %28
25: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %28
26: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %28
27: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %28
28: ; preds = %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%29 = load i8*, i8** %2
ret i8* %29
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [3 x i8] c"NS\00"
@.str.2 = [3 x i8] c"MD\00"
@.str.3 = [3 x i8] c"MF\00"
@.str.4 = [6 x i8] c"CNAME\00"
@.str.5 = [4 x i8] c"SOA\00"
@.str.6 = [3 x i8] c"MB\00"
@.str.7 = [3 x i8] c"MG\00"
@.str.8 = [3 x i8] c"MR\00"
@.str.9 = [5 x i8] c"NULL\00"
@.str.10 = [4 x i8] c"WKS\00"
@.str.11 = [4 x i8] c"PTR\00"
@.str.12 = [6 x i8] c"HINFO\00"
@.str.13 = [6 x i8] c"MINFO\00"
@.str.14 = [3 x i8] c"MX\00"
@.str.15 = [4 x i8] c"TXT\00"
@.str.16 = [5 x i8] c"AAAA\00"
@.str.17 = [4 x i8] c"OPT\00"
@.str.18 = [5 x i8] c"AXFR\00"
@.str.19 = [6 x i8] c"MAILB\00"
@.str.20 = [6 x i8] c"MAILA\00"
@.str.21 = [4 x i8] c"ANY\00"
@.str.22 = [1 x i8] zeroinitializer
define i8* @ns_typename(i32 %0) {
switch i32 %0, label %23 [
i32 1, label %24
i32 2, label %2
i32 3, label %3
i32 4, label %4
i32 5, label %5
i32 6, label %6
i32 7, label %7
i32 8, label %8
i32 9, label %9
i32 10, label %10
i32 11, label %11
i32 12, label %12
i32 13, label %13
i32 14, label %14
i32 15, label %15
i32 16, label %16
i32 28, label %17
i32 41, label %18
i32 252, label %19
i32 253, label %20
i32 254, label %21
i32 255, label %22
]
2: ; preds = %1
br label %24
3: ; preds = %1
br label %24
4: ; preds = %1
br label %24
5: ; preds = %1
br label %24
6: ; preds = %1
br label %24
7: ; preds = %1
br label %24
8: ; preds = %1
br label %24
9: ; preds = %1
br label %24
10: ; preds = %1
br label %24
11: ; preds = %1
br label %24
12: ; preds = %1
br label %24
13: ; preds = %1
br label %24
14: ; preds = %1
br label %24
15: ; preds = %1
br label %24
16: ; preds = %1
br label %24
17: ; preds = %1
br label %24
18: ; preds = %1
br label %24
19: ; preds = %1
br label %24
20: ; preds = %1
br label %24
21: ; preds = %1
br label %24
22: ; preds = %1
br label %24
23: ; preds = %1
br label %24
24: ; preds = %1, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%25 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([6 x i8], [6 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 ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %25
}