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

; 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._EFI_VLAN_CONFIG_PROTOCOL = type { ptr, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }
%struct.MNP_DEVICE_DATA = type { i32, ptr, ptr, %struct._EFI_VLAN_CONFIG_PROTOCOL, i64, ptr, ptr, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, ptr, %struct.NET_BUF_QUEUE, i64, ptr, i8, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct._EFI_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] }

@gBS = external global ptr, align 8
@mVlanConfigProtocolTemplate = external global %struct._EFI_VLAN_CONFIG_PROTOCOL, align 8
@gEfiSimpleNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [67 x i8], align 1

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

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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

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

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpInitializeDeviceData(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %12, i32 0, i32 0
  store i32 1148218957, ptr %13, align 8, !tbaa !9
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %15, i32 0, i32 2
  store ptr %14, ptr %16, align 8, !tbaa !16
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %18, i32 0, i32 1
  store ptr %17, ptr %19, align 8, !tbaa !17
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %20, i32 0, i32 3
  %22 = call ptr @CopyMem(ptr noundef %21, ptr noundef @mVlanConfigProtocolTemplate, i64 noundef 24)
  %23 = load ptr, ptr @gBS, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %23, i32 0, i32 33
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = call i64 %25(ptr noundef %26, ptr noundef @gEfiSimpleNetworkProtocolGuid, ptr noundef %9, ptr noundef %27, ptr noundef %28, i32 noundef 16)
  store i64 %29, ptr %8, align 8, !tbaa !21
  %30 = load i64, ptr %8, align 8, !tbaa !21
  %31 = icmp slt i64 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %3
  store i64 -9223372036854775805, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %323

33:                                               ; preds = %3
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %34, i32 0, i32 15
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  store ptr %36, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %38, i32 0, i32 6
  store ptr %37, ptr %39, align 8, !tbaa !24
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %40, i32 0, i32 7
  %42 = call ptr @InitializeListHead(ptr noundef %41)
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %43, i32 0, i32 9
  %45 = call ptr @InitializeListHead(ptr noundef %44)
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !25
  %49 = add i32 %48, 4
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !28
  %53 = add i32 %49, %52
  %54 = add i32 %53, 4
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %55, i32 0, i32 22
  store i32 %54, ptr %56, align 8, !tbaa !29
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 4, !tbaa !25
  %60 = sub i32 4, %59
  %61 = and i32 %60, 3
  %62 = add i32 %61, 4
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %63, i32 0, i32 23
  store i32 %62, ptr %64, align 4, !tbaa !30
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %67, i32 0, i32 5
  %69 = call i64 @NetLibGetMacString(ptr noundef %65, ptr noundef %66, ptr noundef %68)
  store i64 %69, ptr %8, align 8, !tbaa !21
  %70 = load i64, ptr %8, align 8, !tbaa !21
  %71 = icmp slt i64 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %33
  br label %234

73:                                               ; preds = %33
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %74, i32 0, i32 12
  call void @NetbufQueInit(ptr noundef %75)
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call i64 @MnpAddFreeNbuf(ptr noundef %76, i64 noundef 512)
  store i64 %77, ptr %8, align 8, !tbaa !21
  %78 = load i64, ptr %8, align 8, !tbaa !21
  %79 = icmp slt i64 %78, 0
  br i1 %79, label %80, label %96

80:                                               ; preds = %73
  br label %81

81:                                               ; preds = %80
  %82 = call zeroext i8 @DebugPrintEnabled()
  %83 = icmp ne i8 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %81
  br label %85

85:                                               ; preds = %84
  %86 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %87 = icmp ne i8 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %85
  %89 = load i64, ptr %8, align 8, !tbaa !21
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.7, i64 noundef %89)
  br label %90

90:                                               ; preds = %88, %85
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92, %81
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  br label %234

96:                                               ; preds = %73
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = call ptr @MnpAllocNbuf(ptr noundef %97)
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %99, i32 0, i32 24
  store ptr %98, ptr %100, align 8, !tbaa !31
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %101, i32 0, i32 24
  %103 = load ptr, ptr %102, align 8, !tbaa !31
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %104, i32 0, i32 22
  %106 = load i32, ptr %105, align 8, !tbaa !29
  %107 = call ptr @NetbufAllocSpace(ptr noundef %103, i32 noundef %106, i8 noundef zeroext 0)
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %108, i32 0, i32 22
  %110 = load i32, ptr %109, align 8, !tbaa !29
  %111 = zext i32 %110 to i64
  %112 = call ptr @AllocatePool(i64 noundef %111)
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %113, i32 0, i32 25
  store ptr %112, ptr %114, align 8, !tbaa !32
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %115, i32 0, i32 25
  %117 = load ptr, ptr %116, align 8, !tbaa !32
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %134

