; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (HiiConfigRoutingExportConfig)

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct._HII_DATABASE_PRIVATE_DATA = type { i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._EFI_HII_FONT_PROTOCOL, %struct._EFI_HII_IMAGE_PROTOCOL, %struct._EFI_HII_STRING_PROTOCOL, %struct._EFI_HII_DATABASE_PROTOCOL, %struct._EFI_HII_CONFIG_ROUTING_PROTOCOL, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i64, %struct.GUID, ptr }
%struct._EFI_HII_FONT_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._EFI_HII_IMAGE_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr }
%struct._EFI_HII_STRING_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr }
%struct._EFI_HII_DATABASE_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._EFI_HII_CONFIG_ROUTING_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%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 }
%struct._HII_DATABASE_RECORD = type { i64, ptr, ptr, ptr, %struct._LIST_ENTRY }
%struct._HII_DATABASE_PACKAGE_LIST_INSTANCE = type { %struct.EFI_HII_PACKAGE_LIST_HEADER, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, %struct._LIST_ENTRY, ptr }
%struct.EFI_HII_PACKAGE_LIST_HEADER = type { %struct.GUID, i32 }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [155 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.36 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@gEfiHiiConfigAccessProtocolGuid = external global %struct.GUID, align 4
@.str.38 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [20 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

declare zeroext i8 @DebugAssertEnabled() #1

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

declare ptr @StrStr(ptr noundef, ptr noundef) #1

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

declare ptr @AllocateZeroPool(i64 noundef) #1

declare void @FreePool(ptr noundef) #1

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

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

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

declare i64 @GetDevicePathSize(ptr noundef) #1

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

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

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

declare void @DebugPrint(i64 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @HiiConfigRoutingExportConfig(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, 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 ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i8, align 1
  %25 = 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
  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 1, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #3
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %31, label %28

28:                                               ; preds = %2
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %28, %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %25, align 4
  br label %345

32:                                               ; preds = %28
  %33 = call zeroext i8 @DebugAssertEnabled()
  %34 = zext i8 %33 to i32
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %46

36:                                               ; preds = %32
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = ptrtoint ptr %37 to i64
  %39 = sub i64 %38, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_PRIVATE_DATA, ptr null, i32 0, i32 7) to i64)
  %40 = inttoptr i64 %39 to ptr
  %41 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = icmp ne i64 %42, 1883531592
  br i1 %43, label %44, label %46

44:                                               ; preds = %36
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4013, ptr noundef @.str.36)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  br label %51

46:                                               ; preds = %36, %32
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = ptrtoint ptr %47 to i64
  %49 = sub i64 %48, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_PRIVATE_DATA, ptr null, i32 0, i32 7) to i64)
  %50 = inttoptr i64 %49 to ptr
  br label %51

51:                                               ; preds = %46, %44
  %52 = phi ptr [ %45, %44 ], [ %50, %46 ]
  store ptr %52, ptr %19, align 8, !tbaa !5
  %53 = call ptr @AllocateZeroPool(i64 noundef 1024)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %53, ptr %54, align 8, !tbaa !5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %51
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %25, align 4
  br label %345

59:                                               ; preds = %51
  store i64 0, ptr %14, align 8, !tbaa !21
  %60 = load ptr, ptr @gBS, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %60, i32 0, i32 37
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = call i64 %62(i32 noundef 2, ptr noundef @gEfiHiiConfigAccessProtocolGuid, ptr noundef null, ptr noundef %14, ptr noundef %13)
  store i64 %63, ptr %6, align 8, !tbaa !21
  %64 = load i64, ptr %6, align 8, !tbaa !21
  %65 = icmp slt i64 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %59
  %67 = load i64, ptr %6, align 8, !tbaa !21
  store i64 %67, ptr %3, align 8
  store i32 1, ptr %25, align 4
  br label %345

68:                                               ; preds = %59
  store i8 1, ptr %15, align 1, !tbaa !25
  store i64 0, ptr %12, align 8, !tbaa !21
  br label %69

69:                                               ; preds = %340, %68
  %70 = load i64, ptr %12, align 8, !tbaa !21
  %71 = load i64, ptr %14, align 8, !tbaa !21
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %73, label %343

73:                                               ; preds = %69
  %74 = load ptr, ptr @gBS, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %74, i32 0, i32 17
  %76 = load ptr, ptr %75, align 8, !tbaa !26
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !21
  %79 = getelementptr inbounds ptr, ptr %77, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = call i64 %76(ptr noundef %80, ptr noundef @gEfiHiiConfigAccessProtocolGuid, ptr noundef %7)
  store i64 %81, ptr %6, align 8, !tbaa !21
  %82 = load i64, ptr %6, align 8, !tbaa !21
  %83 = icmp slt i64 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %73
  br label %340

85:                                               ; preds = %73
  store i8 0, ptr %24, align 1, !tbaa !25
  store ptr null, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %17, align 8, !tbaa !5
  store ptr null, ptr %18, align 8, !tbaa !5
  store ptr null, ptr %21, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load i64, ptr %12, align 8, !tbaa !21
  %88 = getelementptr inbounds ptr, ptr %86, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = call ptr @DevicePathFromHandle(ptr noundef %89)
  store ptr %90, ptr %16, align 8, !tbaa !5
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %150

93:                                               ; preds = %85
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct._LIST_ENTRY, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !27
  store ptr %97, ptr %20, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %145, %93
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %100, i32 0, i32 1
  %102 = icmp ne ptr %99, %101
  br i1 %102, label %103, label %149

103:                                              ; preds = %98
  %104 = call zeroext i8 @DebugAssertEnabled()
  %105 = zext i8 %104 to i32
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %117

107:                                              ; preds = %103
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = ptrtoint ptr %108 to i64
  %110 = sub i64 %109, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_RECORD, ptr null, i32 0, i32 4) to i64)
  %111 = inttoptr i64 %110 to ptr
  %112 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %111, i32 0, i32 0
  %113 = load i64, ptr %112, align 8, !tbaa !28
  %114 = icmp ne i64 %113, 1919183208
  br i1 %114, label %115, label %117

115:                                              ; preds = %107
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4063, ptr noundef @.str.36)
  %116 = load ptr, ptr %20, align 8, !tbaa !5
  br label %122

117:                                              ; preds = %107, %103
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = ptrtoint ptr %118 to i64
  %120 = sub i64 %119, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_RECORD, ptr null, i32 0, i32 4) to i64)
  %121 = inttoptr i64 %120 to ptr
  br label %122

122:                                              ; preds = %117, %115
  %123 = phi ptr [ %116, %115 ], [ %121, %117 ]
  store ptr %123, ptr %21, align 8, !tbaa !5
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !30
  %127 = getelementptr inbounds %struct._HII_DATABASE_PACKAGE_LIST_INSTANCE, ptr %126, i32 0, i32 8
  %128 = load ptr, ptr %127, align 8, !tbaa !31
  store ptr %128, ptr %22, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %130, label %144

130:                                              ; preds = %122
  %131 = load ptr, ptr %22, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 4
  store ptr %132, ptr %23, align 8, !tbaa !5
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  %134 = load ptr, ptr %23, align 8, !tbaa !5
  %135 = load ptr, ptr %23, align 8, !tbaa !5
  %136 = call i64 @GetDevicePathSize(ptr noundef %135)
  %137 = call i64 @CompareMem(ptr noundef %133, ptr noundef %134, i64 noundef %136)
  %138 = icmp eq i64 %137, 0
  br i1 %138, label %139, label %143

139:                                              ; preds = %130
  %140 = load ptr, ptr %21, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !34
  store ptr %142, ptr %17, align 8, !tbaa !5
  br label %149

143:                                              ; preds = %130
  br label %144

144:                                              ; preds = %143, %122
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._LIST_ENTRY, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !35
  store ptr %148, ptr %20, align 8, !tbaa !5
  br label %98, !llvm.loop !36

149:                                              ; preds = %139, %98
  br label %150

150:                                              ; preds = %149, %85
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !38
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = call i64 %153(ptr noundef %154, ptr noundef null, ptr noundef %9, ptr noundef %8)
  store i64 %155, ptr %6, align 8, !tbaa !21
  %156 = load i64, ptr %6, align 8, !tbaa !21
  %157 = icmp slt i64 %156, 0
  br i1 %157, label %158, label %184

158:                                              ; preds = %150
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %183

161:                                              ; preds = %158
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %183

164:                                              ; preds = %161
  store i8 1, ptr %24, align 1, !tbaa !25
  %165 = load ptr, ptr %21, align 8, !tbaa !5
  %166 = load ptr, ptr %16, align 8, !tbaa !5
  %167 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %165, ptr noundef %166, ptr noundef %11, ptr noundef %18, ptr noundef null)
  store i64 %167, ptr %6, align 8, !tbaa !21
  %168 = load i64, ptr %6, align 8, !tbaa !21
  %169 = icmp slt i64 %168, 0
  br i1 %169, label %181, label %170

170:                                              ; preds = %164
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  %172 = icmp ne ptr %171, null
  br i1 %172, label %173, label %181

173:                                              ; preds = %170
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !38
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = call i64 %176(ptr noundef %177, ptr noundef %178, ptr noundef %9, ptr noundef %8)
  store i64 %179, ptr %6, align 8, !tbaa !21
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %180)
  br label %182

181:                                              ; preds = %170, %164
  store i64 -9223372036854775794, ptr %6, align 8, !tbaa !21
  br label %182

182:                                              ; preds = %181, %173
  br label %183

183:                                              ; preds = %182, %161, %158
  br label %184

184:                                              ; preds = %183, %150
  %185 = load i64, ptr %6, align 8, !tbaa !21
  %186 = icmp slt i64 %185, 0
  br i1 %186, label %339, label %187

187:                                              ; preds = %184
  %188 = load i8, ptr %24, align 1, !tbaa !25
  %189 = icmp ne i8 %188, 0
  br i1 %189, label %243, label %190

190:                                              ; preds = %187
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %243

193:                                              ; preds = %190
  %194 = load ptr, ptr %16, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %243

196:                                              ; preds = %193
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = call ptr @StrStr(ptr noundef %197, ptr noundef @.str.4)
  store ptr %198, ptr %10, align 8, !tbaa !5
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %203

201:                                              ; preds = %196
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  store i16 0, ptr %202, align 2, !tbaa !40
  br label %203

203:                                              ; preds = %201, %196
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = call zeroext i8 @GetElementsFromRequest(ptr noundef %204)
  %206 = icmp ne i8 %205, 0
  br i1 %206, label %207, label %237

207:                                              ; preds = %203
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = load ptr, ptr %16, align 8, !tbaa !5
  %210 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %208, ptr noundef %209, ptr noundef %8, ptr noundef %18, ptr noundef null)
  store i64 %210, ptr %6, align 8, !tbaa !21
  br label %211

211:                                              ; preds = %207
  %212 = call zeroext i8 @DebugAssertEnabled()
  %213 = icmp ne i8 %212, 0
  br i1 %213, label %214, label %234

214:                                              ; preds = %211
  %215 = load i64, ptr %6, align 8, !tbaa !21
  %216 = icmp slt i64 %215, 0
  br i1 %216, label %217, label %233

217:                                              ; preds = %214
  br label %218

218:                                              ; preds = %217
  %219 = call zeroext i8 @DebugPrintEnabled()
  %220 = icmp ne i8 %219, 0
  br i1 %220, label %221, label %230

221:                                              ; preds = %218
  br label %222

222:                                              ; preds = %221
  %223 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %224 = icmp ne i8 %223, 0
  br i1 %224, label %225, label %227

225:                                              ; preds = %222
  %226 = load i64, ptr %6, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %226)
  br label %227

227:                                              ; preds = %225, %222
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229, %218
  br label %231

231:                                              ; preds = %230
  br label %232

232:                                              ; preds = %231
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4119, ptr noundef @.str.39)
  br label %233

233:                                              ; preds = %232, %214
  br label %234

234:                                              ; preds = %233, %211
  br label %235

235:                                              ; preds = %234
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236, %203
  %238 = load ptr, ptr %10, align 8, !tbaa !5
  %239 = icmp ne ptr %238, null
  br i1 %239, label %240, label %242

240:                                              ; preds = %237
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  store i16 38, ptr %241, align 2, !tbaa !40
  br label %242

242:                                              ; preds = %240, %237
  br label %243

243:                                              ; preds = %242, %193, %190, %187
  %244 = load ptr, ptr %18, align 8, !tbaa !5
  %245 = icmp ne ptr %244, null
  br i1 %245, label %246, label %276

246:                                              ; preds = %243
  %247 = load ptr, ptr %18, align 8, !tbaa !5
  %248 = call i64 @MergeDefaultString(ptr noundef %8, ptr noundef %247)
  store i64 %248, ptr %6, align 8, !tbaa !21
  br label %249

249:                                              ; preds = %246
  %250 = call zeroext i8 @DebugAssertEnabled()
  %251 = icmp ne i8 %250, 0
  br i1 %251, label %252, label %272

252:                                              ; preds = %249
  %253 = load i64, ptr %6, align 8, !tbaa !21
  %254 = icmp slt i64 %253, 0
  br i1 %254, label %255, label %271

255:                                              ; preds = %252
  br label %256

256:                                              ; preds = %255
  %257 = call zeroext i8 @DebugPrintEnabled()
  %258 = icmp ne i8 %257, 0
  br i1 %258, label %259, label %268

259:                                              ; preds = %256
  br label %260

260:                                              ; preds = %259
  %261 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %262 = icmp ne i8 %261, 0
  br i1 %262, label %263, label %265

263:                                              ; preds = %260
  %264 = load i64, ptr %6, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %264)
  br label %265

265:                                              ; preds = %263, %260
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267, %256
  br label %269

269:                                              ; preds = %268
  br label %270

270:                                              ; preds = %269
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4130, ptr noundef @.str.39)
  br label %271

271:                                              ; preds = %270, %252
  br label %272

272:                                              ; preds = %271, %249
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273
  %275 = load ptr, ptr %18, align 8, !tbaa !5
  call void @FreePool(ptr noundef %275)
  store ptr null, ptr %18, align 8, !tbaa !5
  br label %276

276:                                              ; preds = %274, %243
  %277 = load i8, ptr %15, align 1, !tbaa !25
  %278 = icmp ne i8 %277, 0
  br i1 %278, label %308, label %279

279:                                              ; preds = %276
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = call i64 @AppendToMultiString(ptr noundef %280, ptr noundef @.str.11)
  store i64 %281, ptr %6, align 8, !tbaa !21
  br label %282

282:                                              ; preds = %279
  %283 = call zeroext i8 @DebugAssertEnabled()
  %284 = icmp ne i8 %283, 0
  br i1 %284, label %285, label %305

285:                                              ; preds = %282
  %286 = load i64, ptr %6, align 8, !tbaa !21
  %287 = icmp slt i64 %286, 0
  br i1 %287, label %288, label %304

288:                                              ; preds = %285
  br label %289

289:                                              ; preds = %288
  %290 = call zeroext i8 @DebugPrintEnabled()
  %291 = icmp ne i8 %290, 0
  br i1 %291, label %292, label %301

292:                                              ; preds = %289
  br label %293

293:                                              ; preds = %292
  %294 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %295 = icmp ne i8 %294, 0
  br i1 %295, label %296, label %298

296:                                              ; preds = %293
  %297 = load i64, ptr %6, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %297)
  br label %298

298:                                              ; preds = %296, %293
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300, %289
  br label %302

302:                                              ; preds = %301
  br label %303

303:                                              ; preds = %302
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4141, ptr noundef @.str.39)
  br label %304

304:                                              ; preds = %303, %285
  br label %305

305:                                              ; preds = %304, %282
  br label %306

306:                                              ; preds = %305
  br label %307

307:                                              ; preds = %306
  br label %308

308:                                              ; preds = %307, %276
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  %310 = load ptr, ptr %8, align 8, !tbaa !5
  %311 = call i64 @AppendToMultiString(ptr noundef %309, ptr noundef %310)
  store i64 %311, ptr %6, align 8, !tbaa !21
  br label %312

312:                                              ; preds = %308
  %313 = call zeroext i8 @DebugAssertEnabled()
  %314 = icmp ne i8 %313, 0
  br i1 %314, label %315, label %335

315:                                              ; preds = %312
  %316 = load i64, ptr %6, align 8, !tbaa !21
  %317 = icmp slt i64 %316, 0
  br i1 %317, label %318, label %334

318:                                              ; preds = %315
  br label %319

319:                                              ; preds = %318
  %320 = call zeroext i8 @DebugPrintEnabled()
  %321 = icmp ne i8 %320, 0
  br i1 %321, label %322, label %331

322:                                              ; preds = %319
  br label %323

323:                                              ; preds = %322
  %324 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %325 = icmp ne i8 %324, 0
  br i1 %325, label %326, label %328

326:                                              ; preds = %323
  %327 = load i64, ptr %6, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %327)
  br label %328

328:                                              ; preds = %326, %323
  br label %329

329:                                              ; preds = %328
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330, %319
  br label %332

332:                                              ; preds = %331
  br label %333

333:                                              ; preds = %332
  call void @DebugAssert(ptr noundef @.str, i64 noundef 4145, ptr noundef @.str.39)
  br label %334

334:                                              ; preds = %333, %315
  br label %335

335:                                              ; preds = %334, %312
  br label %336

336:                                              ; preds = %335
  br label %337

337:                                              ; preds = %336
  store i8 0, ptr %15, align 1, !tbaa !25
  %338 = load ptr, ptr %8, align 8, !tbaa !5
  call void @FreePool(ptr noundef %338)
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %339

339:                                              ; preds = %337, %184
  br label %340

340:                                              ; preds = %339, %84
  %341 = load i64, ptr %12, align 8, !tbaa !21
  %342 = add i64 %341, 1
  store i64 %342, ptr %12, align 8, !tbaa !21
  br label %69, !llvm.loop !41

343:                                              ; preds = %69
  %344 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %344)
  store i64 0, ptr %3, align 8
  store i32 1, ptr %25, align 4
  br label %345

345:                                              ; preds = %343, %66, %58, %31
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #3
  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 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 1, 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 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
  %346 = load i64, ptr %3, align 8
  ret i64 %346
}

declare ptr @DevicePathFromHandle(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, !11, i64 0}
!10 = !{!"_HII_DATABASE_PRIVATE_DATA", !11, i64 0, !12, i64 8, !12, i64 24, !13, i64 40, !14, i64 72, !15, i64 112, !16, i64 152, !17, i64 240, !12, i64 288, !11, i64 304, !12, i64 312, !11, i64 328, !18, i64 336, !6, i64 352}
!11 = !{!"long long", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_EFI_HII_FONT_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!"_EFI_HII_IMAGE_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!"_EFI_HII_STRING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!16 = !{!"_EFI_HII_DATABASE_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, !6, i64 72, !6, i64 80}
!17 = !{!"_EFI_HII_CONFIG_ROUTING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"", !19, i64 0, !20, i64 4, !20, i64 6, !7, i64 8}
!19 = !{!"int", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !6, i64 312}
!23 = !{!"", !24, 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}
!24 = !{!"", !11, i64 0, !19, i64 8, !19, i64 12, !19, i64 16, !19, i64 20}
!25 = !{!7, !7, i64 0}
!26 = !{!23, !6, i64 152}
!27 = !{!10, !6, i64 8}
!28 = !{!29, !11, i64 0}
!29 = !{!"_HII_DATABASE_RECORD", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!30 = !{!29, !6, i64 8}
!31 = !{!32, !6, i64 128}
!32 = !{!"_HII_DATABASE_PACKAGE_LIST_INSTANCE", !33, i64 0, !12, i64 24, !12, i64 40, !12, i64 56, !12, i64 72, !12, i64 88, !6, i64 104, !12, i64 112, !6, i64 128}
!33 = !{!"", !18, i64 0, !19, i64 16}
!34 = !{!29, !6, i64 24}
!35 = !{!12, !6, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !6, i64 0}
!39 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!20, !20, i64 0}
!41 = distinct !{!41, !37}


; 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.GUID = type { i32, i16, i16, [8 x i8] }

@.str = external hidden unnamed_addr constant [155 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [2 x i32], align 4
@.str.36 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiHiiConfigAccessProtocolGuid = external global %struct.GUID, align 4
@.str.38 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [20 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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

declare ptr @StrStr(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

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

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

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

declare i64 @GetDevicePathSize(ptr noundef) local_unnamed_addr #1

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @HiiConfigRoutingExportConfig(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, 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 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %10 = icmp eq ptr %0, null
  %11 = icmp eq ptr %1, null
  %or.cond = or i1 %10, %11
  br i1 %or.cond, label %146, label %12

12:                                               ; preds = %2
  %13 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %13, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre125 = add i64 %.pre, -240
  %.pre127 = inttoptr i64 %.pre125 to ptr
  br i1 %.not, label %._crit_edge124, label %14

14:                                               ; preds = %12
  %15 = load i64, ptr %.pre127, align 8, !tbaa !5
  %.not96 = icmp eq i64 %15, 1883531592
  br i1 %.not96, label %._crit_edge124, label %16

16:                                               ; preds = %14
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4013, ptr noundef nonnull @.str.36) #3
  br label %._crit_edge124

._crit_edge124:                                   ; preds = %12, %14, %16
  %17 = phi ptr [ %0, %16 ], [ %.pre127, %14 ], [ %.pre127, %12 ]
  %18 = tail call ptr @AllocateZeroPool(i64 noundef 1024) #3
  store ptr %18, ptr %1, align 8, !tbaa !20
  %19 = icmp eq ptr %18, null
  br i1 %19, label %146, label %20

20:                                               ; preds = %._crit_edge124
  store i64 0, ptr %8, align 8, !tbaa !21
  %21 = load ptr, ptr @gBS, align 8, !tbaa !20
  %22 = getelementptr inbounds i8, ptr %21, i64 312
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = call i64 %23(i32 noundef 2, ptr noundef nonnull @gEfiHiiConfigAccessProtocolGuid, ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %7) #3
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %146, label %.preheader

.preheader:                                       ; preds = %20
  %26 = load i64, ptr %8, align 8, !tbaa !21
  %.not122 = icmp eq i64 %26, 0
  br i1 %.not122, label %._crit_edge, label %.lr.ph121

.lr.ph121:                                        ; preds = %.preheader
  %27 = getelementptr inbounds i8, ptr %17, i64 8
  br label %28

28:                                               ; preds = %.lr.ph121, %.thread
  %.076120 = phi i64 [ 0, %.lr.ph121 ], [ %142, %.thread ]
  %.078119 = phi i8 [ 1, %.lr.ph121 ], [ %.179, %.thread ]
  %29 = load ptr, ptr @gBS, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %29, i64 152
  %31 = load ptr, ptr %30, align 8, !tbaa !25
  %32 = load ptr, ptr %7, align 8, !tbaa !20
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.076120
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = call i64 %31(ptr noundef %34, ptr noundef nonnull @gEfiHiiConfigAccessProtocolGuid, ptr noundef nonnull %3) #3
  %36 = icmp slt i64 %35, 0
  br i1 %36, label %.thread, label %37

37:                                               ; preds = %28
  store ptr null, ptr %5, align 8, !tbaa !20
  store ptr null, ptr %9, align 8, !tbaa !20
  store ptr null, ptr %6, align 8, !tbaa !20
  %38 = load ptr, ptr %7, align 8, !tbaa !20
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.076120
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = call ptr @DevicePathFromHandle(ptr noundef %40) #3
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %.loopexit

43:                                               ; preds = %37
  %.075116 = load ptr, ptr %27, align 8, !tbaa !26
  %.not97117 = icmp eq ptr %.075116, %27
  br i1 %.not97117, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %43, %61
  %.075118 = phi ptr [ %.075, %61 ], [ %.075116, %43 ]
  %44 = call zeroext i8 @DebugAssertEnabled() #3
  %.not98 = icmp eq i8 %44, 0
  %.pre129 = ptrtoint ptr %.075118 to i64
  %.pre131 = add i64 %.pre129, -32
  %.pre133 = inttoptr i64 %.pre131 to ptr
  br i1 %.not98, label %.lr.ph._crit_edge, label %45

45:                                               ; preds = %.lr.ph
  %46 = load i64, ptr %.pre133, align 8, !tbaa !27
  %.not99 = icmp eq i64 %46, 1919183208
  br i1 %.not99, label %.lr.ph._crit_edge, label %47

47:                                               ; preds = %45
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4063, ptr noundef nonnull @.str.36) #3
  br label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph, %45, %47
  %48 = phi ptr [ %.075118, %47 ], [ %.pre133, %45 ], [ %.pre133, %.lr.ph ]
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !29
  %51 = getelementptr inbounds i8, ptr %50, i64 128
  %52 = load ptr, ptr %51, align 8, !tbaa !30
  %.not100 = icmp eq ptr %52, null
  br i1 %.not100, label %61, label %53

53:                                               ; preds = %.lr.ph._crit_edge
  %54 = getelementptr inbounds i8, ptr %52, i64 4
  %55 = call i64 @GetDevicePathSize(ptr noundef nonnull %54) #3
  %56 = call i64 @CompareMem(ptr noundef nonnull %41, ptr noundef nonnull %54, i64 noundef %55) #3
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  %59 = getelementptr inbounds i8, ptr %48, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !33
  br label %.loopexit

61:                                               ; preds = %.lr.ph._crit_edge, %53
  %.075 = load ptr, ptr %.075118, align 8, !tbaa !26
  %.not97 = icmp eq ptr %.075, %27
  br i1 %.not97, label %.loopexit, label %.lr.ph, !llvm.loop !34

.loopexit:                                        ; preds = %61, %43, %58, %37
  %.077 = phi ptr [ %60, %58 ], [ null, %37 ], [ null, %43 ], [ null, %61 ]
  %.1 = phi ptr [ %48, %58 ], [ null, %37 ], [ null, %43 ], [ %48, %61 ]
  %62 = load ptr, ptr %3, align 8, !tbaa !20
  %63 = load ptr, ptr %62, align 8, !tbaa !36
  %64 = call i64 %63(ptr noundef nonnull %62, ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %4) #3
  %65 = icmp slt i64 %64, 0
  %66 = icmp ne ptr %.077, null
  %or.cond3 = and i1 %42, %66
  %or.cond113 = select i1 %65, i1 %or.cond3, i1 false
  br i1 %or.cond113, label %67, label %77

67:                                               ; preds = %.loopexit
  %68 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %.1, ptr noundef nonnull %41, ptr noundef nonnull %6, ptr noundef nonnull %9, ptr noundef null)
  %69 = icmp sgt i64 %68, -1
  %70 = load ptr, ptr %6, align 8
  %71 = icmp ne ptr %70, null
  %or.cond5 = select i1 %69, i1 %71, i1 false
  br i1 %or.cond5, label %72, label %.thread

72:                                               ; preds = %67
  %73 = load ptr, ptr %3, align 8, !tbaa !20
  %74 = load ptr, ptr %73, align 8, !tbaa !36
  %75 = call i64 %74(ptr noundef nonnull %73, ptr noundef nonnull %70, ptr noundef nonnull %5, ptr noundef nonnull %4) #3
  %76 = load ptr, ptr %6, align 8, !tbaa !20
  call void @FreePool(ptr noundef %76) #3
  br label %77

77:                                               ; preds = %72, %.loopexit
  %.073 = phi i64 [ %75, %72 ], [ %64, %.loopexit ]
  %78 = icmp slt i64 %.073, 0
  br i1 %78, label %.thread, label %79

79:                                               ; preds = %77
  %80 = xor i1 %or.cond113, true
  %or.cond7 = select i1 %80, i1 %66, i1 false
  %or.cond9 = and i1 %42, %or.cond7
  br i1 %or.cond9, label %81, label %101

81:                                               ; preds = %79
  %82 = load ptr, ptr %4, align 8, !tbaa !20
  %83 = call ptr @StrStr(ptr noundef %82, ptr noundef nonnull @.str.4) #3
  %.not101 = icmp eq ptr %83, null
  br i1 %.not101, label %85, label %84

84:                                               ; preds = %81
  store i16 0, ptr %83, align 2, !tbaa !38
  br label %85

85:                                               ; preds = %84, %81
  %86 = load ptr, ptr %4, align 8, !tbaa !20
  %87 = call zeroext i8 @GetElementsFromRequest(ptr noundef %86)
  %.not102 = icmp eq i8 %87, 0
  br i1 %.not102, label %99, label %88

88:                                               ; preds = %85
  %89 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %.1, ptr noundef nonnull %41, ptr noundef nonnull %4, ptr noundef nonnull %9, ptr noundef null)
  %90 = call zeroext i8 @DebugAssertEnabled() #3
  %91 = icmp ne i8 %90, 0
  %92 = icmp slt i64 %89, 0
  %or.cond11 = select i1 %91, i1 %92, i1 false
  br i1 %or.cond11, label %93, label %99

93:                                               ; preds = %88
  %94 = call zeroext i8 @DebugPrintEnabled() #3
  %.not103 = icmp eq i8 %94, 0
  br i1 %.not103, label %98, label %95

95:                                               ; preds = %93
  %96 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not104 = icmp eq i8 %96, 0
  br i1 %.not104, label %98, label %97

97:                                               ; preds = %95
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %89) #3
  br label %98

98:                                               ; preds = %95, %97, %93
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4119, ptr noundef nonnull @.str.39) #3
  br label %99

99:                                               ; preds = %88, %98, %85
  br i1 %.not101, label %101, label %100

100:                                              ; preds = %99
  store i16 38, ptr %83, align 2, !tbaa !38
  br label %101

101:                                              ; preds = %99, %100, %79
  %102 = load ptr, ptr %9, align 8, !tbaa !20
  %.not105 = icmp eq ptr %102, null
  br i1 %.not105, label %116, label %103

103:                                              ; preds = %101
  %104 = call i64 @MergeDefaultString(ptr noundef nonnull %4, ptr noundef nonnull %102)
  %105 = call zeroext i8 @DebugAssertEnabled() #3
  %106 = icmp ne i8 %105, 0
  %107 = icmp slt i64 %104, 0
  %or.cond13 = select i1 %106, i1 %107, i1 false
  br i1 %or.cond13, label %108, label %114

108:                                              ; preds = %103
  %109 = call zeroext i8 @DebugPrintEnabled() #3
  %.not106 = icmp eq i8 %109, 0
  br i1 %.not106, label %113, label %110

110:                                              ; preds = %108
  %111 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not107 = icmp eq i8 %111, 0
  br i1 %.not107, label %113, label %112

112:                                              ; preds = %110
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %104) #3
  br label %113

113:                                              ; preds = %110, %112, %108
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4130, ptr noundef nonnull @.str.39) #3
  br label %114

114:                                              ; preds = %113, %103
  %115 = load ptr, ptr %9, align 8, !tbaa !20
  call void @FreePool(ptr noundef %115) #3
  store ptr null, ptr %9, align 8, !tbaa !20
  br label %116

116:                                              ; preds = %114, %101
  %.not108 = icmp eq i8 %.078119, 0
  br i1 %.not108, label %117, label %128

117:                                              ; preds = %116
  %118 = call i64 @AppendToMultiString(ptr noundef nonnull %1, ptr noundef nonnull @.str.11)
  %119 = call zeroext i8 @DebugAssertEnabled() #3
  %120 = icmp ne i8 %119, 0
  %121 = icmp slt i64 %118, 0
  %or.cond15 = select i1 %120, i1 %121, i1 false
  br i1 %or.cond15, label %122, label %128

122:                                              ; preds = %117
  %123 = call zeroext i8 @DebugPrintEnabled() #3
  %.not109 = icmp eq i8 %123, 0
  br i1 %.not109, label %127, label %124

124:                                              ; preds = %122
  %125 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not110 = icmp eq i8 %125, 0
  br i1 %.not110, label %127, label %126

126:                                              ; preds = %124
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %118) #3
  br label %127

127:                                              ; preds = %124, %126, %122
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4141, ptr noundef nonnull @.str.39) #3
  br label %128

128:                                              ; preds = %117, %127, %116
  %129 = load ptr, ptr %4, align 8, !tbaa !20
  %130 = call i64 @AppendToMultiString(ptr noundef nonnull %1, ptr noundef %129)
  %131 = call zeroext i8 @DebugAssertEnabled() #3
  %132 = icmp ne i8 %131, 0
  %133 = icmp slt i64 %130, 0
  %or.cond17 = select i1 %132, i1 %133, i1 false
  br i1 %or.cond17, label %134, label %140

134:                                              ; preds = %128
  %135 = call zeroext i8 @DebugPrintEnabled() #3
  %.not111 = icmp eq i8 %135, 0
  br i1 %.not111, label %139, label %136

136:                                              ; preds = %134
  %137 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not112 = icmp eq i8 %137, 0
  br i1 %.not112, label %139, label %138

138:                                              ; preds = %136
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %130) #3
  br label %139

139:                                              ; preds = %136, %138, %134
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 4145, ptr noundef nonnull @.str.39) #3
  br label %140

140:                                              ; preds = %139, %128
  %141 = load ptr, ptr %4, align 8, !tbaa !20
  call void @FreePool(ptr noundef %141) #3
  store ptr null, ptr %4, align 8, !tbaa !20
  br label %.thread

.thread:                                          ; preds = %67, %77, %140, %28
  %.179 = phi i8 [ %.078119, %28 ], [ %.078119, %77 ], [ 0, %140 ], [ %.078119, %67 ]
  %142 = add nuw i64 %.076120, 1
  %143 = load i64, ptr %8, align 8, !tbaa !21
  %144 = icmp ult i64 %142, %143
  br i1 %144, label %28, label %._crit_edge, !llvm.loop !39

._crit_edge:                                      ; preds = %.thread, %.preheader
  %145 = load ptr, ptr %7, align 8, !tbaa !20
  call void @FreePool(ptr noundef %145) #3
  br label %146

146:                                              ; preds = %20, %._crit_edge124, %2, %._crit_edge
  %.072 = phi i64 [ 0, %._crit_edge ], [ -9223372036854775806, %2 ], [ -9223372036854775799, %._crit_edge124 ], [ %24, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i64 %.072
}

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


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