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

; 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.NET_ARP_ADDRESS = type { i16, i8, ptr, %union.NET_ARP_ADDRESS_UNION }
%union.NET_ARP_ADDRESS_UNION = type { [32 x i8] }
%struct.ARP_INSTANCE_DATA = type { i32, ptr, ptr, %struct._EFI_ARP_PROTOCOL, %struct._LIST_ENTRY, %struct.EFI_ARP_CONFIG_DATA, i8, i8 }
%struct._EFI_ARP_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_ARP_CONFIG_DATA = type { i16, i8, ptr, i32, i32, i32 }
%struct._ARP_SERVICE_DATA = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, %struct.EFI_SIMPLE_NETWORK_MODE, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { 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_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct.ARP_CACHE_ENTRY = type { %struct._LIST_ENTRY, i32, i32, i32, i32, [2 x %struct.NET_ARP_ADDRESS], %struct._LIST_ENTRY }
%struct.USER_REQUEST_CONTEXT = type { %struct._LIST_ENTRY, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

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

declare ptr @ArpFindNextCacheEntryInTable(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare ptr @ArpAllocCacheEntry(ptr noundef) #1

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

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

declare void @ArpFillAddressInCacheEntry(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ArpRequest(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.NET_ARP_ADDRESS, align 8
  %16 = alloca %struct.NET_ARP_ADDRESS, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %25, label %22

22:                                               ; preds = %4
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22, %4
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %274

26:                                               ; preds = %22
  %27 = call zeroext i8 @DebugAssertEnabled()
  %28 = zext i8 %27 to i32
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %26
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = ptrtoint ptr %31 to i64
  %33 = sub i64 %32, ptrtoint (ptr getelementptr inbounds (%struct.ARP_INSTANCE_DATA, ptr null, i32 0, i32 3) to i64)
  %34 = inttoptr i64 %33 to ptr
  %35 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !9
  %37 = icmp ne i32 %36, 1230000705
  br i1 %37, label %38, label %40

38:                                               ; preds = %30
  call void @DebugAssert(ptr noundef @.str, i64 noundef 506, ptr noundef @.str.1)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  br label %45

40:                                               ; preds = %30, %26
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = ptrtoint ptr %41 to i64
  %43 = sub i64 %42, ptrtoint (ptr getelementptr inbounds (%struct.ARP_INSTANCE_DATA, ptr null, i32 0, i32 3) to i64)
  %44 = inttoptr i64 %43 to ptr
  br label %45

45:                                               ; preds = %40, %38
  %46 = phi ptr [ %39, %38 ], [ %44, %40 ]
  store ptr %46, ptr %11, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %47, i32 0, i32 6
  %49 = load i8, ptr %48, align 8, !tbaa !16
  %50 = icmp ne i8 %49, 0
  br i1 %50, label %52, label %51

51:                                               ; preds = %45
  store i64 -9223372036854775789, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %274

52:                                               ; preds = %45
  store i64 0, ptr %10, align 8, !tbaa !17
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  store ptr %55, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %56, i32 0, i32 8
  store ptr %57, ptr %13, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = icmp eq ptr %58, null
  br i1 %59, label %71, label %60

60:                                               ; preds = %52
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %61, i32 0, i32 5
  %63 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %62, i32 0, i32 0
  %64 = load i16, ptr %63, align 8, !tbaa !20
  %65 = zext i16 %64 to i32
  %66 = icmp eq i32 %65, 2048
  br i1 %66, label %67, label %80

67:                                               ; preds = %60
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load i32, ptr %68, align 4, !tbaa !21
  %70 = icmp eq i32 %69, -1
  br i1 %70, label %71, label %80

71:                                               ; preds = %67, %52
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %73, i32 0, i32 12
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !22
  %78 = zext i32 %77 to i64
  %79 = call ptr @CopyMem(ptr noundef %72, ptr noundef %74, i64 noundef %78)
  br label %259

80:                                               ; preds = %67, %60
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %81, i32 0, i32 5
  %83 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %82, i32 0, i32 0
  %84 = load i16, ptr %83, align 8, !tbaa !20
  %85 = zext i16 %84 to i32
  %86 = icmp eq i32 %85, 2048
  br i1 %86, label %87, label %105

87:                                               ; preds = %80
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !21
  %90 = call i32 @SwapBytes32(i32 noundef %89)
  %91 = and i32 %90, -268435456
  %92 = icmp eq i32 %91, -536870912
  br i1 %92, label %93, label %105

93:                                               ; preds = %87
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  %97 = getelementptr inbounds %struct._EFI_MANAGED_NETWORK_PROTOCOL, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !30
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %99, i32 0, i32 5
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = call i64 %98(ptr noundef %101, i8 noundef zeroext 0, ptr noundef %102, ptr noundef %103)
  store i64 %104, ptr %10, align 8, !tbaa !17
  br label %259

105:                                              ; preds = %87, %80
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %106, i32 0, i32 14
  %108 = load i8, ptr %107, align 4, !tbaa !32
  %109 = zext i8 %108 to i16
  %110 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %15, i32 0, i32 0
  store i16 %109, ptr %110, align 8, !tbaa !33
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !22
  %114 = trunc i32 %113 to i8
  %115 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %15, i32 0, i32 1
  store i8 %114, ptr %115, align 2, !tbaa !35
  %116 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %15, i32 0, i32 2
  store ptr null, ptr %116, align 8, !tbaa !36
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %117, i32 0, i32 5
  %119 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %118, i32 0, i32 0
  %120 = load i16, ptr %119, align 8, !tbaa !20
  %121 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %16, i32 0, i32 0
  store i16 %120, ptr %121, align 8, !tbaa !33
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %122, i32 0, i32 5
  %124 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %123, i32 0, i32 1
  %125 = load i8, ptr %124, align 2, !tbaa !37
  %126 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %16, i32 0, i32 1
  store i8 %125, ptr %126, align 2, !tbaa !35
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %16, i32 0, i32 2
  store ptr %127, ptr %128, align 8, !tbaa !36
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %130, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !22
  %133 = zext i32 %132 to i64
  %134 = call ptr @ZeroMem(ptr noundef %129, i64 noundef %133)
  %135 = load ptr, ptr @gBS, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !38
  %138 = call i64 %137(i64 noundef 8)
  store i64 %138, ptr %18, align 8, !tbaa !17
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = call ptr @ArpFindDeniedCacheEntry(ptr noundef %139, ptr noundef %16, ptr noundef null)
  store ptr %140, ptr %14, align 8, !tbaa !5
  %141 = load ptr, ptr %14, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %144

143:                                              ; preds = %105
  store i64 -9223372036854775793, ptr %10, align 8, !tbaa !17
  br label %254

144:                                              ; preds = %105
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %145, i32 0, i32 13
  %147 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef %146, ptr noundef null, i32 noundef 1, ptr noundef %16, ptr noundef null)
  store ptr %147, ptr %14, align 8, !tbaa !5
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %164

150:                                              ; preds = %144
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %152, i32 0, i32 5
  %154 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %153, i64 0, i64 0
  %155 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !36
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %157, i32 0, i32 5
  %159 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %158, i64 0, i64 0
  %160 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %159, i32 0, i32 1
  %161 = load i8, ptr %160, align 2, !tbaa !35
  %162 = zext i8 %161 to i64
  %163 = call ptr @CopyMem(ptr noundef %151, ptr noundef %156, i64 noundef %162)
  br label %254

164:                                              ; preds = %144
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %167, label %168

167:                                              ; preds = %164
  store i64 -9223372036854775802, ptr %10, align 8, !tbaa !17
  br label %254

168:                                              ; preds = %164
  %169 = call ptr @AllocatePool(i64 noundef 40)
  store ptr %169, ptr %17, align 8, !tbaa !5
  %170 = load ptr, ptr %17, align 8, !tbaa !5
  %171 = icmp eq ptr %170, null
  br i1 %171, label %172, label %187

172:                                              ; preds = %168
  br label %173

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

176:                                              ; preds = %173
  br label %177

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

180:                                              ; preds = %177
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.3)
  br label %181

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

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183, %173
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  store i64 -9223372036854775799, ptr %10, align 8, !tbaa !17
  br label %254

187:                                              ; preds = %168
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %189, i32 0, i32 1
  store ptr %188, ptr %190, align 8, !tbaa !41
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = load ptr, ptr %17, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %192, i32 0, i32 2
  store ptr %191, ptr %193, align 8, !tbaa !43
  %194 = load ptr, ptr %9, align 8, !tbaa !5
  %195 = load ptr, ptr %17, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %195, i32 0, i32 3
  store ptr %194, ptr %196, align 8, !tbaa !44
  %197 = load ptr, ptr %17, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %197, i32 0, i32 0
  %199 = call ptr @InitializeListHead(ptr noundef %198)
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %200, i32 0, i32 11
  %202 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef %201, ptr noundef null, i32 noundef 1, ptr noundef %16, ptr noundef null)
  store ptr %202, ptr %14, align 8, !tbaa !5
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  %204 = icmp ne ptr %203, null
  br i1 %204, label %205, label %218

205:                                              ; preds = %187
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %206, i32 0, i32 5
  %208 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %207, i32 0, i32 5
  %209 = load i32, ptr %208, align 8, !tbaa !45
  %210 = load ptr, ptr %14, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %210, i32 0, i32 4
  store i32 %209, ptr %211, align 4, !tbaa !46
  %212 = load ptr, ptr %11, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %212, i32 0, i32 5
  %214 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %213, i32 0, i32 4
  %215 = load i32, ptr %214, align 4, !tbaa !48
  %216 = load ptr, ptr %14, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %216, i32 0, i32 1
  store i32 %215, ptr %217, align 8, !tbaa !49
  br label %246

218:                                              ; preds = %187
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = call ptr @ArpAllocCacheEntry(ptr noundef %219)
  store ptr %220, ptr %14, align 8, !tbaa !5
  %221 = load ptr, ptr %14, align 8, !tbaa !5
  %222 = icmp eq ptr %221, null
  br i1 %222, label %223, label %239

223:                                              ; preds = %218
  br label %224

224:                                              ; preds = %223
  %225 = call zeroext i8 @DebugPrintEnabled()
  %226 = icmp ne i8 %225, 0
  br i1 %226, label %227, label %235

227:                                              ; preds = %224
  br label %228

228:                                              ; preds = %227
  %229 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %230 = icmp ne i8 %229, 0
  br i1 %230, label %231, label %232

231:                                              ; preds = %228
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.4)
  br label %232

232:                                              ; preds = %231, %228
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234, %224
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %17, align 8, !tbaa !5
  call void @FreePool(ptr noundef %238)
  store i64 -9223372036854775799, ptr %10, align 8, !tbaa !17
  br label %254

239:                                              ; preds = %218
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ArpFillAddressInCacheEntry(ptr noundef %240, ptr noundef %15, ptr noundef %16)
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %241, i32 0, i32 11
  %243 = load ptr, ptr %14, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %243, i32 0, i32 0
  %245 = call ptr @InsertTailList(ptr noundef %242, ptr noundef %244)
  br label %246

246:                                              ; preds = %239, %205
  %247 = load ptr, ptr %14, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %247, i32 0, i32 6
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %249, i32 0, i32 0
  %251 = call ptr @InsertHeadList(ptr noundef %248, ptr noundef %250)
  %252 = load ptr, ptr %11, align 8, !tbaa !5
  %253 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ArpSendFrame(ptr noundef %252, ptr noundef %253, i16 noundef zeroext 1)
  store i64 -9223372036854775802, ptr %10, align 8, !tbaa !17
  br label %254

254:                                              ; preds = %246, %237, %186, %167, %150, %143
  %255 = load ptr, ptr @gBS, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %255, i32 0, i32 2
  %257 = load ptr, ptr %256, align 8, !tbaa !50
  %258 = load i64, ptr %18, align 8, !tbaa !17
  call void %257(i64 noundef %258)
  br label %259

259:                                              ; preds = %254, %93, %71
  %260 = load ptr, ptr %8, align 8, !tbaa !5
  %261 = icmp ne ptr %260, null
  br i1 %261, label %262, label %272

262:                                              ; preds = %259
  %263 = load i64, ptr %10, align 8, !tbaa !17
  %264 = icmp eq i64 %263, 0
  br i1 %264, label %265, label %272

265:                                              ; preds = %262
  %266 = load ptr, ptr @gBS, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %266, i32 0, i32 11
  %268 = load ptr, ptr %267, align 8, !tbaa !51
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = call i64 %268(ptr noundef %269)
  %271 = call i64 @DispatchDpc()
  br label %272

272:                                              ; preds = %265, %262, %259
  %273 = load i64, ptr %10, align 8, !tbaa !17
  store i64 %273, ptr %5, align 8
  store i32 1, ptr %19, align 4
  br label %274

274:                                              ; preds = %272, %51, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %275 = load i64, ptr %5, align 8
  ret i64 %275
}

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

declare i32 @SwapBytes32(i32 noundef) #1

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

declare ptr @AllocatePool(i64 noundef) #1

declare ptr @InitializeListHead(ptr noundef) #1

declare void @FreePool(ptr noundef) #1

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

declare void @ArpSendFrame(ptr noundef, ptr noundef, i16 noundef zeroext) #1

declare i64 @DispatchDpc() #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 80, !14, i64 96, !7, i64 128, !7, i64 129}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_ARP_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"", !15, i64 0, !7, i64 2, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!15 = !{!"short", !7, i64 0}
!16 = !{!10, !7, i64 128}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = !{!10, !6, i64 8}
!20 = !{!10, !15, i64 96}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !11, i64 4}
!23 = !{!"", !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, !24, i64 552, !24, i64 584, !24, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!24 = !{!"", !7, i64 0}
!25 = !{!26, !6, i64 48}
!26 = !{!"_ARP_SERVICE_DATA", !11, i64 0, !27, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !28, i64 56, !29, i64 80, !23, i64 104, !18, i64 760, !13, i64 768, !13, i64 784, !13, i64 800, !13, i64 816, !6, i64 832}
!27 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!28 = !{!"", !11, i64 0, !11, i64 4, !15, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!29 = !{!"", !6, i64 0, !18, i64 8, !7, i64 16}
!30 = !{!31, !6, i64 16}
!31 = !{!"_EFI_MANAGED_NETWORK_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}
!32 = !{!23, !7, i64 648}
!33 = !{!34, !15, i64 0}
!34 = !{!"", !15, i64 0, !7, i64 2, !6, i64 8, !7, i64 16}
!35 = !{!34, !7, i64 2}
!36 = !{!34, !6, i64 8}
!37 = !{!10, !7, i64 98}
!38 = !{!39, !6, i64 24}
!39 = !{!"", !40, 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}
!40 = !{!"", !18, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!41 = !{!42, !6, i64 16}
!42 = !{!"", !13, i64 0, !6, i64 16, !6, i64 24, !6, i64 32}
!43 = !{!42, !6, i64 24}
!44 = !{!42, !6, i64 32}
!45 = !{!10, !11, i64 120}
!46 = !{!47, !11, i64 28}
!47 = !{!"", !13, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !13, i64 128}
!48 = !{!10, !11, i64 116}
!49 = !{!47, !11, i64 16}
!50 = !{!39, !6, i64 32}
!51 = !{!39, !6, i64 104}


; 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.NET_ARP_ADDRESS = type { i16, i8, ptr, %union.NET_ARP_ADDRESS_UNION }
%union.NET_ARP_ADDRESS_UNION = type { [32 x i8] }

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [52 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

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

declare ptr @ArpFindNextCacheEntryInTable(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ArpAllocCacheEntry(ptr noundef) local_unnamed_addr #1

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

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

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

declare void @ArpFillAddressInCacheEntry(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @ArpRequest(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.NET_ARP_ADDRESS, align 8
  %6 = alloca %struct.NET_ARP_ADDRESS, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #3
  %7 = icmp eq ptr %0, null
  %8 = icmp eq ptr %3, null
  %or.cond = or i1 %7, %8
  br i1 %or.cond, label %126, label %9

9:                                                ; preds = %4
  %10 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %10, 0
  %.pre88 = ptrtoint ptr %0 to i64
  %.pre89 = add i64 %.pre88, -24
  %.pre91 = inttoptr i64 %.pre89 to ptr
  br i1 %.not, label %._crit_edge87, label %11

11:                                               ; preds = %9
  %12 = load i32, ptr %.pre91, align 8, !tbaa !5
  %.not78 = icmp eq i32 %12, 1230000705
  br i1 %.not78, label %._crit_edge87, label %13

13:                                               ; preds = %11
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 506, ptr noundef nonnull @.str.1) #3
  br label %._crit_edge87

._crit_edge87:                                    ; preds = %9, %11, %13
  %14 = phi ptr [ %0, %13 ], [ %.pre91, %11 ], [ %.pre91, %9 ]
  %15 = getelementptr inbounds i8, ptr %14, i64 128
  %16 = load i8, ptr %15, align 8, !tbaa !15
  %.not79 = icmp eq i8 %16, 0
  br i1 %.not79, label %126, label %17

17:                                               ; preds = %._crit_edge87
  %18 = getelementptr inbounds i8, ptr %14, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = icmp eq ptr %1, null
  br i1 %20, label %28, label %21

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %14, i64 96
  %23 = load i16, ptr %22, align 8, !tbaa !17
  %24 = icmp eq i16 %23, 2048
  br i1 %24, label %25, label %44

25:                                               ; preds = %21
  %26 = load i32, ptr %1, align 4, !tbaa !18
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %28, label %34

28:                                               ; preds = %25, %17
  %29 = getelementptr inbounds i8, ptr %19, i64 688
  %30 = getelementptr inbounds i8, ptr %19, i64 108
  %31 = load i32, ptr %30, align 4, !tbaa !19
  %32 = zext i32 %31 to i64
  %33 = tail call ptr @CopyMem(ptr noundef nonnull %3, ptr noundef nonnull %29, i64 noundef %32) #3
  br label %117

34:                                               ; preds = %25
  %35 = tail call i32 @SwapBytes32(i32 noundef %26) #3
  %36 = and i32 %35, -268435456
  %37 = icmp eq i32 %36, -536870912
  br i1 %37, label %38, label %._crit_edge

._crit_edge:                                      ; preds = %34
  %.pre = load i16, ptr %22, align 8, !tbaa !17
  br label %44

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %19, i64 48
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !28
  %43 = tail call i64 %42(ptr noundef %40, i8 noundef zeroext 0, ptr noundef nonnull %1, ptr noundef nonnull %3) #3
  br label %117

44:                                               ; preds = %._crit_edge, %21
  %45 = phi i16 [ %.pre, %._crit_edge ], [ %23, %21 ]
  %46 = getelementptr inbounds i8, ptr %19, i64 752
  %47 = load i8, ptr %46, align 4, !tbaa !30
  %48 = zext i8 %47 to i16
  store i16 %48, ptr %5, align 8, !tbaa !31
  %49 = getelementptr inbounds i8, ptr %19, i64 108
  %50 = load i32, ptr %49, align 4, !tbaa !19
  %51 = trunc i32 %50 to i8
  %52 = getelementptr inbounds i8, ptr %5, i64 2
  store i8 %51, ptr %52, align 2, !tbaa !33
  %53 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr null, ptr %53, align 8, !tbaa !34
  store i16 %45, ptr %6, align 8, !tbaa !31
  %54 = getelementptr inbounds i8, ptr %14, i64 98
  %55 = load i8, ptr %54, align 2, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %6, i64 2
  store i8 %55, ptr %56, align 2, !tbaa !33
  %57 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %1, ptr %57, align 8, !tbaa !34
  %58 = zext i32 %50 to i64
  %59 = tail call ptr @ZeroMem(ptr noundef nonnull %3, i64 noundef %58) #3
  %60 = load ptr, ptr @gBS, align 8, !tbaa !36
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !37
  %63 = tail call i64 %62(i64 noundef 8) #3
  %64 = call ptr @ArpFindDeniedCacheEntry(ptr noundef %19, ptr noundef nonnull %6, ptr noundef null) #3
  %.not80 = icmp eq ptr %64, null
  br i1 %.not80, label %65, label %113

65:                                               ; preds = %44
  %66 = getelementptr inbounds i8, ptr %19, i64 816
  %67 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef nonnull %66, ptr noundef null, i32 noundef 1, ptr noundef nonnull %6, ptr noundef null) #3
  %.not81 = icmp eq ptr %67, null
  br i1 %.not81, label %75, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %67, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !34
  %71 = getelementptr inbounds i8, ptr %67, i64 34
  %72 = load i8, ptr %71, align 2, !tbaa !33
  %73 = zext i8 %72 to i64
  %74 = call ptr @CopyMem(ptr noundef nonnull %3, ptr noundef %70, i64 noundef %73) #3
  br label %113

75:                                               ; preds = %65
  %76 = icmp eq ptr %2, null
  br i1 %76, label %113, label %77

77:                                               ; preds = %75
  %78 = call ptr @AllocatePool(i64 noundef 40) #3
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %85

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

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

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

85:                                               ; preds = %77
  %86 = getelementptr inbounds i8, ptr %78, i64 16
  store ptr %14, ptr %86, align 8, !tbaa !40
  %87 = getelementptr inbounds i8, ptr %78, i64 24
  store ptr %2, ptr %87, align 8, !tbaa !42
  %88 = getelementptr inbounds i8, ptr %78, i64 32
  store ptr %3, ptr %88, align 8, !tbaa !43
  %89 = call ptr @InitializeListHead(ptr noundef nonnull %78) #3
  %90 = getelementptr inbounds i8, ptr %19, i64 784
  %91 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef nonnull %90, ptr noundef null, i32 noundef 1, ptr noundef nonnull %6, ptr noundef null) #3
  %.not82 = icmp eq ptr %91, null
  br i1 %.not82, label %99, label %92

92:                                               ; preds = %85
  %93 = getelementptr inbounds i8, ptr %14, i64 120
  %94 = load i32, ptr %93, align 8, !tbaa !44
  %95 = getelementptr inbounds i8, ptr %91, i64 28
  store i32 %94, ptr %95, align 4, !tbaa !45
  %96 = getelementptr inbounds i8, ptr %14, i64 116
  %97 = load i32, ptr %96, align 4, !tbaa !47
  %98 = getelementptr inbounds i8, ptr %91, i64 16
  store i32 %97, ptr %98, align 8, !tbaa !48
  br label %110

99:                                               ; preds = %85
  %100 = call ptr @ArpAllocCacheEntry(ptr noundef nonnull %14) #3
  %101 = icmp eq ptr %100, null
  br i1 %101, label %102, label %108

102:                                              ; preds = %99
  %103 = call zeroext i8 @DebugPrintEnabled() #3
  %.not83 = icmp eq i8 %103, 0
  br i1 %.not83, label %107, label %104

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

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

107:                                              ; preds = %104, %106, %102
  call void @FreePool(ptr noundef nonnull %78) #3
  br label %113

108:                                              ; preds = %99
  call void @ArpFillAddressInCacheEntry(ptr noundef nonnull %100, ptr noundef nonnull %5, ptr noundef nonnull %6) #3
  %109 = call ptr @InsertTailList(ptr noundef nonnull %90, ptr noundef nonnull %100) #3
  br label %110

110:                                              ; preds = %108, %92
  %.068 = phi ptr [ %91, %92 ], [ %100, %108 ]
  %111 = getelementptr inbounds i8, ptr %.068, i64 128
  %112 = call ptr @InsertHeadList(ptr noundef nonnull %111, ptr noundef nonnull %78) #3
  call void @ArpSendFrame(ptr noundef nonnull %14, ptr noundef nonnull %.068, i16 noundef zeroext 1) #3
  br label %113

113:                                              ; preds = %80, %84, %82, %75, %44, %110, %107, %68
  %.067 = phi i64 [ 0, %68 ], [ -9223372036854775802, %110 ], [ -9223372036854775799, %107 ], [ -9223372036854775793, %44 ], [ -9223372036854775802, %75 ], [ -9223372036854775799, %82 ], [ -9223372036854775799, %84 ], [ -9223372036854775799, %80 ]
  %114 = load ptr, ptr @gBS, align 8, !tbaa !36
  %115 = getelementptr inbounds i8, ptr %114, i64 32
  %116 = load ptr, ptr %115, align 8, !tbaa !49
  call void %116(i64 noundef %63) #3
  br label %117

117:                                              ; preds = %113, %38, %28
  %.1 = phi i64 [ 0, %28 ], [ %43, %38 ], [ %.067, %113 ]
  %118 = icmp ne ptr %2, null
  %119 = icmp eq i64 %.1, 0
  %or.cond3 = select i1 %118, i1 %119, i1 false
  br i1 %or.cond3, label %120, label %126

120:                                              ; preds = %117
  %121 = load ptr, ptr @gBS, align 8, !tbaa !36
  %122 = getelementptr inbounds i8, ptr %121, i64 104
  %123 = load ptr, ptr %122, align 8, !tbaa !50
  %124 = call i64 %123(ptr noundef nonnull %2) #3
  %125 = call i64 @DispatchDpc() #3
  br label %126

126:                                              ; preds = %117, %120, %._crit_edge87, %4
  %.0 = phi i64 [ -9223372036854775806, %4 ], [ -9223372036854775789, %._crit_edge87 ], [ 0, %120 ], [ %.1, %117 ]
  call void @llvm.lifetime.end.p0(i64 48, 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 i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

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

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #1

declare ptr @InitializeListHead(ptr noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

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

declare void @ArpSendFrame(ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #1

declare i64 @DispatchDpc() local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 80, !13, i64 96, !8, i64 128, !8, i64 129}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_ARP_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!12 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!13 = !{!"", !14, i64 0, !8, i64 2, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !8, i64 128}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !14, i64 96}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !7, i64 4}
!20 = !{!"", !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, !21, i64 552, !21, i64 584, !21, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!21 = !{!"", !8, i64 0}
!22 = !{!23, !10, i64 48}
!23 = !{!"_ARP_SERVICE_DATA", !7, i64 0, !24, i64 8, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !25, i64 56, !26, i64 80, !20, i64 104, !27, i64 760, !12, i64 768, !12, i64 784, !12, i64 800, !12, i64 816, !10, i64 832}
!24 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !10, i64 0, !10, i64 8}
!25 = !{!"", !7, i64 0, !7, i64 4, !14, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!26 = !{!"", !10, i64 0, !27, i64 8, !8, i64 16}
!27 = !{!"long long", !8, i64 0}
!28 = !{!29, !10, i64 16}
!29 = !{!"_EFI_MANAGED_NETWORK_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}
!30 = !{!20, !8, i64 648}
!31 = !{!32, !14, i64 0}
!32 = !{!"", !14, i64 0, !8, i64 2, !10, i64 8, !8, i64 16}
!33 = !{!32, !8, i64 2}
!34 = !{!32, !10, i64 8}
!35 = !{!6, !8, i64 98}
!36 = !{!10, !10, i64 0}
!37 = !{!38, !10, i64 24}
!38 = !{!"", !39, 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}
!39 = !{!"", !27, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!40 = !{!41, !10, i64 16}
!41 = !{!"", !12, i64 0, !10, i64 16, !10, i64 24, !10, i64 32}
!42 = !{!41, !10, i64 24}
!43 = !{!41, !10, i64 32}
!44 = !{!6, !7, i64 120}
!45 = !{!46, !7, i64 28}
!46 = !{!"", !12, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !12, i64 128}
!47 = !{!6, !7, i64 116}
!48 = !{!46, !7, i64 16}
!49 = !{!38, !10, i64 32}
!50 = !{!38, !10, i64 104}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass