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

; 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._DHCP6_INSTANCE = type { i32, ptr, ptr, %struct._LIST_ENTRY, %struct._EFI_DHCP6_PROTOCOL, ptr, ptr, ptr, %struct._DHCP6_IA_CB, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, i8, ptr, i64, i8, i8, i64 }
%struct._EFI_DHCP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._DHCP6_IA_CB = type { ptr, i32, i32, i32, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_DHCP6_CONFIG_DATA = type { ptr, ptr, i32, ptr, %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr, i8, i8, ptr }
%struct.EFI_DHCP6_IA_DESCRIPTOR = type { i16, i32 }
%struct.EFI_DHCP6_PACKET_OPTION = type <{ i16, i16, [1 x i8] }>
%struct.EFI_DHCP6_RETRANSMISSION = type { i32, i32, i32, i32 }
%struct._DHCP6_SERVICE = type { i32, ptr, ptr, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, ptr, ptr, i32, %struct._LIST_ENTRY, i64 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_DHCP6_IA = type { %struct.EFI_DHCP6_IA_DESCRIPTOR, i32, ptr, i32, [1 x %struct.EFI_DHCP6_IA_ADDRESS] }
%struct.EFI_DHCP6_IA_ADDRESS = type { %struct.EFI_IPv6_ADDRESS, i32, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiDhcp6Configure(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

17:                                               ; preds = %2
  %18 = call zeroext i8 @DebugAssertEnabled()
  %19 = zext i8 %18 to i32
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %31

21:                                               ; preds = %17
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = ptrtoint ptr %22 to i64
  %24 = sub i64 %23, ptrtoint (ptr getelementptr inbounds (%struct._DHCP6_INSTANCE, ptr null, i32 0, i32 4) to i64)
  %25 = inttoptr i64 %24 to ptr
  %26 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = icmp ne i32 %27, 1228294212
  br i1 %28, label %29, label %31

29:                                               ; preds = %21
  call void @DebugAssert(ptr noundef @.str, i64 noundef 420, ptr noundef @.str.1)
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  br label %36

31:                                               ; preds = %21, %17
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr getelementptr inbounds (%struct._DHCP6_INSTANCE, ptr null, i32 0, i32 4) to i64)
  %35 = inttoptr i64 %34 to ptr
  br label %36

36:                                               ; preds = %31, %29
  %37 = phi ptr [ %30, %29 ], [ %35, %31 ]
  store ptr %37, ptr %10, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  store ptr %40, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %229

43:                                               ; preds = %36
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !17
  %47 = icmp ugt i32 %46, 0
  br i1 %47, label %48, label %54

48:                                               ; preds = %43
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %49, i32 0, i32 3
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

54:                                               ; preds = %48, %43
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %55, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %128

59:                                               ; preds = %54
  store i64 0, ptr %12, align 8, !tbaa !22
  br label %60

60:                                               ; preds = %124, %59
  %61 = load i64, ptr %12, align 8, !tbaa !22
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 8, !tbaa !17
  %65 = zext i32 %64 to i64
  %66 = icmp ult i64 %61, %65
  br i1 %66, label %67, label %127

67:                                               ; preds = %60
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %68, i32 0, i32 3
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = load i64, ptr %12, align 8, !tbaa !22
  %72 = getelementptr inbounds ptr, ptr %70, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %73, i32 0, i32 0
  %75 = load i16, ptr %74, align 1, !tbaa !23
  %76 = zext i16 %75 to i32
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %122, label %78

78:                                               ; preds = %67
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = load i64, ptr %12, align 8, !tbaa !22
  %83 = getelementptr inbounds ptr, ptr %81, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %84, i32 0, i32 0
  %86 = load i16, ptr %85, align 1, !tbaa !23
  %87 = zext i16 %86 to i32
  %88 = icmp eq i32 %87, 14
  br i1 %88, label %122, label %89

89:                                               ; preds = %78
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = load i64, ptr %12, align 8, !tbaa !22
  %94 = getelementptr inbounds ptr, ptr %92, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %95, i32 0, i32 0
  %97 = load i16, ptr %96, align 1, !tbaa !23
  %98 = zext i16 %97 to i32
  %99 = icmp eq i32 %98, 20
  br i1 %99, label %122, label %100

100:                                              ; preds = %89
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %101, i32 0, i32 3
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = load i64, ptr %12, align 8, !tbaa !22
  %105 = getelementptr inbounds ptr, ptr %103, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %106, i32 0, i32 0
  %108 = load i16, ptr %107, align 1, !tbaa !23
  %109 = zext i16 %108 to i32
  %110 = icmp eq i32 %109, 3
  br i1 %110, label %122, label %111

111:                                              ; preds = %100
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %112, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !21
  %115 = load i64, ptr %12, align 8, !tbaa !22
  %116 = getelementptr inbounds ptr, ptr %114, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %117, i32 0, i32 0
  %119 = load i16, ptr %118, align 1, !tbaa !23
  %120 = zext i16 %119 to i32
  %121 = icmp eq i32 %120, 4
  br i1 %121, label %122, label %123

122:                                              ; preds = %111, %100, %89, %78, %67
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

123:                                              ; preds = %111
  br label %124

124:                                              ; preds = %123
  %125 = load i64, ptr %12, align 8, !tbaa !22
  %126 = add i64 %125, 1
  store i64 %126, ptr %12, align 8, !tbaa !22
  br label %60, !llvm.loop !25

127:                                              ; preds = %60
  br label %128

128:                                              ; preds = %127, %54
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %129, i32 0, i32 4
  %131 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %130, i32 0, i32 0
  %132 = load i16, ptr %131, align 8, !tbaa !27
  %133 = zext i16 %132 to i32
  %134 = icmp ne i32 %133, 3
  br i1 %134, label %135, label %143

135:                                              ; preds = %128
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %136, i32 0, i32 4
  %138 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %137, i32 0, i32 0
  %139 = load i16, ptr %138, align 8, !tbaa !27
  %140 = zext i16 %139 to i32
  %141 = icmp ne i32 %140, 4
  br i1 %141, label %142, label %143

142:                                              ; preds = %135
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

143:                                              ; preds = %135, %128
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %144, i32 0, i32 5
  %146 = load ptr, ptr %145, align 8, !tbaa !28
  %147 = icmp eq ptr %146, null
  br i1 %147, label %148, label %154

148:                                              ; preds = %143
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %149, i32 0, i32 8
  %151 = load ptr, ptr %150, align 8, !tbaa !29
  %152 = icmp eq ptr %151, null
  br i1 %152, label %153, label %154

153:                                              ; preds = %148
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

154:                                              ; preds = %148, %143
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %155, i32 0, i32 8
  %157 = load ptr, ptr %156, align 8, !tbaa !29
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %174

159:                                              ; preds = %154
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !29
  %163 = getelementptr inbounds %struct.EFI_DHCP6_RETRANSMISSION, ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !30
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %174

166:                                              ; preds = %159
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %167, i32 0, i32 8
  %169 = load ptr, ptr %168, align 8, !tbaa !29
  %170 = getelementptr inbounds %struct.EFI_DHCP6_RETRANSMISSION, ptr %169, i32 0, i32 3
  %171 = load i32, ptr %170, align 4, !tbaa !32
  %172 = icmp eq i32 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %166
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

174:                                              ; preds = %166, %159, %154
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._DHCP6_SERVICE, ptr %175, i32 0, i32 9
  %177 = getelementptr inbounds %struct._LIST_ENTRY, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !33
  store ptr %178, ptr %8, align 8, !tbaa !5
  br label %179

179:                                              ; preds = %224, %174
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._DHCP6_SERVICE, ptr %181, i32 0, i32 9
  %183 = icmp ne ptr %180, %182
  br i1 %183, label %184, label %228

184:                                              ; preds = %179
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = ptrtoint ptr %185 to i64
  %187 = sub i64 %186, ptrtoint (ptr getelementptr inbounds (%struct._DHCP6_INSTANCE, ptr null, i32 0, i32 3) to i64)
  %188 = inttoptr i64 %187 to ptr
  store ptr %188, ptr %9, align 8, !tbaa !5
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %189, i32 0, i32 8
  %191 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !36
  %193 = icmp ne ptr %192, null
  br i1 %193, label %194, label %223

194:                                              ; preds = %184
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %195, i32 0, i32 8
  %197 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %196, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8, !tbaa !36
  %199 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %198, i32 0, i32 0
  %200 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %199, i32 0, i32 0
  %201 = load i16, ptr %200, align 8, !tbaa !37
  %202 = zext i16 %201 to i32
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %203, i32 0, i32 4
  %205 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %204, i32 0, i32 0
  %206 = load i16, ptr %205, align 8, !tbaa !27
  %207 = zext i16 %206 to i32
  %208 = icmp eq i32 %202, %207
  br i1 %208, label %209, label %223

209:                                              ; preds = %194
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %210, i32 0, i32 8
  %212 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !36
  %214 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %214, i32 0, i32 1
  %216 = load i32, ptr %215, align 4, !tbaa !39
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %217, i32 0, i32 4
  %219 = getelementptr inbounds %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr %218, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !40
  %221 = icmp eq i32 %216, %220
  br i1 %221, label %222, label %223

222:                                              ; preds = %209
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

223:                                              ; preds = %209, %194, %184
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %8, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct._LIST_ENTRY, ptr %225, i32 0, i32 0
  %227 = load ptr, ptr %226, align 8, !tbaa !41
  store ptr %227, ptr %8, align 8, !tbaa !5
  br label %179, !llvm.loop !42

228:                                              ; preds = %179
  br label %229

229:                                              ; preds = %228, %36
  %230 = load ptr, ptr @gBS, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %230, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !43
  %233 = call i64 %232(i64 noundef 8)
  store i64 %233, ptr %6, align 8, !tbaa !22
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = icmp ne ptr %234, null
  br i1 %235, label %236, label %305

236:                                              ; preds = %229
  %237 = load ptr, ptr %10, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %237, i32 0, i32 6
  %239 = load ptr, ptr %238, align 8, !tbaa !46
  %240 = icmp ne ptr %239, null
  br i1 %240, label %241, label %246

241:                                              ; preds = %236
  %242 = load ptr, ptr @gBS, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %242, i32 0, i32 2
  %244 = load ptr, ptr %243, align 8, !tbaa !47
  %245 = load i64, ptr %6, align 8, !tbaa !22
  call void %244(i64 noundef %245)
  store i64 -9223372036854775793, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

246:                                              ; preds = %236
  %247 = call ptr @AllocateZeroPool(i64 noundef 64)
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %248, i32 0, i32 6
  store ptr %247, ptr %249, align 8, !tbaa !46
  %250 = load ptr, ptr %10, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %250, i32 0, i32 6
  %252 = load ptr, ptr %251, align 8, !tbaa !46
  %253 = icmp eq ptr %252, null
  br i1 %253, label %254, label %259

254:                                              ; preds = %246
  %255 = load ptr, ptr @gBS, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %255, i32 0, i32 2
  %257 = load ptr, ptr %256, align 8, !tbaa !47
  %258 = load i64, ptr %6, align 8, !tbaa !22
  call void %257(i64 noundef %258)
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

259:                                              ; preds = %246
  %260 = load ptr, ptr %10, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %260, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !46
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = call i64 @Dhcp6CopyConfigData(ptr noundef %262, ptr noundef %263)
  store i64 %264, ptr %7, align 8, !tbaa !22
  %265 = load i64, ptr %7, align 8, !tbaa !22
  %266 = icmp slt i64 %265, 0
  br i1 %266, label %267, label %275

267:                                              ; preds = %259
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %268, i32 0, i32 6
  %270 = load ptr, ptr %269, align 8, !tbaa !46
  call void @FreePool(ptr noundef %270)
  %271 = load ptr, ptr @gBS, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %271, i32 0, i32 2
  %273 = load ptr, ptr %272, align 8, !tbaa !47
  %274 = load i64, ptr %6, align 8, !tbaa !22
  call void %273(i64 noundef %274)
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

275:                                              ; preds = %259
  %276 = call ptr @AllocateZeroPool(i64 noundef 56)
  %277 = load ptr, ptr %10, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %277, i32 0, i32 8
  %279 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %278, i32 0, i32 0
  store ptr %276, ptr %279, align 8, !tbaa !36
  %280 = load ptr, ptr %10, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %280, i32 0, i32 8
  %282 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %282, align 8, !tbaa !36
  %284 = icmp eq ptr %283, null
  br i1 %284, label %285, label %296

285:                                              ; preds = %275
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %286, i32 0, i32 6
  %288 = load ptr, ptr %287, align 8, !tbaa !46
  call void @Dhcp6CleanupConfigData(ptr noundef %288)
  %289 = load ptr, ptr %10, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %289, i32 0, i32 6
  %291 = load ptr, ptr %290, align 8, !tbaa !46
  call void @FreePool(ptr noundef %291)
  %292 = load ptr, ptr @gBS, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %292, i32 0, i32 2
  %294 = load ptr, ptr %293, align 8, !tbaa !47
  %295 = load i64, ptr %6, align 8, !tbaa !22
  call void %294(i64 noundef %295)
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

296:                                              ; preds = %275
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %297, i32 0, i32 8
  %299 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %298, i32 0, i32 0
  %300 = load ptr, ptr %299, align 8, !tbaa !36
  %301 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %300, i32 0, i32 0
  %302 = load ptr, ptr %5, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %302, i32 0, i32 4
  %304 = call ptr @CopyMem(ptr noundef %301, ptr noundef %303, i64 noundef 8)
  br label %358

305:                                              ; preds = %229
  %306 = load ptr, ptr %10, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %306, i32 0, i32 6
  %308 = load ptr, ptr %307, align 8, !tbaa !46
  %309 = icmp eq ptr %308, null
  br i1 %309, label %310, label %329

310:                                              ; preds = %305
  br label %311

311:                                              ; preds = %310
  %312 = call zeroext i8 @DebugAssertEnabled()
  %313 = icmp ne i8 %312, 0
  br i1 %313, label %314, label %322

314:                                              ; preds = %311
  %315 = load ptr, ptr %10, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %315, i32 0, i32 8
  %317 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !36
  %319 = icmp eq ptr %318, null
  br i1 %319, label %321, label %320

320:                                              ; preds = %314
  call void @DebugAssert(ptr noundef @.str, i64 noundef 521, ptr noundef @.str.5)
  br label %321

321:                                              ; preds = %320, %314
  br label %322

322:                                              ; preds = %321, %311
  br label %323

323:                                              ; preds = %322
  br label %324

324:                                              ; preds = %323
  %325 = load ptr, ptr @gBS, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %325, i32 0, i32 2
  %327 = load ptr, ptr %326, align 8, !tbaa !47
  %328 = load i64, ptr %6, align 8, !tbaa !22
  call void %327(i64 noundef %328)
  store i64 0, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

329:                                              ; preds = %305
  %330 = load ptr, ptr %10, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %330, i32 0, i32 8
  %332 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %331, i32 0, i32 0
  %333 = load ptr, ptr %332, align 8, !tbaa !36
  %334 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %333, i32 0, i32 1
  %335 = load i32, ptr %334, align 8, !tbaa !48
  %336 = icmp ne i32 %335, 0
  br i1 %336, label %337, label %342

337:                                              ; preds = %329
  %338 = load ptr, ptr @gBS, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %338, i32 0, i32 2
  %340 = load ptr, ptr %339, align 8, !tbaa !47
  %341 = load i64, ptr %6, align 8, !tbaa !22
  call void %340(i64 noundef %341)
  store i64 -9223372036854775793, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

342:                                              ; preds = %329
  %343 = load ptr, ptr %10, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %343, i32 0, i32 6
  %345 = load ptr, ptr %344, align 8, !tbaa !46
  call void @Dhcp6CleanupConfigData(ptr noundef %345)
  %346 = load ptr, ptr %10, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %346, i32 0, i32 6
  %348 = load ptr, ptr %347, align 8, !tbaa !46
  call void @FreePool(ptr noundef %348)
  %349 = load ptr, ptr %10, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %349, i32 0, i32 6
  store ptr null, ptr %350, align 8, !tbaa !46
  %351 = load ptr, ptr %10, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %351, i32 0, i32 8
  %353 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %352, i32 0, i32 0
  %354 = load ptr, ptr %353, align 8, !tbaa !36
  call void @FreePool(ptr noundef %354)
  %355 = load ptr, ptr %10, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %355, i32 0, i32 8
  %357 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %356, i32 0, i32 0
  store ptr null, ptr %357, align 8, !tbaa !36
  br label %358

358:                                              ; preds = %342, %296
  %359 = load ptr, ptr @gBS, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %359, i32 0, i32 2
  %361 = load ptr, ptr %360, align 8, !tbaa !47
  %362 = load i64, ptr %6, align 8, !tbaa !22
  call void %361(i64 noundef %362)
  store i64 0, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %363

363:                                              ; preds = %358, %337, %324, %285, %267, %254, %241, %222, %173, %153, %142, %122, %53, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %364 = load i64, ptr %3, align 8
  ret i64 %364
}

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

declare i64 @Dhcp6CopyConfigData(ptr noundef, ptr noundef) #2

declare ptr @AllocateZeroPool(i64 noundef) #2

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

declare void @Dhcp6CleanupConfigData(ptr noundef) #2

declare void @FreePool(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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, !11, i64 0}
!10 = !{!"_DHCP6_INSTANCE", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 40, !6, i64 112, !6, i64 120, !6, i64 128, !14, i64 136, !12, i64 160, !12, i64 176, !6, i64 192, !7, i64 200, !6, i64 208, !15, i64 216, !7, i64 224, !7, i64 225, !15, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_EFI_DHCP6_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!14 = !{!"_DHCP6_IA_CB", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!15 = !{!"long long", !7, i64 0}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !11, i64 16}
!18 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !19, i64 32, !6, i64 40, !7, i64 48, !7, i64 49, !6, i64 56}
!19 = !{!"", !20, i64 0, !11, i64 4}
!20 = !{!"short", !7, i64 0}
!21 = !{!18, !6, i64 24}
!22 = !{!15, !15, i64 0}
!23 = !{!24, !20, i64 0}
!24 = !{!"", !20, i64 0, !20, i64 2, !7, i64 4}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!18, !20, i64 32}
!28 = !{!18, !6, i64 40}
!29 = !{!18, !6, i64 56}
!30 = !{!31, !11, i64 4}
!31 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!32 = !{!31, !11, i64 12}
!33 = !{!34, !6, i64 80}
!34 = !{!"_DHCP6_SERVICE", !11, i64 0, !6, i64 8, !6, i64 16, !35, i64 24, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !12, i64 80, !15, i64 96}
!35 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!36 = !{!10, !6, i64 136}
!37 = !{!38, !20, i64 0}
!38 = !{!"", !19, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !7, i64 28}
!39 = !{!38, !11, i64 4}
!40 = !{!18, !11, i64 36}
!41 = !{!12, !6, i64 0}
!42 = distinct !{!42, !26}
!43 = !{!44, !6, i64 24}
!44 = !{!"", !45, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!45 = !{!"", !15, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!46 = !{!10, !6, i64 120}
!47 = !{!44, !6, i64 32}
!48 = !{!38, !11, i64 8}


; 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"

@.str = external hidden unnamed_addr constant [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775806, 1) i64 @EfiDhcp6Configure(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %2
  %5 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %5, 0
  %.pre105 = ptrtoint ptr %0 to i64
  %.pre106 = add i64 %.pre105, -40
  %.pre108 = inttoptr i64 %.pre106 to ptr
  br i1 %.not, label %._crit_edge104, label %6

6:                                                ; preds = %4
  %7 = load i32, ptr %.pre108, align 8, !tbaa !5
  %.not79 = icmp eq i32 %7, 1228294212
  br i1 %.not79, label %._crit_edge104, label %8

8:                                                ; preds = %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 420, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge104

._crit_edge104:                                   ; preds = %4, %6, %8
  %9 = phi ptr [ %0, %8 ], [ %.pre108, %6 ], [ %.pre108, %4 ]
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %.not80 = icmp eq ptr %1, null
  br i1 %.not80, label %.thread, label %19

.thread:                                          ; preds = %._crit_edge104
  %12 = load ptr, ptr @gBS, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = tail call i64 %14(i64 noundef 8) #2
  %16 = getelementptr inbounds i8, ptr %9, i64 120
  %17 = load ptr, ptr %16, align 8, !tbaa !20
  %18 = icmp eq ptr %17, null
  br i1 %18, label %91, label %98

19:                                               ; preds = %._crit_edge104
  %20 = getelementptr inbounds i8, ptr %1, i64 16
  %21 = load i32, ptr %20, align 8, !tbaa !21
  %.not81 = icmp eq i32 %21, 0
  br i1 %.not81, label %.loopexit91, label %22

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !25
  %25 = icmp eq ptr %24, null
  br i1 %25, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %22
  %26 = zext i32 %21 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %30
  %.093 = phi i64 [ %31, %30 ], [ 0, %.lr.ph.preheader ]
  %27 = getelementptr inbounds ptr, ptr %24, i64 %.093
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = load i16, ptr %28, align 1, !tbaa !26
  switch i16 %29, label %30 [
    i16 1, label %.loopexit
    i16 14, label %.loopexit
    i16 20, label %.loopexit
    i16 3, label %.loopexit
    i16 4, label %.loopexit
  ]

30:                                               ; preds = %.lr.ph
  %31 = add nuw nsw i64 %.093, 1
  %exitcond.not = icmp eq i64 %31, %26
  br i1 %exitcond.not, label %.loopexit91, label %.lr.ph, !llvm.loop !28

.loopexit91:                                      ; preds = %30, %19
  %32 = getelementptr inbounds i8, ptr %1, i64 32
  %33 = load i16, ptr %32, align 8, !tbaa !30
  %.off = add i16 %33, -3
  %switch = icmp ult i16 %.off, 2
  br i1 %switch, label %34, label %.loopexit

34:                                               ; preds = %.loopexit91
  %35 = getelementptr inbounds i8, ptr %1, i64 40
  %36 = load ptr, ptr %35, align 8, !tbaa !31
  %37 = icmp eq ptr %36, null
  %38 = getelementptr inbounds i8, ptr %1, i64 56
  %39 = load ptr, ptr %38, align 8, !tbaa !32
  %40 = icmp eq ptr %39, null
  br i1 %37, label %41, label %42

41:                                               ; preds = %34
  br i1 %40, label %.loopexit, label %.thread112

42:                                               ; preds = %34
  br i1 %40, label %50, label %.thread112

.thread112:                                       ; preds = %41, %42
  %43 = getelementptr inbounds i8, ptr %39, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !33
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %50

46:                                               ; preds = %.thread112
  %47 = getelementptr inbounds i8, ptr %39, i64 12
  %48 = load i32, ptr %47, align 4, !tbaa !35
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %.loopexit, label %50

50:                                               ; preds = %46, %.thread112, %42
  %51 = getelementptr inbounds i8, ptr %11, i64 80
  %.06994 = load ptr, ptr %51, align 8, !tbaa !36
  %.not8695 = icmp eq ptr %.06994, %51
  br i1 %.not8695, label %._crit_edge, label %.lr.ph97

.lr.ph97:                                         ; preds = %50
  %52 = getelementptr inbounds i8, ptr %1, i64 36
  br label %53

53:                                               ; preds = %.lr.ph97, %67
  %.06996 = phi ptr [ %.06994, %.lr.ph97 ], [ %.069, %67 ]
  %54 = ptrtoint ptr %.06996 to i64
  %55 = add i64 %54, -24
  %56 = inttoptr i64 %55 to ptr
  %57 = getelementptr inbounds i8, ptr %56, i64 136
  %58 = load ptr, ptr %57, align 8, !tbaa !37
  %.not90 = icmp eq ptr %58, null
  br i1 %.not90, label %67, label %59

59:                                               ; preds = %53
  %60 = load i16, ptr %58, align 8, !tbaa !38
  %61 = icmp eq i16 %60, %33
  br i1 %61, label %62, label %67

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %58, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !40
  %65 = load i32, ptr %52, align 4, !tbaa !41
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %.loopexit, label %67

67:                                               ; preds = %53, %59, %62
  %.069 = load ptr, ptr %.06996, align 8, !tbaa !36
  %.not86 = icmp eq ptr %.069, %51
  br i1 %.not86, label %._crit_edge, label %53, !llvm.loop !42

._crit_edge:                                      ; preds = %67, %50
  %68 = load ptr, ptr @gBS, align 8, !tbaa !16
  %69 = getelementptr inbounds i8, ptr %68, i64 24
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = tail call i64 %70(i64 noundef 8) #2
  %72 = getelementptr inbounds i8, ptr %9, i64 120
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  %.not89 = icmp eq ptr %73, null
  br i1 %.not89, label %74, label %.loopexit.sink.split

74:                                               ; preds = %._crit_edge
  %75 = tail call ptr @AllocateZeroPool(i64 noundef 64) #2
  store ptr %75, ptr %72, align 8, !tbaa !20
  %76 = icmp eq ptr %75, null
  br i1 %76, label %.loopexit.sink.split, label %77

77:                                               ; preds = %74
  %78 = tail call i64 @Dhcp6CopyConfigData(ptr noundef nonnull %75, ptr noundef nonnull %1) #2
  %79 = icmp slt i64 %78, 0
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = load ptr, ptr %72, align 8, !tbaa !20
  tail call void @FreePool(ptr noundef %81) #2
  br label %.loopexit.sink.split

82:                                               ; preds = %77
  %83 = tail call ptr @AllocateZeroPool(i64 noundef 56) #2
  %84 = getelementptr inbounds i8, ptr %9, i64 136
  store ptr %83, ptr %84, align 8, !tbaa !37
  %85 = icmp eq ptr %83, null
  br i1 %85, label %86, label %89

86:                                               ; preds = %82
  %87 = load ptr, ptr %72, align 8, !tbaa !20
  tail call void @Dhcp6CleanupConfigData(ptr noundef %87) #2
  %88 = load ptr, ptr %72, align 8, !tbaa !20
  tail call void @FreePool(ptr noundef %88) #2
  br label %.loopexit.sink.split

89:                                               ; preds = %82
  %90 = tail call ptr @CopyMem(ptr noundef nonnull %83, ptr noundef nonnull %32, i64 noundef 8) #2
  br label %.loopexit.sink.split

91:                                               ; preds = %.thread
  %92 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not88 = icmp eq i8 %92, 0
  br i1 %.not88, label %.loopexit.sink.split, label %93

93:                                               ; preds = %91
  %94 = getelementptr inbounds i8, ptr %9, i64 136
  %95 = load ptr, ptr %94, align 8, !tbaa !37
  %96 = icmp eq ptr %95, null
  br i1 %96, label %.loopexit.sink.split, label %97

97:                                               ; preds = %93
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 521, ptr noundef nonnull @.str.5) #2
  br label %.loopexit.sink.split

98:                                               ; preds = %.thread
  %99 = getelementptr inbounds i8, ptr %9, i64 136
  %100 = load ptr, ptr %99, align 8, !tbaa !37
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = load i32, ptr %101, align 8, !tbaa !43
  %.not87 = icmp eq i32 %102, 0
  br i1 %.not87, label %103, label %.loopexit.sink.split

103:                                              ; preds = %98
  tail call void @Dhcp6CleanupConfigData(ptr noundef nonnull %17) #2
  %104 = load ptr, ptr %16, align 8, !tbaa !20
  tail call void @FreePool(ptr noundef %104) #2
  store ptr null, ptr %16, align 8, !tbaa !20
  %105 = load ptr, ptr %99, align 8, !tbaa !37
  tail call void @FreePool(ptr noundef %105) #2
  store ptr null, ptr %99, align 8, !tbaa !37
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %89, %103, %98, %91, %97, %93, %74, %._crit_edge, %80, %86
  %.sink = phi i64 [ %71, %86 ], [ %71, %80 ], [ %71, %._crit_edge ], [ %71, %74 ], [ %15, %93 ], [ %15, %97 ], [ %15, %91 ], [ %15, %98 ], [ %15, %103 ], [ %71, %89 ]
  %.068.ph = phi i64 [ -9223372036854775799, %86 ], [ -9223372036854775799, %80 ], [ -9223372036854775793, %._crit_edge ], [ -9223372036854775799, %74 ], [ 0, %93 ], [ 0, %97 ], [ 0, %91 ], [ -9223372036854775793, %98 ], [ 0, %103 ], [ 0, %89 ]
  %106 = load ptr, ptr @gBS, align 8, !tbaa !16
  %107 = getelementptr inbounds i8, ptr %106, i64 32
  %108 = load ptr, ptr %107, align 8, !tbaa !44
  tail call void %108(i64 noundef %.sink) #2
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %62, %.loopexit.sink.split, %.loopexit91, %46, %41, %22, %2
  %.068 = phi i64 [ -9223372036854775806, %2 ], [ -9223372036854775806, %22 ], [ -9223372036854775806, %.loopexit91 ], [ -9223372036854775806, %41 ], [ -9223372036854775806, %46 ], [ %.068.ph, %.loopexit.sink.split ], [ -9223372036854775806, %62 ], [ -9223372036854775806, %.lr.ph ], [ -9223372036854775806, %.lr.ph ], [ -9223372036854775806, %.lr.ph ], [ -9223372036854775806, %.lr.ph ], [ -9223372036854775806, %.lr.ph ]
  ret i64 %.068
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

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

declare void @Dhcp6CleanupConfigData(ptr noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 }

!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 0}
!6 = !{!"_DHCP6_INSTANCE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 40, !10, i64 112, !10, i64 120, !10, i64 128, !13, i64 136, !11, i64 160, !11, i64 176, !10, i64 192, !8, i64 200, !10, i64 208, !14, i64 216, !8, i64 224, !8, i64 225, !14, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!12 = !{!"_EFI_DHCP6_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!13 = !{!"_DHCP6_IA_CB", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!14 = !{!"long long", !8, i64 0}
!15 = !{!6, !10, i64 16}
!16 = !{!10, !10, i64 0}
!17 = !{!18, !10, i64 24}
!18 = !{!"", !19, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!19 = !{!"", !14, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!20 = !{!6, !10, i64 120}
!21 = !{!22, !7, i64 16}
!22 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !23, i64 32, !10, i64 40, !8, i64 48, !8, i64 49, !10, i64 56}
!23 = !{!"", !24, i64 0, !7, i64 4}
!24 = !{!"short", !8, i64 0}
!25 = !{!22, !10, i64 24}
!26 = !{!27, !24, i64 0}
!27 = !{!"", !24, i64 0, !24, i64 2, !8, i64 4}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!22, !24, i64 32}
!31 = !{!22, !10, i64 40}
!32 = !{!22, !10, i64 56}
!33 = !{!34, !7, i64 4}
!34 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!35 = !{!34, !7, i64 12}
!36 = !{!11, !10, i64 0}
!37 = !{!6, !10, i64 136}
!38 = !{!39, !24, i64 0}
!39 = !{!"", !23, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !8, i64 28}
!40 = !{!39, !7, i64 4}
!41 = !{!22, !7, i64 36}
!42 = distinct !{!42, !29}
!43 = !{!39, !7, i64 8}
!44 = !{!18, !10, i64 32}


; Effective O3 passes: ADCEPass,BDCEPass,ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass