char *ipv6_hopopt_type(unsigned char id) {
  switch (id) {
  case 0x00:
    return ("Pad1");
  case 0x01:
    return ("PadN");
  case 0xc2:
    return ("Jumbo Payload");
  case 0x63:
    return ("RPL Option");
  case 0x04:
    return ("Tunnel Encapsulation Limit");
  case 0x05:
    return ("Router Alert");
  case 0x26:
    return ("Quick-Start");
  case 0x07:
    return ("CALIPSO");
  case 0x08:
    return ("SMF_DPD");
  case 0xc9:
    return ("Home Address");
  case 0x8a:
    return ("Endpoint Identification");
  case 0x8b:
    return ("ILNP Nonce");
  case 0x8c:
    return ("Line-Identification Option");
  case 0x4d:
    return ("Deprecated");
  case 0x6d:
    return ("MPL Option");
  case 0xee:
    return ("IP_DFF");
  case 0x1e:
  case 0x3e:
  case 0x5e:
  case 0x7e:
  case 0x9e:
  case 0xbe:
  case 0xde:
  case 0xfe:
    return ("RFC3692-style Experiment");
  }
  return ("UNKNOWN");
}


x86 assembly (clang, -O0):
<ipv6_hopopt_type>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     12b9 <ipv6_hopopt_type+0x1b9>
jmp    111e <ipv6_hopopt_type+0x1e>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     12c9 <ipv6_hopopt_type+0x1c9>
jmp    112f <ipv6_hopopt_type+0x2f>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     12f9 <ipv6_hopopt_type+0x1f9>
jmp    1140 <ipv6_hopopt_type+0x40>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     1309 <ipv6_hopopt_type+0x209>
jmp    1151 <ipv6_hopopt_type+0x51>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     1329 <ipv6_hopopt_type+0x229>
jmp    1162 <ipv6_hopopt_type+0x62>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     1339 <ipv6_hopopt_type+0x239>
jmp    1173 <ipv6_hopopt_type+0x73>
mov    -0x10(%rbp),%eax
sub    $0x1e,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    1184 <ipv6_hopopt_type+0x84>
mov    -0x10(%rbp),%eax
sub    $0x26,%eax
je     1319 <ipv6_hopopt_type+0x219>
jmp    1195 <ipv6_hopopt_type+0x95>
mov    -0x10(%rbp),%eax
sub    $0x3e,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    11a6 <ipv6_hopopt_type+0xa6>
mov    -0x10(%rbp),%eax
sub    $0x4d,%eax
je     1389 <ipv6_hopopt_type+0x289>
jmp    11b7 <ipv6_hopopt_type+0xb7>
mov    -0x10(%rbp),%eax
sub    $0x5e,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    11c8 <ipv6_hopopt_type+0xc8>
mov    -0x10(%rbp),%eax
sub    $0x63,%eax
je     12e9 <ipv6_hopopt_type+0x1e9>
jmp    11d9 <ipv6_hopopt_type+0xd9>
mov    -0x10(%rbp),%eax
sub    $0x6d,%eax
je     1399 <ipv6_hopopt_type+0x299>
jmp    11ea <ipv6_hopopt_type+0xea>
mov    -0x10(%rbp),%eax
sub    $0x7e,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    11fb <ipv6_hopopt_type+0xfb>
mov    -0x10(%rbp),%eax
sub    $0x8a,%eax
je     1359 <ipv6_hopopt_type+0x259>
jmp    120e <ipv6_hopopt_type+0x10e>
mov    -0x10(%rbp),%eax
sub    $0x8b,%eax
je     1369 <ipv6_hopopt_type+0x269>
jmp    1221 <ipv6_hopopt_type+0x121>
mov    -0x10(%rbp),%eax
sub    $0x8c,%eax
je     1379 <ipv6_hopopt_type+0x279>
jmp    1234 <ipv6_hopopt_type+0x134>
mov    -0x10(%rbp),%eax
sub    $0x9e,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    1247 <ipv6_hopopt_type+0x147>
mov    -0x10(%rbp),%eax
sub    $0xbe,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    125a <ipv6_hopopt_type+0x15a>
mov    -0x10(%rbp),%eax
sub    $0xc2,%eax
je     12d9 <ipv6_hopopt_type+0x1d9>
jmp    126d <ipv6_hopopt_type+0x16d>
mov    -0x10(%rbp),%eax
sub    $0xc9,%eax
je     1349 <ipv6_hopopt_type+0x249>
jmp    1280 <ipv6_hopopt_type+0x180>
mov    -0x10(%rbp),%eax
sub    $0xde,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    1293 <ipv6_hopopt_type+0x193>
mov    -0x10(%rbp),%eax
sub    $0xee,%eax
je     13a9 <ipv6_hopopt_type+0x2a9>
jmp    12a6 <ipv6_hopopt_type+0x1a6>
mov    -0x10(%rbp),%eax
sub    $0xfe,%eax
je     13b9 <ipv6_hopopt_type+0x2b9>
jmp    13c9 <ipv6_hopopt_type+0x2c9>
lea    0xd40(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd35(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd2a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd28(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd23(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd2e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd2b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd27(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd1f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd17(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd17(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd22(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd1d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd18(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd0f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13d4 <ipv6_hopopt_type+0x2d4>
lea    0xd18(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_hopopt_type>:
lea    0x76(%rdi),%ecx
cmp    $0xe3,%cl
ja     112a <ipv6_hopopt_type+0x2a>
lea    0x1281(%rip),%rax
movzbl %cl,%ecx
lea    0xee7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x1336(%rip),%rax
ret
cmp    $0x7e,%dil
je     1122 <ipv6_hopopt_type+0x22>
lea    0x1341(%rip),%rax
ret
lea    0x12c5(%rip),%rax
ret
lea    0x12d5(%rip),%rax
ret
lea    0x12d8(%rip),%rax
ret
lea    0x1243(%rip),%rax
ret
lea    0x1298(%rip),%rax
ret
lea    0x12f1(%rip),%rax
ret
lea    0x1226(%rip),%rax
ret
lea    0x123c(%rip),%rax
ret
lea    0x124f(%rip),%rax
ret
lea    0x1260(%rip),%rax
ret
lea    0x1260(%rip),%rax
ret
lea    0x1244(%rip),%rax
ret
lea    0x12a3(%rip),%rax
ret
lea    0x1201(%rip),%rax
ret
lea    0x129e(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Pad1\00"
@.str.1 = [5 x i8] c"PadN\00"
@.str.2 = [14 x i8] c"Jumbo Payload\00"
@.str.3 = [11 x i8] c"RPL Option\00"
@.str.4 = [27 x i8] c"Tunnel Encapsulation Limit\00"
@.str.5 = [13 x i8] c"Router Alert\00"
@.str.6 = [12 x i8] c"Quick-Start\00"
@.str.7 = [8 x i8] c"CALIPSO\00"
@.str.8 = [8 x i8] c"SMF_DPD\00"
@.str.9 = [13 x i8] c"Home Address\00"
@.str.10 = [24 x i8] c"Endpoint Identification\00"
@.str.11 = [11 x i8] c"ILNP Nonce\00"
@.str.12 = [27 x i8] c"Line-Identification Option\00"
@.str.13 = [11 x i8] c"Deprecated\00"
@.str.14 = [11 x i8] c"MPL Option\00"
@.str.15 = [7 x i8] c"IP_DFF\00"
@.str.16 = [25 x i8] c"RFC3692-style Experiment\00"
@.str.17 = [8 x i8] c"UNKNOWN\00"
define i8* @ipv6_hopopt_type(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %23 [
i32 0, label %6
i32 1, label %7
i32 194, label %8
i32 99, label %9
i32 4, label %10
i32 5, label %11
i32 38, label %12
i32 7, label %13
i32 8, label %14
i32 201, label %15
i32 138, label %16
i32 139, label %17
i32 140, label %18
i32 77, label %19
i32 109, label %20
i32 238, label %21
i32 30, label %22
i32 62, label %22
i32 94, label %22
i32 126, label %22
i32 158, label %22
i32 190, label %22
i32 222, label %22
i32 254, label %22
]
6: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %24
7: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %24
8: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %24
9: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %24
10: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %24
11: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %24
12: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %24
13: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %24
14: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %24
15: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %24
16: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %24
17: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %24
18: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %24
19: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %24
20: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %24
21: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %24
22: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %24
23: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %24
24: ; preds = %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
@.str = [5 x i8] c"Pad1\00"
@.str.1 = [5 x i8] c"PadN\00"
@.str.2 = [14 x i8] c"Jumbo Payload\00"
@.str.3 = [11 x i8] c"RPL Option\00"
@.str.4 = [27 x i8] c"Tunnel Encapsulation Limit\00"
@.str.5 = [13 x i8] c"Router Alert\00"
@.str.6 = [12 x i8] c"Quick-Start\00"
@.str.7 = [8 x i8] c"CALIPSO\00"
@.str.8 = [8 x i8] c"SMF_DPD\00"
@.str.9 = [13 x i8] c"Home Address\00"
@.str.10 = [24 x i8] c"Endpoint Identification\00"
@.str.11 = [11 x i8] c"ILNP Nonce\00"
@.str.12 = [27 x i8] c"Line-Identification Option\00"
@.str.13 = [11 x i8] c"Deprecated\00"
@.str.14 = [11 x i8] c"MPL Option\00"
@.str.15 = [7 x i8] c"IP_DFF\00"
@.str.16 = [25 x i8] c"RFC3692-style Experiment\00"
@.str.17 = [8 x i8] c"UNKNOWN\00"
define i8* @ipv6_hopopt_type(i8 zeroext %0) {
switch i8 %0, label %18 [
i8 0, label %19
i8 1, label %2
i8 -62, label %3
i8 99, label %4
i8 4, label %5
i8 5, label %6
i8 38, label %7
i8 7, label %8
i8 8, label %9
i8 -55, label %10
i8 -118, label %11
i8 -117, label %12
i8 -116, label %13
i8 77, label %14
i8 109, label %15
i8 -18, label %16
i8 30, label %17
i8 62, label %17
i8 94, label %17
i8 126, label %17
i8 -98, label %17
i8 -66, label %17
i8 -34, label %17
i8 -2, label %17
]
2: ; preds = %1
br label %19
3: ; preds = %1
br label %19
4: ; preds = %1
br label %19
5: ; preds = %1
br label %19
6: ; preds = %1
br label %19
7: ; preds = %1
br label %19
8: ; preds = %1
br label %19
9: ; preds = %1
br label %19
10: ; preds = %1
br label %19
11: ; preds = %1
br label %19
12: ; preds = %1
br label %19
13: ; preds = %1
br label %19
14: ; preds = %1
br label %19
15: ; preds = %1
br label %19
16: ; preds = %1
br label %19
17: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
br label %19
18: ; preds = %1
br label %19
19: ; preds = %1, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%20 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([8 x i8], [8 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 ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %20
}