char *icmp_code(unsigned char type, unsigned char code) {
  switch (type) {
  case 0:
  case 4:
  case 8:
  case 10:
  case 13:
  case 14:
  case 15:
  case 16:
  case 17:
  case 18:
    if (code == 0)
      return ("No code");
    break;
  case 3:
    switch (code) {
    case 0:
      return ("Net Unreachable");
    case 1:
      return ("Host Unreachable");
    case 2:
      return ("Protocol Unreachable");
    case 3:
      return ("Port Unreachable");
    case 4:
      return ("Fragmentation Needed and Don't Fragment was Set");
    case 5:
      return ("Source Route Failed");
    case 6:
      return ("Destination Network Unknown");
    case 7:
      return ("Destination Host Unknown");
    case 8:
      return ("Source Host Isolated");
    case 9:
      return ("Communication with Destination Network is Administratively "
              "Prohibited");
    case 10:
      return (
          "Communication with Destination Host is Administratively Prohibited");
    case 11:
      return ("Destination Network Unreachable for Type of Service");
    case 12:
      return ("Destination Host Unreachable for Type of Service");
    case 13:
      return ("Communication Administratively Prohibited");
    case 14:
      return ("Host Precedence Violation");
    case 15:
      return ("Precedence cutoff in effect");
    }
    break;
  case 5:
    switch (code) {
    case 0:
      return ("Redirect Datagram for the Network (or subnet)");
    case 1:
      return ("Redirect Datagram for the Host");
    case 2:
      return ("Redirect Datagram for the Type of Service and Network");
    case 3:
      return ("Redirect Datagram for the Type of Service and Host");
    }
    break;
  case 6:
    if (code == 0)
      return ("Alternate Address for Host");
    break;
  case 9:
    if (code == 0)
      return ("Normal router advertisement");
    if (code == 16)
      return ("Does not route common traffic");
    break;
  case 11:
    if (code == 0)
      return ("Time to Live exceeded in Transit");
    if (code == 1)
      return ("Fragment Reassembly Time Exceeded");
    break;
  case 12:
    if (code == 0)
      return ("Pointer indicates the error");
    if (code == 1)
      return ("Missing a Required Option");
    if (code == 2)
      return ("Bad Length");
    break;
  case 40:
    switch (code) {
    case 0:
      return ("Bad SPI");
    case 1:
      return ("Authentication Failed");
    case 2:
      return ("Decompression Failed");
    case 3:
      return ("Decryption Failed");
    case 4:
      return ("Need Authentication");
    case 5:
      return ("Need Authorization");
    }
    break;
  }
  return ("UNKNOWN");
}


x86 assembly (clang, -O0):
<icmp_code>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x28,%rax
ja     1475 <icmp_code+0x375>
mov    -0x18(%rbp),%rax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movzbl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    1153 <icmp_code+0x53>
lea    0xfc2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0xf,%rax
ja     127e <icmp_code+0x17e>
mov    -0x20(%rbp),%rax
lea    0xf57(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf8f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xf8f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xf90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xf95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xf96(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xfb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xfba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xfc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xfcf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0xfd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x100a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x103d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x1061(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x1082(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x109c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10a6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x3,%rax
ja     12e9 <icmp_code+0x1e9>
mov    -0x28(%rbp),%rax
lea    0xe1c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1087(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10a5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10da(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    130b <icmp_code+0x20b>
lea    0x10eb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    132d <icmp_code+0x22d>
lea    0x10e4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
movzbl -0xa(%rbp),%eax
cmp    $0x10,%eax
jne    134a <icmp_code+0x24a>
lea    0x10e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    136c <icmp_code+0x26c>
lea    0x10df(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
movzbl -0xa(%rbp),%eax
cmp    $0x1,%eax
jne    1389 <icmp_code+0x289>
lea    0x10e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
cmp    $0x0,%eax
jne    13ab <icmp_code+0x2ab>
lea    0x10e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
movzbl -0xa(%rbp),%eax
cmp    $0x1,%eax
jne    13c8 <icmp_code+0x2c8>
lea    0x10e2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
movzbl -0xa(%rbp),%eax
cmp    $0x2,%eax
jne    13e5 <icmp_code+0x2e5>
lea    0x10df(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
movzbl -0xa(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0x5,%rax
ja     1470 <icmp_code+0x370>
mov    -0x30(%rbp),%rax
lea    0xc9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x10af(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10a7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10ad(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10b2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
lea    0x10b8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1480 <icmp_code+0x380>
jmp    1475 <icmp_code+0x375>
lea    0x10b6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<icmp_code>:
cmp    $0x28,%dil
ja     111d <icmp_code+0x1d>
mov    %edi,%eax
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
test   %sil,%sil
je     1125 <icmp_code+0x25>
lea    0x141a(%rip),%rax
ret
lea    0xfec(%rip),%rax
ret
cmp    $0x10,%sil
jae    111d <icmp_code+0x1d>
movsbq %sil,%rax
lea    0xf66(%rip),%rcx
jmp    11dc <icmp_code+0xdc>
cmp    $0x4,%sil
jae    111d <icmp_code+0x1d>
movsbq %sil,%rax
lea    0xf90(%rip),%rcx
jmp    11dc <icmp_code+0xdc>
test   %sil,%sil
jne    111d <icmp_code+0x1d>
lea    0x1294(%rip),%rax
ret
cmp    $0x10,%sil
lea    0x12bf(%rip),%rax
lea    0x13c6(%rip),%rcx
cmove  %rax,%rcx
test   %sil,%sil
lea    0x128e(%rip),%rax
cmovne %rcx,%rax
ret
cmp    $0x1,%sil
lea    0x12d9(%rip),%rax
lea    0x13a1(%rip),%rcx
cmove  %rax,%rcx
test   %sil,%sil
lea    0x12a3(%rip),%rax
cmovne %rcx,%rax
ret
cmp    $0x3,%sil
jae    111d <icmp_code+0x1d>
movsbq %sil,%rax
lea    0xf2f(%rip),%rcx
jmp    11dc <icmp_code+0xdc>
cmp    $0x6,%sil
jae    111d <icmp_code+0x1d>
movsbq %sil,%rax
lea    0xf24(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"No code\00"
@.str.1 = [16 x i8] c"Net Unreachable\00"
@.str.2 = [17 x i8] c"Host Unreachable\00"
@.str.3 = [21 x i8] c"Protocol Unreachable\00"
@.str.4 = [17 x i8] c"Port Unreachable\00"
@.str.5 = [48 x i8] c"Fragmentation Needed and Don't Fragment was Set\00"
@.str.6 = [20 x i8] c"Source Route Failed\00"
@.str.7 = [28 x i8] c"Destination Network Unknown\00"
@.str.8 = [25 x i8] c"Destination Host Unknown\00"
@.str.9 = [21 x i8] c"Source Host Isolated\00"
@.str.10 = [70 x i8] c"Communication with Destination Network is Administratively Prohibited\00"
@.str.11 = [67 x i8] c"Communication with Destination Host is Administratively Prohibited\00"
@.str.12 = [52 x i8] c"Destination Network Unreachable for Type of Service\00"
@.str.13 = [49 x i8] c"Destination Host Unreachable for Type of Service\00"
@.str.14 = [42 x i8] c"Communication Administratively Prohibited\00"
@.str.15 = [26 x i8] c"Host Precedence Violation\00"
@.str.16 = [28 x i8] c"Precedence cutoff in effect\00"
@.str.17 = [46 x i8] c"Redirect Datagram for the Network (or subnet)\00"
@.str.18 = [31 x i8] c"Redirect Datagram for the Host\00"
@.str.19 = [54 x i8] c"Redirect Datagram for the Type of Service and Network\00"
@.str.20 = [51 x i8] c"Redirect Datagram for the Type of Service and Host\00"
@.str.21 = [27 x i8] c"Alternate Address for Host\00"
@.str.22 = [28 x i8] c"Normal router advertisement\00"
@.str.23 = [30 x i8] c"Does not route common traffic\00"
@.str.24 = [33 x i8] c"Time to Live exceeded in Transit\00"
@.str.25 = [34 x i8] c"Fragment Reassembly Time Exceeded\00"
@.str.26 = [28 x i8] c"Pointer indicates the error\00"
@.str.27 = [26 x i8] c"Missing a Required Option\00"
@.str.28 = [11 x i8] c"Bad Length\00"
@.str.29 = [8 x i8] c"Bad SPI\00"
@.str.30 = [22 x i8] c"Authentication Failed\00"
@.str.31 = [21 x i8] c"Decompression Failed\00"
@.str.32 = [18 x i8] c"Decryption Failed\00"
@.str.33 = [20 x i8] c"Need Authentication\00"
@.str.34 = [19 x i8] c"Need Authorization\00"
@.str.35 = [8 x i8] c"UNKNOWN\00"
define i8* @icmp_code(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
switch i32 %7, label %96 [
i32 0, label %8
i32 4, label %8
i32 8, label %8
i32 10, label %8
i32 13, label %8
i32 14, label %8
i32 15, label %8
i32 16, label %8
i32 17, label %8
i32 18, label %8
i32 3, label %14
i32 5, label %34
i32 6, label %42
i32 9, label %48
i32 11, label %59
i32 12, label %70
i32 40, label %86
]
8: ; preds = %2, %2, %2, %2, %2, %2, %2, %2, %2, %2
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
br label %97
13: ; preds = %8
br label %96
14: ; preds = %2
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
switch i32 %16, label %33 [
i32 0, label %17
i32 1, label %18
i32 2, label %19
i32 3, label %20
i32 4, label %21
i32 5, label %22
i32 6, label %23
i32 7, label %24
i32 8, label %25
i32 9, label %26
i32 10, label %27
i32 11, label %28
i32 12, label %29
i32 13, label %30
i32 14, label %31
i32 15, label %32
]
17: ; preds = %14
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %97
18: ; preds = %14
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %97
19: ; preds = %14
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %97
20: ; preds = %14
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %97
21: ; preds = %14
store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %97
22: ; preds = %14
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %97
23: ; preds = %14
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %97
24: ; preds = %14
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %97
25: ; preds = %14
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %97
26: ; preds = %14
store i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %97
27: ; preds = %14
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %97
28: ; preds = %14
store i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %97
29: ; preds = %14
store i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %97
30: ; preds = %14
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %97
31: ; preds = %14
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %97
32: ; preds = %14
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %97
33: ; preds = %14
br label %96
34: ; preds = %2
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
switch i32 %36, label %41 [
i32 0, label %37
i32 1, label %38
i32 2, label %39
i32 3, label %40
]
37: ; preds = %34
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %97
38: ; preds = %34
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %97
39: ; preds = %34
store i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %97
40: ; preds = %34
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.20, i64 0, i64 0), i8** %3
br label %97
41: ; preds = %34
br label %96
42: ; preds = %2
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0), i8** %3
br label %97
47: ; preds = %42
br label %96
48: ; preds = %2
%49 = load i8, i8* %5
%50 = zext i8 %49 to i32
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %48
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.22, i64 0, i64 0), i8** %3
br label %97
53: ; preds = %48
%54 = load i8, i8* %5
%55 = zext i8 %54 to i32
%56 = icmp eq i32 %55, 16
br i1 %56, label %57, label %58
57: ; preds = %53
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0), i8** %3
br label %97
58: ; preds = %53
br label %96
59: ; preds = %2
%60 = load i8, i8* %5
%61 = zext i8 %60 to i32
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %59
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i8** %3
br label %97
64: ; preds = %59
%65 = load i8, i8* %5
%66 = zext i8 %65 to i32
%67 = icmp eq i32 %66, 1
br i1 %67, label %68, label %69
68: ; preds = %64
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.25, i64 0, i64 0), i8** %3
br label %97
69: ; preds = %64
br label %96
70: ; preds = %2
%71 = load i8, i8* %5
%72 = zext i8 %71 to i32
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %75
74: ; preds = %70
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0), i8** %3
br label %97
75: ; preds = %70
%76 = load i8, i8* %5
%77 = zext i8 %76 to i32
%78 = icmp eq i32 %77, 1
br i1 %78, label %79, label %80
79: ; preds = %75
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0), i8** %3
br label %97
80: ; preds = %75
%81 = load i8, i8* %5
%82 = zext i8 %81 to i32
%83 = icmp eq i32 %82, 2
br i1 %83, label %84, label %85
84: ; preds = %80
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0), i8** %3
br label %97
85: ; preds = %80
br label %96
86: ; preds = %2
%87 = load i8, i8* %5
%88 = zext i8 %87 to i32
switch i32 %88, label %95 [
i32 0, label %89
i32 1, label %90
i32 2, label %91
i32 3, label %92
i32 4, label %93
i32 5, label %94
]
89: ; preds = %86
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i64 0, i64 0), i8** %3
br label %97
90: ; preds = %86
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.30, i64 0, i64 0), i8** %3
br label %97
91: ; preds = %86
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0), i8** %3
br label %97
92: ; preds = %86
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0), i8** %3
br label %97
93: ; preds = %86
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.33, i64 0, i64 0), i8** %3
br label %97
94: ; preds = %86
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.34, i64 0, i64 0), i8** %3
br label %97
95: ; preds = %86
br label %96
96: ; preds = %2, %95, %85, %69, %58, %47, %41, %33, %13
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i8** %3
br label %97
97: ; preds = %96, %94, %93, %92, %91, %90, %89, %84, %79, %74, %68, %63, %57, %52, %46, %40, %39, %38, %37, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %12
%98 = load i8*, i8** %3
ret i8* %98
}

LLVM IR (-O2):
@.str = [8 x i8] c"No code\00"
@.str.1 = [16 x i8] c"Net Unreachable\00"
@.str.2 = [17 x i8] c"Host Unreachable\00"
@.str.3 = [21 x i8] c"Protocol Unreachable\00"
@.str.4 = [17 x i8] c"Port Unreachable\00"
@.str.5 = [48 x i8] c"Fragmentation Needed and Don't Fragment was Set\00"
@.str.6 = [20 x i8] c"Source Route Failed\00"
@.str.7 = [28 x i8] c"Destination Network Unknown\00"
@.str.8 = [25 x i8] c"Destination Host Unknown\00"
@.str.9 = [21 x i8] c"Source Host Isolated\00"
@.str.10 = [70 x i8] c"Communication with Destination Network is Administratively Prohibited\00"
@.str.11 = [67 x i8] c"Communication with Destination Host is Administratively Prohibited\00"
@.str.12 = [52 x i8] c"Destination Network Unreachable for Type of Service\00"
@.str.13 = [49 x i8] c"Destination Host Unreachable for Type of Service\00"
@.str.14 = [42 x i8] c"Communication Administratively Prohibited\00"
@.str.15 = [26 x i8] c"Host Precedence Violation\00"
@.str.16 = [28 x i8] c"Precedence cutoff in effect\00"
@.str.17 = [46 x i8] c"Redirect Datagram for the Network (or subnet)\00"
@.str.18 = [31 x i8] c"Redirect Datagram for the Host\00"
@.str.19 = [54 x i8] c"Redirect Datagram for the Type of Service and Network\00"
@.str.20 = [51 x i8] c"Redirect Datagram for the Type of Service and Host\00"
@.str.21 = [27 x i8] c"Alternate Address for Host\00"
@.str.22 = [28 x i8] c"Normal router advertisement\00"
@.str.23 = [30 x i8] c"Does not route common traffic\00"
@.str.24 = [33 x i8] c"Time to Live exceeded in Transit\00"
@.str.25 = [34 x i8] c"Fragment Reassembly Time Exceeded\00"
@.str.26 = [28 x i8] c"Pointer indicates the error\00"
@.str.27 = [26 x i8] c"Missing a Required Option\00"
@.str.28 = [11 x i8] c"Bad Length\00"
@.str.29 = [8 x i8] c"Bad SPI\00"
@.str.30 = [22 x i8] c"Authentication Failed\00"
@.str.31 = [21 x i8] c"Decompression Failed\00"
@.str.32 = [18 x i8] c"Decryption Failed\00"
@.str.33 = [20 x i8] c"Need Authentication\00"
@.str.34 = [19 x i8] c"Need Authorization\00"
@.str.35 = [8 x i8] c"UNKNOWN\00"
@reltable.icmp_code = [16 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.1 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.2 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.3 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.4 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([48 x i8]* @.str.5 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.6 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.7 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.8 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.9 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([70 x i8]* @.str.10 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([67 x i8]* @.str.11 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([52 x i8]* @.str.12 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([49 x i8]* @.str.13 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @.str.14 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.15 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.16 to i64), i64 ptrtoint ([16 x i32]* @reltable.icmp_code to i64)) to i32)]
@reltable.icmp_code.39 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([46 x i8]* @.str.17 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmp_code.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.18 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmp_code.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([54 x i8]* @.str.19 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmp_code.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([51 x i8]* @.str.20 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmp_code.39 to i64)) to i32)]
@reltable.icmp_code.40 = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.26 to i64), i64 ptrtoint ([3 x i32]* @reltable.icmp_code.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.27 to i64), i64 ptrtoint ([3 x i32]* @reltable.icmp_code.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.28 to i64), i64 ptrtoint ([3 x i32]* @reltable.icmp_code.40 to i64)) to i32)]
@reltable.icmp_code.41 = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.29 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.30 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.31 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.32 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.33 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.34 to i64), i64 ptrtoint ([6 x i32]* @reltable.icmp_code.41 to i64)) to i32)]
define i8* @icmp_code(i8 zeroext %0, i8 zeroext %1) {
switch i8 %0, label %25 [
i8 0, label %3
i8 4, label %3
i8 8, label %3
i8 10, label %3
i8 13, label %3
i8 14, label %3
i8 15, label %3
i8 16, label %3
i8 17, label %3
i8 18, label %3
i8 3, label %5
i8 5, label %7
i8 6, label %9
i8 9, label %11
i8 11, label %16
i8 12, label %21
i8 40, label %23
]
3: ; preds = %2, %2, %2, %2, %2, %2, %2, %2, %2, %2
%4 = icmp eq i8 %1, 0
br i1 %4, label %42, label %25
5: ; preds = %2
%6 = icmp ult i8 %1, 16
br i1 %6, label %26, label %25
7: ; preds = %2
%8 = icmp ult i8 %1, 4
br i1 %8, label %30, label %25
9: ; preds = %2
%10 = icmp eq i8 %1, 0
br i1 %10, label %42, label %25
11: ; preds = %2
%12 = icmp eq i8 %1, 16
%13 = select i1 %12, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0)
%14 = icmp eq i8 %1, 0
%15 = select i1 %14, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.22, i64 0, i64 0), i8* %13
br label %42
16: ; preds = %2
%17 = icmp eq i8 %1, 1
%18 = select i1 %17, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0)
%19 = icmp eq i8 %1, 0
%20 = select i1 %19, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.24, i64 0, i64 0), i8* %18
br label %42
21: ; preds = %2
%22 = icmp ult i8 %1, 3
br i1 %22, label %34, label %25
23: ; preds = %2
%24 = icmp ult i8 %1, 6
br i1 %24, label %38, label %25
25: ; preds = %23, %21, %7, %5, %9, %3, %2
br label %42
26: ; preds = %5
%27 = sext i8 %1 to i64
%28 = shl i64 %27, 2
%29 = call i8* @llvm.load.relative.i64(i8* bitcast ([16 x i32]* @reltable.icmp_code to i8*), i64 %28)
br label %42
30: ; preds = %7
%31 = sext i8 %1 to i64
%32 = shl i64 %31, 2
%33 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.icmp_code.39 to i8*), i64 %32)
br label %42
34: ; preds = %21
%35 = sext i8 %1 to i64
%36 = shl i64 %35, 2
%37 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.icmp_code.40 to i8*), i64 %36)
br label %42
38: ; preds = %23
%39 = sext i8 %1 to i64
%40 = shl i64 %39, 2
%41 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.icmp_code.41 to i8*), i64 %40)
br label %42
42: ; preds = %38, %34, %30, %26, %16, %11, %9, %3, %25
%43 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), %25 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %3 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0), %9 ], [ %15, %11 ], [ %20, %16 ], [ %29, %26 ], [ %33, %30 ], [ %37, %34 ], [ %41, %38 ]
ret i8* %43
}