119:                                              ; preds = %96
  br label %120

120:                                              ; preds = %119
  %121 = call zeroext i8 @DebugPrintEnabled()
  %122 = icmp ne i8 %121, 0
  br i1 %122, label %123, label %131

123:                                              ; preds = %120
  br label %124

124:                                              ; preds = %123
  %125 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %126 = icmp ne i8 %125, 0
  br i1 %126, label %127, label %128

127:                                              ; preds = %124
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.8)
  br label %128

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

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130, %120
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132
  store i64 -9223372036854775799, ptr %8, align 8, !tbaa !21
  br label %234

134:                                              ; preds = %96
  %135 = load ptr, ptr @gBS, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %135, i32 0, i32 8
  %137 = load ptr, ptr %136, align 8, !tbaa !33
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %139, i32 0, i32 14
  %141 = call i64 %137(i32 noundef -2147483136, i64 noundef 8, ptr noundef @MnpSystemPoll, ptr noundef %138, ptr noundef %140)
  store i64 %141, ptr %8, align 8, !tbaa !21
  %142 = load i64, ptr %8, align 8, !tbaa !21
  %143 = icmp slt i64 %142, 0
  br i1 %143, label %144, label %159

144:                                              ; preds = %134
  br label %145

145:                                              ; preds = %144
  %146 = call zeroext i8 @DebugPrintEnabled()
  %147 = icmp ne i8 %146, 0
  br i1 %147, label %148, label %156

148:                                              ; preds = %145
  br label %149

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

152:                                              ; preds = %149
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.9)
  br label %153

153:                                              ; preds = %152, %149
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155, %145
  br label %157

157:                                              ; preds = %156
  br label %158

158:                                              ; preds = %157
  br label %234

159:                                              ; preds = %134
  %160 = load ptr, ptr @gBS, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !33
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %164, i32 0, i32 16
  %166 = call i64 %162(i32 noundef -2147483136, i64 noundef 8, ptr noundef @MnpCheckPacketTimeout, ptr noundef %163, ptr noundef %165)
  store i64 %166, ptr %8, align 8, !tbaa !21
  %167 = load i64, ptr %8, align 8, !tbaa !21
  %168 = icmp slt i64 %167, 0
  br i1 %168, label %169, label %184

169:                                              ; preds = %159
  br label %170

170:                                              ; preds = %169
  %171 = call zeroext i8 @DebugPrintEnabled()
  %172 = icmp ne i8 %171, 0
  br i1 %172, label %173, label %181

173:                                              ; preds = %170
  br label %174

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

177:                                              ; preds = %174
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.10)
  br label %178

178:                                              ; preds = %177, %174
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180, %170
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  br label %234

184:                                              ; preds = %159
  %185 = load ptr, ptr @gBS, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %185, i32 0, i32 8
  %187 = load ptr, ptr %186, align 8, !tbaa !33
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %189, i32 0, i32 17
  %191 = call i64 %187(i32 noundef -2147483136, i64 noundef 8, ptr noundef @MnpCheckMediaStatus, ptr noundef %188, ptr noundef %190)
  store i64 %191, ptr %8, align 8, !tbaa !21
  %192 = load i64, ptr %8, align 8, !tbaa !21
  %193 = icmp slt i64 %192, 0
  br i1 %193, label %194, label %209

194:                                              ; preds = %184
  br label %195

195:                                              ; preds = %194
  %196 = call zeroext i8 @DebugPrintEnabled()
  %197 = icmp ne i8 %196, 0
  br i1 %197, label %198, label %206

198:                                              ; preds = %195
  br label %199

199:                                              ; preds = %198
  %200 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %201 = icmp ne i8 %200, 0
  br i1 %201, label %202, label %203

202:                                              ; preds = %199
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.11)
  br label %203

203:                                              ; preds = %202, %199
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205, %195
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  br label %234

209:                                              ; preds = %184
  %210 = load ptr, ptr @gBS, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %210, i32 0, i32 8
  %212 = load ptr, ptr %211, align 8, !tbaa !33
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %213, i32 0, i32 11
  %215 = call i64 %212(i32 noundef -2147483648, i64 noundef 8, ptr noundef null, ptr noundef null, ptr noundef %214)
  store i64 %215, ptr %8, align 8, !tbaa !21
  %216 = load i64, ptr %8, align 8, !tbaa !21
  %217 = icmp slt i64 %216, 0
  br i1 %217, label %218, label %233

218:                                              ; preds = %209
  br label %219

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

222:                                              ; preds = %219
  br label %223

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

226:                                              ; preds = %223
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.12)
  br label %227

227:                                              ; preds = %226, %223
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228
  br label %230

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

231:                                              ; preds = %230
  br label %232

232:                                              ; preds = %231
  br label %233

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

234:                                              ; preds = %233, %208, %183, %158, %133, %95, %72
  %235 = load i64, ptr %8, align 8, !tbaa !21
  %236 = icmp slt i64 %235, 0
  br i1 %236, label %237, label %321

237:                                              ; preds = %234
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %238, i32 0, i32 5
  %240 = load ptr, ptr %239, align 8, !tbaa !34
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %246

242:                                              ; preds = %237
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %243, i32 0, i32 5
  %245 = load ptr, ptr %244, align 8, !tbaa !34
  call void @FreePool(ptr noundef %245)
  br label %246

246:                                              ; preds = %242, %237
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %247, i32 0, i32 16
  %249 = load ptr, ptr %248, align 8, !tbaa !35
  %250 = icmp ne ptr %249, null
  br i1 %250, label %251, label %259

251:                                              ; preds = %246
  %252 = load ptr, ptr @gBS, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %252, i32 0, i32 12
  %254 = load ptr, ptr %253, align 8, !tbaa !36
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %255, i32 0, i32 16
  %257 = load ptr, ptr %256, align 8, !tbaa !35
  %258 = call i64 %254(ptr noundef %257)
  br label %259

259:                                              ; preds = %251, %246
  %260 = load ptr, ptr %5, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %260, i32 0, i32 17
  %262 = load ptr, ptr %261, align 8, !tbaa !37
  %263 = icmp ne ptr %262, null
  br i1 %263, label %264, label %272

264:                                              ; preds = %259
  %265 = load ptr, ptr @gBS, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %265, i32 0, i32 12
  %267 = load ptr, ptr %266, align 8, !tbaa !36
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %268, i32 0, i32 17
  %270 = load ptr, ptr %269, align 8, !tbaa !37
  %271 = call i64 %267(ptr noundef %270)
  br label %272

272:                                              ; preds = %264, %259
  %273 = load ptr, ptr %5, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %273, i32 0, i32 14
  %275 = load ptr, ptr %274, align 8, !tbaa !38
  %276 = icmp ne ptr %275, null
  br i1 %276, label %277, label %285

277:                                              ; preds = %272
  %278 = load ptr, ptr @gBS, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %278, i32 0, i32 12
  %280 = load ptr, ptr %279, align 8, !tbaa !36
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %281, i32 0, i32 14
  %283 = load ptr, ptr %282, align 8, !tbaa !38
  %284 = call i64 %280(ptr noundef %283)
  br label %285

285:                                              ; preds = %277, %272
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %286, i32 0, i32 25
  %288 = load ptr, ptr %287, align 8, !tbaa !32
  %289 = icmp ne ptr %288, null
  br i1 %289, label %290, label %294

290:                                              ; preds = %285
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %291, i32 0, i32 25
  %293 = load ptr, ptr %292, align 8, !tbaa !32
  call void @FreePool(ptr noundef %293)
  br label %294

294:                                              ; preds = %290, %285
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %295, i32 0, i32 24
  %297 = load ptr, ptr %296, align 8, !tbaa !31
  %298 = icmp ne ptr %297, null
  br i1 %298, label %299, label %304

299:                                              ; preds = %294
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %301, i32 0, i32 24
  %303 = load ptr, ptr %302, align 8, !tbaa !31
  call void @MnpFreeNbuf(ptr noundef %300, ptr noundef %303)
  br label %304

304:                                              ; preds = %299, %294
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %305, i32 0, i32 12
  %307 = getelementptr inbounds %struct.NET_BUF_QUEUE, ptr %306, i32 0, i32 5
  %308 = load i32, ptr %307, align 4, !tbaa !39
  %309 = icmp ne i32 %308, 0
  br i1 %309, label %310, label %313

310:                                              ; preds = %304
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %311, i32 0, i32 12
  call void @NetbufQueFlush(ptr noundef %312)
  br label %313

313:                                              ; preds = %310, %304
  %314 = load ptr, ptr @gBS, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %314, i32 0, i32 34
  %316 = load ptr, ptr %315, align 8, !tbaa !40
  %317 = load ptr, ptr %7, align 8, !tbaa !5
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = load ptr, ptr %7, align 8, !tbaa !5
  %320 = call i64 %316(ptr noundef %317, ptr noundef @gEfiSimpleNetworkProtocolGuid, ptr noundef %318, ptr noundef %319)
  br label %321

321:                                              ; preds = %313, %234
  %322 = load i64, ptr %8, align 8, !tbaa !21
  store i64 %322, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %323

323:                                              ; preds = %321, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %324 = load i64, ptr %4, align 8
  ret i64 %324
}

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

declare ptr @InitializeListHead(ptr noundef) #2

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

declare void @NetbufQueInit(ptr noundef) #2

declare ptr @AllocatePool(i64 noundef) #2

declare void @MnpSystemPoll(ptr noundef, ptr noundef) #2

declare void @MnpCheckPacketTimeout(ptr noundef, ptr noundef) #2

declare void @MnpCheckMediaStatus(ptr noundef, ptr noundef) #2

declare void @FreePool(ptr noundef) #2

declare void @NetbufQueFlush(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !13, i64 88, !14, i64 96, !11, i64 112, !6, i64 120, !15, i64 128, !13, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !6, i64 248, !6, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 32, !11, i64 48, !11, i64 52}
!16 = !{!10, !6, i64 16}
!17 = !{!10, !6, i64 8}
!18 = !{!19, !6, i64 280}
!19 = !{!"", !20, 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}
!20 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!21 = !{!13, !13, i64 0}
!22 = !{!23, !6, i64 120}
!23 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !13, 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}
!24 = !{!10, !6, i64 64}
!25 = !{!26, !11, i64 8}
!26 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !27, i64 552, !27, i64 584, !27, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!27 = !{!"", !7, i64 0}
!28 = !{!26, !11, i64 12}
!29 = !{!10, !11, i64 240}
!30 = !{!10, !11, i64 244}
!31 = !{!10, !6, i64 248}
!32 = !{!10, !6, i64 256}
!33 = !{!19, !6, i64 80}
!34 = !{!10, !6, i64 56}
!35 = !{!10, !6, i64 208}
!36 = !{!19, !6, i64 112}
!37 = !{!10, !6, i64 216}
!38 = !{!10, !6, i64 192}
!39 = !{!10, !11, i64 180}
!40 = !{!19, !6, i64 288}


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

@gBS = external local_unnamed_addr global ptr, align 8
@mVlanConfigProtocolTemplate = external global %struct._EFI_VLAN_CONFIG_PROTOCOL, align 8
@gEfiSimpleNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [67 x i8], align 1

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

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

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

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpInitializeDeviceData(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store i32 1148218957, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %1, ptr %5, align 8, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %2, ptr %6, align 8, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = tail call ptr @CopyMem(ptr noundef nonnull %7, ptr noundef nonnull @mVlanConfigProtocolTemplate, i64 noundef 24) #3
  %9 = load ptr, ptr @gBS, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %9, i64 280
  %11 = load ptr, ptr %10, align 8, !tbaa !18
  %12 = call i64 %11(ptr noundef %2, ptr noundef nonnull @gEfiSimpleNetworkProtocolGuid, ptr noundef nonnull %4, ptr noundef %1, ptr noundef %2, i32 noundef 16) #3
  %13 = icmp slt i64 %12, 0
  br i1 %13, label %154, label %14

14:                                               ; preds = %3
  %15 = load ptr, ptr %4, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %15, i64 120
  %17 = load ptr, ptr %16, align 8, !tbaa !21
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %15, ptr %18, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = call ptr @InitializeListHead(ptr noundef nonnull %19) #3
  %21 = getelementptr inbounds i8, ptr %0, i64 96
  %22 = call ptr @InitializeListHead(ptr noundef nonnull %21) #3
  %23 = getelementptr inbounds i8, ptr %17, i64 8
  %24 = load i32, ptr %23, align 4, !tbaa !24
  %25 = getelementptr inbounds i8, ptr %17, i64 12
  %26 = load i32, ptr %25, align 4, !tbaa !27
  %27 = add i32 %24, 8
  %28 = add i32 %27, %26
  %29 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 %28, ptr %29, align 8, !tbaa !28
  %30 = sub i32 0, %24
  %31 = and i32 %30, 3
  %32 = or disjoint i32 %31, 4
  %33 = getelementptr inbounds i8, ptr %0, i64 244
  store i32 %32, ptr %33, align 4, !tbaa !29
  %34 = getelementptr inbounds i8, ptr %0, i64 56
  %35 = call i64 @NetLibGetMacString(ptr noundef %2, ptr noundef %1, ptr noundef nonnull %34) #3
  %36 = icmp slt i64 %35, 0
  br i1 %36, label %109, label %37

37:                                               ; preds = %14
  %38 = getelementptr inbounds i8, ptr %0, i64 128
  call void @NetbufQueInit(ptr noundef nonnull %38) #3
  %39 = call i64 @MnpAddFreeNbuf(ptr noundef nonnull %0, i64 noundef 512)
  %40 = icmp slt i64 %39, 0
  br i1 %40, label %41, label %46

41:                                               ; preds = %37
  %42 = call zeroext i8 @DebugPrintEnabled() #3
  %.not86 = icmp eq i8 %42, 0
  br i1 %.not86, label %109, label %43

43:                                               ; preds = %41
  %44 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not87 = icmp eq i8 %44, 0
  br i1 %.not87, label %109, label %45

45:                                               ; preds = %43
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.7, i64 noundef %39) #3
  br label %109

46:                                               ; preds = %37
  %47 = call ptr @MnpAllocNbuf(ptr noundef nonnull %0)
  %48 = getelementptr inbounds i8, ptr %0, i64 248
  store ptr %47, ptr %48, align 8, !tbaa !30
  %49 = load i32, ptr %29, align 8, !tbaa !28
  %50 = call ptr @NetbufAllocSpace(ptr noundef %47, i32 noundef %49, i8 noundef zeroext 0) #3
  %51 = load i32, ptr %29, align 8, !tbaa !28
  %52 = zext i32 %51 to i64
  %53 = call ptr @AllocatePool(i64 noundef %52) #3
  %54 = getelementptr inbounds i8, ptr %0, i64 256
  store ptr %53, ptr %54, align 8, !tbaa !31
  %55 = icmp eq ptr %53, null
  br i1 %55, label %56, label %61

56:                                               ; preds = %46
  %57 = call zeroext i8 @DebugPrintEnabled() #3
  %.not84 = icmp eq i8 %57, 0
  br i1 %.not84, label %109, label %58

58:                                               ; preds = %56
  %59 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not85 = icmp eq i8 %59, 0
  br i1 %.not85, label %109, label %60

60:                                               ; preds = %58
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.8) #3
  br label %109

61:                                               ; preds = %46
  %62 = load ptr, ptr @gBS, align 8, !tbaa !17
  %63 = getelementptr inbounds i8, ptr %62, i64 80
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = getelementptr inbounds i8, ptr %0, i64 192
  %66 = call i64 %64(i32 noundef -2147483136, i64 noundef 8, ptr noundef nonnull @MnpSystemPoll, ptr noundef nonnull %0, ptr noundef nonnull %65) #3
  %67 = icmp slt i64 %66, 0
  br i1 %67, label %68, label %73

68:                                               ; preds = %61
  %69 = call zeroext i8 @DebugPrintEnabled() #3
  %.not82 = icmp eq i8 %69, 0
  br i1 %.not82, label %109, label %70

70:                                               ; preds = %68
  %71 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not83 = icmp eq i8 %71, 0
  br i1 %.not83, label %109, label %72

72:                                               ; preds = %70
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.9) #3
  br label %109

73:                                               ; preds = %61
  %74 = load ptr, ptr @gBS, align 8, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %74, i64 80
  %76 = load ptr, ptr %75, align 8, !tbaa !32
  %77 = getelementptr inbounds i8, ptr %0, i64 208
  %78 = call i64 %76(i32 noundef -2147483136, i64 noundef 8, ptr noundef nonnull @MnpCheckPacketTimeout, ptr noundef nonnull %0, ptr noundef nonnull %77) #3
  %79 = icmp slt i64 %78, 0
  br i1 %79, label %80, label %85

80:                                               ; preds = %73
  %81 = call zeroext i8 @DebugPrintEnabled() #3
  %.not80 = icmp eq i8 %81, 0
  br i1 %.not80, label %109, label %82

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

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

85:                                               ; preds = %73
  %86 = load ptr, ptr @gBS, align 8, !tbaa !17
  %87 = getelementptr inbounds i8, ptr %86, i64 80
  %88 = load ptr, ptr %87, align 8, !tbaa !32
  %89 = getelementptr inbounds i8, ptr %0, i64 216
  %90 = call i64 %88(i32 noundef -2147483136, i64 noundef 8, ptr noundef nonnull @MnpCheckMediaStatus, ptr noundef nonnull %0, ptr noundef nonnull %89) #3
  %91 = icmp slt i64 %90, 0
  br i1 %91, label %92, label %97

92:                                               ; preds = %85
  %93 = call zeroext i8 @DebugPrintEnabled() #3
  %.not78 = icmp eq i8 %93, 0
  br i1 %.not78, label %109, label %94

94:                                               ; preds = %92
  %95 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not79 = icmp eq i8 %95, 0
  br i1 %.not79, label %109, label %96

96:                                               ; preds = %94
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.11) #3
  br label %109

97:                                               ; preds = %85
  %98 = load ptr, ptr @gBS, align 8, !tbaa !17
  %99 = getelementptr inbounds i8, ptr %98, i64 80
  %100 = load ptr, ptr %99, align 8, !tbaa !32
  %101 = getelementptr inbounds i8, ptr %0, i64 120
  %102 = call i64 %100(i32 noundef -2147483648, i64 noundef 8, ptr noundef null, ptr noundef null, ptr noundef nonnull %101) #3
  %103 = icmp slt i64 %102, 0
  br i1 %103, label %104, label %154

104:                                              ; preds = %97
  %105 = call zeroext i8 @DebugPrintEnabled() #3
  %.not = icmp eq i8 %105, 0
  br i1 %.not, label %109, label %106

106:                                              ; preds = %104
  %107 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not77 = icmp eq i8 %107, 0
  br i1 %.not77, label %109, label %108

108:                                              ; preds = %106
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.12) #3
  br label %109

109:                                              ; preds = %14, %45, %43, %41, %72, %70, %68, %84, %82, %80, %96, %94, %92, %108, %106, %104, %58, %60, %56
  %.064.ph = phi i64 [ -9223372036854775799, %56 ], [ -9223372036854775799, %60 ], [ -9223372036854775799, %58 ], [ %102, %104 ], [ %102, %106 ], [ %102, %108 ], [ %90, %92 ], [ %90, %94 ], [ %90, %96 ], [ %78, %80 ], [ %78, %82 ], [ %78, %84 ], [ %66, %68 ], [ %66, %70 ], [ %66, %72 ], [ %39, %41 ], [ %39, %43 ], [ %39, %45 ], [ %35, %14 ]
  %110 = load ptr, ptr %34, align 8, !tbaa !33
  %.not88 = icmp eq ptr %110, null
  br i1 %.not88, label %112, label %111

111:                                              ; preds = %109
  call void @FreePool(ptr noundef nonnull %110) #3
  br label %112

112:                                              ; preds = %111, %109
  %113 = getelementptr inbounds i8, ptr %0, i64 208
  %114 = load ptr, ptr %113, align 8, !tbaa !34
  %.not89 = icmp eq ptr %114, null
  br i1 %.not89, label %120, label %115

115:                                              ; preds = %112
  %116 = load ptr, ptr @gBS, align 8, !tbaa !17
  %117 = getelementptr inbounds i8, ptr %116, i64 112
  %118 = load ptr, ptr %117, align 8, !tbaa !35
  %119 = call i64 %118(ptr noundef nonnull %114) #3
  br label %120

120:                                              ; preds = %115, %112
  %121 = getelementptr inbounds i8, ptr %0, i64 216
  %122 = load ptr, ptr %121, align 8, !tbaa !36
  %.not90 = icmp eq ptr %122, null
  br i1 %.not90, label %128, label %123

123:                                              ; preds = %120
  %124 = load ptr, ptr @gBS, align 8, !tbaa !17
  %125 = getelementptr inbounds i8, ptr %124, i64 112
  %126 = load ptr, ptr %125, align 8, !tbaa !35
  %127 = call i64 %126(ptr noundef nonnull %122) #3
  br label %128

128:                                              ; preds = %123, %120
  %129 = getelementptr inbounds i8, ptr %0, i64 192
  %130 = load ptr, ptr %129, align 8, !tbaa !37
  %.not91 = icmp eq ptr %130, null
  br i1 %.not91, label %136, label %131

131:                                              ; preds = %128
  %132 = load ptr, ptr @gBS, align 8, !tbaa !17
  %133 = getelementptr inbounds i8, ptr %132, i64 112
  %134 = load ptr, ptr %133, align 8, !tbaa !35
  %135 = call i64 %134(ptr noundef nonnull %130) #3
  br label %136

136:                                              ; preds = %131, %128
  %137 = getelementptr inbounds i8, ptr %0, i64 256
  %138 = load ptr, ptr %137, align 8, !tbaa !31
  %.not92 = icmp eq ptr %138, null
  br i1 %.not92, label %140, label %139

139:                                              ; preds = %136
  call void @FreePool(ptr noundef nonnull %138) #3
  br label %140

140:                                              ; preds = %139, %136
  %141 = getelementptr inbounds i8, ptr %0, i64 248
  %142 = load ptr, ptr %141, align 8, !tbaa !30
  %.not93 = icmp eq ptr %142, null
  br i1 %.not93, label %144, label %143

143:                                              ; preds = %140
  call void @MnpFreeNbuf(ptr noundef nonnull %0, ptr noundef nonnull %142)
  br label %144

144:                                              ; preds = %143, %140
  %145 = getelementptr inbounds i8, ptr %0, i64 180
  %146 = load i32, ptr %145, align 4, !tbaa !38
  %.not94 = icmp eq i32 %146, 0
  br i1 %.not94, label %149, label %147

147:                                              ; preds = %144
  %148 = getelementptr inbounds i8, ptr %0, i64 128
  call void @NetbufQueFlush(ptr noundef nonnull %148) #3
  br label %149

149:                                              ; preds = %147, %144
  %150 = load ptr, ptr @gBS, align 8, !tbaa !17
  %151 = getelementptr inbounds i8, ptr %150, i64 288
  %152 = load ptr, ptr %151, align 8, !tbaa !39
  %153 = call i64 %152(ptr noundef %2, ptr noundef nonnull @gEfiSimpleNetworkProtocolGuid, ptr noundef %1, ptr noundef %2) #3
  br label %154

154:                                              ; preds = %97, %149, %3
  %.0 = phi i64 [ -9223372036854775805, %3 ], [ %.064.ph, %149 ], [ %102, %97 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret i64 %.0
}

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

declare ptr @InitializeListHead(ptr noundef) local_unnamed_addr #2

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

declare void @NetbufQueInit(ptr noundef) local_unnamed_addr #2

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #2

declare void @MnpSystemPoll(ptr noundef, ptr noundef) #2

declare void @MnpCheckPacketTimeout(ptr noundef, ptr noundef) #2

declare void @MnpCheckMediaStatus(ptr noundef, ptr noundef) #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare void @NetbufQueFlush(ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 48, !10, i64 56, !10, i64 64, !13, i64 72, !12, i64 88, !13, i64 96, !7, i64 112, !10, i64 120, !14, i64 128, !12, i64 184, !10, i64 192, !8, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !10, i64 248, !10, i64 256}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!14 = !{!"", !7, i64 0, !12, i64 8, !13, i64 16, !13, i64 32, !7, i64 48, !7, i64 52}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !10, i64 8}
!17 = !{!10, !10, i64 0}
!18 = !{!19, !10, i64 280}
!19 = !{!"", !20, 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}
!20 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!21 = !{!22, !10, i64 120}
!22 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !12, 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}
!23 = !{!6, !10, i64 64}
!24 = !{!25, !7, i64 8}
!25 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !26, i64 552, !26, i64 584, !26, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!26 = !{!"", !8, i64 0}
!27 = !{!25, !7, i64 12}
!28 = !{!6, !7, i64 240}
!29 = !{!6, !7, i64 244}
!30 = !{!6, !10, i64 248}
!31 = !{!6, !10, i64 256}
!32 = !{!19, !10, i64 80}
!33 = !{!6, !10, i64 56}
!34 = !{!6, !10, i64 208}
!35 = !{!19, !10, i64 112}
!36 = !{!6, !10, i64 216}
!37 = !{!6, !10, i64 192}
!38 = !{!6, !7, i64 180}
!39 = !{!19, !10, i64 288}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass