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

/* Variables and functions */
const char *icmpTypeCode2String(int ipv, u_int8_t type, u_int8_t code) {
  const char *DestUnreach[] = {"Destination network unreachable",
                               "Destination host unreachable",
                               "Destination protocol unreachable",
                               "Destination port unreachable",
                               "Fragmentation required, and DF flag set",
                               "Source route failed",
                               "Destination network unknown",
                               "Destination host unknown",
                               "Source host isolated",
                               "Network administratively prohibited",
                               "Host administratively prohibited",
                               "Network unreachable for TOS",
                               "Host unreachable for TOS",
                               "Communication administratively prohibited"};
  const char *Redirect[] = {"Redirect Datagram for the Network",
                            "Redirect Datagram for the Host",
                            "Redirect Datagram for the TOS & network",
                            "Redirect Datagram for the TOS & host"};
  const char *TimeExceed[] = {"TTL expired in transit",
                              "Fragment reassembly time exceeded"};
  const char *Dest6Unreach[] = {
      "No route to destination",
      "Communication with destination administratively prohibited",
      "Beyond scope of source address",
      "Address unreachable",
      "Port unreachable",
      "Source address failed ingress/egress policy",
      "Reject route to destination"};
  const char *Time6Exceed[] = {"Hop limit exceeded in transit",
                               "Fragment reassembly time exceeded"};
  const char *ND_messesg[] = {
      "ICMPv6 router solicitation", "ICMPv6 router advertisement",
      "ICMPv6 neighbor solicitation", "ICMPv6 neighbor advertisement",
      "ICMPv6 redirect"};
  const char *empty = "";
  if (ipv == 4) {
    switch (type) {
    case 0:
      return "Echo reply";
    case 8:
      return "Echo";
    case 3:
      if (code <= 13)
        return DestUnreach[code];
      break;
    case 5:
      if (code <= 3)
        return Redirect[code];
      break;
    case 11:
      if (code <= 1)
        return TimeExceed[code];
      break;
    default:
      break;
    }
  } else if (ipv == 6) {
    switch (type) {
    case 1:
      if (code <= 6)
        return Dest6Unreach[code];
      break;
    case 2:
      return "ICMPv6 packet too big";
    case 3:
      if (code <= 1)
        return Time6Exceed[code];
      break;
    case 128:
      return "ICMPv6 echo request";
    case 129:
      return "ICMPv6 echo reply";
    case 133:
    case 134:
    case 135:
    case 136:
    case 137:
      return ND_messesg[type - 133];
    default:
      break;
    }
  }
  return empty;
}


x86 assembly (clang, -O0):
<icmpTypeCode2String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2bee(%rip),%rsi
mov    $0x70,%edx
call   1040 <memcpy@plt>
mov    0x2c4d(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2c47(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0x2c41(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2c3b(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0x2c35(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2c2f(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x100(%rbp),%rdi
lea    0x2c22(%rip),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
mov    0x2c51(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0x2c4b(%rip),%rax
mov    %rax,-0x108(%rbp)
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    0x11ab(%rip),%rax
mov    %rax,-0x140(%rbp)
lea    0x11b8(%rip),%rax
mov    %rax,-0x138(%rbp)
lea    0x11c6(%rip),%rax
mov    %rax,-0x130(%rbp)
lea    0x11d5(%rip),%rax
mov    %rax,-0x128(%rbp)
lea    0x11e5(%rip),%rax
mov    %rax,-0x120(%rbp)
lea    0xf5d(%rip),%rax
mov    %rax,-0x148(%rbp)
cmpl   $0x4,-0xc(%rbp)
jne    1306 <icmpTypeCode2String+0x1e6>
mov    -0x10(%rbp),%eax
mov    %rax,-0x150(%rbp)
sub    $0xb,%rax
ja     12fc <icmpTypeCode2String+0x1dc>
mov    -0x150(%rbp),%rax
lea    0xd99(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x11a4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
lea    0x119f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
cmpl   $0xd,-0x14(%rbp)
jg     12af <icmpTypeCode2String+0x18f>
movslq -0x14(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    1301 <icmpTypeCode2String+0x1e1>
cmpl   $0x3,-0x14(%rbp)
jg     12d3 <icmpTypeCode2String+0x1b3>
movslq -0x14(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    1301 <icmpTypeCode2String+0x1e1>
cmpl   $0x1,-0x14(%rbp)
jg     12f7 <icmpTypeCode2String+0x1d7>
movslq -0x14(%rbp),%rax
mov    -0xc0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    1301 <icmpTypeCode2String+0x1e1>
jmp    1301 <icmpTypeCode2String+0x1e1>
jmp    1436 <icmpTypeCode2String+0x316>
cmpl   $0x6,-0xc(%rbp)
jne    1431 <icmpTypeCode2String+0x311>
mov    -0x10(%rbp),%eax
mov    %eax,-0x154(%rbp)
sub    $0x1,%eax
je     1394 <icmpTypeCode2String+0x274>
jmp    1327 <icmpTypeCode2String+0x207>
mov    -0x154(%rbp),%eax
sub    $0x2,%eax
je     13b8 <icmpTypeCode2String+0x298>
jmp    133b <icmpTypeCode2String+0x21b>
mov    -0x154(%rbp),%eax
sub    $0x3,%eax
je     13c8 <icmpTypeCode2String+0x2a8>
jmp    134f <icmpTypeCode2String+0x22f>
mov    -0x154(%rbp),%eax
sub    $0x80,%eax
je     13ec <icmpTypeCode2String+0x2cc>
jmp    1365 <icmpTypeCode2String+0x245>
mov    -0x154(%rbp),%eax
sub    $0x81,%eax
je     13fc <icmpTypeCode2String+0x2dc>
jmp    137b <icmpTypeCode2String+0x25b>
mov    -0x154(%rbp),%eax
add    $0xffffff7b,%eax
sub    $0x5,%eax
jb     140c <icmpTypeCode2String+0x2ec>
jmp    1427 <icmpTypeCode2String+0x307>
cmpl   $0x6,-0x14(%rbp)
jg     13b3 <icmpTypeCode2String+0x293>
movslq -0x14(%rbp),%rax
mov    -0x100(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    142c <icmpTypeCode2String+0x30c>
lea    0x106c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
cmpl   $0x1,-0x14(%rbp)
jg     13e7 <icmpTypeCode2String+0x2c7>
movslq -0x14(%rbp),%rax
mov    -0x110(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    142c <icmpTypeCode2String+0x30c>
lea    0x104e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
lea    0x1052(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
mov    -0x10(%rbp),%eax
sub    $0x85,%eax
cltq
mov    -0x140(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    1441 <icmpTypeCode2String+0x321>
jmp    142c <icmpTypeCode2String+0x30c>
jmp    1431 <icmpTypeCode2String+0x311>
jmp    1436 <icmpTypeCode2String+0x316>
mov    -0x148(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icmpTypeCode2String>:
lea    0x1306(%rip),%rax
mov    %rax,-0x28(%rsp)
lea    0x1315(%rip),%rax
mov    %rax,-0x20(%rsp)
lea    0x1325(%rip),%rax
mov    %rax,-0x18(%rsp)
lea    0x1336(%rip),%rax
mov    %rax,-0x10(%rsp)
lea    0x1348(%rip),%rax
mov    %rax,-0x8(%rsp)
cmp    $0x6,%edi
je     1184 <icmpTypeCode2String+0x84>
cmp    $0x4,%edi
jne    1217 <icmpTypeCode2String+0x117>
cmp    $0xb,%esi
ja     1217 <icmpTypeCode2String+0x117>
lea    0x1335(%rip),%rax
mov    %esi,%ecx
lea    0xe9d(%rip),%rsi
movslq (%rsi,%rcx,4),%rcx
add    %rsi,%rcx
jmp    *%rcx
cmp    $0xd,%edx
jg     1217 <icmpTypeCode2String+0x117>
movslq %edx,%rax
lea    0xeb1(%rip),%rcx
jmp    120f <icmpTypeCode2String+0x10f>
cmp    $0x7f,%esi
jg     11ad <icmpTypeCode2String+0xad>
cmp    $0x1,%esi
je     1200 <icmpTypeCode2String+0x100>
cmp    $0x2,%esi
je     121f <icmpTypeCode2String+0x11f>
cmp    $0x3,%esi
jne    1217 <icmpTypeCode2String+0x117>
cmp    $0x1,%edx
jg     1217 <icmpTypeCode2String+0x117>
movslq %edx,%rax
lea    0xef1(%rip),%rcx
jmp    120f <icmpTypeCode2String+0x10f>
lea    -0x85(%rsi),%eax
cmp    $0x5,%eax
jae    11cf <icmpTypeCode2String+0xcf>
mov    -0x28(%rsp,%rax,8),%rax
ret
cmp    $0x3,%edx
jg     1217 <icmpTypeCode2String+0x117>
movslq %edx,%rax
lea    0xe9b(%rip),%rcx
jmp    120f <icmpTypeCode2String+0x10f>
cmp    $0x80,%esi
je     1227 <icmpTypeCode2String+0x127>
cmp    $0x81,%esi
jne    1217 <icmpTypeCode2String+0x117>
lea    0x12e3(%rip),%rax
ret
lea    0x12ac(%rip),%rax
ret
cmp    $0x1,%edx
jg     1217 <icmpTypeCode2String+0x117>
movslq %edx,%rax
lea    0xe7a(%rip),%rcx
jmp    120f <icmpTypeCode2String+0x10f>
cmp    $0x6,%edx
jg     1217 <icmpTypeCode2String+0x117>
movslq %edx,%rax
lea    0xe71(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xfe7(%rip),%rax
ret
lea    0x1279(%rip),%rax
ret
lea    0x1287(%rip),%rax
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Destination network unreachable\00"
@.str.1 = [29 x i8] c"Destination host unreachable\00"
@.str.2 = [33 x i8] c"Destination protocol unreachable\00"
@.str.3 = [29 x i8] c"Destination port unreachable\00"
@.str.4 = [40 x i8] c"Fragmentation required, and DF flag set\00"
@.str.5 = [20 x i8] c"Source route failed\00"
@.str.6 = [28 x i8] c"Destination network unknown\00"
@.str.7 = [25 x i8] c"Destination host unknown\00"
@.str.8 = [21 x i8] c"Source host isolated\00"
@.str.9 = [36 x i8] c"Network administratively prohibited\00"
@.str.10 = [33 x i8] c"Host administratively prohibited\00"
@.str.11 = [28 x i8] c"Network unreachable for TOS\00"
@.str.12 = [25 x i8] c"Host unreachable for TOS\00"
@.str.13 = [42 x i8] c"Communication administratively prohibited\00"
@__const.icmpTypeCode2String.DestUnreach = [14 x i8*] [i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i32 0, i32 0)]
@.str.14 = [34 x i8] c"Redirect Datagram for the Network\00"
@.str.15 = [31 x i8] c"Redirect Datagram for the Host\00"
@.str.16 = [40 x i8] c"Redirect Datagram for the TOS & network\00"
@.str.17 = [37 x i8] c"Redirect Datagram for the TOS & host\00"
@__const.icmpTypeCode2String.Redirect = [4 x i8*] [i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.17, i32 0, i32 0)]
@.str.18 = [23 x i8] c"TTL expired in transit\00"
@.str.19 = [34 x i8] c"Fragment reassembly time exceeded\00"
@__const.icmpTypeCode2String.TimeExceed = [2 x i8*] [i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i32 0, i32 0)]
@.str.20 = [24 x i8] c"No route to destination\00"
@.str.21 = [59 x i8] c"Communication with destination administratively prohibited\00"
@.str.22 = [31 x i8] c"Beyond scope of source address\00"
@.str.23 = [20 x i8] c"Address unreachable\00"
@.str.24 = [17 x i8] c"Port unreachable\00"
@.str.25 = [44 x i8] c"Source address failed ingress/egress policy\00"
@.str.26 = [28 x i8] c"Reject route to destination\00"
@__const.icmpTypeCode2String.Dest6Unreach = [7 x i8*] [i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i32 0, i32 0)]
@.str.27 = [30 x i8] c"Hop limit exceeded in transit\00"
@__const.icmpTypeCode2String.Time6Exceed = [2 x i8*] [i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i32 0, i32 0)]
@.str.28 = [27 x i8] c"ICMPv6 router solicitation\00"
@.str.29 = [28 x i8] c"ICMPv6 router advertisement\00"
@.str.30 = [29 x i8] c"ICMPv6 neighbor solicitation\00"
@.str.31 = [30 x i8] c"ICMPv6 neighbor advertisement\00"
@.str.32 = [16 x i8] c"ICMPv6 redirect\00"
@.str.33 = [1 x i8] zeroinitializer
@.str.34 = [11 x i8] c"Echo reply\00"
@.str.35 = [5 x i8] c"Echo\00"
@.str.36 = [22 x i8] c"ICMPv6 packet too big\00"
@.str.37 = [20 x i8] c"ICMPv6 echo request\00"
@.str.38 = [18 x i8] c"ICMPv6 echo reply\00"
define i8* @icmpTypeCode2String(i32 %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [14 x i8*]
%9 = alloca [4 x i8*]
%10 = alloca [2 x i8*]
%11 = alloca [7 x i8*]
%12 = alloca [2 x i8*]
%13 = alloca [5 x i8*]
%14 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%15 = bitcast [14 x i8*]* %8 to i8*
%16 = bitcast [4 x i8*]* %9 to i8*
%17 = bitcast [2 x i8*]* %10 to i8*
%18 = bitcast [7 x i8*]* %11 to i8*
%19 = bitcast [2 x i8*]* %12 to i8*
%20 = bitcast [5 x i8*]* %13 to i8*
%21 = bitcast i8* %20 to [5 x i8*]*
%22 = getelementptr inbounds [5 x i8*], [5 x i8*]* %21, i32 0, i32 0
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.28, i32 0, i32 0), i8** %22
%23 = getelementptr inbounds [5 x i8*], [5 x i8*]* %21, i32 0, i32 1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.29, i32 0, i32 0), i8** %23
%24 = getelementptr inbounds [5 x i8*], [5 x i8*]* %21, i32 0, i32 2
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.30, i32 0, i32 0), i8** %24
%25 = getelementptr inbounds [5 x i8*], [5 x i8*]* %21, i32 0, i32 3
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i32 0, i32 0), i8** %25
%26 = getelementptr inbounds [5 x i8*], [5 x i8*]* %21, i32 0, i32 4
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.32, i32 0, i32 0), i8** %26
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.33, i64 0, i64 0), i8** %14
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 4
br i1 %28, label %29, label %62
29: ; preds = %3
%30 = load i32, i32* %6
switch i32 %30, label %60 [
i32 0, label %31
i32 8, label %32
i32 3, label %33
i32 5, label %42
i32 11, label %51
]
31: ; preds = %29
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.34, i64 0, i64 0), i8** %4
br label %99
32: ; preds = %29
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i64 0, i64 0), i8** %4
br label %99
33: ; preds = %29
%34 = load i32, i32* %7
%35 = icmp sle i32 %34, 13
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load i32, i32* %7
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [14 x i8*], [14 x i8*]* %8, i64 0, i64 %38
%40 = load i8*, i8** %39
store i8* %40, i8** %4
br label %99
41: ; preds = %33
br label %61
42: ; preds = %29
%43 = load i32, i32* %7
%44 = icmp sle i32 %43, 3
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = load i32, i32* %7
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [4 x i8*], [4 x i8*]* %9, i64 0, i64 %47
%49 = load i8*, i8** %48
store i8* %49, i8** %4
br label %99
50: ; preds = %42
br label %61
51: ; preds = %29
%52 = load i32, i32* %7
%53 = icmp sle i32 %52, 1
br i1 %53, label %54, label %59
54: ; preds = %51
%55 = load i32, i32* %7
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [2 x i8*], [2 x i8*]* %10, i64 0, i64 %56
%58 = load i8*, i8** %57
store i8* %58, i8** %4
br label %99
59: ; preds = %51
br label %61
60: ; preds = %29
br label %61
61: ; preds = %60, %59, %50, %41
br label %97
62: ; preds = %3
%63 = load i32, i32* %5
%64 = icmp eq i32 %63, 6
br i1 %64, label %65, label %96
65: ; preds = %62
%66 = load i32, i32* %6
switch i32 %66, label %94 [
i32 1, label %67
i32 2, label %76
i32 3, label %77
i32 128, label %86
i32 129, label %87
i32 133, label %88
i32 134, label %88
i32 135, label %88
i32 136, label %88
i32 137, label %88
]
67: ; preds = %65
%68 = load i32, i32* %7
%69 = icmp sle i32 %68, 6
br i1 %69, label %70, label %75
70: ; preds = %67
%71 = load i32, i32* %7
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %72
%74 = load i8*, i8** %73
store i8* %74, i8** %4
br label %99
75: ; preds = %67
br label %95
76: ; preds = %65
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.36, i64 0, i64 0), i8** %4
br label %99
77: ; preds = %65
%78 = load i32, i32* %7
%79 = icmp sle i32 %78, 1
br i1 %79, label %80, label %85
80: ; preds = %77
%81 = load i32, i32* %7
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [2 x i8*], [2 x i8*]* %12, i64 0, i64 %82
%84 = load i8*, i8** %83
store i8* %84, i8** %4
br label %99
85: ; preds = %77
br label %95
86: ; preds = %65
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.37, i64 0, i64 0), i8** %4
br label %99
87: ; preds = %65
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i64 0, i64 0), i8** %4
br label %99
88: ; preds = %65, %65, %65, %65, %65
%89 = load i32, i32* %6
%90 = sub nsw i32 %89, 133
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i64 0, i64 %91
%93 = load i8*, i8** %92
store i8* %93, i8** %4
br label %99
94: ; preds = %65
br label %95
95: ; preds = %94, %85, %75
br label %96
96: ; preds = %95, %62
br label %97
97: ; preds = %96, %61
%98 = load i8*, i8** %14
store i8* %98, i8** %4
br label %99
99: ; preds = %97, %88, %87, %86, %80, %76, %70, %54, %45, %36, %32, %31
%100 = load i8*, i8** %4
ret i8* %100
}

