; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg (MakePxeCall)

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

%union.EFI_IA32_REGISTER_SET = type { %struct.EFI_DWORD_REGS }
%struct.EFI_DWORD_REGS = type { i32, i32, i32, i32, i32, i32, %struct.EFI_EFLAGS_REG, i16, i16, i16, i16, i16, i16, i32, i32 }
%struct.EFI_EFLAGS_REG = type { i32 }
%struct.EFI_SIMPLE_NETWORK_DEV = type { i64, ptr, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL, ptr, ptr, ptr, i8, ptr, ptr, i16, i16, %struct.EFI_SIMPLE_NETWORK_DEV_FIFO, ptr, ptr, %struct.PXENV_UNDI_GET_INFORMATION_T, %struct.PXENV_UNDI_GET_NIC_TYPE_T, %struct.PXENV_UNDI_GET_NDIS_INFO_T, i8, %struct.PXENV_UNDI_ISR_T, ptr, ptr, ptr, ptr, i8, i64, i64, i64, i64, ptr, ptr, ptr, ptr }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct._EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL = type { i64, i64, i64, i32, [4 x i8], i8, i8, i8, i8, i16 }
%struct.EFI_SIMPLE_NETWORK_DEV_FIFO = type { i32, i32, [64 x ptr] }
%struct.PXENV_UNDI_GET_INFORMATION_T = type { i16, i16, i16, i16, i16, i16, [16 x i8], [16 x i8], i16, i16, i16 }
%struct.PXENV_UNDI_GET_NIC_TYPE_T = type <{ i16, i8, %union.PCI_PNP_INFO_T }>
%union.PCI_PNP_INFO_T = type { %struct.PCI_INFO_T }
%struct.PCI_INFO_T = type { i16, i16, i8, i8, i8, i8, i16, i16, i16 }
%struct.PXENV_UNDI_GET_NDIS_INFO_T = type <{ i16, [16 x i8], i32, i32, [4 x i32] }>
%struct.PXENV_UNDI_ISR_T = type { i16, i16, i16, i16, i16, i16, i16, i8, i8 }
%struct.EFI_WORD_REGS = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, %struct.EFI_FLAGS_REG, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
%struct.EFI_FLAGS_REG = type { i16 }
%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_LEGACY_BIOS_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.78 = external hidden unnamed_addr constant [55 x i8], align 1
@gBS = external global ptr, align 8
@.str.109 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

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

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

declare i64 @RShiftU64(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @MakePxeCall(ptr noundef %0, ptr noundef %1, i64 noundef %2, i16 noundef zeroext %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i16, align 2
  %10 = alloca i64, align 8
  %11 = alloca %union.EFI_IA32_REGISTER_SET, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i16 %3, ptr %9, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 48, 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 1, ptr %17) #3
  br label %19

19:                                               ; preds = %4
  %20 = call zeroext i8 @DebugPrintEnabled()
  %21 = icmp ne i8 %20, 0
  br i1 %21, label %22, label %34

22:                                               ; preds = %19
  br label %23

23:                                               ; preds = %22
  %24 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %25 = icmp ne i8 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = load i16, ptr %9, align 2, !tbaa !11
  %28 = zext i16 %27 to i32
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load i64, ptr %8, align 8, !tbaa !9
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.109, i32 noundef %28, ptr noundef %29, i64 noundef %30)
  br label %31

31:                                               ; preds = %26, %23
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33, %19
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %37, i32 0, i32 11
  %39 = load i16, ptr %38, align 8, !tbaa !13
  %40 = zext i16 %39 to i32
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %49

42:                                               ; preds = %36
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %43, i32 0, i32 12
  %45 = load i16, ptr %44, align 2, !tbaa !25
  %46 = zext i16 %45 to i32
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %42
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %385

49:                                               ; preds = %42, %36
  store i64 0, ptr %10, align 8, !tbaa !9
  %50 = load i64, ptr %8, align 8, !tbaa !9
  %51 = udiv i64 %50, 4096
  %52 = add i64 %51, 1
  %53 = call i64 @BiosSnp16AllocatePagesBelowOneMb(i64 noundef %52, ptr noundef %15)
  store i64 %53, ptr %10, align 8, !tbaa !9
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %56, label %73

56:                                               ; preds = %49
  br label %57

57:                                               ; preds = %56
  %58 = call zeroext i8 @DebugPrintEnabled()
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %60, label %69

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60
  %62 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %63 = icmp ne i8 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %61
  %65 = load i64, ptr %10, align 8, !tbaa !9
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.78, i64 noundef %65)
  br label %66

66:                                               ; preds = %64, %61
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68, %57
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %72, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %385

73:                                               ; preds = %49
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i64, ptr %8, align 8, !tbaa !9
  %77 = call ptr @CopyMem(ptr noundef %74, ptr noundef %75, i64 noundef %76)
  %78 = call ptr @ZeroMem(ptr noundef %11, i64 noundef 48)
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %79, i32 0, i32 11
  %81 = load i16, ptr %80, align 8, !tbaa !13
  %82 = getelementptr inbounds %struct.EFI_WORD_REGS, ptr %11, i32 0, i32 14
  store i16 %81, ptr %82, align 4, !tbaa !26
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %83, i32 0, i32 12
  %85 = load i16, ptr %84, align 2, !tbaa !25
  %86 = getelementptr inbounds %struct.EFI_WORD_REGS, ptr %11, i32 0, i32 10
  store i16 %85, ptr %86, align 4, !tbaa !26
  store i64 6, ptr %14, align 8, !tbaa !9
  %87 = load ptr, ptr @gBS, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %87, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !27
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = call i64 %89(i32 noundef 6, i64 noundef %90, ptr noundef %13)
  store i64 %91, ptr %10, align 8, !tbaa !9
  %92 = load i64, ptr %10, align 8, !tbaa !9
  %93 = icmp slt i64 %92, 0
  br i1 %93, label %94, label %96

94:                                               ; preds = %73
  %95 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %95, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %385

96:                                               ; preds = %73
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %97, ptr %12, align 8, !tbaa !5
  %98 = load i16, ptr %9, align 2, !tbaa !11
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds i16, ptr %99, i32 1
  store ptr %100, ptr %12, align 8, !tbaa !5
  store i16 %98, ptr %99, align 2, !tbaa !11
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = ptrtoint ptr %101 to i64
  %103 = trunc i64 %102 to i32
  %104 = and i32 %103, 65535
  %105 = trunc i32 %104 to i16
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds i16, ptr %106, i32 1
  store ptr %107, ptr %12, align 8, !tbaa !5
  store i16 %105, ptr %106, align 2, !tbaa !11
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = ptrtoint ptr %108 to i64
  %110 = trunc i64 %109 to i32
  %111 = zext i32 %110 to i64
  %112 = call i64 @RShiftU64(i64 noundef %111, i64 noundef 4)
  %113 = and i64 %112, 61440
  %114 = trunc i64 %113 to i16
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds i16, ptr %115, i32 1
  store ptr %116, ptr %12, align 8, !tbaa !5
  store i16 %114, ptr %115, align 2, !tbaa !11
  br label %117

117:                                              ; preds = %96
  %118 = call zeroext i8 @DebugPrintEnabled()
  %119 = icmp ne i8 %118, 0
  br i1 %119, label %120, label %128

120:                                              ; preds = %117
  br label %121

121:                                              ; preds = %120
  %122 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %123 = icmp ne i8 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %121
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.110)
  br label %125

125:                                              ; preds = %124, %121
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127, %117
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  %132 = call zeroext i8 @DebugPrintEnabled()
  %133 = icmp ne i8 %132, 0
  br i1 %133, label %134, label %143

134:                                              ; preds = %131
  br label %135

135:                                              ; preds = %134
  %136 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %137 = icmp ne i8 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %135
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.111, ptr noundef %139)
  br label %140

140:                                              ; preds = %138, %135
  br label %141

141:                                              ; preds = %140
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142, %131
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %146, ptr %12, align 8, !tbaa !5
  br label %147

147:                                              ; preds = %145
  %148 = call zeroext i8 @DebugPrintEnabled()
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %150, label %169

150:                                              ; preds = %147
  br label %151

151:                                              ; preds = %150
  %152 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %153 = icmp ne i8 %152, 0
  br i1 %153, label %154, label %166

154:                                              ; preds = %151
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = load i16, ptr %155, align 2, !tbaa !11
  %157 = zext i16 %156 to i32
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = getelementptr inbounds i16, ptr %158, i64 1
  %160 = load i16, ptr %159, align 2, !tbaa !11
  %161 = zext i16 %160 to i32
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = getelementptr inbounds i16, ptr %162, i64 2
  %164 = load i16, ptr %163, align 2, !tbaa !11
  %165 = zext i16 %164 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.112, i32 noundef %157, i32 noundef %161, i32 noundef %165)
  br label %166

166:                                              ; preds = %154, %151
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168, %147
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  %173 = call zeroext i8 @DebugPrintEnabled()
  %174 = icmp ne i8 %173, 0
  br i1 %174, label %175, label %183

175:                                              ; preds = %172
  br label %176

176:                                              ; preds = %175
  %177 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %178 = icmp ne i8 %177, 0
  br i1 %178, label %179, label %180

179:                                              ; preds = %176
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.113)
  br label %180

180:                                              ; preds = %179, %176
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182, %172
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %186

186:                                              ; preds = %210, %185
  %187 = load i64, ptr %16, align 8, !tbaa !9
  %188 = load i64, ptr %8, align 8, !tbaa !9
  %189 = icmp ult i64 %187, %188
  br i1 %189, label %190, label %213

190:                                              ; preds = %186
  br label %191

191:                                              ; preds = %190
  %192 = call zeroext i8 @DebugPrintEnabled()
  %193 = icmp ne i8 %192, 0
  br i1 %193, label %194, label %207

194:                                              ; preds = %191
  br label %195

195:                                              ; preds = %194
  %196 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %197 = icmp ne i8 %196, 0
  br i1 %197, label %198, label %204

198:                                              ; preds = %195
  %199 = load ptr, ptr %15, align 8, !tbaa !5
  %200 = load i64, ptr %16, align 8, !tbaa !9
  %201 = getelementptr inbounds i8, ptr %199, i64 %200
  %202 = load i8, ptr %201, align 1, !tbaa !26
  %203 = zext i8 %202 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.114, i32 noundef %203)
  br label %204

204:                                              ; preds = %198, %195
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206, %191
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209
  %211 = load i64, ptr %16, align 8, !tbaa !9
  %212 = add i64 %211, 1
  store i64 %212, ptr %16, align 8, !tbaa !9
  br label %186, !llvm.loop !30

213:                                              ; preds = %186
  br label %214

214:                                              ; preds = %213
  %215 = call zeroext i8 @DebugPrintEnabled()
  %216 = icmp ne i8 %215, 0
  br i1 %216, label %217, label %225

217:                                              ; preds = %214
  br label %218

218:                                              ; preds = %217
  %219 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %220 = icmp ne i8 %219, 0
  br i1 %220, label %221, label %222

221:                                              ; preds = %218
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.115)
  br label %222

222:                                              ; preds = %221, %218
  br label %223

223:                                              ; preds = %222
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224, %214
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %228, i32 0, i32 7
  %230 = load ptr, ptr %229, align 8, !tbaa !32
  %231 = getelementptr inbounds %struct._EFI_LEGACY_BIOS_PROTOCOL, ptr %230, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8, !tbaa !33
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %233, i32 0, i32 7
  %235 = load ptr, ptr %234, align 8, !tbaa !32
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %236, i32 0, i32 11
  %238 = load i16, ptr %237, align 8, !tbaa !13
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %239, i32 0, i32 12
  %241 = load i16, ptr %240, align 2, !tbaa !25
  %242 = load ptr, ptr %13, align 8, !tbaa !5
  %243 = call zeroext i8 %232(ptr noundef %235, i16 noundef zeroext %238, i16 noundef zeroext %241, ptr noundef %11, ptr noundef %242, i64 noundef 6)
  store i8 %243, ptr %17, align 1, !tbaa !26
  %244 = load i8, ptr %17, align 1, !tbaa !26
  %245 = icmp ne i8 %244, 0
  br i1 %245, label %246, label %247

246:                                              ; preds = %227
  store i64 -9223372036854775787, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %385

247:                                              ; preds = %227
  br label %248

248:                                              ; preds = %247
  %249 = call zeroext i8 @DebugPrintEnabled()
  %250 = icmp ne i8 %249, 0
  br i1 %250, label %251, label %259

251:                                              ; preds = %248
  br label %252

252:                                              ; preds = %251
  %253 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %254 = icmp ne i8 %253, 0
  br i1 %254, label %255, label %256

255:                                              ; preds = %252
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.116)
  br label %256

256:                                              ; preds = %255, %252
  br label %257

257:                                              ; preds = %256
  br label %258

258:                                              ; preds = %257
  br label %259

259:                                              ; preds = %258, %248
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  %263 = call zeroext i8 @DebugPrintEnabled()
  %264 = icmp ne i8 %263, 0
  br i1 %264, label %265, label %274

265:                                              ; preds = %262
  br label %266

266:                                              ; preds = %265
  %267 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %268 = icmp ne i8 %267, 0
  br i1 %268, label %269, label %271

269:                                              ; preds = %266
  %270 = load ptr, ptr %13, align 8, !tbaa !5
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.111, ptr noundef %270)
  br label %271

271:                                              ; preds = %269, %266
  br label %272

272:                                              ; preds = %271
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273, %262
  br label %275

275:                                              ; preds = %274
  br label %276

276:                                              ; preds = %275
  %277 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %277, ptr %12, align 8, !tbaa !5
  br label %278

278:                                              ; preds = %276
  %279 = call zeroext i8 @DebugPrintEnabled()
  %280 = icmp ne i8 %279, 0
  br i1 %280, label %281, label %300

281:                                              ; preds = %278
  br label %282

282:                                              ; preds = %281
  %283 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %284 = icmp ne i8 %283, 0
  br i1 %284, label %285, label %297

285:                                              ; preds = %282
  %286 = load ptr, ptr %12, align 8, !tbaa !5
  %287 = load i16, ptr %286, align 2, !tbaa !11
  %288 = zext i16 %287 to i32
  %289 = load ptr, ptr %12, align 8, !tbaa !5
  %290 = getelementptr inbounds i16, ptr %289, i64 1
  %291 = load i16, ptr %290, align 2, !tbaa !11
  %292 = zext i16 %291 to i32
  %293 = load ptr, ptr %12, align 8, !tbaa !5
  %294 = getelementptr inbounds i16, ptr %293, i64 2
  %295 = load i16, ptr %294, align 2, !tbaa !11
  %296 = zext i16 %295 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.112, i32 noundef %288, i32 noundef %292, i32 noundef %296)
  br label %297

297:                                              ; preds = %285, %282
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299, %278
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301
  br label %303

303:                                              ; preds = %302
  %304 = call zeroext i8 @DebugPrintEnabled()
  %305 = icmp ne i8 %304, 0
  br i1 %305, label %306, label %314

306:                                              ; preds = %303
  br label %307

307:                                              ; preds = %306
  %308 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %309 = icmp ne i8 %308, 0
  br i1 %309, label %310, label %311

310:                                              ; preds = %307
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.113)
  br label %311

311:                                              ; preds = %310, %307
  br label %312

312:                                              ; preds = %311
  br label %313

313:                                              ; preds = %312
  br label %314

314:                                              ; preds = %313, %303
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %317

317:                                              ; preds = %341, %316
  %318 = load i64, ptr %16, align 8, !tbaa !9
  %319 = load i64, ptr %8, align 8, !tbaa !9
  %320 = icmp ult i64 %318, %319
  br i1 %320, label %321, label %344

321:                                              ; preds = %317
  br label %322

322:                                              ; preds = %321
  %323 = call zeroext i8 @DebugPrintEnabled()
  %324 = icmp ne i8 %323, 0
  br i1 %324, label %325, label %338

325:                                              ; preds = %322
  br label %326

326:                                              ; preds = %325
  %327 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %328 = icmp ne i8 %327, 0
  br i1 %328, label %329, label %335

329:                                              ; preds = %326
  %330 = load ptr, ptr %15, align 8, !tbaa !5
  %331 = load i64, ptr %16, align 8, !tbaa !9
  %332 = getelementptr inbounds i8, ptr %330, i64 %331
  %333 = load i8, ptr %332, align 1, !tbaa !26
  %334 = zext i8 %333 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.114, i32 noundef %334)
  br label %335

335:                                              ; preds = %329, %326
  br label %336

336:                                              ; preds = %335
  br label %337

337:                                              ; preds = %336
  br label %338

338:                                              ; preds = %337, %322
  br label %339

339:                                              ; preds = %338
  br label %340

340:                                              ; preds = %339
  br label %341

341:                                              ; preds = %340
  %342 = load i64, ptr %16, align 8, !tbaa !9
  %343 = add i64 %342, 1
  store i64 %343, ptr %16, align 8, !tbaa !9
  br label %317, !llvm.loop !35

344:                                              ; preds = %317
  br label %345

345:                                              ; preds = %344
  %346 = call zeroext i8 @DebugPrintEnabled()
  %347 = icmp ne i8 %346, 0
  br i1 %347, label %348, label %356

348:                                              ; preds = %345
  br label %349

349:                                              ; preds = %348
  %350 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %351 = icmp ne i8 %350, 0
  br i1 %351, label %352, label %353

352:                                              ; preds = %349
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.115)
  br label %353

353:                                              ; preds = %352, %349
  br label %354

354:                                              ; preds = %353
  br label %355

355:                                              ; preds = %354
  br label %356

356:                                              ; preds = %355, %345
  br label %357

357:                                              ; preds = %356
  br label %358

358:                                              ; preds = %357
  %359 = load ptr, ptr %7, align 8, !tbaa !5
  %360 = load ptr, ptr %15, align 8, !tbaa !5
  %361 = load i64, ptr %8, align 8, !tbaa !9
  %362 = call ptr @CopyMem(ptr noundef %359, ptr noundef %360, i64 noundef %361)
  %363 = getelementptr inbounds %struct.EFI_WORD_REGS, ptr %11, i32 0, i32 0
  %364 = load i16, ptr %363, align 4, !tbaa !26
  %365 = zext i16 %364 to i32
  %366 = icmp eq i32 %365, 0
  br i1 %366, label %367, label %368

367:                                              ; preds = %358
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %369

368:                                              ; preds = %358
  store i64 -9223372036854775801, ptr %10, align 8, !tbaa !9
  br label %369

369:                                              ; preds = %368, %367
  %370 = load ptr, ptr @gBS, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %370, i32 0, i32 7
  %372 = load ptr, ptr %371, align 8, !tbaa !36
  %373 = load ptr, ptr %13, align 8, !tbaa !5
  %374 = call i64 %372(ptr noundef %373)
  %375 = load ptr, ptr @gBS, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %375, i32 0, i32 4
  %377 = load ptr, ptr %376, align 8, !tbaa !37
  %378 = load ptr, ptr %15, align 8, !tbaa !5
  %379 = ptrtoint ptr %378 to i64
  %380 = load i64, ptr %8, align 8, !tbaa !9
  %381 = udiv i64 %380, 4096
  %382 = add i64 %381, 1
  %383 = call i64 %377(i64 noundef %379, i64 noundef %382)
  %384 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %384, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %385

385:                                              ; preds = %369, %246, %94, %71, %48
  call void @llvm.lifetime.end.p0(i64 1, 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 48, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %386 = load i64, ptr %5, align 8
  ret i64 %386
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !12, i64 888}
!14 = !{!"", !10, i64 0, !6, i64 8, !15, i64 16, !16, i64 144, !19, i64 800, !6, i64 840, !6, i64 848, !6, i64 856, !7, i64 864, !6, i64 872, !6, i64 880, !12, i64 888, !12, i64 890, !20, i64 896, !6, i64 1416, !6, i64 1424, !21, i64 1432, !22, i64 1482, !23, i64 1499, !7, i64 1541, !24, i64 1542, !6, i64 1560, !6, i64 1568, !6, i64 1576, !6, i64 1584, !7, i64 1592, !10, i64 1600, !10, i64 1608, !10, i64 1616, !10, i64 1624, !6, i64 1632, !6, i64 1640, !6, i64 1648, !6, i64 1656}
!15 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !10, 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, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!16 = !{!"", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !7, i64 40, !18, i64 552, !18, i64 584, !18, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!17 = !{!"int", !7, i64 0}
!18 = !{!"", !7, i64 0}
!19 = !{!"_EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !17, i64 24, !7, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !12, i64 36}
!20 = !{!"", !17, i64 0, !17, i64 4, !7, i64 8}
!21 = !{!"", !12, i64 0, !12, i64 2, !12, i64 4, !12, i64 6, !12, i64 8, !12, i64 10, !7, i64 12, !7, i64 28, !12, i64 44, !12, i64 46, !12, i64 48}
!22 = !{!"", !12, i64 0, !7, i64 2, !7, i64 3}
!23 = !{!"", !12, i64 0, !7, i64 2, !17, i64 18, !17, i64 22, !7, i64 26}
!24 = !{!"", !12, i64 0, !12, i64 2, !12, i64 4, !12, i64 6, !12, i64 8, !12, i64 10, !12, i64 12, !7, i64 14, !7, i64 15}
!25 = !{!14, !12, i64 890}
!26 = !{!7, !7, i64 0}
!27 = !{!28, !6, i64 64}
!28 = !{!"", !29, 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}
!29 = !{!"", !10, i64 0, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!14, !6, i64 856}
!33 = !{!34, !6, i64 8}
!34 = !{!"_EFI_LEGACY_BIOS_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, !6, i64 88}
!35 = distinct !{!35, !31}
!36 = !{!28, !6, i64 72}
!37 = !{!28, !6, i64 48}


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

%union.EFI_IA32_REGISTER_SET = type { %struct.EFI_DWORD_REGS }
%struct.EFI_DWORD_REGS = type { i32, i32, i32, i32, i32, i32, %struct.EFI_EFLAGS_REG, i16, i16, i16, i16, i16, i16, i32, i32 }
%struct.EFI_EFLAGS_REG = type { i32 }

@.str.78 = external hidden unnamed_addr constant [55 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.109 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.113 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.114 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.115 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

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

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

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

declare i64 @RShiftU64(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @MakePxeCall(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, i16 noundef zeroext %3) local_unnamed_addr #2 {
  %5 = alloca %union.EFI_IA32_REGISTER_SET, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 48, 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
  %8 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not = icmp eq i8 %8, 0
  br i1 %.not, label %13, label %9

9:                                                ; preds = %4
  %10 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not48 = icmp eq i8 %10, 0
  br i1 %.not48, label %13, label %11

11:                                               ; preds = %9
  %12 = zext i16 %3 to i32
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.109, i32 noundef %12, ptr noundef %1, i64 noundef %2) #3
  br label %13

13:                                               ; preds = %9, %11, %4
  %14 = getelementptr inbounds i8, ptr %0, i64 888
  %15 = load i16, ptr %14, align 8, !tbaa !5
  %16 = icmp eq i16 %15, 0
  br i1 %16, label %17, label %21

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 890
  %19 = load i16, ptr %18, align 2, !tbaa !22
  %20 = icmp eq i16 %19, 0
  br i1 %20, label %170, label %21

21:                                               ; preds = %17, %13
  %22 = lshr i64 %2, 12
  %23 = add nuw nsw i64 %22, 1
  %24 = call i64 @BiosSnp16AllocatePagesBelowOneMb(i64 noundef %23, ptr noundef nonnull %7) #3
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %21
  %27 = call zeroext i8 @DebugPrintEnabled() #3
  %.not74 = icmp eq i8 %27, 0
  br i1 %.not74, label %170, label %28

28:                                               ; preds = %26
  %29 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not75 = icmp eq i8 %29, 0
  br i1 %.not75, label %170, label %30

30:                                               ; preds = %28
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.78, i64 noundef %24) #3
  br label %170

31:                                               ; preds = %21
  %32 = load ptr, ptr %7, align 8, !tbaa !23
  %33 = call ptr @CopyMem(ptr noundef %32, ptr noundef %1, i64 noundef %2) #3
  %34 = call ptr @ZeroMem(ptr noundef nonnull %5, i64 noundef 48) #3
  %35 = load i16, ptr %14, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %5, i64 28
  store i16 %35, ptr %36, align 4, !tbaa !24
  %37 = getelementptr inbounds i8, ptr %0, i64 890
  %38 = load i16, ptr %37, align 2, !tbaa !22
  %39 = getelementptr inbounds i8, ptr %5, i64 20
  store i16 %38, ptr %39, align 4, !tbaa !24
  %40 = load ptr, ptr @gBS, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %40, i64 64
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %43 = call i64 %42(i32 noundef 6, i64 noundef 6, ptr noundef nonnull %6) #3
  %44 = icmp slt i64 %43, 0
  br i1 %44, label %170, label %45

45:                                               ; preds = %31
  %46 = load ptr, ptr %6, align 8, !tbaa !23
  %47 = getelementptr inbounds i8, ptr %46, i64 2
  store i16 %3, ptr %46, align 2, !tbaa !28
  %48 = load ptr, ptr %7, align 8, !tbaa !23
  %49 = ptrtoint ptr %48 to i64
  %50 = trunc i64 %49 to i16
  %51 = getelementptr inbounds i8, ptr %46, i64 4
  store i16 %50, ptr %47, align 2, !tbaa !28
  %52 = and i64 %49, 4294967295
  %53 = call i64 @RShiftU64(i64 noundef %52, i64 noundef 4) #3
  %54 = trunc i64 %53 to i16
  %55 = and i16 %54, -4096
  store i16 %55, ptr %51, align 2, !tbaa !28
  %56 = call zeroext i8 @DebugPrintEnabled() #3
  %.not49 = icmp eq i8 %56, 0
  br i1 %.not49, label %60, label %57

57:                                               ; preds = %45
  %58 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not50 = icmp eq i8 %58, 0
  br i1 %.not50, label %60, label %59

59:                                               ; preds = %57
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.110) #3
  br label %60

60:                                               ; preds = %45, %59, %57
  %61 = call zeroext i8 @DebugPrintEnabled() #3
  %.not51 = icmp eq i8 %61, 0
  br i1 %.not51, label %66, label %62

62:                                               ; preds = %60
  %63 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not52 = icmp eq i8 %63, 0
  br i1 %.not52, label %66, label %64

64:                                               ; preds = %62
  %65 = load ptr, ptr %6, align 8, !tbaa !23
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.111, ptr noundef %65) #3
  br label %66

66:                                               ; preds = %62, %64, %60
  %67 = load ptr, ptr %6, align 8, !tbaa !23
  %68 = call zeroext i8 @DebugPrintEnabled() #3
  %.not53 = icmp eq i8 %68, 0
  br i1 %.not53, label %80, label %69

69:                                               ; preds = %66
  %70 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not54 = icmp eq i8 %70, 0
  br i1 %.not54, label %80, label %71

71:                                               ; preds = %69
  %72 = load i16, ptr %67, align 2, !tbaa !28
  %73 = zext i16 %72 to i32
  %74 = getelementptr inbounds i8, ptr %67, i64 2
  %75 = load i16, ptr %74, align 2, !tbaa !28
  %76 = zext i16 %75 to i32
  %77 = getelementptr inbounds i8, ptr %67, i64 4
  %78 = load i16, ptr %77, align 2, !tbaa !28
  %79 = zext i16 %78 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.112, i32 noundef %73, i32 noundef %76, i32 noundef %79) #3
  br label %80

80:                                               ; preds = %66, %71, %69
  %81 = call zeroext i8 @DebugPrintEnabled() #3
  %.not55 = icmp eq i8 %81, 0
  br i1 %.not55, label %85, label %82

82:                                               ; preds = %80
  %83 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not56 = icmp eq i8 %83, 0
  br i1 %.not56, label %85, label %84

84:                                               ; preds = %82
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.113) #3
  br label %85

85:                                               ; preds = %82, %84, %80
  %.not81 = icmp eq i64 %2, 0
  br i1 %.not81, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %85, %94
  %.04376 = phi i64 [ %95, %94 ], [ 0, %85 ]
  %86 = call zeroext i8 @DebugPrintEnabled() #3
  %.not72 = icmp eq i8 %86, 0
  br i1 %.not72, label %94, label %87

87:                                               ; preds = %.lr.ph
  %88 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not73 = icmp eq i8 %88, 0
  br i1 %.not73, label %94, label %89

89:                                               ; preds = %87
  %90 = load ptr, ptr %7, align 8, !tbaa !23
  %91 = getelementptr inbounds i8, ptr %90, i64 %.04376
  %92 = load i8, ptr %91, align 1, !tbaa !24
  %93 = zext i8 %92 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.114, i32 noundef %93) #3
  br label %94

94:                                               ; preds = %.lr.ph, %89, %87
  %95 = add nuw i64 %.04376, 1
  %exitcond.not = icmp eq i64 %95, %2
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !29

._crit_edge:                                      ; preds = %94, %85
  %96 = call zeroext i8 @DebugPrintEnabled() #3
  %.not57 = icmp eq i8 %96, 0
  br i1 %.not57, label %100, label %97

97:                                               ; preds = %._crit_edge
  %98 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not58 = icmp eq i8 %98, 0
  br i1 %.not58, label %100, label %99

99:                                               ; preds = %97
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.115) #3
  br label %100

100:                                              ; preds = %97, %99, %._crit_edge
  %101 = getelementptr inbounds i8, ptr %0, i64 856
  %102 = load ptr, ptr %101, align 8, !tbaa !31
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !32
  %105 = load i16, ptr %14, align 8, !tbaa !5
  %106 = load i16, ptr %37, align 2, !tbaa !22
  %107 = load ptr, ptr %6, align 8, !tbaa !23
  %108 = call zeroext i8 %104(ptr noundef %102, i16 noundef zeroext %105, i16 noundef zeroext %106, ptr noundef nonnull %5, ptr noundef %107, i64 noundef 6) #3
  %.not59 = icmp eq i8 %108, 0
  br i1 %.not59, label %109, label %170

109:                                              ; preds = %100
  %110 = call zeroext i8 @DebugPrintEnabled() #3
  %.not60 = icmp eq i8 %110, 0
  br i1 %.not60, label %114, label %111

111:                                              ; preds = %109
  %112 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not61 = icmp eq i8 %112, 0
  br i1 %.not61, label %114, label %113

113:                                              ; preds = %111
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.116) #3
  br label %114

114:                                              ; preds = %109, %113, %111
  %115 = call zeroext i8 @DebugPrintEnabled() #3
  %.not62 = icmp eq i8 %115, 0
  br i1 %.not62, label %120, label %116

116:                                              ; preds = %114
  %117 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not63 = icmp eq i8 %117, 0
  br i1 %.not63, label %120, label %118

118:                                              ; preds = %116
  %119 = load ptr, ptr %6, align 8, !tbaa !23
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.111, ptr noundef %119) #3
  br label %120

120:                                              ; preds = %116, %118, %114
  %121 = load ptr, ptr %6, align 8, !tbaa !23
  %122 = call zeroext i8 @DebugPrintEnabled() #3
  %.not64 = icmp eq i8 %122, 0
  br i1 %.not64, label %134, label %123

123:                                              ; preds = %120
  %124 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not65 = icmp eq i8 %124, 0
  br i1 %.not65, label %134, label %125

125:                                              ; preds = %123
  %126 = load i16, ptr %121, align 2, !tbaa !28
  %127 = zext i16 %126 to i32
  %128 = getelementptr inbounds i8, ptr %121, i64 2
  %129 = load i16, ptr %128, align 2, !tbaa !28
  %130 = zext i16 %129 to i32
  %131 = getelementptr inbounds i8, ptr %121, i64 4
  %132 = load i16, ptr %131, align 2, !tbaa !28
  %133 = zext i16 %132 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.112, i32 noundef %127, i32 noundef %130, i32 noundef %133) #3
  br label %134

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

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

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

139:                                              ; preds = %136, %138, %134
  br i1 %.not81, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %139, %148
  %.177 = phi i64 [ %149, %148 ], [ 0, %139 ]
  %140 = call zeroext i8 @DebugPrintEnabled() #3
  %.not70 = icmp eq i8 %140, 0
  br i1 %.not70, label %148, label %141

141:                                              ; preds = %.lr.ph79
  %142 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not71 = icmp eq i8 %142, 0
  br i1 %.not71, label %148, label %143

143:                                              ; preds = %141
  %144 = load ptr, ptr %7, align 8, !tbaa !23
  %145 = getelementptr inbounds i8, ptr %144, i64 %.177
  %146 = load i8, ptr %145, align 1, !tbaa !24
  %147 = zext i8 %146 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.114, i32 noundef %147) #3
  br label %148

148:                                              ; preds = %.lr.ph79, %143, %141
  %149 = add nuw i64 %.177, 1
  %exitcond83.not = icmp eq i64 %149, %2
  br i1 %exitcond83.not, label %._crit_edge80, label %.lr.ph79, !llvm.loop !34

._crit_edge80:                                    ; preds = %148, %139
  %150 = call zeroext i8 @DebugPrintEnabled() #3
  %.not68 = icmp eq i8 %150, 0
  br i1 %.not68, label %154, label %151

151:                                              ; preds = %._crit_edge80
  %152 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not69 = icmp eq i8 %152, 0
  br i1 %.not69, label %154, label %153

153:                                              ; preds = %151
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.115) #3
  br label %154

154:                                              ; preds = %151, %153, %._crit_edge80
  %155 = load ptr, ptr %7, align 8, !tbaa !23
  %156 = call ptr @CopyMem(ptr noundef %1, ptr noundef %155, i64 noundef %2) #3
  %157 = load i16, ptr %5, align 4, !tbaa !24
  %158 = icmp eq i16 %157, 0
  %. = select i1 %158, i64 0, i64 -9223372036854775801
  %159 = load ptr, ptr @gBS, align 8, !tbaa !23
  %160 = getelementptr inbounds i8, ptr %159, i64 72
  %161 = load ptr, ptr %160, align 8, !tbaa !35
  %162 = load ptr, ptr %6, align 8, !tbaa !23
  %163 = call i64 %161(ptr noundef %162) #3
  %164 = load ptr, ptr @gBS, align 8, !tbaa !23
  %165 = getelementptr inbounds i8, ptr %164, i64 48
  %166 = load ptr, ptr %165, align 8, !tbaa !36
  %167 = load ptr, ptr %7, align 8, !tbaa !23
  %168 = ptrtoint ptr %167 to i64
  %169 = call i64 %166(i64 noundef %168, i64 noundef %23) #3
  br label %170

170:                                              ; preds = %100, %31, %26, %30, %28, %17, %154
  %.0 = phi i64 [ %., %154 ], [ -9223372036854775801, %17 ], [ %24, %28 ], [ %24, %30 ], [ %24, %26 ], [ %43, %31 ], [ -9223372036854775787, %100 ]
  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 48, ptr nonnull %5) #3
  ret i64 %.0
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !16, i64 888}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 144, !15, i64 800, !10, i64 840, !10, i64 848, !10, i64 856, !8, i64 864, !10, i64 872, !10, i64 880, !16, i64 888, !16, i64 890, !17, i64 896, !10, i64 1416, !10, i64 1424, !18, i64 1432, !19, i64 1482, !20, i64 1499, !8, i64 1541, !21, i64 1542, !10, i64 1560, !10, i64 1568, !10, i64 1576, !10, i64 1584, !8, i64 1592, !7, i64 1600, !7, i64 1608, !7, i64 1616, !7, i64 1624, !10, i64 1632, !10, i64 1640, !10, i64 1648, !10, i64 1656}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !8, i64 40, !14, i64 552, !14, i64 584, !14, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!13 = !{!"int", !8, i64 0}
!14 = !{!"", !8, i64 0}
!15 = !{!"_EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL", !7, i64 0, !7, i64 8, !7, i64 16, !13, i64 24, !8, i64 28, !8, i64 32, !8, i64 33, !8, i64 34, !8, i64 35, !16, i64 36}
!16 = !{!"short", !8, i64 0}
!17 = !{!"", !13, i64 0, !13, i64 4, !8, i64 8}
!18 = !{!"", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8, !16, i64 10, !8, i64 12, !8, i64 28, !16, i64 44, !16, i64 46, !16, i64 48}
!19 = !{!"", !16, i64 0, !8, i64 2, !8, i64 3}
!20 = !{!"", !16, i64 0, !8, i64 2, !13, i64 18, !13, i64 22, !8, i64 26}
!21 = !{!"", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8, !16, i64 10, !16, i64 12, !8, i64 14, !8, i64 15}
!22 = !{!6, !16, i64 890}
!23 = !{!10, !10, i64 0}
!24 = !{!8, !8, i64 0}
!25 = !{!26, !10, i64 64}
!26 = !{!"", !27, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!27 = !{!"", !7, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!28 = !{!16, !16, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!6, !10, i64 856}
!32 = !{!33, !10, i64 8}
!33 = !{!"_EFI_LEGACY_BIOS_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!34 = distinct !{!34, !30}
!35 = !{!26, !10, i64 72}
!36 = !{!26, !10, i64 48}


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