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

; 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._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_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._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [155 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 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
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@.str.37 = external hidden unnamed_addr constant [31 x i8], align 1
@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
@.str.40 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @CalculateConfigStringLen(ptr noundef) #0

; 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

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

declare i64 @StrLen(ptr noundef) #2

declare ptr @StrStr(ptr 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

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

declare ptr @AllocateZeroPool(i64 noundef) #2

declare void @FreePool(ptr noundef) #2

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

declare i64 @StrSize(ptr noundef) #2

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @IsThisPackageList(ptr noundef, ptr noundef) #0

declare i64 @GetDevicePathSize(ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ConfigRequestValidate(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @HiiConfigRoutingExtractConfig(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, 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 ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, 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 ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  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 8, 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 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %42, label %36

36:                                               ; preds = %4
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %39, %36, %4
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %33, align 4
  br label %514

43:                                               ; preds = %39
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %48

46:                                               ; preds = %43
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr null, ptr %47, align 8, !tbaa !5
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %33, align 4
  br label %514

48:                                               ; preds = %43
  %49 = call zeroext i8 @DebugAssertEnabled()
  %50 = zext i8 %49 to i32
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %62

52:                                               ; preds = %48
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_PRIVATE_DATA, ptr null, i32 0, i32 7) to i64)
  %56 = inttoptr i64 %55 to ptr
  %57 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %56, i32 0, i32 0
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = icmp ne i64 %58, 1883531592
  br i1 %59, label %60, label %62

60:                                               ; preds = %52
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3698, ptr noundef @.str.36)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  br label %67

62:                                               ; preds = %52, %48
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = ptrtoint ptr %63 to i64
  %65 = sub i64 %64, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_PRIVATE_DATA, ptr null, i32 0, i32 7) to i64)
  %66 = inttoptr i64 %65 to ptr
  br label %67

67:                                               ; preds = %62, %60
  %68 = phi ptr [ %61, %60 ], [ %66, %62 ]
  store ptr %68, ptr %10, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %69, ptr %11, align 8, !tbaa !5
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %70, ptr %71, align 8, !tbaa !5
  store ptr null, ptr %26, align 8, !tbaa !5
  store ptr null, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %16, align 8, !tbaa !21
  store ptr null, ptr %25, align 8, !tbaa !5
  store ptr null, ptr %24, align 8, !tbaa !5
  store ptr null, ptr %14, align 8, !tbaa !5
  store i8 0, ptr %28, align 1, !tbaa !22
  store i8 0, ptr %29, align 1, !tbaa !22
  store ptr null, ptr %30, align 8, !tbaa !5
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = call i64 @StrLen(ptr noundef @.str.2)
  %74 = call i64 @StrnCmp(ptr noundef %72, ptr noundef @.str.2, i64 noundef %73)
  %75 = icmp ne i64 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %67
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %33, align 4
  br label %514

77:                                               ; preds = %67
  store i8 1, ptr %27, align 1, !tbaa !22
  %78 = call ptr @AllocateZeroPool(i64 noundef 1024)
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %78, ptr %79, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %84

83:                                               ; preds = %77
  store i64 -9223372036854775799, ptr %5, align 8
  store i32 1, ptr %33, align 4
  br label %514

84:                                               ; preds = %77
  br label %85

85:                                               ; preds = %481, %84
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i16, ptr %86, align 2, !tbaa !23
  %88 = zext i16 %87 to i32
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %95

90:                                               ; preds = %85
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = call i64 @StrLen(ptr noundef @.str.2)
  %93 = call i64 @StrnCmp(ptr noundef %91, ptr noundef @.str.2, i64 noundef %92)
  %94 = icmp eq i64 %93, 0
  br label %95

95:                                               ; preds = %90, %85
  %96 = phi i1 [ false, %85 ], [ %94, %90 ]
  br i1 %96, label %97, label %484

97:                                               ; preds = %95
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = icmp eq ptr %98, %99
  br i1 %100, label %101, label %104

101:                                              ; preds = %97
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %102, ptr %103, align 8, !tbaa !5
  br label %108

104:                                              ; preds = %97
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds i16, ptr %105, i64 -1
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %106, ptr %107, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %104, %101
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = call i64 @CalculateConfigStringLen(ptr noundef %109)
  store i64 %110, ptr %13, align 8, !tbaa !21
  %111 = load i64, ptr %13, align 8, !tbaa !21
  %112 = add i64 %111, 1
  %113 = mul i64 %112, 2
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = call ptr @AllocateCopyPool(i64 noundef %113, ptr noundef %114)
  store ptr %115, ptr %12, align 8, !tbaa !5
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = icmp eq ptr %116, null
  br i1 %117, label %118, label %119

118:                                              ; preds = %108
  store i64 -9223372036854775799, ptr %16, align 8, !tbaa !21
  br label %485

119:                                              ; preds = %108
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i64, ptr %13, align 8, !tbaa !21
  %122 = getelementptr inbounds i16, ptr %120, i64 %121
  store i16 0, ptr %122, align 2, !tbaa !23
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  %124 = call i64 @GetDevicePath(ptr noundef %123, ptr noundef %14)
  store i64 %124, ptr %16, align 8, !tbaa !21
  %125 = load i64, ptr %16, align 8, !tbaa !21
  %126 = icmp slt i64 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %119
  br label %485

128:                                              ; preds = %119
  store ptr null, ptr %21, align 8, !tbaa !5
  store ptr null, ptr %22, align 8, !tbaa !5
  store ptr null, ptr %18, align 8, !tbaa !5
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %129, i32 0, i32 1
  %131 = getelementptr inbounds %struct._LIST_ENTRY, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !24
  store ptr %132, ptr %17, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %190, %128
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._HII_DATABASE_PRIVATE_DATA, ptr %135, i32 0, i32 1
  %137 = icmp ne ptr %134, %136
  br i1 %137, label %138, label %194

138:                                              ; preds = %133
  %139 = call zeroext i8 @DebugAssertEnabled()
  %140 = zext i8 %139 to i32
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %152

142:                                              ; preds = %138
  %143 = load ptr, ptr %17, align 8, !tbaa !5
  %144 = ptrtoint ptr %143 to i64
  %145 = sub i64 %144, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_RECORD, ptr null, i32 0, i32 4) to i64)
  %146 = inttoptr i64 %145 to ptr
  %147 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %146, i32 0, i32 0
  %148 = load i64, ptr %147, align 8, !tbaa !25
  %149 = icmp ne i64 %148, 1919183208
  br i1 %149, label %150, label %152

150:                                              ; preds = %142
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3770, ptr noundef @.str.36)
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  br label %157

152:                                              ; preds = %142, %138
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = ptrtoint ptr %153 to i64
  %155 = sub i64 %154, ptrtoint (ptr getelementptr inbounds (%struct._HII_DATABASE_RECORD, ptr null, i32 0, i32 4) to i64)
  %156 = inttoptr i64 %155 to ptr
  br label %157

157:                                              ; preds = %152, %150
  %158 = phi ptr [ %151, %150 ], [ %156, %152 ]
  store ptr %158, ptr %18, align 8, !tbaa !5
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !27
  %162 = getelementptr inbounds %struct._HII_DATABASE_PACKAGE_LIST_INSTANCE, ptr %161, i32 0, i32 8
  %163 = load ptr, ptr %162, align 8, !tbaa !28
  store ptr %163, ptr %19, align 8, !tbaa !5
  %164 = icmp ne ptr %163, null
  br i1 %164, label %165, label %189

165:                                              ; preds = %157
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  %167 = getelementptr inbounds i8, ptr %166, i64 4
  store ptr %167, ptr %20, align 8, !tbaa !5
  %168 = load ptr, ptr %20, align 8, !tbaa !5
  %169 = call i64 @GetDevicePathSize(ptr noundef %168)
  store i64 %169, ptr %32, align 8, !tbaa !21
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = load ptr, ptr %20, align 8, !tbaa !5
  %172 = load i64, ptr %32, align 8, !tbaa !21
  %173 = call i64 @CompareMem(ptr noundef %170, ptr noundef %171, i64 noundef %172)
  %174 = icmp eq i64 %173, 0
  br i1 %174, label %175, label %188

175:                                              ; preds = %165
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  %178 = call zeroext i8 @IsThisPackageList(ptr noundef %176, ptr noundef %177)
  %179 = zext i8 %178 to i32
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %188

181:                                              ; preds = %175
  %182 = load ptr, ptr %18, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %182, i32 0, i32 2
  %184 = load ptr, ptr %183, align 8, !tbaa !31
  store ptr %184, ptr %21, align 8, !tbaa !5
  %185 = load ptr, ptr %18, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._HII_DATABASE_RECORD, ptr %185, i32 0, i32 3
  %187 = load ptr, ptr %186, align 8, !tbaa !32
  store ptr %187, ptr %22, align 8, !tbaa !5
  br label %194

188:                                              ; preds = %175, %165
  br label %189

189:                                              ; preds = %188, %157
  br label %190

190:                                              ; preds = %189
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._LIST_ENTRY, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !33
  store ptr %193, ptr %17, align 8, !tbaa !5
  br label %133, !llvm.loop !34

194:                                              ; preds = %181, %133
  %195 = load ptr, ptr %21, align 8, !tbaa !5
  %196 = icmp eq ptr %195, null
  br i1 %196, label %197, label %212

197:                                              ; preds = %194
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %198, ptr %15, align 8, !tbaa !5
  %199 = load ptr, ptr @gBS, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %199, i32 0, i32 21
  %201 = load ptr, ptr %200, align 8, !tbaa !36
  %202 = call i64 %201(ptr noundef @gEfiDevicePathProtocolGuid, ptr noundef %15, ptr noundef %21)
  store i64 %202, ptr %16, align 8, !tbaa !21
  %203 = load i64, ptr %16, align 8, !tbaa !21
  %204 = icmp slt i64 %203, 0
  br i1 %204, label %208, label %205

205:                                              ; preds = %197
  %206 = load ptr, ptr %21, align 8, !tbaa !5
  %207 = icmp eq ptr %206, null
  br i1 %207, label %208, label %211

208:                                              ; preds = %205, %197
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %209, ptr %210, align 8, !tbaa !5
  store i64 -9223372036854775794, ptr %16, align 8, !tbaa !21
  br label %485

211:                                              ; preds = %205
  br label %212

212:                                              ; preds = %211, %194
  %213 = load ptr, ptr %12, align 8, !tbaa !5
  %214 = call ptr @ConfigRequestValidate(ptr noundef %213)
  store ptr %214, ptr %31, align 8, !tbaa !5
  %215 = load ptr, ptr %31, align 8, !tbaa !5
  %216 = icmp ne ptr %215, null
  br i1 %216, label %217, label %222

217:                                              ; preds = %212
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load ptr, ptr %31, align 8, !tbaa !5
  %220 = call ptr @StrStr(ptr noundef %218, ptr noundef %219)
  %221 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %220, ptr %221, align 8, !tbaa !5
  store i64 -9223372036854775806, ptr %16, align 8, !tbaa !21
  br label %485

222:                                              ; preds = %212
  store i8 0, ptr %28, align 1, !tbaa !22
  %223 = load ptr, ptr %22, align 8, !tbaa !5
  %224 = icmp ne ptr %223, null
  br i1 %224, label %225, label %261

225:                                              ; preds = %222
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = call zeroext i8 @GetElementsFromRequest(ptr noundef %226)
  %228 = icmp ne i8 %227, 0
  br i1 %228, label %261, label %229

229:                                              ; preds = %225
  store i8 1, ptr %28, align 1, !tbaa !22
  %230 = load ptr, ptr %18, align 8, !tbaa !5
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %230, ptr noundef %231, ptr noundef %12, ptr noundef %26, ptr noundef %24)
  store i64 %232, ptr %16, align 8, !tbaa !21
  %233 = load i64, ptr %16, align 8, !tbaa !21
  %234 = icmp slt i64 %233, 0
  br i1 %234, label %235, label %251

235:                                              ; preds = %229
  br label %236

236:                                              ; preds = %235
  %237 = call zeroext i8 @DebugAssertEnabled()
  %238 = icmp ne i8 %237, 0
  br i1 %238, label %239, label %244

239:                                              ; preds = %236
  %240 = load ptr, ptr %24, align 8, !tbaa !5
  %241 = icmp ne ptr %240, null
  br i1 %241, label %243, label %242

242:                                              ; preds = %239
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3828, ptr noundef @.str.37)
  br label %243

243:                                              ; preds = %242, %239
  br label %244

244:                                              ; preds = %243, %236
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  %247 = load ptr, ptr %11, align 8, !tbaa !5
  %248 = load ptr, ptr %24, align 8, !tbaa !5
  %249 = call ptr @StrStr(ptr noundef %247, ptr noundef %248)
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %249, ptr %250, align 8, !tbaa !5
  br label %485

251:                                              ; preds = %229
  %252 = load ptr, ptr %12, align 8, !tbaa !5
  %253 = call zeroext i8 @GetElementsFromRequest(ptr noundef %252)
  %254 = icmp ne i8 %253, 0
  br i1 %254, label %260, label %255

255:                                              ; preds = %251
  %256 = load ptr, ptr %12, align 8, !tbaa !5
  %257 = call i64 @StrSize(ptr noundef %256)
  %258 = load ptr, ptr %12, align 8, !tbaa !5
  %259 = call ptr @AllocateCopyPool(i64 noundef %257, ptr noundef %258)
  store ptr %259, ptr %25, align 8, !tbaa !5
  br label %407

260:                                              ; preds = %251
  br label %261

261:                                              ; preds = %260, %225, %222
  %262 = load ptr, ptr %18, align 8, !tbaa !5
  %263 = load ptr, ptr %12, align 8, !tbaa !5
  %264 = call i64 @GetVarStoreType(ptr noundef %262, ptr noundef %263, ptr noundef %29, ptr noundef %30)
  store i64 %264, ptr %16, align 8, !tbaa !21
  %265 = load i64, ptr %16, align 8, !tbaa !21
  %266 = icmp slt i64 %265, 0
  br i1 %266, label %267, label %268

267:                                              ; preds = %261
  br label %485

268:                                              ; preds = %261
  %269 = load i8, ptr %29, align 1, !tbaa !22
  %270 = icmp ne i8 %269, 0
  br i1 %270, label %271, label %277

271:                                              ; preds = %268
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = load ptr, ptr %30, align 8, !tbaa !5
  %274 = load ptr, ptr %12, align 8, !tbaa !5
  %275 = call i64 @GetConfigRespFromEfiVarStore(ptr noundef %272, ptr noundef %273, ptr noundef %274, ptr noundef %25, ptr noundef %24)
  store i64 %275, ptr %16, align 8, !tbaa !21
  %276 = load ptr, ptr %30, align 8, !tbaa !5
  call void @FreePool(ptr noundef %276)
  br label %315

277:                                              ; preds = %268
  %278 = load ptr, ptr @gBS, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %278, i32 0, i32 17
  %280 = load ptr, ptr %279, align 8, !tbaa !39
  %281 = load ptr, ptr %21, align 8, !tbaa !5
  %282 = call i64 %280(ptr noundef %281, ptr noundef @gEfiHiiConfigAccessProtocolGuid, ptr noundef %23)
  store i64 %282, ptr %16, align 8, !tbaa !21
  br label %283

283:                                              ; preds = %277
  %284 = call zeroext i8 @DebugAssertEnabled()
  %285 = icmp ne i8 %284, 0
  br i1 %285, label %286, label %306

286:                                              ; preds = %283
  %287 = load i64, ptr %16, align 8, !tbaa !21
  %288 = icmp slt i64 %287, 0
  br i1 %288, label %289, label %305

289:                                              ; preds = %286
  br label %290

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

293:                                              ; preds = %290
  br label %294

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

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

299:                                              ; preds = %297, %294
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301, %290
  br label %303

303:                                              ; preds = %302
  br label %304

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

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

306:                                              ; preds = %305, %283
  br label %307

307:                                              ; preds = %306
  br label %308

308:                                              ; preds = %307
  %309 = load ptr, ptr %23, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr %309, i32 0, i32 0
  %311 = load ptr, ptr %310, align 8, !tbaa !40
  %312 = load ptr, ptr %23, align 8, !tbaa !5
  %313 = load ptr, ptr %12, align 8, !tbaa !5
  %314 = call i64 %311(ptr noundef %312, ptr noundef %313, ptr noundef %24, ptr noundef %25)
  store i64 %314, ptr %16, align 8, !tbaa !21
  br label %315

315:                                              ; preds = %308, %271
  %316 = load i64, ptr %16, align 8, !tbaa !21
  %317 = icmp slt i64 %316, 0
  br i1 %317, label %318, label %323

318:                                              ; preds = %315
  %319 = load ptr, ptr %11, align 8, !tbaa !5
  %320 = load ptr, ptr %24, align 8, !tbaa !5
  %321 = call ptr @StrStr(ptr noundef %319, ptr noundef %320)
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %321, ptr %322, align 8, !tbaa !5
  br label %485

323:                                              ; preds = %315
  br label %324

324:                                              ; preds = %323
  %325 = call zeroext i8 @DebugAssertEnabled()
  %326 = icmp ne i8 %325, 0
  br i1 %326, label %327, label %334

327:                                              ; preds = %324
  %328 = load ptr, ptr %24, align 8, !tbaa !5
  %329 = load i16, ptr %328, align 2, !tbaa !23
  %330 = zext i16 %329 to i32
  %331 = icmp eq i32 %330, 0
  br i1 %331, label %333, label %332

332:                                              ; preds = %327
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3886, ptr noundef @.str.40)
  br label %333

333:                                              ; preds = %332, %327
  br label %334

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

335:                                              ; preds = %334
  br label %336

336:                                              ; preds = %335
  %337 = load i8, ptr %28, align 1, !tbaa !22
  %338 = icmp ne i8 %337, 0
  br i1 %338, label %372, label %339

339:                                              ; preds = %336
  %340 = load ptr, ptr %22, align 8, !tbaa !5
  %341 = icmp ne ptr %340, null
  br i1 %341, label %342, label %372

342:                                              ; preds = %339
  %343 = load ptr, ptr %18, align 8, !tbaa !5
  %344 = load ptr, ptr %14, align 8, !tbaa !5
  %345 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %343, ptr noundef %344, ptr noundef %12, ptr noundef %26, ptr noundef null)
  store i64 %345, ptr %16, align 8, !tbaa !21
  br label %346

346:                                              ; preds = %342
  %347 = call zeroext i8 @DebugAssertEnabled()
  %348 = icmp ne i8 %347, 0
  br i1 %348, label %349, label %369

349:                                              ; preds = %346
  %350 = load i64, ptr %16, align 8, !tbaa !21
  %351 = icmp slt i64 %350, 0
  br i1 %351, label %352, label %368

352:                                              ; preds = %349
  br label %353

353:                                              ; preds = %352
  %354 = call zeroext i8 @DebugPrintEnabled()
  %355 = icmp ne i8 %354, 0
  br i1 %355, label %356, label %365

356:                                              ; preds = %353
  br label %357

357:                                              ; preds = %356
  %358 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %359 = icmp ne i8 %358, 0
  br i1 %359, label %360, label %362

360:                                              ; preds = %357
  %361 = load i64, ptr %16, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %361)
  br label %362

362:                                              ; preds = %360, %357
  br label %363

363:                                              ; preds = %362
  br label %364

364:                                              ; preds = %363
  br label %365

365:                                              ; preds = %364, %353
  br label %366

366:                                              ; preds = %365
  br label %367

367:                                              ; preds = %366
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3893, ptr noundef @.str.39)
  br label %368

368:                                              ; preds = %367, %349
  br label %369

369:                                              ; preds = %368, %346
  br label %370

370:                                              ; preds = %369
  br label %371

371:                                              ; preds = %370
  br label %372

372:                                              ; preds = %371, %339, %336
  %373 = load ptr, ptr %14, align 8, !tbaa !5
  call void @FreePool(ptr noundef %373)
  store ptr null, ptr %14, align 8, !tbaa !5
  %374 = load ptr, ptr %26, align 8, !tbaa !5
  %375 = icmp ne ptr %374, null
  br i1 %375, label %376, label %406

376:                                              ; preds = %372
  %377 = load ptr, ptr %26, align 8, !tbaa !5
  %378 = call i64 @MergeDefaultString(ptr noundef %25, ptr noundef %377)
  store i64 %378, ptr %16, align 8, !tbaa !21
  br label %379

379:                                              ; preds = %376
  %380 = call zeroext i8 @DebugAssertEnabled()
  %381 = icmp ne i8 %380, 0
  br i1 %381, label %382, label %402

382:                                              ; preds = %379
  %383 = load i64, ptr %16, align 8, !tbaa !21
  %384 = icmp slt i64 %383, 0
  br i1 %384, label %385, label %401

385:                                              ; preds = %382
  br label %386

386:                                              ; preds = %385
  %387 = call zeroext i8 @DebugPrintEnabled()
  %388 = icmp ne i8 %387, 0
  br i1 %388, label %389, label %398

389:                                              ; preds = %386
  br label %390

390:                                              ; preds = %389
  %391 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %392 = icmp ne i8 %391, 0
  br i1 %392, label %393, label %395

393:                                              ; preds = %390
  %394 = load i64, ptr %16, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %394)
  br label %395

395:                                              ; preds = %393, %390
  br label %396

396:                                              ; preds = %395
  br label %397

397:                                              ; preds = %396
  br label %398

398:                                              ; preds = %397, %386
  br label %399

399:                                              ; preds = %398
  br label %400

400:                                              ; preds = %399
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3901, ptr noundef @.str.39)
  br label %401

401:                                              ; preds = %400, %382
  br label %402

402:                                              ; preds = %401, %379
  br label %403

403:                                              ; preds = %402
  br label %404

404:                                              ; preds = %403
  %405 = load ptr, ptr %26, align 8, !tbaa !5
  call void @FreePool(ptr noundef %405)
  store ptr null, ptr %26, align 8, !tbaa !5
  br label %406

406:                                              ; preds = %404, %372
  br label %407

407:                                              ; preds = %406, %255
  %408 = load i8, ptr %27, align 1, !tbaa !22
  %409 = icmp ne i8 %408, 0
  br i1 %409, label %439, label %410

410:                                              ; preds = %407
  %411 = load ptr, ptr %9, align 8, !tbaa !5
  %412 = call i64 @AppendToMultiString(ptr noundef %411, ptr noundef @.str.11)
  store i64 %412, ptr %16, align 8, !tbaa !21
  br label %413

413:                                              ; preds = %410
  %414 = call zeroext i8 @DebugAssertEnabled()
  %415 = icmp ne i8 %414, 0
  br i1 %415, label %416, label %436

416:                                              ; preds = %413
  %417 = load i64, ptr %16, align 8, !tbaa !21
  %418 = icmp slt i64 %417, 0
  br i1 %418, label %419, label %435

419:                                              ; preds = %416
  br label %420

420:                                              ; preds = %419
  %421 = call zeroext i8 @DebugPrintEnabled()
  %422 = icmp ne i8 %421, 0
  br i1 %422, label %423, label %432

423:                                              ; preds = %420
  br label %424

424:                                              ; preds = %423
  %425 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %426 = icmp ne i8 %425, 0
  br i1 %426, label %427, label %429

427:                                              ; preds = %424
  %428 = load i64, ptr %16, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %428)
  br label %429

429:                                              ; preds = %427, %424
  br label %430

430:                                              ; preds = %429
  br label %431

431:                                              ; preds = %430
  br label %432

432:                                              ; preds = %431, %420
  br label %433

433:                                              ; preds = %432
  br label %434

434:                                              ; preds = %433
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3909, ptr noundef @.str.39)
  br label %435

435:                                              ; preds = %434, %416
  br label %436

436:                                              ; preds = %435, %413
  br label %437

437:                                              ; preds = %436
  br label %438

438:                                              ; preds = %437
  br label %439

439:                                              ; preds = %438, %407
  %440 = load ptr, ptr %9, align 8, !tbaa !5
  %441 = load ptr, ptr %25, align 8, !tbaa !5
  %442 = call i64 @AppendToMultiString(ptr noundef %440, ptr noundef %441)
  store i64 %442, ptr %16, align 8, !tbaa !21
  br label %443

443:                                              ; preds = %439
  %444 = call zeroext i8 @DebugAssertEnabled()
  %445 = icmp ne i8 %444, 0
  br i1 %445, label %446, label %466

446:                                              ; preds = %443
  %447 = load i64, ptr %16, align 8, !tbaa !21
  %448 = icmp slt i64 %447, 0
  br i1 %448, label %449, label %465

449:                                              ; preds = %446
  br label %450

450:                                              ; preds = %449
  %451 = call zeroext i8 @DebugPrintEnabled()
  %452 = icmp ne i8 %451, 0
  br i1 %452, label %453, label %462

453:                                              ; preds = %450
  br label %454

454:                                              ; preds = %453
  %455 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %456 = icmp ne i8 %455, 0
  br i1 %456, label %457, label %459

457:                                              ; preds = %454
  %458 = load i64, ptr %16, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.38, i64 noundef %458)
  br label %459

459:                                              ; preds = %457, %454
  br label %460

460:                                              ; preds = %459
  br label %461

461:                                              ; preds = %460
  br label %462

462:                                              ; preds = %461, %450
  br label %463

463:                                              ; preds = %462
  br label %464

464:                                              ; preds = %463
  call void @DebugAssert(ptr noundef @.str, i64 noundef 3913, ptr noundef @.str.39)
  br label %465

465:                                              ; preds = %464, %446
  br label %466

466:                                              ; preds = %465, %443
  br label %467

467:                                              ; preds = %466
  br label %468

468:                                              ; preds = %467
  store i8 0, ptr %27, align 1, !tbaa !22
  %469 = load ptr, ptr %25, align 8, !tbaa !5
  call void @FreePool(ptr noundef %469)
  store ptr null, ptr %25, align 8, !tbaa !5
  %470 = load ptr, ptr %12, align 8, !tbaa !5
  call void @FreePool(ptr noundef %470)
  store ptr null, ptr %12, align 8, !tbaa !5
  %471 = load i64, ptr %13, align 8, !tbaa !21
  %472 = load ptr, ptr %11, align 8, !tbaa !5
  %473 = getelementptr inbounds i16, ptr %472, i64 %471
  store ptr %473, ptr %11, align 8, !tbaa !5
  %474 = load ptr, ptr %11, align 8, !tbaa !5
  %475 = load i16, ptr %474, align 2, !tbaa !23
  %476 = zext i16 %475 to i32
  %477 = icmp eq i32 %476, 0
  br i1 %477, label %478, label %481

478:                                              ; preds = %468
  %479 = load ptr, ptr %11, align 8, !tbaa !5
  %480 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %479, ptr %480, align 8, !tbaa !5
  br label %484

481:                                              ; preds = %468
  %482 = load ptr, ptr %11, align 8, !tbaa !5
  %483 = getelementptr inbounds i16, ptr %482, i32 1
  store ptr %483, ptr %11, align 8, !tbaa !5
  br label %85, !llvm.loop !42

484:                                              ; preds = %478, %95
  br label %485

485:                                              ; preds = %484, %318, %267, %246, %217, %208, %127, %118
  %486 = load i64, ptr %16, align 8, !tbaa !21
  %487 = icmp slt i64 %486, 0
  br i1 %487, label %488, label %492

488:                                              ; preds = %485
  %489 = load ptr, ptr %9, align 8, !tbaa !5
  %490 = load ptr, ptr %489, align 8, !tbaa !5
  call void @FreePool(ptr noundef %490)
  %491 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %491, align 8, !tbaa !5
  br label %492

492:                                              ; preds = %488, %485
  %493 = load ptr, ptr %12, align 8, !tbaa !5
  %494 = icmp ne ptr %493, null
  br i1 %494, label %495, label %497

495:                                              ; preds = %492
  %496 = load ptr, ptr %12, align 8, !tbaa !5
  call void @FreePool(ptr noundef %496)
  br label %497

497:                                              ; preds = %495, %492
  %498 = load ptr, ptr %25, align 8, !tbaa !5
  %499 = icmp ne ptr %498, null
  br i1 %499, label %500, label %502

500:                                              ; preds = %497
  %501 = load ptr, ptr %25, align 8, !tbaa !5
  call void @FreePool(ptr noundef %501)
  br label %502

502:                                              ; preds = %500, %497
  %503 = load ptr, ptr %26, align 8, !tbaa !5
  %504 = icmp ne ptr %503, null
  br i1 %504, label %505, label %507

505:                                              ; preds = %502
  %506 = load ptr, ptr %26, align 8, !tbaa !5
  call void @FreePool(ptr noundef %506)
  br label %507

507:                                              ; preds = %505, %502
  %508 = load ptr, ptr %14, align 8, !tbaa !5
  %509 = icmp ne ptr %508, null
  br i1 %509, label %510, label %512

510:                                              ; preds = %507
  %511 = load ptr, ptr %14, align 8, !tbaa !5
  call void @FreePool(ptr noundef %511)
  br label %512

512:                                              ; preds = %510, %507
  %513 = load i64, ptr %16, align 8, !tbaa !21
  store i64 %513, ptr %5, align 8
  store i32 1, ptr %33, align 4
  br label %514

514:                                              ; preds = %512, %83, %76, %46, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 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
  %515 = load i64, ptr %5, align 8
  ret i64 %515
}

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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

declare void @DebugPrint(i64 noundef, 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 = !{!"_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 = !{!7, !7, i64 0}
!23 = !{!20, !20, i64 0}
!24 = !{!10, !6, i64 8}
!25 = !{!26, !11, i64 0}
!26 = !{!"_HII_DATABASE_RECORD", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!27 = !{!26, !6, i64 8}
!28 = !{!29, !6, i64 128}
!29 = !{!"_HII_DATABASE_PACKAGE_LIST_INSTANCE", !30, 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}
!30 = !{!"", !18, i64 0, !19, i64 16}
!31 = !{!26, !6, i64 16}
!32 = !{!26, !6, i64 24}
!33 = !{!12, !6, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!37, !6, i64 184}
!37 = !{!"", !38, 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}
!38 = !{!"", !11, i64 0, !19, i64 8, !19, i64 12, !19, i64 16, !19, i64 20}
!39 = !{!37, !6, i64 152}
!40 = !{!41, !6, i64 0}
!41 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = distinct !{!42, !35}


; 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.2 = external hidden unnamed_addr constant [6 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
@gEfiDevicePathProtocolGuid = external global %struct.GUID, align 4
@.str.37 = external hidden unnamed_addr constant [31 x i8], align 1
@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
@.str.40 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @CalculateConfigStringLen(ptr noundef) local_unnamed_addr #0

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

declare i64 @StrnCmp(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @StrLen(ptr noundef) local_unnamed_addr #2

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

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

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

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare ptr @AllocateCopyPool(i64 noundef, ptr noundef) local_unnamed_addr #2

declare i64 @StrSize(ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @IsThisPackageList(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i64 @GetDevicePathSize(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ConfigRequestValidate(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @HiiConfigRoutingExtractConfig(ptr noundef %0, ptr noundef %1, ptr noundef writeonly %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, 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 ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #3
  %15 = icmp eq ptr %0, null
  %16 = icmp eq ptr %2, null
  %or.cond = or i1 %15, %16
  %17 = icmp eq ptr %3, null
  %or.cond3 = or i1 %or.cond, %17
  br i1 %or.cond3, label %237, label %18

18:                                               ; preds = %4
  %19 = icmp eq ptr %1, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  store ptr null, ptr %2, align 8, !tbaa !5
  br label %237

21:                                               ; preds = %18
  %22 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %22, 0
  %.pre211 = ptrtoint ptr %0 to i64
  %.pre212 = add i64 %.pre211, -240
  %.pre214 = inttoptr i64 %.pre212 to ptr
  br i1 %.not, label %._crit_edge, label %23

23:                                               ; preds = %21
  %24 = load i64, ptr %.pre214, align 8, !tbaa !9
  %.not133 = icmp eq i64 %24, 1883531592
  br i1 %.not133, label %._crit_edge, label %25

25:                                               ; preds = %23
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3698, ptr noundef nonnull @.str.36) #3
  br label %._crit_edge

._crit_edge:                                      ; preds = %21, %23, %25
  %26 = phi ptr [ %0, %25 ], [ %.pre214, %23 ], [ %.pre214, %21 ]
  store ptr %1, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %12, align 8, !tbaa !5
  store ptr null, ptr %5, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %13, align 1, !tbaa !21
  store ptr null, ptr %14, align 8, !tbaa !5
  %27 = tail call i64 @StrLen(ptr noundef nonnull @.str.2) #3
  %28 = tail call i64 @StrnCmp(ptr noundef nonnull %1, ptr noundef nonnull @.str.2, i64 noundef %27) #3
  %.not134 = icmp eq i64 %28, 0
  br i1 %.not134, label %29, label %237

29:                                               ; preds = %._crit_edge
  %30 = tail call ptr @AllocateZeroPool(i64 noundef 1024) #3
  store ptr %30, ptr %3, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %237, label %.preheader

.preheader:                                       ; preds = %29
  %32 = load i16, ptr %1, align 2, !tbaa !22
  %.not135188 = icmp eq i16 %32, 0
  br i1 %.not135188, label %.critedge.thread228, label %.lr.ph192

.lr.ph192:                                        ; preds = %.preheader
  %33 = getelementptr inbounds i8, ptr %26, i64 8
  %34 = tail call i64 @StrLen(ptr noundef nonnull @.str.2) #3
  %35 = tail call i64 @StrnCmp(ptr noundef nonnull %1, ptr noundef nonnull @.str.2, i64 noundef %34) #3
  %36 = icmp eq i64 %35, 0
  br i1 %36, label %.lr.ph261, label %.critedge

37:                                               ; preds = %221
  %38 = call i64 @StrLen(ptr noundef nonnull @.str.2) #3
  %39 = call i64 @StrnCmp(ptr noundef nonnull %222, ptr noundef nonnull @.str.2, i64 noundef %38) #3
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %.lr.ph261, label %.critedge, !llvm.loop !23

.lr.ph261:                                        ; preds = %.lr.ph192, %37
  %.not153190260 = phi i1 [ true, %37 ], [ false, %.lr.ph192 ]
  %.0105191259 = phi ptr [ %222, %37 ], [ %1, %.lr.ph192 ]
  %41 = icmp eq ptr %.0105191259, %1
  %storemerge.idx = select i1 %41, i64 0, i64 -2
  %storemerge = getelementptr inbounds i8, ptr %.0105191259, i64 %storemerge.idx
  store ptr %storemerge, ptr %2, align 8, !tbaa !5
  %42 = call i64 @CalculateConfigStringLen(ptr noundef nonnull %.0105191259)
  %43 = shl i64 %42, 1
  %44 = add i64 %43, 2
  %45 = call ptr @AllocateCopyPool(i64 noundef %44, ptr noundef nonnull %.0105191259) #3
  store ptr %45, ptr %5, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %.critedge.thread, label %47

47:                                               ; preds = %.lr.ph261
  %48 = getelementptr inbounds i16, ptr %45, i64 %42
  store i16 0, ptr %48, align 2, !tbaa !22
  %49 = call i64 @GetDevicePath(ptr noundef nonnull %45, ptr noundef nonnull %6)
  %50 = icmp slt i64 %49, 0
  br i1 %50, label %.critedge.thread, label %51

51:                                               ; preds = %47
  store ptr null, ptr %8, align 8, !tbaa !5
  %.0110185 = load ptr, ptr %33, align 8, !tbaa !25
  %.not136186 = icmp eq ptr %.0110185, %33
  br i1 %.not136186, label %thread-pre-split.thread, label %.lr.ph

.lr.ph:                                           ; preds = %51, %75
  %.0110187 = phi ptr [ %.0110, %75 ], [ %.0110185, %51 ]
  %52 = call zeroext i8 @DebugAssertEnabled() #3
  %.not137 = icmp eq i8 %52, 0
  %.pre216 = ptrtoint ptr %.0110187 to i64
  %.pre218 = add i64 %.pre216, -32
  %.pre220 = inttoptr i64 %.pre218 to ptr
  br i1 %.not137, label %.lr.ph._crit_edge, label %53

53:                                               ; preds = %.lr.ph
  %54 = load i64, ptr %.pre220, align 8, !tbaa !26
  %.not138 = icmp eq i64 %54, 1919183208
  br i1 %.not138, label %.lr.ph._crit_edge, label %55

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

.lr.ph._crit_edge:                                ; preds = %.lr.ph, %53, %55
  %56 = phi ptr [ %.0110187, %55 ], [ %.pre220, %53 ], [ %.pre220, %.lr.ph ]
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !28
  %59 = getelementptr inbounds i8, ptr %58, i64 128
  %60 = load ptr, ptr %59, align 8, !tbaa !29
  %.not139 = icmp eq ptr %60, null
  br i1 %.not139, label %75, label %61

61:                                               ; preds = %.lr.ph._crit_edge
  %62 = getelementptr inbounds i8, ptr %60, i64 4
  %63 = call i64 @GetDevicePathSize(ptr noundef nonnull %62) #3
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call i64 @CompareMem(ptr noundef %64, ptr noundef nonnull %62, i64 noundef %63) #3
  %66 = icmp eq i64 %65, 0
  br i1 %66, label %67, label %75

67:                                               ; preds = %61
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call zeroext i8 @IsThisPackageList(ptr noundef nonnull %56, ptr noundef %68)
  %.not140 = icmp eq i8 %69, 0
  br i1 %.not140, label %75, label %70

70:                                               ; preds = %67
  %71 = getelementptr inbounds i8, ptr %56, i64 16
  %72 = load ptr, ptr %71, align 8, !tbaa !32
  store ptr %72, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %56, i64 24
  %74 = load ptr, ptr %73, align 8, !tbaa !33
  br label %thread-pre-split

75:                                               ; preds = %.lr.ph._crit_edge, %67, %61
  %.0110 = load ptr, ptr %.0110187, align 8, !tbaa !25
  %.not136 = icmp eq ptr %.0110, %33
  br i1 %.not136, label %thread-pre-split.loopexit, label %.lr.ph, !llvm.loop !34

thread-pre-split.loopexit:                        ; preds = %75
  %.pr.pre = load ptr, ptr %8, align 8, !tbaa !5
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %thread-pre-split.loopexit, %70
  %76 = phi ptr [ %72, %70 ], [ %.pr.pre, %thread-pre-split.loopexit ]
  %.0108 = phi ptr [ %74, %70 ], [ null, %thread-pre-split.loopexit ]
  %77 = icmp eq ptr %76, null
  br i1 %77, label %thread-pre-split.thread, label %86

thread-pre-split.thread:                          ; preds = %51, %thread-pre-split
  %.0108227 = phi ptr [ %.0108, %thread-pre-split ], [ null, %51 ]
  %.1112225 = phi ptr [ %56, %thread-pre-split ], [ null, %51 ]
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %78, ptr %7, align 8, !tbaa !5
  %79 = load ptr, ptr @gBS, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 184
  %81 = load ptr, ptr %80, align 8, !tbaa !35
  %82 = call i64 %81(ptr noundef nonnull @gEfiDevicePathProtocolGuid, ptr noundef nonnull %7, ptr noundef nonnull %8) #3
  %83 = icmp slt i64 %82, 0
  %84 = load ptr, ptr %8, align 8
  %85 = icmp eq ptr %84, null
  %or.cond5 = select i1 %83, i1 true, i1 %85
  br i1 %or.cond5, label %.critedge.thread.sink.split, label %86

86:                                               ; preds = %thread-pre-split.thread, %thread-pre-split
  %.0108226 = phi ptr [ %.0108227, %thread-pre-split.thread ], [ %.0108, %thread-pre-split ]
  %.1112224 = phi ptr [ %.1112225, %thread-pre-split.thread ], [ %56, %thread-pre-split ]
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = call ptr @ConfigRequestValidate(ptr noundef %87)
  %.not141 = icmp eq ptr %88, null
  br i1 %.not141, label %91, label %89

89:                                               ; preds = %86
  %90 = call ptr @StrStr(ptr noundef nonnull %.0105191259, ptr noundef nonnull %88) #3
  br label %.critedge.thread.sink.split

91:                                               ; preds = %86
  %92 = icmp ne ptr %.0108226, null
  br i1 %92, label %93, label %117

93:                                               ; preds = %91
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = call zeroext i8 @GetElementsFromRequest(ptr noundef %94)
  %.not142 = icmp eq i8 %95, 0
  br i1 %.not142, label %96, label %117

96:                                               ; preds = %93
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %.1112224, ptr noundef %97, ptr noundef nonnull %5, ptr noundef nonnull %12, ptr noundef nonnull %10)
  %99 = icmp slt i64 %98, 0
  br i1 %99, label %100, label %109

100:                                              ; preds = %96
  %101 = call zeroext i8 @DebugAssertEnabled() #3
  %102 = icmp eq i8 %101, 0
  %103 = load ptr, ptr %10, align 8
  %104 = icmp ne ptr %103, null
  %or.cond9 = select i1 %102, i1 true, i1 %104
  br i1 %or.cond9, label %106, label %105

105:                                              ; preds = %100
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3828, ptr noundef nonnull @.str.37) #3
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %105, %100
  %107 = phi ptr [ %.pre, %105 ], [ %103, %100 ]
  %108 = call ptr @StrStr(ptr noundef nonnull %.0105191259, ptr noundef %107) #3
  br label %.critedge.thread.sink.split

109:                                              ; preds = %96
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call zeroext i8 @GetElementsFromRequest(ptr noundef %110)
  %.not143 = icmp eq i8 %111, 0
  br i1 %.not143, label %112, label %117

112:                                              ; preds = %109
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = call i64 @StrSize(ptr noundef %113) #3
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = call ptr @AllocateCopyPool(i64 noundef %114, ptr noundef %115) #3
  store ptr %116, ptr %11, align 8, !tbaa !5
  br label %190

117:                                              ; preds = %109, %93, %91
  %118 = phi i1 [ true, %93 ], [ false, %109 ], [ true, %91 ]
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = call i64 @GetVarStoreType(ptr noundef %.1112224, ptr noundef %119, ptr noundef nonnull %13, ptr noundef nonnull %14)
  %121 = icmp slt i64 %120, 0
  br i1 %121, label %.critedge.thread, label %122

122:                                              ; preds = %117
  %123 = load i8, ptr %13, align 1, !tbaa !21
  %.not144 = icmp eq i8 %123, 0
  br i1 %.not144, label %129, label %124

124:                                              ; preds = %122
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call i64 @GetConfigRespFromEfiVarStore(ptr noundef %0, ptr noundef %125, ptr noundef %126, ptr noundef nonnull %11, ptr noundef nonnull %10)
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  call void @FreePool(ptr noundef %128) #3
  br label %149

129:                                              ; preds = %122
  %130 = load ptr, ptr @gBS, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 152
  %132 = load ptr, ptr %131, align 8, !tbaa !38
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = call i64 %132(ptr noundef %133, ptr noundef nonnull @gEfiHiiConfigAccessProtocolGuid, ptr noundef nonnull %9) #3
  %135 = call zeroext i8 @DebugAssertEnabled() #3
  %136 = icmp ne i8 %135, 0
  %137 = icmp slt i64 %134, 0
  %or.cond11 = select i1 %136, i1 %137, i1 false
  br i1 %or.cond11, label %138, label %144

138:                                              ; preds = %129
  %139 = call zeroext i8 @DebugPrintEnabled() #3
  %.not145 = icmp eq i8 %139, 0
  br i1 %.not145, label %143, label %140

140:                                              ; preds = %138
  %141 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not146 = icmp eq i8 %141, 0
  br i1 %.not146, label %143, label %142

142:                                              ; preds = %140
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %134) #3
  br label %143

143:                                              ; preds = %140, %142, %138
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3864, ptr noundef nonnull @.str.39) #3
  br label %144

144:                                              ; preds = %143, %129
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load ptr, ptr %145, align 8, !tbaa !39
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = call i64 %146(ptr noundef nonnull %145, ptr noundef %147, ptr noundef nonnull %10, ptr noundef nonnull %11) #3
  br label %149

149:                                              ; preds = %144, %124
  %.1 = phi i64 [ %127, %124 ], [ %148, %144 ]
  %150 = icmp slt i64 %.1, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %149
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = call ptr @StrStr(ptr noundef nonnull %.0105191259, ptr noundef %152) #3
  br label %.critedge.thread.sink.split

154:                                              ; preds = %149
  %155 = call zeroext i8 @DebugAssertEnabled() #3
  %.not147 = icmp eq i8 %155, 0
  br i1 %.not147, label %161, label %156

156:                                              ; preds = %154
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = load i16, ptr %157, align 2, !tbaa !22
  %159 = icmp eq i16 %158, 0
  br i1 %159, label %161, label %160

160:                                              ; preds = %156
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3886, ptr noundef nonnull @.str.40) #3
  br label %161

161:                                              ; preds = %156, %160, %154
  %or.cond7 = and i1 %92, %118
  br i1 %or.cond7, label %162, label %174

162:                                              ; preds = %161
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = call i64 @GetFullStringFromHiiFormPackages(ptr noundef %.1112224, ptr noundef %163, ptr noundef nonnull %5, ptr noundef nonnull %12, ptr noundef null)
  %165 = call zeroext i8 @DebugAssertEnabled() #3
  %166 = icmp ne i8 %165, 0
  %167 = icmp slt i64 %164, 0
  %or.cond13 = select i1 %166, i1 %167, i1 false
  br i1 %or.cond13, label %168, label %174

168:                                              ; preds = %162
  %169 = call zeroext i8 @DebugPrintEnabled() #3
  %.not148 = icmp eq i8 %169, 0
  br i1 %.not148, label %173, label %170

170:                                              ; preds = %168
  %171 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not149 = icmp eq i8 %171, 0
  br i1 %.not149, label %173, label %172

172:                                              ; preds = %170
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %164) #3
  br label %173

173:                                              ; preds = %170, %172, %168
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3893, ptr noundef nonnull @.str.39) #3
  br label %174

174:                                              ; preds = %162, %173, %161
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %175) #3
  store ptr null, ptr %6, align 8, !tbaa !5
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %.not150 = icmp eq ptr %176, null
  br i1 %.not150, label %190, label %177

177:                                              ; preds = %174
  %178 = call i64 @MergeDefaultString(ptr noundef nonnull %11, ptr noundef nonnull %176)
  %179 = call zeroext i8 @DebugAssertEnabled() #3
  %180 = icmp ne i8 %179, 0
  %181 = icmp slt i64 %178, 0
  %or.cond15 = select i1 %180, i1 %181, i1 false
  br i1 %or.cond15, label %182, label %188

182:                                              ; preds = %177
  %183 = call zeroext i8 @DebugPrintEnabled() #3
  %.not151 = icmp eq i8 %183, 0
  br i1 %.not151, label %187, label %184

184:                                              ; preds = %182
  %185 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not152 = icmp eq i8 %185, 0
  br i1 %.not152, label %187, label %186

186:                                              ; preds = %184
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %178) #3
  br label %187

187:                                              ; preds = %184, %186, %182
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3901, ptr noundef nonnull @.str.39) #3
  br label %188

188:                                              ; preds = %187, %177
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  call void @FreePool(ptr noundef %189) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %190

190:                                              ; preds = %174, %188, %112
  br i1 %.not153190260, label %191, label %202

191:                                              ; preds = %190
  %192 = call i64 @AppendToMultiString(ptr noundef nonnull %3, ptr noundef nonnull @.str.11)
  %193 = call zeroext i8 @DebugAssertEnabled() #3
  %194 = icmp ne i8 %193, 0
  %195 = icmp slt i64 %192, 0
  %or.cond17 = select i1 %194, i1 %195, i1 false
  br i1 %or.cond17, label %196, label %202

196:                                              ; preds = %191
  %197 = call zeroext i8 @DebugPrintEnabled() #3
  %.not154 = icmp eq i8 %197, 0
  br i1 %.not154, label %201, label %198

198:                                              ; preds = %196
  %199 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not155 = icmp eq i8 %199, 0
  br i1 %.not155, label %201, label %200

200:                                              ; preds = %198
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %192) #3
  br label %201

201:                                              ; preds = %198, %200, %196
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3909, ptr noundef nonnull @.str.39) #3
  br label %202

202:                                              ; preds = %191, %201, %190
  %203 = load ptr, ptr %11, align 8, !tbaa !5
  %204 = call i64 @AppendToMultiString(ptr noundef nonnull %3, ptr noundef %203)
  %205 = call zeroext i8 @DebugAssertEnabled() #3
  %206 = icmp ne i8 %205, 0
  %207 = icmp slt i64 %204, 0
  %or.cond19 = select i1 %206, i1 %207, i1 false
  br i1 %or.cond19, label %208, label %214

208:                                              ; preds = %202
  %209 = call zeroext i8 @DebugPrintEnabled() #3
  %.not156 = icmp eq i8 %209, 0
  br i1 %.not156, label %213, label %210

210:                                              ; preds = %208
  %211 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not157 = icmp eq i8 %211, 0
  br i1 %.not157, label %213, label %212

212:                                              ; preds = %210
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.38, i64 noundef %204) #3
  br label %213

213:                                              ; preds = %210, %212, %208
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 3913, ptr noundef nonnull @.str.39) #3
  br label %214

214:                                              ; preds = %213, %202
  %215 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %215) #3
  store ptr null, ptr %11, align 8, !tbaa !5
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  call void @FreePool(ptr noundef %216) #3
  store ptr null, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds i16, ptr %.0105191259, i64 %42
  %218 = load i16, ptr %217, align 2, !tbaa !22
  %219 = icmp eq i16 %218, 0
  br i1 %219, label %220, label %221

220:                                              ; preds = %214
  store ptr %217, ptr %2, align 8, !tbaa !5
  br label %.critedge

221:                                              ; preds = %214
  %222 = getelementptr inbounds i8, ptr %217, i64 2
  %223 = load i16, ptr %222, align 2, !tbaa !22
  %.not135 = icmp eq i16 %223, 0
  br i1 %.not135, label %.critedge, label %37, !llvm.loop !23

.critedge:                                        ; preds = %37, %221, %.lr.ph192, %220
  %.2 = phi i64 [ %204, %220 ], [ 0, %.lr.ph192 ], [ %204, %221 ], [ %204, %37 ]
  %224 = icmp slt i64 %.2, 0
  br i1 %224, label %.critedge.thread, label %.critedge.thread228

.critedge.thread.sink.split:                      ; preds = %thread-pre-split.thread, %89, %151, %106
  %.sink = phi ptr [ %108, %106 ], [ %153, %151 ], [ %90, %89 ], [ %.0105191259, %thread-pre-split.thread ]
  %.2164.ph = phi i64 [ %98, %106 ], [ %.1, %151 ], [ -9223372036854775806, %89 ], [ -9223372036854775794, %thread-pre-split.thread ]
  store ptr %.sink, ptr %2, align 8, !tbaa !5
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %.lr.ph261, %117, %47, %.critedge.thread.sink.split, %.critedge
  %.2164 = phi i64 [ %.2, %.critedge ], [ %.2164.ph, %.critedge.thread.sink.split ], [ %49, %47 ], [ %120, %117 ], [ -9223372036854775799, %.lr.ph261 ]
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  call void @FreePool(ptr noundef %225) #3
  store ptr null, ptr %3, align 8, !tbaa !5
  br label %.critedge.thread228

.critedge.thread228:                              ; preds = %.preheader, %.critedge.thread, %.critedge
  %.2163 = phi i64 [ %.2164, %.critedge.thread ], [ %.2, %.critedge ], [ 0, %.preheader ]
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %.not158 = icmp eq ptr %226, null
  br i1 %.not158, label %228, label %227

227:                                              ; preds = %.critedge.thread228
  call void @FreePool(ptr noundef nonnull %226) #3
  br label %228

228:                                              ; preds = %227, %.critedge.thread228
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %.not159 = icmp eq ptr %229, null
  br i1 %.not159, label %231, label %230

230:                                              ; preds = %228
  call void @FreePool(ptr noundef nonnull %229) #3
  br label %231

231:                                              ; preds = %230, %228
  %232 = load ptr, ptr %12, align 8, !tbaa !5
  %.not160 = icmp eq ptr %232, null
  br i1 %.not160, label %234, label %233

233:                                              ; preds = %231
  call void @FreePool(ptr noundef nonnull %232) #3
  br label %234

234:                                              ; preds = %233, %231
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %.not161 = icmp eq ptr %235, null
  br i1 %.not161, label %237, label %236

236:                                              ; preds = %234
  call void @FreePool(ptr noundef nonnull %235) #3
  br label %237

237:                                              ; preds = %234, %236, %29, %._crit_edge, %4, %20
  %.0 = phi i64 [ -9223372036854775806, %20 ], [ -9223372036854775806, %4 ], [ -9223372036854775806, %._crit_edge ], [ -9223372036854775799, %29 ], [ %.2163, %236 ], [ %.2163, %234 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  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
  ret i64 %.0
}

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

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

declare void @DebugPrint(i64 noundef, ptr noundef, ...) local_unnamed_addr #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 = { mustprogress 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 = !{!"_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 = !{!7, !7, i64 0}
!22 = !{!20, !20, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!12, !6, i64 0}
!26 = !{!27, !11, i64 0}
!27 = !{!"_HII_DATABASE_RECORD", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!28 = !{!27, !6, i64 8}
!29 = !{!30, !6, i64 128}
!30 = !{!"_HII_DATABASE_PACKAGE_LIST_INSTANCE", !31, 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}
!31 = !{!"", !18, i64 0, !19, i64 16}
!32 = !{!27, !6, i64 16}
!33 = !{!27, !6, i64 24}
!34 = distinct !{!34, !24}
!35 = !{!36, !6, i64 184}
!36 = !{!"", !37, 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}
!37 = !{!"", !11, i64 0, !19, i64 8, !19, i64 12, !19, i64 16, !19, i64 20}
!38 = !{!36, !6, i64 152}
!39 = !{!40, !6, i64 0}
!40 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}


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