LLVM IR (-O2):
@.str = [32 x i8] c"Destination network unreachable\00"
@.str.1 = [29 x i8] c"Destination host unreachable\00"
@.str.2 = [33 x i8] c"Destination protocol unreachable\00"
@.str.3 = [29 x i8] c"Destination port unreachable\00"
@.str.4 = [40 x i8] c"Fragmentation required, and DF flag set\00"
@.str.5 = [20 x i8] c"Source route failed\00"
@.str.6 = [28 x i8] c"Destination network unknown\00"
@.str.7 = [25 x i8] c"Destination host unknown\00"
@.str.8 = [21 x i8] c"Source host isolated\00"
@.str.9 = [36 x i8] c"Network administratively prohibited\00"
@.str.10 = [33 x i8] c"Host administratively prohibited\00"
@.str.11 = [28 x i8] c"Network unreachable for TOS\00"
@.str.12 = [25 x i8] c"Host unreachable for TOS\00"
@.str.13 = [42 x i8] c"Communication administratively prohibited\00"
@reltable.icmpTypeCode2String = [14 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([32 x i8]* @.str to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.1 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.2 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.3 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([40 x i8]* @.str.4 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.5 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.6 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.7 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.8 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.9 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.10 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.11 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.12 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @.str.13 to i64), i64 ptrtoint ([14 x i32]* @reltable.icmpTypeCode2String to i64)) to i32)]
@.str.14 = [34 x i8] c"Redirect Datagram for the Network\00"
@.str.15 = [31 x i8] c"Redirect Datagram for the Host\00"
@.str.16 = [40 x i8] c"Redirect Datagram for the TOS & network\00"
@.str.17 = [37 x i8] c"Redirect Datagram for the TOS & host\00"
@reltable.icmpTypeCode2String.39 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.14 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmpTypeCode2String.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.15 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmpTypeCode2String.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([40 x i8]* @.str.16 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmpTypeCode2String.39 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([37 x i8]* @.str.17 to i64), i64 ptrtoint ([4 x i32]* @reltable.icmpTypeCode2String.39 to i64)) to i32)]
@.str.18 = [23 x i8] c"TTL expired in transit\00"
@.str.19 = [34 x i8] c"Fragment reassembly time exceeded\00"
@reltable.icmpTypeCode2String.40 = [2 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.18 to i64), i64 ptrtoint ([2 x i32]* @reltable.icmpTypeCode2String.40 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.19 to i64), i64 ptrtoint ([2 x i32]* @reltable.icmpTypeCode2String.40 to i64)) to i32)]
@.str.20 = [24 x i8] c"No route to destination\00"
@.str.21 = [59 x i8] c"Communication with destination administratively prohibited\00"
@.str.22 = [31 x i8] c"Beyond scope of source address\00"
@.str.23 = [20 x i8] c"Address unreachable\00"
@.str.24 = [17 x i8] c"Port unreachable\00"
@.str.25 = [44 x i8] c"Source address failed ingress/egress policy\00"
@.str.26 = [28 x i8] c"Reject route to destination\00"
@reltable.icmpTypeCode2String.41 = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.20 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([59 x i8]* @.str.21 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.22 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.23 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.24 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([44 x i8]* @.str.25 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.26 to i64), i64 ptrtoint ([7 x i32]* @reltable.icmpTypeCode2String.41 to i64)) to i32)]
@.str.27 = [30 x i8] c"Hop limit exceeded in transit\00"
@reltable.icmpTypeCode2String.42 = [2 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.27 to i64), i64 ptrtoint ([2 x i32]* @reltable.icmpTypeCode2String.42 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.19 to i64), i64 ptrtoint ([2 x i32]* @reltable.icmpTypeCode2String.42 to i64)) to i32)]
@.str.28 = [27 x i8] c"ICMPv6 router solicitation\00"
@.str.29 = [28 x i8] c"ICMPv6 router advertisement\00"
@.str.30 = [29 x i8] c"ICMPv6 neighbor solicitation\00"
@.str.31 = [30 x i8] c"ICMPv6 neighbor advertisement\00"
@.str.32 = [16 x i8] c"ICMPv6 redirect\00"
@.str.33 = [1 x i8] zeroinitializer
@.str.34 = [11 x i8] c"Echo reply\00"
@.str.35 = [5 x i8] c"Echo\00"
@.str.36 = [22 x i8] c"ICMPv6 packet too big\00"
@.str.37 = [20 x i8] c"ICMPv6 echo request\00"
@.str.38 = [18 x i8] c"ICMPv6 echo reply\00"
define i8* @icmpTypeCode2String(i32 %0, i32 %1, i32 %2) {
%4 = alloca [5 x i8*]
%5 = bitcast [5 x i8*]* %4 to i8*
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 0
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.28, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.29, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 2
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.30, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 3
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 4
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.32, i64 0, i64 0), i8** %10
switch i32 %0, label %51 [
i32 4, label %11
i32 6, label %31
]
11: ; preds = %3
switch i32 %1, label %51 [
i32 0, label %52
i32 8, label %12
i32 3, label %13
i32 5, label %19
i32 11, label %25
]
12: ; preds = %11
br label %52
13: ; preds = %11
%14 = icmp slt i32 %2, 14
br i1 %14, label %15, label %51
15: ; preds = %13
%16 = sext i32 %2 to i64
%17 = shl i64 %16, 2
%18 = call i8* @llvm.load.relative.i64(i8* bitcast ([14 x i32]* @reltable.icmpTypeCode2String to i8*), i64 %17)
br label %52
19: ; preds = %11
%20 = icmp slt i32 %2, 4
br i1 %20, label %21, label %51
21: ; preds = %19
%22 = sext i32 %2 to i64
%23 = shl i64 %22, 2
%24 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.icmpTypeCode2String.39 to i8*), i64 %23)
br label %52
25: ; preds = %11
%26 = icmp slt i32 %2, 2
br i1 %26, label %27, label %51
27: ; preds = %25
%28 = sext i32 %2 to i64
%29 = shl i64 %28, 2
%30 = call i8* @llvm.load.relative.i64(i8* bitcast ([2 x i32]* @reltable.icmpTypeCode2String.40 to i8*), i64 %29)
br label %52
31: ; preds = %3
switch i32 %1, label %51 [
i32 1, label %32
i32 2, label %52
i32 3, label %38
i32 128, label %44
i32 129, label %45
i32 133, label %46
i32 134, label %46
i32 135, label %46
i32 136, label %46
i32 137, label %46
]
32: ; preds = %31
%33 = icmp slt i32 %2, 7
br i1 %33, label %34, label %51
34: ; preds = %32
%35 = sext i32 %2 to i64
%36 = shl i64 %35, 2
%37 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.icmpTypeCode2String.41 to i8*), i64 %36)
br label %52
38: ; preds = %31
%39 = icmp slt i32 %2, 2
br i1 %39, label %40, label %51
40: ; preds = %38
%41 = sext i32 %2 to i64
%42 = shl i64 %41, 2
%43 = call i8* @llvm.load.relative.i64(i8* bitcast ([2 x i32]* @reltable.icmpTypeCode2String.42 to i8*), i64 %42)
br label %52
44: ; preds = %31
br label %52
45: ; preds = %31
br label %52
46: ; preds = %31, %31, %31, %31, %31
%47 = add nsw i32 %1, -133
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds [5 x i8*], [5 x i8*]* %4, i64 0, i64 %48
%50 = load i8*, i8** %49
br label %52
51: ; preds = %3, %31, %38, %32, %13, %19, %25, %11
br label %52
52: ; preds = %31, %11, %51, %46, %45, %44, %40, %34, %27, %21, %15, %12
%53 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.33, i64 0, i64 0), %51 ], [ %30, %27 ], [ %24, %21 ], [ %18, %15 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.35, i64 0, i64 0), %12 ], [ %50, %46 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.38, i64 0, i64 0), %45 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.37, i64 0, i64 0), %44 ], [ %43, %40 ], [ %37, %34 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.34, i64 0, i64 0), %11 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.36, i64 0, i64 0), %31 ]
ret i8* %53
}