; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/SecurityPkg/Application_ (UefiMain)

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

@.str = external hidden unnamed_addr constant [29 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [30 x i32], align 4
@.str.2 = external hidden unnamed_addr constant [32 x i32], align 4
@gBS = external global ptr, align 8
@gEfiRngProtocolGuid = external global %struct.GUID, align 4
@.str.3 = external hidden unnamed_addr constant [22 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [8 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [37 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [49 x i32], align 4
@.str.7 = external hidden unnamed_addr constant [16 x i32], align 4
@.str.8 = external hidden unnamed_addr constant [49 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [37 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [39 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [21 x i32], align 4
@.str.12 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.13 = external hidden unnamed_addr constant [39 x i32], align 4
@gEfiRngAlgorithmSp80090Hmac256Guid = external global %struct.GUID, align 4
@.str.14 = external hidden unnamed_addr constant [39 x i32], align 4
@gEfiRngAlgorithmSp80090Hash256Guid = external global %struct.GUID, align 4
@.str.15 = external hidden unnamed_addr constant [38 x i32], align 4
@gEfiRngAlgorithmSp80090Ctr256Guid = external global %struct.GUID, align 4
@.str.16 = external hidden unnamed_addr constant [32 x i32], align 4
@gEfiRngAlgorithmX9313DesGuid = external global %struct.GUID, align 4
@.str.17 = external hidden unnamed_addr constant [31 x i32], align 4
@gEfiRngAlgorithmX931AesGuid = external global %struct.GUID, align 4
@.str.18 = external hidden unnamed_addr constant [33 x i32], align 4
@gEfiRngAlgorithmRaw = external global %struct.GUID, align 4
@.str.19 = external hidden unnamed_addr constant [76 x i32], align 4
@.str.20 = external hidden unnamed_addr constant [20 x i32], align 4
@.str.21 = external hidden unnamed_addr constant [5 x i32], align 4
@.str.22 = external hidden unnamed_addr constant [48 x i32], align 4
@.str.23 = external hidden unnamed_addr constant [49 x i32], align 4

; Function Attrs: nounwind uwtable
define dso_local i64 @UefiMain(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca [10 x %struct.GUID], align 16
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  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 160, 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
  store i64 0, ptr %5, align 8, !tbaa !9
  store ptr null, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %15 = call i64 (ptr, ...) @Print(ptr noundef @.str)
  %16 = call i64 (ptr, ...) @Print(ptr noundef @.str.1)
  %17 = call i64 (ptr, ...) @Print(ptr noundef @.str.2)
  %18 = load ptr, ptr @gBS, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %18, i32 0, i32 38
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = call i64 %20(ptr noundef @gEfiRngProtocolGuid, ptr noundef null, ptr noundef %6)
  store i64 %21, ptr %5, align 8, !tbaa !9
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = icmp slt i64 %22, 0
  br i1 %23, label %24, label %27

24:                                               ; preds = %2
  %25 = load i64, ptr %5, align 8, !tbaa !9
  %26 = call i64 (ptr, ...) @Print(ptr noundef @.str.3, i64 noundef %25)
  br label %322

27:                                               ; preds = %2
  %28 = call i64 (ptr, ...) @Print(ptr noundef @.str.4)
  br label %29

29:                                               ; preds = %27
  %30 = call i64 (ptr, ...) @Print(ptr noundef @.str.5)
  store i64 0, ptr %7, align 8, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = call i64 %33(ptr noundef %34, ptr noundef %7, ptr noundef null)
  store i64 %35, ptr %5, align 8, !tbaa !9
  %36 = load i64, ptr %5, align 8, !tbaa !9
  %37 = icmp ne i64 %36, -9223372036854775803
  br i1 %37, label %38, label %41

38:                                               ; preds = %29
  %39 = load i64, ptr %5, align 8, !tbaa !9
  %40 = call i64 (ptr, ...) @Print(ptr noundef @.str.3, i64 noundef %39)
  br label %41

41:                                               ; preds = %38, %29
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = udiv i64 %42, 16
  store i64 %43, ptr %10, align 8, !tbaa !9
  %44 = load i64, ptr %10, align 8, !tbaa !9
  %45 = call i64 (ptr, ...) @Print(ptr noundef @.str.6, i64 noundef %44)
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds [10 x %struct.GUID], ptr %8, i64 0, i64 0
  %51 = call i64 %48(ptr noundef %49, ptr noundef %7, ptr noundef %50)
  store i64 %51, ptr %5, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %113, %41
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %56, label %116

56:                                               ; preds = %52
  %57 = load i64, ptr %13, align 8, !tbaa !9
  %58 = getelementptr inbounds [10 x %struct.GUID], ptr %8, i64 0, i64 %57
  store ptr %58, ptr %9, align 8, !tbaa !5
  %59 = load i64, ptr %13, align 8, !tbaa !9
  %60 = call i64 (ptr, ...) @Print(ptr noundef @.str.7, i64 noundef %59)
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.GUID, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !17
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.GUID, ptr %64, i32 0, i32 1
  %66 = load i16, ptr %65, align 4, !tbaa !20
  %67 = zext i16 %66 to i32
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.GUID, ptr %68, i32 0, i32 2
  %70 = load i16, ptr %69, align 2, !tbaa !21
  %71 = zext i16 %70 to i32
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.GUID, ptr %72, i32 0, i32 3
  %74 = getelementptr inbounds [8 x i8], ptr %73, i64 0, i64 0
  %75 = load i8, ptr %74, align 4, !tbaa !22
  %76 = zext i8 %75 to i32
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.GUID, ptr %77, i32 0, i32 3
  %79 = getelementptr inbounds [8 x i8], ptr %78, i64 0, i64 1
  %80 = load i8, ptr %79, align 1, !tbaa !22
  %81 = zext i8 %80 to i32
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.GUID, ptr %82, i32 0, i32 3
  %84 = getelementptr inbounds [8 x i8], ptr %83, i64 0, i64 2
  %85 = load i8, ptr %84, align 2, !tbaa !22
  %86 = zext i8 %85 to i32
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.GUID, ptr %87, i32 0, i32 3
  %89 = getelementptr inbounds [8 x i8], ptr %88, i64 0, i64 3
  %90 = load i8, ptr %89, align 1, !tbaa !22
  %91 = zext i8 %90 to i32
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.GUID, ptr %92, i32 0, i32 3
  %94 = getelementptr inbounds [8 x i8], ptr %93, i64 0, i64 4
  %95 = load i8, ptr %94, align 4, !tbaa !22
  %96 = zext i8 %95 to i32
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.GUID, ptr %97, i32 0, i32 3
  %99 = getelementptr inbounds [8 x i8], ptr %98, i64 0, i64 5
  %100 = load i8, ptr %99, align 1, !tbaa !22
  %101 = zext i8 %100 to i32
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.GUID, ptr %102, i32 0, i32 3
  %104 = getelementptr inbounds [8 x i8], ptr %103, i64 0, i64 6
  %105 = load i8, ptr %104, align 2, !tbaa !22
  %106 = zext i8 %105 to i32
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.GUID, ptr %107, i32 0, i32 3
  %109 = getelementptr inbounds [8 x i8], ptr %108, i64 0, i64 7
  %110 = load i8, ptr %109, align 1, !tbaa !22
  %111 = zext i8 %110 to i32
  %112 = call i64 (ptr, ...) @Print(ptr noundef @.str.8, i32 noundef %63, i32 noundef %67, i32 noundef %71, i32 noundef %76, i32 noundef %81, i32 noundef %86, i32 noundef %91, i32 noundef %96, i32 noundef %101, i32 noundef %106, i32 noundef %111)
  br label %113

113:                                              ; preds = %56
  %114 = load i64, ptr %13, align 8, !tbaa !9
  %115 = add i64 %114, 1
  store i64 %115, ptr %13, align 8, !tbaa !9
  br label %52, !llvm.loop !23

116:                                              ; preds = %52
  %117 = call i64 (ptr, ...) @Print(ptr noundef @.str.9)
  store i64 32, ptr %12, align 8, !tbaa !9
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = call ptr @AllocatePool(i64 noundef %118)
  store ptr %119, ptr %11, align 8, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %123

122:                                              ; preds = %116
  br label %322

123:                                              ; preds = %116
  %124 = call i64 (ptr, ...) @Print(ptr noundef @.str.10)
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !25
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = call i64 %127(ptr noundef %128, ptr noundef null, i64 noundef %129, ptr noundef %130)
  store i64 %131, ptr %5, align 8, !tbaa !9
  %132 = load i64, ptr %5, align 8, !tbaa !9
  %133 = icmp slt i64 %132, 0
  br i1 %133, label %134, label %137

134:                                              ; preds = %123
  %135 = load i64, ptr %5, align 8, !tbaa !9
  %136 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %135)
  br label %139

137:                                              ; preds = %123
  %138 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %139

139:                                              ; preds = %137, %134
  %140 = call i64 (ptr, ...) @Print(ptr noundef @.str.13)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !25
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = load i64, ptr %12, align 8, !tbaa !9
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = call i64 %143(ptr noundef %144, ptr noundef @gEfiRngAlgorithmSp80090Hmac256Guid, i64 noundef %145, ptr noundef %146)
  store i64 %147, ptr %5, align 8, !tbaa !9
  %148 = load i64, ptr %5, align 8, !tbaa !9
  %149 = icmp slt i64 %148, 0
  br i1 %149, label %150, label %153

150:                                              ; preds = %139
  %151 = load i64, ptr %5, align 8, !tbaa !9
  %152 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %151)
  br label %155

153:                                              ; preds = %139
  %154 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %155

155:                                              ; preds = %153, %150
  %156 = call i64 (ptr, ...) @Print(ptr noundef @.str.14)
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !25
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = load i64, ptr %12, align 8, !tbaa !9
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = call i64 %159(ptr noundef %160, ptr noundef @gEfiRngAlgorithmSp80090Hash256Guid, i64 noundef %161, ptr noundef %162)
  store i64 %163, ptr %5, align 8, !tbaa !9
  %164 = load i64, ptr %5, align 8, !tbaa !9
  %165 = icmp slt i64 %164, 0
  br i1 %165, label %166, label %169

166:                                              ; preds = %155
  %167 = load i64, ptr %5, align 8, !tbaa !9
  %168 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %167)
  br label %171

169:                                              ; preds = %155
  %170 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %171

171:                                              ; preds = %169, %166
  %172 = call i64 (ptr, ...) @Print(ptr noundef @.str.15)
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %173, i32 0, i32 1
  %175 = load ptr, ptr %174, align 8, !tbaa !25
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = load i64, ptr %12, align 8, !tbaa !9
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = call i64 %175(ptr noundef %176, ptr noundef @gEfiRngAlgorithmSp80090Ctr256Guid, i64 noundef %177, ptr noundef %178)
  store i64 %179, ptr %5, align 8, !tbaa !9
  %180 = load i64, ptr %5, align 8, !tbaa !9
  %181 = icmp slt i64 %180, 0
  br i1 %181, label %182, label %185

182:                                              ; preds = %171
  %183 = load i64, ptr %5, align 8, !tbaa !9
  %184 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %183)
  br label %187

185:                                              ; preds = %171
  %186 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %187

187:                                              ; preds = %185, %182
  %188 = call i64 (ptr, ...) @Print(ptr noundef @.str.16)
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !25
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = load i64, ptr %12, align 8, !tbaa !9
  %194 = load ptr, ptr %11, align 8, !tbaa !5
  %195 = call i64 %191(ptr noundef %192, ptr noundef @gEfiRngAlgorithmX9313DesGuid, i64 noundef %193, ptr noundef %194)
  store i64 %195, ptr %5, align 8, !tbaa !9
  %196 = load i64, ptr %5, align 8, !tbaa !9
  %197 = icmp slt i64 %196, 0
  br i1 %197, label %198, label %201

198:                                              ; preds = %187
  %199 = load i64, ptr %5, align 8, !tbaa !9
  %200 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %199)
  br label %203

201:                                              ; preds = %187
  %202 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %203

203:                                              ; preds = %201, %198
  %204 = call i64 (ptr, ...) @Print(ptr noundef @.str.17)
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %205, i32 0, i32 1
  %207 = load ptr, ptr %206, align 8, !tbaa !25
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = load i64, ptr %12, align 8, !tbaa !9
  %210 = load ptr, ptr %11, align 8, !tbaa !5
  %211 = call i64 %207(ptr noundef %208, ptr noundef @gEfiRngAlgorithmX931AesGuid, i64 noundef %209, ptr noundef %210)
  store i64 %211, ptr %5, align 8, !tbaa !9
  %212 = load i64, ptr %5, align 8, !tbaa !9
  %213 = icmp slt i64 %212, 0
  br i1 %213, label %214, label %217

214:                                              ; preds = %203
  %215 = load i64, ptr %5, align 8, !tbaa !9
  %216 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %215)
  br label %219

217:                                              ; preds = %203
  %218 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %219

219:                                              ; preds = %217, %214
  %220 = call i64 (ptr, ...) @Print(ptr noundef @.str.18)
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %221, i32 0, i32 1
  %223 = load ptr, ptr %222, align 8, !tbaa !25
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = load i64, ptr %12, align 8, !tbaa !9
  %226 = load ptr, ptr %11, align 8, !tbaa !5
  %227 = call i64 %223(ptr noundef %224, ptr noundef @gEfiRngAlgorithmRaw, i64 noundef %225, ptr noundef %226)
  store i64 %227, ptr %5, align 8, !tbaa !9
  %228 = load i64, ptr %5, align 8, !tbaa !9
  %229 = icmp slt i64 %228, 0
  br i1 %229, label %230, label %233

230:                                              ; preds = %219
  %231 = load i64, ptr %5, align 8, !tbaa !9
  %232 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %231)
  br label %235

233:                                              ; preds = %219
  %234 = call i64 (ptr, ...) @Print(ptr noundef @.str.12)
  br label %235

235:                                              ; preds = %233, %230
  %236 = call i64 (ptr, ...) @Print(ptr noundef @.str.19)
  store i64 1, ptr %12, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %237

237:                                              ; preds = %275, %235
  %238 = load i64, ptr %13, align 8, !tbaa !9
  %239 = icmp ult i64 %238, 20
  br i1 %239, label %240, label %278

240:                                              ; preds = %237
  %241 = load ptr, ptr %6, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %241, i32 0, i32 1
  %243 = load ptr, ptr %242, align 8, !tbaa !25
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = load i64, ptr %12, align 8, !tbaa !9
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  %247 = call i64 %243(ptr noundef %244, ptr noundef null, i64 noundef %245, ptr noundef %246)
  store i64 %247, ptr %5, align 8, !tbaa !9
  %248 = load i64, ptr %5, align 8, !tbaa !9
  %249 = icmp slt i64 %248, 0
  br i1 %249, label %250, label %253

250:                                              ; preds = %240
  %251 = load i64, ptr %5, align 8, !tbaa !9
  %252 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %251)
  br label %278

253:                                              ; preds = %240
  %254 = load i64, ptr %13, align 8, !tbaa !9
  %255 = add i64 %254, 1
  %256 = call i64 (ptr, ...) @Print(ptr noundef @.str.20, i64 noundef %255)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %257

257:                                              ; preds = %268, %253
  %258 = load i64, ptr %14, align 8, !tbaa !9
  %259 = load i64, ptr %12, align 8, !tbaa !9
  %260 = icmp ult i64 %258, %259
  br i1 %260, label %261, label %271

261:                                              ; preds = %257
  %262 = load ptr, ptr %11, align 8, !tbaa !5
  %263 = load i64, ptr %14, align 8, !tbaa !9
  %264 = getelementptr inbounds i8, ptr %262, i64 %263
  %265 = load i8, ptr %264, align 1, !tbaa !22
  %266 = zext i8 %265 to i32
  %267 = call i64 (ptr, ...) @Print(ptr noundef @.str.21, i32 noundef %266)
  br label %268

268:                                              ; preds = %261
  %269 = load i64, ptr %14, align 8, !tbaa !9
  %270 = add i64 %269, 1
  store i64 %270, ptr %14, align 8, !tbaa !9
  br label %257, !llvm.loop !26

271:                                              ; preds = %257
  br label %272

272:                                              ; preds = %271
  %273 = load i64, ptr %12, align 8, !tbaa !9
  %274 = add i64 %273, 1
  store i64 %274, ptr %12, align 8, !tbaa !9
  br label %275

275:                                              ; preds = %272
  %276 = load i64, ptr %13, align 8, !tbaa !9
  %277 = add i64 %276, 1
  store i64 %277, ptr %13, align 8, !tbaa !9
  br label %237, !llvm.loop !27

278:                                              ; preds = %250, %237
  %279 = call i64 (ptr, ...) @Print(ptr noundef @.str.22)
  store i64 32, ptr %12, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %280

280:                                              ; preds = %316, %278
  %281 = load i64, ptr %13, align 8, !tbaa !9
  %282 = icmp ult i64 %281, 20
  br i1 %282, label %283, label %319

283:                                              ; preds = %280
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct._EFI_RNG_PROTOCOL, ptr %284, i32 0, i32 1
  %286 = load ptr, ptr %285, align 8, !tbaa !25
  %287 = load ptr, ptr %6, align 8, !tbaa !5
  %288 = load i64, ptr %12, align 8, !tbaa !9
  %289 = load ptr, ptr %11, align 8, !tbaa !5
  %290 = call i64 %286(ptr noundef %287, ptr noundef @gEfiRngAlgorithmRaw, i64 noundef %288, ptr noundef %289)
  store i64 %290, ptr %5, align 8, !tbaa !9
  %291 = load i64, ptr %5, align 8, !tbaa !9
  %292 = icmp slt i64 %291, 0
  br i1 %292, label %293, label %296

293:                                              ; preds = %283
  %294 = load i64, ptr %5, align 8, !tbaa !9
  %295 = call i64 (ptr, ...) @Print(ptr noundef @.str.11, i64 noundef %294)
  br label %319

296:                                              ; preds = %283
  %297 = load i64, ptr %13, align 8, !tbaa !9
  %298 = add i64 %297, 1
  %299 = call i64 (ptr, ...) @Print(ptr noundef @.str.20, i64 noundef %298)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %300

300:                                              ; preds = %311, %296
  %301 = load i64, ptr %14, align 8, !tbaa !9
  %302 = load i64, ptr %12, align 8, !tbaa !9
  %303 = icmp ult i64 %301, %302
  br i1 %303, label %304, label %314

304:                                              ; preds = %300
  %305 = load ptr, ptr %11, align 8, !tbaa !5
  %306 = load i64, ptr %14, align 8, !tbaa !9
  %307 = getelementptr inbounds i8, ptr %305, i64 %306
  %308 = load i8, ptr %307, align 1, !tbaa !22
  %309 = zext i8 %308 to i32
  %310 = call i64 (ptr, ...) @Print(ptr noundef @.str.21, i32 noundef %309)
  br label %311

311:                                              ; preds = %304
  %312 = load i64, ptr %14, align 8, !tbaa !9
  %313 = add i64 %312, 1
  store i64 %313, ptr %14, align 8, !tbaa !9
  br label %300, !llvm.loop !28

314:                                              ; preds = %300
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  %317 = load i64, ptr %13, align 8, !tbaa !9
  %318 = add i64 %317, 1
  store i64 %318, ptr %13, align 8, !tbaa !9
  br label %280, !llvm.loop !29

319:                                              ; preds = %293, %280
  %320 = load i64, ptr %5, align 8, !tbaa !9
  %321 = call i64 (ptr, ...) @Print(ptr noundef @.str.23, i64 noundef %320)
  br label %322

322:                                              ; preds = %319, %122, %24
  %323 = load ptr, ptr %11, align 8, !tbaa !5
  %324 = icmp ne ptr %323, null
  br i1 %324, label %325, label %327

325:                                              ; preds = %322
  %326 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %326)
  br label %327

327:                                              ; preds = %325, %322
  %328 = load i64, ptr %5, align 8, !tbaa !9
  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 160, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret i64 %328
}

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

declare i64 @Print(ptr noundef, ...) #2

declare ptr @AllocatePool(i64 noundef) #2

declare void @FreePool(ptr noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 320}
!12 = !{!"", !13, 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}
!13 = !{!"", !10, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_EFI_RNG_PROTOCOL", !6, i64 0, !6, i64 8}
!17 = !{!18, !14, i64 0}
!18 = !{!"", !14, i64 0, !19, i64 4, !19, i64 6, !7, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !19, i64 4}
!21 = !{!18, !19, i64 6}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!16, !6, i64 8}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !24}


; 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 [29 x i32], align 4
@.str.1 = external hidden unnamed_addr constant [30 x i32], align 4
@.str.2 = external hidden unnamed_addr constant [32 x i32], align 4
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiRngProtocolGuid = external global %struct.GUID, align 4
@.str.3 = external hidden unnamed_addr constant [22 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [8 x i32], align 4
@.str.5 = external hidden unnamed_addr constant [37 x i32], align 4
@.str.6 = external hidden unnamed_addr constant [49 x i32], align 4
@.str.7 = external hidden unnamed_addr constant [16 x i32], align 4
@.str.8 = external hidden unnamed_addr constant [49 x i32], align 4
@.str.9 = external hidden unnamed_addr constant [37 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [39 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [21 x i32], align 4
@.str.12 = external hidden unnamed_addr constant [7 x i32], align 4
@.str.13 = external hidden unnamed_addr constant [39 x i32], align 4
@gEfiRngAlgorithmSp80090Hmac256Guid = external global %struct.GUID, align 4
@.str.14 = external hidden unnamed_addr constant [39 x i32], align 4
@gEfiRngAlgorithmSp80090Hash256Guid = external global %struct.GUID, align 4
@.str.15 = external hidden unnamed_addr constant [38 x i32], align 4
@gEfiRngAlgorithmSp80090Ctr256Guid = external global %struct.GUID, align 4
@.str.16 = external hidden unnamed_addr constant [32 x i32], align 4
@gEfiRngAlgorithmX9313DesGuid = external global %struct.GUID, align 4
@.str.17 = external hidden unnamed_addr constant [31 x i32], align 4
@gEfiRngAlgorithmX931AesGuid = external global %struct.GUID, align 4
@.str.18 = external hidden unnamed_addr constant [33 x i32], align 4
@gEfiRngAlgorithmRaw = external global %struct.GUID, align 4
@.str.19 = external hidden unnamed_addr constant [76 x i32], align 4
@.str.20 = external hidden unnamed_addr constant [20 x i32], align 4
@.str.21 = external hidden unnamed_addr constant [5 x i32], align 4
@.str.22 = external hidden unnamed_addr constant [48 x i32], align 4
@.str.23 = external hidden unnamed_addr constant [49 x i32], align 4

; Function Attrs: nounwind uwtable
define dso_local i64 @UefiMain(ptr nocapture noundef readnone %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca [10 x %struct.GUID], align 16
  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 160, ptr nonnull %5) #3
  %6 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str) #3
  %7 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.1) #3
  %8 = tail call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.2) #3
  %9 = load ptr, ptr @gBS, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 320
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = call i64 %11(ptr noundef nonnull @gEfiRngProtocolGuid, ptr noundef null, ptr noundef nonnull %3) #3
  %13 = icmp slt i64 %12, 0
  br i1 %13, label %14, label %16

14:                                               ; preds = %2
  %15 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.3, i64 noundef %12) #3
  br label %.thread

16:                                               ; preds = %2
  %17 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.4) #3
  %18 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.5) #3
  store i64 0, ptr %4, align 8, !tbaa !14
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = call i64 %20(ptr noundef nonnull %19, ptr noundef nonnull %4, ptr noundef null) #3
  %.not = icmp eq i64 %21, -9223372036854775803
  br i1 %.not, label %24, label %22

22:                                               ; preds = %16
  %23 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.3, i64 noundef %21) #3
  br label %24

24:                                               ; preds = %22, %16
  %25 = load i64, ptr %4, align 8, !tbaa !14
  %26 = lshr i64 %25, 4
  %27 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.6, i64 noundef %26) #3
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = call i64 %29(ptr noundef nonnull %28, ptr noundef nonnull %4, ptr noundef nonnull %5) #3
  %.not120 = icmp ult i64 %25, 16
  br i1 %.not120, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %24, %.lr.ph
  %.079111 = phi i64 [ %65, %.lr.ph ], [ 0, %24 ]
  %31 = getelementptr inbounds [10 x %struct.GUID], ptr %5, i64 0, i64 %.079111
  %32 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.7, i64 noundef %.079111) #3
  %33 = load i32, ptr %31, align 16, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %31, i64 4
  %35 = load i16, ptr %34, align 4, !tbaa !20
  %36 = zext i16 %35 to i32
  %37 = getelementptr inbounds i8, ptr %31, i64 6
  %38 = load i16, ptr %37, align 2, !tbaa !21
  %39 = zext i16 %38 to i32
  %40 = getelementptr inbounds i8, ptr %31, i64 8
  %41 = load i8, ptr %40, align 8, !tbaa !22
  %42 = zext i8 %41 to i32
  %43 = getelementptr inbounds i8, ptr %31, i64 9
  %44 = load i8, ptr %43, align 1, !tbaa !22
  %45 = zext i8 %44 to i32
  %46 = getelementptr inbounds i8, ptr %31, i64 10
  %47 = load i8, ptr %46, align 2, !tbaa !22
  %48 = zext i8 %47 to i32
  %49 = getelementptr inbounds i8, ptr %31, i64 11
  %50 = load i8, ptr %49, align 1, !tbaa !22
  %51 = zext i8 %50 to i32
  %52 = getelementptr inbounds i8, ptr %31, i64 12
  %53 = load i8, ptr %52, align 4, !tbaa !22
  %54 = zext i8 %53 to i32
  %55 = getelementptr inbounds i8, ptr %31, i64 13
  %56 = load i8, ptr %55, align 1, !tbaa !22
  %57 = zext i8 %56 to i32
  %58 = getelementptr inbounds i8, ptr %31, i64 14
  %59 = load i8, ptr %58, align 2, !tbaa !22
  %60 = zext i8 %59 to i32
  %61 = getelementptr inbounds i8, ptr %31, i64 15
  %62 = load i8, ptr %61, align 1, !tbaa !22
  %63 = zext i8 %62 to i32
  %64 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.8, i32 noundef %33, i32 noundef %36, i32 noundef %39, i32 noundef %42, i32 noundef %45, i32 noundef %48, i32 noundef %51, i32 noundef %54, i32 noundef %57, i32 noundef %60, i32 noundef %63) #3
  %65 = add nuw nsw i64 %.079111, 1
  %exitcond.not = icmp eq i64 %65, %26
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %24
  %66 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.9) #3
  %67 = call ptr @AllocatePool(i64 noundef 32) #3
  %68 = icmp eq ptr %67, null
  br i1 %68, label %.thread, label %69

69:                                               ; preds = %._crit_edge
  %70 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.10) #3
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !25
  %74 = call i64 %73(ptr noundef %71, ptr noundef null, i64 noundef 32, ptr noundef nonnull %67) #3
  %75 = icmp slt i64 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %69
  %77 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %74) #3
  br label %80

78:                                               ; preds = %69
  %79 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %80

80:                                               ; preds = %78, %76
  %81 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.13) #3
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !25
  %85 = call i64 %84(ptr noundef %82, ptr noundef nonnull @gEfiRngAlgorithmSp80090Hmac256Guid, i64 noundef 32, ptr noundef nonnull %67) #3
  %86 = icmp slt i64 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %80
  %88 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %85) #3
  br label %91

89:                                               ; preds = %80
  %90 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %91

91:                                               ; preds = %89, %87
  %92 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.14) #3
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  %95 = load ptr, ptr %94, align 8, !tbaa !25
  %96 = call i64 %95(ptr noundef %93, ptr noundef nonnull @gEfiRngAlgorithmSp80090Hash256Guid, i64 noundef 32, ptr noundef nonnull %67) #3
  %97 = icmp slt i64 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %91
  %99 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %96) #3
  br label %102

100:                                              ; preds = %91
  %101 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %102

102:                                              ; preds = %100, %98
  %103 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.15) #3
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  %107 = call i64 %106(ptr noundef %104, ptr noundef nonnull @gEfiRngAlgorithmSp80090Ctr256Guid, i64 noundef 32, ptr noundef nonnull %67) #3
  %108 = icmp slt i64 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %102
  %110 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %107) #3
  br label %113

111:                                              ; preds = %102
  %112 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %113

113:                                              ; preds = %111, %109
  %114 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.16) #3
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %115, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !25
  %118 = call i64 %117(ptr noundef %115, ptr noundef nonnull @gEfiRngAlgorithmX9313DesGuid, i64 noundef 32, ptr noundef nonnull %67) #3
  %119 = icmp slt i64 %118, 0
  br i1 %119, label %120, label %122

120:                                              ; preds = %113
  %121 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %118) #3
  br label %124

122:                                              ; preds = %113
  %123 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %124

124:                                              ; preds = %122, %120
  %125 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.17) #3
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %126, i64 8
  %128 = load ptr, ptr %127, align 8, !tbaa !25
  %129 = call i64 %128(ptr noundef %126, ptr noundef nonnull @gEfiRngAlgorithmX931AesGuid, i64 noundef 32, ptr noundef nonnull %67) #3
  %130 = icmp slt i64 %129, 0
  br i1 %130, label %131, label %133

131:                                              ; preds = %124
  %132 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %129) #3
  br label %135

133:                                              ; preds = %124
  %134 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %135

135:                                              ; preds = %133, %131
  %136 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.18) #3
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i64 8
  %139 = load ptr, ptr %138, align 8, !tbaa !25
  %140 = call i64 %139(ptr noundef %137, ptr noundef nonnull @gEfiRngAlgorithmRaw, i64 noundef 32, ptr noundef nonnull %67) #3
  %141 = icmp slt i64 %140, 0
  br i1 %141, label %142, label %144

142:                                              ; preds = %135
  %143 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %140) #3
  br label %146

144:                                              ; preds = %135
  %145 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.12) #3
  br label %146

146:                                              ; preds = %144, %142
  %147 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.19) #3
  br label %148

148:                                              ; preds = %146, %._crit_edge115
  %.180117 = phi i64 [ 0, %146 ], [ %156, %._crit_edge115 ]
  %.081116 = phi i64 [ 1, %146 ], [ %163, %._crit_edge115 ]
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds i8, ptr %149, i64 8
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = call i64 %151(ptr noundef %149, ptr noundef null, i64 noundef %.081116, ptr noundef nonnull %67) #3
  %153 = icmp slt i64 %152, 0
  br i1 %153, label %154, label %.lr.ph114.preheader

154:                                              ; preds = %148
  %155 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %152) #3
  br label %.loopexit107

.lr.ph114.preheader:                              ; preds = %148
  %156 = add nuw nsw i64 %.180117, 1
  %157 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.20, i64 noundef %156) #3
  br label %.lr.ph114

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %.lr.ph114
  %.0112 = phi i64 [ %162, %.lr.ph114 ], [ 0, %.lr.ph114.preheader ]
  %158 = getelementptr inbounds i8, ptr %67, i64 %.0112
  %159 = load i8, ptr %158, align 1, !tbaa !22
  %160 = zext i8 %159 to i32
  %161 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %160) #3
  %162 = add nuw nsw i64 %.0112, 1
  %exitcond125.not = icmp eq i64 %162, %.081116
  br i1 %exitcond125.not, label %._crit_edge115, label %.lr.ph114, !llvm.loop !26

._crit_edge115:                                   ; preds = %.lr.ph114
  %163 = add nuw nsw i64 %.081116, 1
  %exitcond126.not = icmp eq i64 %156, 20
  br i1 %exitcond126.not, label %.loopexit107, label %148, !llvm.loop !27

.loopexit107:                                     ; preds = %._crit_edge115, %154
  %164 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.22) #3
  %165 = getelementptr inbounds i8, ptr %67, i64 1
  %166 = getelementptr inbounds i8, ptr %67, i64 2
  %167 = getelementptr inbounds i8, ptr %67, i64 3
  %168 = getelementptr inbounds i8, ptr %67, i64 4
  %169 = getelementptr inbounds i8, ptr %67, i64 5
  %170 = getelementptr inbounds i8, ptr %67, i64 6
  %171 = getelementptr inbounds i8, ptr %67, i64 7
  %172 = getelementptr inbounds i8, ptr %67, i64 8
  %173 = getelementptr inbounds i8, ptr %67, i64 9
  %174 = getelementptr inbounds i8, ptr %67, i64 10
  %175 = getelementptr inbounds i8, ptr %67, i64 11
  %176 = getelementptr inbounds i8, ptr %67, i64 12
  %177 = getelementptr inbounds i8, ptr %67, i64 13
  %178 = getelementptr inbounds i8, ptr %67, i64 14
  %179 = getelementptr inbounds i8, ptr %67, i64 15
  %180 = getelementptr inbounds i8, ptr %67, i64 16
  %181 = getelementptr inbounds i8, ptr %67, i64 17
  %182 = getelementptr inbounds i8, ptr %67, i64 18
  %183 = getelementptr inbounds i8, ptr %67, i64 19
  %184 = getelementptr inbounds i8, ptr %67, i64 20
  %185 = getelementptr inbounds i8, ptr %67, i64 21
  %186 = getelementptr inbounds i8, ptr %67, i64 22
  %187 = getelementptr inbounds i8, ptr %67, i64 23
  %188 = getelementptr inbounds i8, ptr %67, i64 24
  %189 = getelementptr inbounds i8, ptr %67, i64 25
  %190 = getelementptr inbounds i8, ptr %67, i64 26
  %191 = getelementptr inbounds i8, ptr %67, i64 27
  %192 = getelementptr inbounds i8, ptr %67, i64 28
  %193 = getelementptr inbounds i8, ptr %67, i64 29
  %194 = getelementptr inbounds i8, ptr %67, i64 30
  %195 = getelementptr inbounds i8, ptr %67, i64 31
  br label %196

196:                                              ; preds = %.loopexit107, %.loopexit
  %.2119 = phi i64 [ 0, %.loopexit107 ], [ %204, %.loopexit ]
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %197, i64 8
  %199 = load ptr, ptr %198, align 8, !tbaa !25
  %200 = call i64 %199(ptr noundef %197, ptr noundef nonnull @gEfiRngAlgorithmRaw, i64 noundef 32, ptr noundef nonnull %67) #3
  %201 = icmp slt i64 %200, 0
  br i1 %201, label %202, label %.loopexit

202:                                              ; preds = %196
  %203 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.11, i64 noundef %200) #3
  br label %.loopexit106

.loopexit:                                        ; preds = %196
  %204 = add nuw nsw i64 %.2119, 1
  %205 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.20, i64 noundef %204) #3
  %206 = load i8, ptr %67, align 1, !tbaa !22
  %207 = zext i8 %206 to i32
  %208 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %207) #3
  %209 = load i8, ptr %165, align 1, !tbaa !22
  %210 = zext i8 %209 to i32
  %211 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %210) #3
  %212 = load i8, ptr %166, align 1, !tbaa !22
  %213 = zext i8 %212 to i32
  %214 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %213) #3
  %215 = load i8, ptr %167, align 1, !tbaa !22
  %216 = zext i8 %215 to i32
  %217 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %216) #3
  %218 = load i8, ptr %168, align 1, !tbaa !22
  %219 = zext i8 %218 to i32
  %220 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %219) #3
  %221 = load i8, ptr %169, align 1, !tbaa !22
  %222 = zext i8 %221 to i32
  %223 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %222) #3
  %224 = load i8, ptr %170, align 1, !tbaa !22
  %225 = zext i8 %224 to i32
  %226 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %225) #3
  %227 = load i8, ptr %171, align 1, !tbaa !22
  %228 = zext i8 %227 to i32
  %229 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %228) #3
  %230 = load i8, ptr %172, align 1, !tbaa !22
  %231 = zext i8 %230 to i32
  %232 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %231) #3
  %233 = load i8, ptr %173, align 1, !tbaa !22
  %234 = zext i8 %233 to i32
  %235 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %234) #3
  %236 = load i8, ptr %174, align 1, !tbaa !22
  %237 = zext i8 %236 to i32
  %238 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %237) #3
  %239 = load i8, ptr %175, align 1, !tbaa !22
  %240 = zext i8 %239 to i32
  %241 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %240) #3
  %242 = load i8, ptr %176, align 1, !tbaa !22
  %243 = zext i8 %242 to i32
  %244 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %243) #3
  %245 = load i8, ptr %177, align 1, !tbaa !22
  %246 = zext i8 %245 to i32
  %247 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %246) #3
  %248 = load i8, ptr %178, align 1, !tbaa !22
  %249 = zext i8 %248 to i32
  %250 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %249) #3
  %251 = load i8, ptr %179, align 1, !tbaa !22
  %252 = zext i8 %251 to i32
  %253 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %252) #3
  %254 = load i8, ptr %180, align 1, !tbaa !22
  %255 = zext i8 %254 to i32
  %256 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %255) #3
  %257 = load i8, ptr %181, align 1, !tbaa !22
  %258 = zext i8 %257 to i32
  %259 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %258) #3
  %260 = load i8, ptr %182, align 1, !tbaa !22
  %261 = zext i8 %260 to i32
  %262 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %261) #3
  %263 = load i8, ptr %183, align 1, !tbaa !22
  %264 = zext i8 %263 to i32
  %265 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %264) #3
  %266 = load i8, ptr %184, align 1, !tbaa !22
  %267 = zext i8 %266 to i32
  %268 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %267) #3
  %269 = load i8, ptr %185, align 1, !tbaa !22
  %270 = zext i8 %269 to i32
  %271 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %270) #3
  %272 = load i8, ptr %186, align 1, !tbaa !22
  %273 = zext i8 %272 to i32
  %274 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %273) #3
  %275 = load i8, ptr %187, align 1, !tbaa !22
  %276 = zext i8 %275 to i32
  %277 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %276) #3
  %278 = load i8, ptr %188, align 1, !tbaa !22
  %279 = zext i8 %278 to i32
  %280 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %279) #3
  %281 = load i8, ptr %189, align 1, !tbaa !22
  %282 = zext i8 %281 to i32
  %283 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %282) #3
  %284 = load i8, ptr %190, align 1, !tbaa !22
  %285 = zext i8 %284 to i32
  %286 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %285) #3
  %287 = load i8, ptr %191, align 1, !tbaa !22
  %288 = zext i8 %287 to i32
  %289 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %288) #3
  %290 = load i8, ptr %192, align 1, !tbaa !22
  %291 = zext i8 %290 to i32
  %292 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %291) #3
  %293 = load i8, ptr %193, align 1, !tbaa !22
  %294 = zext i8 %293 to i32
  %295 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %294) #3
  %296 = load i8, ptr %194, align 1, !tbaa !22
  %297 = zext i8 %296 to i32
  %298 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %297) #3
  %299 = load i8, ptr %195, align 1, !tbaa !22
  %300 = zext i8 %299 to i32
  %301 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.21, i32 noundef %300) #3
  %exitcond128.not = icmp eq i64 %204, 20
  br i1 %exitcond128.not, label %.loopexit106, label %196, !llvm.loop !28

.loopexit106:                                     ; preds = %.loopexit, %202
  %302 = call i64 (ptr, ...) @Print(ptr noundef nonnull @.str.23, i64 noundef %200) #3
  call void @FreePool(ptr noundef nonnull %67) #3
  br label %.thread

.thread:                                          ; preds = %._crit_edge, %14, %.loopexit106
  %.4105 = phi i64 [ %200, %.loopexit106 ], [ %30, %._crit_edge ], [ %12, %14 ]
  call void @llvm.lifetime.end.p0(i64 160, 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 %.4105
}

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

declare i64 @Print(ptr noundef, ...) local_unnamed_addr #2

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #2

declare void @FreePool(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

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, !6, i64 320}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_EFI_RNG_PROTOCOL", !6, i64 0, !6, i64 8}
!17 = !{!18, !13, i64 0}
!18 = !{!"", !13, i64 0, !19, i64 4, !19, i64 6, !7, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !19, i64 4}
!21 = !{!18, !19, i64 6}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!16, !6, i64 8}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass