; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/Ip6Dxe (Ip6Nd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.IP6_ICMP_INFORMATION_HEAD = type { %struct.IP6_ICMP_HEAD, i32 }
%struct.IP6_ICMP_HEAD = type { i8, i8, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._IP6_ETHE_ADDR_OPTION = type { i8, i8, [6 x i8] }
%struct._EFI_IP6_HEADER = type { i16, i16, i16, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct._IP6_DAD_ENTRY = type { i32, %struct._LIST_ENTRY, i32, i32, i32, i32, ptr, %struct.EFI_IPv6_ADDRESS, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._IP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP6_LINK_RX_TOKEN, %struct.IP6_ASSEMBLE_TABLE, %struct.IP6_MLD_SERVICE_DATA, %struct.EFI_IPv6_ADDRESS, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i8, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, %struct._IP6_CONFIG_INSTANCE, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.IP6_LINK_RX_TOKEN = type { i32, ptr, ptr, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.IP6_ASSEMBLE_TABLE = type { [127 x %struct._LIST_ENTRY] }
%struct.IP6_MLD_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct._IP6_CONFIG_INSTANCE = type { i32, i8, %struct._LIST_ENTRY, i16, %struct.EFI_IP6_CONFIG_INTERFACE_INFO, %struct.EFI_IP6_CONFIG_INTERFACE_ID, i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, [7 x %struct.IP6_CONFIG_DATA_ITEM], %struct.NET_MAP, %struct.NET_MAP, %struct._EFI_IP6_CONFIG_PROTOCOL, ptr, ptr, ptr, ptr, i8, i32, ptr, i32, ptr, i32, %struct._IP6_FORM_CALLBACK_INFO, %struct.IP6_CONFIG_NVDATA }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_ID = type { [8 x i8] }
%struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS = type { i32 }
%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%union.IP6_CONFIG_DATA = type { ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._EFI_IP6_CONFIG_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._IP6_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }
%struct.IP6_CONFIG_NVDATA = type { i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, %struct.EFI_IP6_CONFIG_INTERFACE_ID, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32 }
%struct.EFI_MANAGED_NETWORK_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, i32, i32, i32, i32, i8, i8, i8, i16, ptr, ptr, ptr, ptr }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }
%struct._IP6_NEIGHBOR_ENTRY = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, i32, i32, %struct._LIST_ENTRY, ptr, ptr }

@.str = external hidden unnamed_addr constant [127 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #1

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnArpResolved(ptr noundef) #2

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6CreateNeighborEntry(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6FindNeighborEntry(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnDADFinished(i8 noundef zeroext, ptr noundef, ptr noundef) #2

declare i64 @Ip6SetToAllNodeMulticast(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6FindDADEntry(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ip6SendNeighborAdvertise(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #2

declare zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef) #1

declare zeroext i8 @Ip6IsSNMulticastAddr(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip6ProcessNeighborSolicit(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.IP6_ICMP_INFORMATION_HEAD, align 1
  %8 = alloca %struct.EFI_IPv6_ADDRESS, align 1
  %9 = alloca %struct._IP6_ETHE_ADDR_OPTION, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca %struct.EFI_IPv6_ADDRESS, align 1
  %19 = alloca i16, align 2
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call i32 @NetbufCopy(ptr noundef %24, i32 noundef 0, i32 noundef 8, ptr noundef %7)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %8, i32 0, i32 0
  %28 = getelementptr inbounds [16 x i8], ptr %27, i64 0, i64 0
  %29 = call i32 @NetbufCopy(ptr noundef %26, i32 noundef 8, i32 noundef 16, ptr noundef %28)
  store i64 -9223372036854775806, ptr %22, align 8, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %30, i32 0, i32 4
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = zext i8 %32 to i32
  %34 = icmp ne i32 %33, 255
  br i1 %34, label %44, label %35

35:                                               ; preds = %3
  %36 = getelementptr inbounds %struct.IP6_ICMP_INFORMATION_HEAD, ptr %7, i32 0, i32 0
  %37 = getelementptr inbounds %struct.IP6_ICMP_HEAD, ptr %36, i32 0, i32 1
  %38 = load i8, ptr %37, align 1, !tbaa !15
  %39 = zext i8 %38 to i32
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %44, label %41

41:                                               ; preds = %35
  %42 = call zeroext i8 @NetIp6IsValidUnicast(ptr noundef %8)
  %43 = icmp ne i8 %42, 0
  br i1 %43, label %45, label %44

44:                                               ; preds = %41, %35, %3
  br label %268

45:                                               ; preds = %41
  store i16 0, ptr %19, align 2, !tbaa !19
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %46, i32 0, i32 2
  %48 = load i16, ptr %47, align 1, !tbaa !20
  %49 = zext i16 %48 to i32
  %50 = icmp slt i32 %49, 24
  br i1 %50, label %51, label %52

51:                                               ; preds = %45
  br label %268

52:                                               ; preds = %45
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %53, i32 0, i32 2
  %55 = load i16, ptr %54, align 1, !tbaa !20
  %56 = zext i16 %55 to i32
  %57 = sub nsw i32 %56, 24
  %58 = trunc i32 %57 to i16
  store i16 %58, ptr %19, align 2, !tbaa !19
  %59 = load i16, ptr %19, align 2, !tbaa !19
  %60 = zext i16 %59 to i32
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %82

62:                                               ; preds = %52
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call ptr @NetbufGetByte(ptr noundef %63, i32 noundef 24, ptr noundef null)
  store ptr %64, ptr %20, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %62
  %66 = call zeroext i8 @DebugAssertEnabled()
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %73

68:                                               ; preds = %65
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1508, ptr noundef @.str.19)
  br label %72

72:                                               ; preds = %71, %68
  br label %73

73:                                               ; preds = %72, %65
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = load i16, ptr %19, align 2, !tbaa !19
  %78 = call zeroext i8 @Ip6IsNDOptionValid(ptr noundef %76, i16 noundef zeroext %77)
  %79 = icmp ne i8 %78, 0
  br i1 %79, label %81, label %80

80:                                               ; preds = %75
  br label %268

81:                                               ; preds = %75
  br label %82

82:                                               ; preds = %81, %52
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %84, i32 0, i32 5
  %86 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef %85)
  store i8 %86, ptr %10, align 1, !tbaa !21
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %87, i32 0, i32 6
  %89 = call zeroext i8 @Ip6IsSNMulticastAddr(ptr noundef %88)
  %90 = icmp ne i8 %89, 0
  %91 = xor i1 %90, true
  %92 = zext i1 %91 to i32
  %93 = trunc i32 %92 to i8
  store i8 %93, ptr %11, align 1, !tbaa !21
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = call zeroext i8 @Ip6IsOneOfSetAddress(ptr noundef %94, ptr noundef %8, ptr noundef %14, ptr noundef null)
  store i8 %95, ptr %12, align 1, !tbaa !21
  store i8 0, ptr %21, align 1, !tbaa !21
  %96 = load i16, ptr %19, align 2, !tbaa !19
  %97 = zext i16 %96 to i64
  %98 = icmp uge i64 %97, 8
  br i1 %98, label %99, label %112

99:                                               ; preds = %83
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call i32 @NetbufCopy(ptr noundef %100, i32 noundef 24, i32 noundef 8, ptr noundef %9)
  %102 = getelementptr inbounds %struct._IP6_ETHE_ADDR_OPTION, ptr %9, i32 0, i32 0
  %103 = load i8, ptr %102, align 1, !tbaa !22
  %104 = zext i8 %103 to i32
  %105 = icmp eq i32 %104, 1
  br i1 %105, label %106, label %111

106:                                              ; preds = %99
  %107 = load i8, ptr %10, align 1, !tbaa !21
  %108 = icmp ne i8 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  br label %268

110:                                              ; preds = %106
  store i8 1, ptr %21, align 1, !tbaa !21
  br label %111

111:                                              ; preds = %110, %99
  br label %112

112:                                              ; preds = %111, %83
  %113 = load i8, ptr %10, align 1, !tbaa !21
  %114 = zext i8 %113 to i32
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %112
  %117 = load i8, ptr %11, align 1, !tbaa !21
  %118 = zext i8 %117 to i32
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  br label %268

121:                                              ; preds = %116, %112
  %122 = load i8, ptr %10, align 1, !tbaa !21
  %123 = icmp ne i8 %122, 0
  br i1 %123, label %128, label %124

124:                                              ; preds = %121
  %125 = load i8, ptr %12, align 1, !tbaa !21
  %126 = icmp ne i8 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  br label %268

128:                                              ; preds = %124, %121
  %129 = load i8, ptr %11, align 1, !tbaa !21
  %130 = zext i8 %129 to i32
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %136

132:                                              ; preds = %128
  %133 = load i8, ptr %12, align 1, !tbaa !21
  %134 = icmp ne i8 %133, 0
  br i1 %134, label %136, label %135

135:                                              ; preds = %132
  br label %268

136:                                              ; preds = %132, %128
  %137 = load i8, ptr %10, align 1, !tbaa !21
  %138 = zext i8 %137 to i32
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %197

140:                                              ; preds = %136
  %141 = load i8, ptr %12, align 1, !tbaa !21
  %142 = icmp ne i8 %141, 0
  br i1 %142, label %197, label %143

143:                                              ; preds = %140
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = call ptr @Ip6FindDADEntry(ptr noundef %144, ptr noundef %8, ptr noundef %14)
  store ptr %145, ptr %13, align 8, !tbaa !5
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = icmp ne ptr %146, null
  br i1 %147, label %148, label %196

148:                                              ; preds = %143
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %149, i32 0, i32 3
  %151 = load i32, ptr %150, align 4, !tbaa !24
  %152 = icmp eq i32 %151, 0
  br i1 %152, label %153, label %156

153:                                              ; preds = %148
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  call void @Ip6OnDADFinished(i8 noundef zeroext 0, ptr noundef %154, ptr noundef %155)
  store i64 -9223372036854775786, ptr %22, align 8, !tbaa !9
  br label %268

156:                                              ; preds = %148
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._IP6_SERVICE, ptr %157, i32 0, i32 8
  %159 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %158, i32 0, i32 3
  %160 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %159, i32 0, i32 2
  %161 = load ptr, ptr %160, align 8, !tbaa !21
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %164

163:                                              ; preds = %156
  br label %268

164:                                              ; preds = %156
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._IP6_SERVICE, ptr %165, i32 0, i32 8
  %167 = getelementptr inbounds %struct.IP6_LINK_RX_TOKEN, ptr %166, i32 0, i32 3
  %168 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !21
  %170 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %169, i32 0, i32 11
  %171 = load ptr, ptr %170, align 8, !tbaa !27
  store ptr %171, ptr %23, align 8, !tbaa !5
  %172 = load ptr, ptr %23, align 8, !tbaa !5
  %173 = icmp ne ptr %172, null
  br i1 %173, label %174, label %195

174:                                              ; preds = %164
  %175 = load ptr, ptr %23, align 8, !tbaa !5
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._IP6_SERVICE, ptr %176, i32 0, i32 36
  %178 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %177, i32 0, i32 11
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._IP6_SERVICE, ptr %179, i32 0, i32 36
  %181 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !30
  %183 = zext i32 %182 to i64
  %184 = call i64 @CompareMem(ptr noundef %175, ptr noundef %178, i64 noundef %183)
  %185 = icmp ne i64 %184, 0
  br i1 %185, label %186, label %189

186:                                              ; preds = %174
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  call void @Ip6OnDADFinished(i8 noundef zeroext 0, ptr noundef %187, ptr noundef %188)
  store i64 -9223372036854775786, ptr %22, align 8, !tbaa !9
  br label %194

189:                                              ; preds = %174
  %190 = load ptr, ptr %13, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %190, i32 0, i32 4
  %192 = load i32, ptr %191, align 8, !tbaa !46
  %193 = add i32 %192, 1
  store i32 %193, ptr %191, align 8, !tbaa !46
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %194

194:                                              ; preds = %189, %186
  br label %195

195:                                              ; preds = %194, %164
  br label %196

196:                                              ; preds = %195, %143
  br label %268

197:                                              ; preds = %140, %136
  %198 = load i8, ptr %21, align 1, !tbaa !21
  %199 = icmp ne i8 %198, 0
  br i1 %199, label %200, label %247

200:                                              ; preds = %197
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %202, i32 0, i32 5
  %204 = call ptr @Ip6FindNeighborEntry(ptr noundef %201, ptr noundef %203)
  store ptr %204, ptr %15, align 8, !tbaa !5
  store i8 0, ptr %17, align 1, !tbaa !21
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = icmp eq ptr %205, null
  br i1 %206, label %207, label %216

207:                                              ; preds = %200
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %209, i32 0, i32 5
  %211 = call ptr @Ip6CreateNeighborEntry(ptr noundef %208, ptr noundef @Ip6OnArpResolved, ptr noundef %210, ptr noundef null)
  store ptr %211, ptr %15, align 8, !tbaa !5
  %212 = load ptr, ptr %15, align 8, !tbaa !5
  %213 = icmp eq ptr %212, null
  br i1 %213, label %214, label %215

214:                                              ; preds = %207
  store i64 -9223372036854775799, ptr %22, align 8, !tbaa !9
  br label %268

215:                                              ; preds = %207
  store i8 1, ptr %17, align 1, !tbaa !21
  br label %227

216:                                              ; preds = %200
  %217 = load ptr, ptr %15, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct._IP6_NEIGHBOR_ENTRY, ptr %217, i32 0, i32 7
  %219 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds [32 x i8], ptr %219, i64 0, i64 0
  %221 = getelementptr inbounds %struct._IP6_ETHE_ADDR_OPTION, ptr %9, i32 0, i32 2
  %222 = getelementptr inbounds [6 x i8], ptr %221, i64 0, i64 0
  %223 = call i64 @CompareMem(ptr noundef %220, ptr noundef %222, i64 noundef 6)
  %224 = icmp ne i64 %223, 0
  br i1 %224, label %225, label %226

225:                                              ; preds = %216
  store i8 1, ptr %17, align 1, !tbaa !21
  br label %226

226:                                              ; preds = %225, %216
  br label %227

227:                                              ; preds = %226, %215
  %228 = load i8, ptr %17, align 1, !tbaa !21
  %229 = icmp ne i8 %228, 0
  br i1 %229, label %230, label %246

230:                                              ; preds = %227
  %231 = load ptr, ptr %15, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._IP6_NEIGHBOR_ENTRY, ptr %231, i32 0, i32 8
  store i32 2, ptr %232, align 4, !tbaa !47
  %233 = load ptr, ptr %15, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct._IP6_NEIGHBOR_ENTRY, ptr %233, i32 0, i32 10
  store i32 -1, ptr %234, align 4, !tbaa !49
  %235 = load ptr, ptr %15, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct._IP6_NEIGHBOR_ENTRY, ptr %235, i32 0, i32 7
  %237 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %236, i32 0, i32 0
  %238 = getelementptr inbounds [32 x i8], ptr %237, i64 0, i64 0
  %239 = getelementptr inbounds %struct._IP6_ETHE_ADDR_OPTION, ptr %9, i32 0, i32 2
  %240 = getelementptr inbounds [6 x i8], ptr %239, i64 0, i64 0
  %241 = call ptr @CopyMem(ptr noundef %238, ptr noundef %240, i64 noundef 6)
  %242 = load ptr, ptr %15, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct._IP6_NEIGHBOR_ENTRY, ptr %242, i32 0, i32 13
  %244 = load ptr, ptr %243, align 8, !tbaa !50
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  call void %244(ptr noundef %245)
  br label %246

246:                                              ; preds = %230, %227
  br label %247

247:                                              ; preds = %246, %197
  %248 = load i8, ptr %10, align 1, !tbaa !21
  %249 = zext i8 %248 to i32
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %257

251:                                              ; preds = %247
  %252 = load i8, ptr %12, align 1, !tbaa !21
  %253 = zext i8 %252 to i32
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %257

255:                                              ; preds = %251
  store i8 0, ptr %16, align 1, !tbaa !21
  %256 = call i64 @Ip6SetToAllNodeMulticast(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef %18)
  br label %261

257:                                              ; preds = %251, %247
  store i8 1, ptr %16, align 1, !tbaa !21
  %258 = load ptr, ptr %5, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %258, i32 0, i32 5
  %260 = call ptr @CopyMem(ptr noundef %18, ptr noundef %259, i64 noundef 16)
  br label %261

261:                                              ; preds = %257, %255
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct._IP6_SERVICE, ptr %263, i32 0, i32 36
  %265 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %264, i32 0, i32 11
  %266 = load i8, ptr %16, align 1, !tbaa !21
  %267 = call i64 @Ip6SendNeighborAdvertise(ptr noundef %262, ptr noundef %8, ptr noundef %18, ptr noundef %8, ptr noundef %265, i8 noundef zeroext 0, i8 noundef zeroext 1, i8 noundef zeroext %266)
  store i64 %267, ptr %22, align 8, !tbaa !9
  br label %268

268:                                              ; preds = %261, %214, %196, %163, %153, %135, %127, %120, %109, %80, %51, %44
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %269)
  %270 = load i64, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret i64 %270
}

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare zeroext i8 @NetIp6IsValidUnicast(ptr noundef) #1

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) #1

declare zeroext i8 @Ip6IsNDOptionValid(ptr noundef, i16 noundef zeroext) #1

declare zeroext i8 @Ip6IsOneOfSetAddress(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @NetbufFree(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !7, i64 7}
!12 = !{!"_EFI_IP6_HEADER", !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 1, !13, i64 2, !13, i64 4, !7, i64 6, !7, i64 7, !14, i64 8, !14, i64 24}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !7, i64 0}
!15 = !{!16, !7, i64 1}
!16 = !{!"", !17, i64 0, !18, i64 4}
!17 = !{!"", !7, i64 0, !7, i64 1, !13, i64 2}
!18 = !{!"int", !7, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !13, i64 4}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !7, i64 0}
!23 = !{!"_IP6_ETHE_ADDR_OPTION", !7, i64 0, !7, i64 1, !7, i64 2}
!24 = !{!25, !18, i64 28}
!25 = !{!"_IP6_DAD_ENTRY", !18, i64 0, !26, i64 8, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !6, i64 40, !14, i64 48, !6, i64 64, !6, i64 72}
!26 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!27 = !{!28, !6, i64 56}
!28 = !{!"", !29, i64 0, !6, i64 16, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !13, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!29 = !{!"", !13, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !18, i64 8, !13, i64 12, !7, i64 14, !7, i64 15}
!30 = !{!31, !18, i64 2376}
!31 = !{!"_IP6_SERVICE", !18, i64 0, !32, i64 8, !10, i64 24, !10, i64 32, !26, i64 40, !26, i64 56, !6, i64 72, !6, i64 80, !33, i64 88, !14, i64 136, !35, i64 2168, !14, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !18, i64 2216, !18, i64 2220, !18, i64 2224, !18, i64 2228, !26, i64 2232, !26, i64 2248, !26, i64 2264, !26, i64 2280, !18, i64 2296, !7, i64 2300, !6, i64 2304, !7, i64 2312, !7, i64 2313, !18, i64 2316, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !36, i64 2352, !37, i64 2372, !6, i64 3032, !6, i64 3040, !38, i64 3048, !6, i64 4176, !18, i64 4184, !18, i64 4188}
!32 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!33 = !{!"", !18, i64 0, !6, i64 8, !6, i64 16, !34, i64 24}
!34 = !{!"", !6, i64 0, !10, i64 8, !7, i64 16}
!35 = !{!"", !10, i64 0, !26, i64 8}
!36 = !{!"", !18, i64 0, !18, i64 4, !13, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!37 = !{!"", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !7, i64 40, !14, i64 552, !14, i64 584, !14, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!38 = !{!"_IP6_CONFIG_INSTANCE", !18, i64 0, !7, i64 4, !26, i64 8, !13, i64 24, !39, i64 32, !14, i64 168, !18, i64 176, !40, i64 180, !7, i64 184, !41, i64 800, !41, i64 840, !42, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !18, i64 948, !6, i64 952, !18, i64 960, !6, i64 968, !18, i64 976, !43, i64 984, !45, i64 1040}
!39 = !{!"", !7, i64 0, !7, i64 64, !18, i64 68, !14, i64 72, !18, i64 104, !6, i64 112, !18, i64 120, !6, i64 128}
!40 = !{!"", !18, i64 0}
!41 = !{!"", !26, i64 0, !26, i64 16, !10, i64 32}
!42 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!43 = !{!"_IP6_FORM_CALLBACK_INFO", !18, i64 0, !6, i64 8, !44, i64 16, !6, i64 40, !6, i64 48}
!44 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"", !18, i64 0, !40, i64 4, !14, i64 8, !26, i64 16, !18, i64 32, !26, i64 40, !18, i64 56, !26, i64 64, !18, i64 80}
!46 = !{!25, !18, i64 32}
!47 = !{!48, !18, i64 92}
!48 = !{!"_IP6_NEIGHBOR_ENTRY", !26, i64 0, !26, i64 16, !10, i64 32, !7, i64 40, !7, i64 41, !7, i64 42, !14, i64 43, !14, i64 59, !18, i64 92, !18, i64 96, !18, i64 100, !26, i64 104, !6, i64 120, !6, i64 128}
!49 = !{!48, !18, i64 100}
!50 = !{!48, !6, i64 128}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.IP6_ICMP_INFORMATION_HEAD = type { %struct.IP6_ICMP_HEAD, i32 }
%struct.IP6_ICMP_HEAD = type { i8, i8, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._IP6_ETHE_ADDR_OPTION = type { i8, i8, [6 x i8] }

@.str = external hidden unnamed_addr constant [127 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnArpResolved(ptr noundef) #2

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6CreateNeighborEntry(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6FindNeighborEntry(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnDADFinished(i8 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @Ip6SetToAllNodeMulticast(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip6FindDADEntry(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ip6SendNeighborAdvertise(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

declare zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef) local_unnamed_addr #1

declare zeroext i8 @Ip6IsSNMulticastAddr(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip6ProcessNeighborSolicit(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.IP6_ICMP_INFORMATION_HEAD, align 1
  %5 = alloca %struct.EFI_IPv6_ADDRESS, align 1
  %6 = alloca %struct._IP6_ETHE_ADDR_OPTION, align 1
  %7 = alloca ptr, align 8
  %8 = alloca %struct.EFI_IPv6_ADDRESS, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  %9 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 0, i32 noundef 8, ptr noundef nonnull %4) #3
  %10 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 8, i32 noundef 16, ptr noundef nonnull %5) #3
  %11 = getelementptr inbounds i8, ptr %1, i64 7
  %12 = load i8, ptr %11, align 1, !tbaa !5
  %13 = icmp ne i8 %12, -1
  %14 = getelementptr inbounds i8, ptr %4, i64 1
  %15 = load i8, ptr %14, align 1
  %16 = icmp ne i8 %15, 0
  %or.cond = select i1 %13, i1 true, i1 %16
  br i1 %or.cond, label %106, label %17

17:                                               ; preds = %3
  %18 = call zeroext i8 @NetIp6IsValidUnicast(ptr noundef nonnull %5) #3
  %.not = icmp eq i8 %18, 0
  br i1 %.not, label %106, label %19

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %1, i64 4
  %21 = load i16, ptr %20, align 1, !tbaa !11
  %22 = icmp ult i16 %21, 24
  br i1 %22, label %106, label %23

23:                                               ; preds = %19
  %24 = add i16 %21, -24
  %.not85 = icmp eq i16 %24, 0
  br i1 %.not85, label %33, label %25

25:                                               ; preds = %23
  %26 = call ptr @NetbufGetByte(ptr noundef %2, i32 noundef 24, ptr noundef null) #3
  %27 = call zeroext i8 @DebugAssertEnabled() #3
  %28 = icmp eq i8 %27, 0
  %29 = icmp ne ptr %26, null
  %or.cond18 = select i1 %28, i1 true, i1 %29
  br i1 %or.cond18, label %31, label %30

30:                                               ; preds = %25
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1508, ptr noundef nonnull @.str.19) #3
  br label %31

31:                                               ; preds = %30, %25
  %32 = call zeroext i8 @Ip6IsNDOptionValid(ptr noundef %26, i16 noundef zeroext %24) #3
  %.not86 = icmp eq i8 %32, 0
  br i1 %.not86, label %106, label %33

33:                                               ; preds = %23, %31
  %34 = getelementptr inbounds i8, ptr %1, i64 8
  %35 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef nonnull %34) #3
  %36 = getelementptr inbounds i8, ptr %1, i64 24
  %37 = call zeroext i8 @Ip6IsSNMulticastAddr(ptr noundef nonnull %36) #3
  %.not87 = icmp eq i8 %37, 0
  %38 = call zeroext i8 @Ip6IsOneOfSetAddress(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef null) #3
  %39 = icmp ugt i16 %24, 7
  br i1 %39, label %40, label %45

40:                                               ; preds = %33
  %41 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 24, i32 noundef 8, ptr noundef nonnull %6) #3
  %42 = load i8, ptr %6, align 1, !tbaa !12
  %43 = icmp eq i8 %42, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  %.not88 = icmp eq i8 %35, 0
  br i1 %.not88, label %.thread, label %106

45:                                               ; preds = %40, %33
  %46 = icmp ne i8 %35, 0
  %or.cond7 = select i1 %46, i1 %.not87, i1 false
  br i1 %or.cond7, label %106, label %.thread

.thread:                                          ; preds = %44, %45
  %47 = phi i1 [ %46, %45 ], [ false, %44 ]
  %.not9298 = phi i1 [ true, %45 ], [ false, %44 ]
  %48 = icmp ne i8 %38, 0
  %49 = xor i1 %.not87, true
  %50 = select i1 %47, i1 %49, i1 false
  %or.cond95 = select i1 %50, i1 true, i1 %48
  br i1 %or.cond95, label %51, label %106

51:                                               ; preds = %.thread
  %52 = icmp eq i8 %35, 0
  %or.cond13 = select i1 %52, i1 true, i1 %48
  br i1 %or.cond13, label %80, label %53

53:                                               ; preds = %51
  %54 = call ptr @Ip6FindDADEntry(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %7)
  %.not89 = icmp eq ptr %54, null
  br i1 %.not89, label %106, label %55

55:                                               ; preds = %53
  %56 = getelementptr inbounds i8, ptr %54, i64 28
  %57 = load i32, ptr %56, align 4, !tbaa !14
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %55
  %60 = load ptr, ptr %7, align 8, !tbaa !19
  call void @Ip6OnDADFinished(i8 noundef zeroext 0, ptr noundef %60, ptr noundef nonnull %54)
  br label %106

61:                                               ; preds = %55
  %62 = getelementptr inbounds i8, ptr %0, i64 128
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = icmp eq ptr %63, null
  br i1 %64, label %106, label %65

65:                                               ; preds = %61
  %66 = getelementptr inbounds i8, ptr %63, i64 56
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %.not90 = icmp eq ptr %67, null
  br i1 %.not90, label %106, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %0, i64 2924
  %70 = getelementptr inbounds i8, ptr %0, i64 2376
  %71 = load i32, ptr %70, align 4, !tbaa !24
  %72 = zext i32 %71 to i64
  %73 = call i64 @CompareMem(ptr noundef nonnull %67, ptr noundef nonnull %69, i64 noundef %72) #3
  %.not91 = icmp eq i64 %73, 0
  br i1 %.not91, label %76, label %74

74:                                               ; preds = %68
  %75 = load ptr, ptr %7, align 8, !tbaa !19
  call void @Ip6OnDADFinished(i8 noundef zeroext 0, ptr noundef %75, ptr noundef nonnull %54)
  br label %106

76:                                               ; preds = %68
  %77 = getelementptr inbounds i8, ptr %54, i64 32
  %78 = load i32, ptr %77, align 8, !tbaa !41
  %79 = add i32 %78, 1
  store i32 %79, ptr %77, align 8, !tbaa !41
  br label %106

80:                                               ; preds = %51
  br i1 %.not9298, label %98, label %81

81:                                               ; preds = %80
  %82 = call ptr @Ip6FindNeighborEntry(ptr noundef %0, ptr noundef nonnull %34)
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %87

84:                                               ; preds = %81
  %85 = call ptr @Ip6CreateNeighborEntry(ptr noundef %0, ptr noundef nonnull @Ip6OnArpResolved, ptr noundef nonnull %34, ptr noundef null)
  %86 = icmp eq ptr %85, null
  br i1 %86, label %106, label %.thread99

87:                                               ; preds = %81
  %88 = getelementptr inbounds i8, ptr %82, i64 59
  %89 = getelementptr inbounds i8, ptr %6, i64 2
  %90 = call i64 @CompareMem(ptr noundef nonnull %88, ptr noundef nonnull %89, i64 noundef 6) #3
  %.not93 = icmp eq i64 %90, 0
  br i1 %.not93, label %98, label %.thread99

.thread99:                                        ; preds = %84, %87
  %.0102 = phi ptr [ %82, %87 ], [ %85, %84 ]
  %91 = getelementptr inbounds i8, ptr %.0102, i64 92
  store i32 2, ptr %91, align 4, !tbaa !42
  %92 = getelementptr inbounds i8, ptr %.0102, i64 100
  store i32 -1, ptr %92, align 4, !tbaa !44
  %93 = getelementptr inbounds i8, ptr %.0102, i64 59
  %94 = getelementptr inbounds i8, ptr %6, i64 2
  %95 = call ptr @CopyMem(ptr noundef nonnull %93, ptr noundef nonnull %94, i64 noundef 6) #3
  %96 = getelementptr inbounds i8, ptr %.0102, i64 128
  %97 = load ptr, ptr %96, align 8, !tbaa !45
  call void %97(ptr noundef nonnull %.0102) #3
  br label %98

98:                                               ; preds = %87, %.thread99, %80
  %or.cond16 = select i1 %47, i1 %48, i1 false
  br i1 %or.cond16, label %99, label %101

99:                                               ; preds = %98
  %100 = call i64 @Ip6SetToAllNodeMulticast(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef nonnull %8) #3
  br label %103

101:                                              ; preds = %98
  %102 = call ptr @CopyMem(ptr noundef nonnull %8, ptr noundef nonnull %34, i64 noundef 16) #3
  br label %103

103:                                              ; preds = %101, %99
  %.077 = phi i8 [ 0, %99 ], [ 1, %101 ]
  %104 = getelementptr inbounds i8, ptr %0, i64 2924
  %105 = call i64 @Ip6SendNeighborAdvertise(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %104, i8 noundef zeroext 0, i8 noundef zeroext 1, i8 noundef zeroext %.077)
  br label %106

106:                                              ; preds = %84, %53, %74, %76, %65, %61, %.thread, %45, %44, %31, %19, %3, %17, %103, %59
  %.075 = phi i64 [ -9223372036854775806, %3 ], [ -9223372036854775806, %19 ], [ -9223372036854775806, %44 ], [ -9223372036854775806, %45 ], [ %105, %103 ], [ -9223372036854775786, %59 ], [ -9223372036854775806, %61 ], [ -9223372036854775786, %74 ], [ 0, %76 ], [ -9223372036854775806, %65 ], [ -9223372036854775806, %53 ], [ -9223372036854775806, %.thread ], [ -9223372036854775806, %31 ], [ -9223372036854775806, %17 ], [ -9223372036854775799, %84 ]
  call void @NetbufFree(ptr noundef %2) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret i64 %.075
}

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @NetIp6IsValidUnicast(ptr noundef) local_unnamed_addr #1

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i8 @Ip6IsNDOptionValid(ptr noundef, i16 noundef zeroext) local_unnamed_addr #1

declare zeroext i8 @Ip6IsOneOfSetAddress(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @NetbufFree(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 7}
!6 = !{!"_EFI_IP6_HEADER", !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 1, !9, i64 2, !9, i64 4, !7, i64 6, !7, i64 7, !10, i64 8, !10, i64 24}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!"", !7, i64 0}
!11 = !{!6, !9, i64 4}
!12 = !{!13, !7, i64 0}
!13 = !{!"_IP6_ETHE_ADDR_OPTION", !7, i64 0, !7, i64 1, !7, i64 2}
!14 = !{!15, !16, i64 28}
!15 = !{!"_IP6_DAD_ENTRY", !16, i64 0, !17, i64 8, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !18, i64 40, !10, i64 48, !18, i64 64, !18, i64 72}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_LIST_ENTRY", !18, i64 0, !18, i64 8}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!18, !18, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !18, i64 56}
!22 = !{!"", !23, i64 0, !18, i64 16, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !9, i64 44, !18, i64 48, !18, i64 56, !18, i64 64, !18, i64 72}
!23 = !{!"", !9, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !16, i64 8, !9, i64 12, !7, i64 14, !7, i64 15}
!24 = !{!25, !16, i64 2376}
!25 = !{!"_IP6_SERVICE", !16, i64 0, !26, i64 8, !27, i64 24, !27, i64 32, !17, i64 40, !17, i64 56, !18, i64 72, !18, i64 80, !28, i64 88, !10, i64 136, !30, i64 2168, !10, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !16, i64 2216, !16, i64 2220, !16, i64 2224, !16, i64 2228, !17, i64 2232, !17, i64 2248, !17, i64 2264, !17, i64 2280, !16, i64 2296, !7, i64 2300, !18, i64 2304, !7, i64 2312, !7, i64 2313, !16, i64 2316, !18, i64 2320, !18, i64 2328, !18, i64 2336, !18, i64 2344, !31, i64 2352, !32, i64 2372, !18, i64 3032, !18, i64 3040, !33, i64 3048, !18, i64 4176, !16, i64 4184, !16, i64 4188}
!26 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !18, i64 0, !18, i64 8}
!27 = !{!"long long", !7, i64 0}
!28 = !{!"", !16, i64 0, !18, i64 8, !18, i64 16, !29, i64 24}
!29 = !{!"", !18, i64 0, !27, i64 8, !7, i64 16}
!30 = !{!"", !27, i64 0, !17, i64 8}
!31 = !{!"", !16, i64 0, !16, i64 4, !9, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!32 = !{!"", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !7, i64 40, !10, i64 552, !10, i64 584, !10, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!33 = !{!"_IP6_CONFIG_INSTANCE", !16, i64 0, !7, i64 4, !17, i64 8, !9, i64 24, !34, i64 32, !10, i64 168, !16, i64 176, !35, i64 180, !7, i64 184, !36, i64 800, !36, i64 840, !37, i64 880, !18, i64 912, !18, i64 920, !18, i64 928, !18, i64 936, !7, i64 944, !16, i64 948, !18, i64 952, !16, i64 960, !18, i64 968, !16, i64 976, !38, i64 984, !40, i64 1040}
!34 = !{!"", !7, i64 0, !7, i64 64, !16, i64 68, !10, i64 72, !16, i64 104, !18, i64 112, !16, i64 120, !18, i64 128}
!35 = !{!"", !16, i64 0}
!36 = !{!"", !17, i64 0, !17, i64 16, !27, i64 32}
!37 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!38 = !{!"_IP6_FORM_CALLBACK_INFO", !16, i64 0, !18, i64 8, !39, i64 16, !18, i64 40, !18, i64 48}
!39 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !18, i64 0, !18, i64 8, !18, i64 16}
!40 = !{!"", !16, i64 0, !35, i64 4, !10, i64 8, !17, i64 16, !16, i64 32, !17, i64 40, !16, i64 56, !17, i64 64, !16, i64 80}
!41 = !{!15, !16, i64 32}
!42 = !{!43, !16, i64 92}
!43 = !{!"_IP6_NEIGHBOR_ENTRY", !17, i64 0, !17, i64 16, !27, i64 32, !7, i64 40, !7, i64 41, !7, i64 42, !10, i64 43, !10, i64 59, !16, i64 92, !16, i64 96, !16, i64 100, !17, i64 104, !18, i64 120, !18, i64 128}
!44 = !{!43, !16, i64 100}
!45 = !{!43, !18, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass