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

; 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.ARP_ADDRESS = type { ptr, ptr, ptr, ptr }
%struct.NET_ARP_ADDRESS = type { i16, i8, ptr, %union.NET_ARP_ADDRESS_UNION }
%union.NET_ARP_ADDRESS_UNION = type { [32 x i8] }
%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._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_MANAGED_NETWORK_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, i32, i32, i32, i32, i8, i8, i8, i16, ptr, ptr, ptr, ptr }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }
%struct.ARP_HEAD = type { i16, i16, i8, i8, i16 }
%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.EFI_ARP_CONFIG_DATA = type { i16, i8, ptr, 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.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_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [115 x i8], align 1
@gBS = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() #0

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

; Function Attrs: nounwind uwtable
define dso_local void @ArpOnFrameRcvdDpc(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ARP_ADDRESS, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [2 x %struct.NET_ARP_ADDRESS], align 16
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 96, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %19, ptr %4, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %1
  %21 = call zeroext i8 @DebugAssertEnabled()
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %23, label %33

23:                                               ; preds = %20
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = icmp eq i32 %29, 1397772865
  br i1 %30, label %32, label %31

31:                                               ; preds = %26, %23
  call void @DebugAssert(ptr noundef @.str, i64 noundef 92, ptr noundef @.str.1)
  br label %32

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

33:                                               ; preds = %32, %20
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %36, i32 0, i32 7
  store ptr %37, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %38, i32 0, i32 1
  %40 = load i64, ptr %39, align 8, !tbaa !20
  %41 = icmp eq i64 %40, -9223372036854775787
  br i1 %41, label %42, label %43

42:                                               ; preds = %35
  store i32 1, ptr %17, align 4
  br label %360

43:                                               ; preds = %35
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %44, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !20
  %47 = icmp slt i64 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %43
  br label %321

49:                                               ; preds = %43
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  store ptr %52, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %53, i32 0, i32 13
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  store ptr %55, ptr %7, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ARP_HEAD, ptr %56, i32 0, i32 0
  %58 = load i16, ptr %57, align 1, !tbaa !25
  %59 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %58)
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ARP_HEAD, ptr %60, i32 0, i32 0
  store i16 %59, ptr %61, align 1, !tbaa !25
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ARP_HEAD, ptr %62, i32 0, i32 1
  %64 = load i16, ptr %63, align 1, !tbaa !27
  %65 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %64)
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ARP_HEAD, ptr %66, i32 0, i32 1
  store i16 %65, ptr %67, align 1, !tbaa !27
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ARP_HEAD, ptr %68, i32 0, i32 4
  %70 = load i16, ptr %69, align 1, !tbaa !28
  %71 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %70)
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ARP_HEAD, ptr %72, i32 0, i32 4
  store i16 %71, ptr %73, align 1, !tbaa !28
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ARP_HEAD, ptr %74, i32 0, i32 0
  %76 = load i16, ptr %75, align 1, !tbaa !25
  %77 = zext i16 %76 to i32
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %78, i32 0, i32 8
  %80 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %79, i32 0, i32 14
  %81 = load i8, ptr %80, align 8, !tbaa !29
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %77, %82
  br i1 %83, label %100, label %84

84:                                               ; preds = %49
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ARP_HEAD, ptr %85, i32 0, i32 2
  %87 = load i8, ptr %86, align 1, !tbaa !30
  %88 = zext i8 %87 to i32
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %89, i32 0, i32 8
  %91 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !31
  %93 = icmp ne i32 %88, %92
  br i1 %93, label %100, label %94

94:                                               ; preds = %84
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %95, i32 0, i32 9
  %97 = load i16, ptr %96, align 4, !tbaa !32
  %98 = zext i16 %97 to i32
  %99 = icmp ne i32 %98, 2054
  br i1 %99, label %100, label %101

100:                                              ; preds = %94, %84, %49
  br label %313

101:                                              ; preds = %94
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ARP_HEAD, ptr %102, i64 1
  %104 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 0
  store ptr %103, ptr %104, align 8, !tbaa !33
  %105 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !33
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ARP_HEAD, ptr %107, i32 0, i32 2
  %109 = load i8, ptr %108, align 1, !tbaa !30
  %110 = zext i8 %109 to i32
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %106, i64 %111
  %113 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 1
  store ptr %112, ptr %113, align 8, !tbaa !35
  %114 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !35
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ARP_HEAD, ptr %116, i32 0, i32 3
  %118 = load i8, ptr %117, align 1, !tbaa !36
  %119 = zext i8 %118 to i32
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i8, ptr %115, i64 %120
  %122 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 2
  store ptr %121, ptr %122, align 8, !tbaa !37
  %123 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 2
  %124 = load ptr, ptr %123, align 8, !tbaa !37
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ARP_HEAD, ptr %125, i32 0, i32 2
  %127 = load i8, ptr %126, align 1, !tbaa !30
  %128 = zext i8 %127 to i32
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %124, i64 %129
  %131 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 3
  store ptr %130, ptr %131, align 8, !tbaa !38
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.ARP_HEAD, ptr %132, i32 0, i32 0
  %134 = load i16, ptr %133, align 1, !tbaa !25
  %135 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  %136 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %135, i32 0, i32 0
  store i16 %134, ptr %136, align 16, !tbaa !39
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ARP_HEAD, ptr %137, i32 0, i32 2
  %139 = load i8, ptr %138, align 1, !tbaa !30
  %140 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  %141 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %140, i32 0, i32 1
  store i8 %139, ptr %141, align 2, !tbaa !41
  %142 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !33
  %144 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  %145 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %144, i32 0, i32 2
  store ptr %143, ptr %145, align 8, !tbaa !42
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ARP_HEAD, ptr %146, i32 0, i32 1
  %148 = load i16, ptr %147, align 1, !tbaa !27
  %149 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %150 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %149, i32 0, i32 0
  store i16 %148, ptr %150, align 16, !tbaa !39
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ARP_HEAD, ptr %151, i32 0, i32 3
  %153 = load i8, ptr %152, align 1, !tbaa !36
  %154 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %155 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %154, i32 0, i32 1
  store i8 %153, ptr %155, align 2, !tbaa !41
  %156 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !35
  %158 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %159 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %158, i32 0, i32 2
  store ptr %157, ptr %159, align 8, !tbaa !42
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %162 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  %163 = call ptr @ArpFindDeniedCacheEntry(ptr noundef %160, ptr noundef %161, ptr noundef %162)
  store ptr %163, ptr %9, align 8, !tbaa !5
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %167

166:                                              ; preds = %101
  br label %313

167:                                              ; preds = %101
  store i8 0, ptr %14, align 1, !tbaa !21
  store i8 0, ptr %15, align 1, !tbaa !21
  store ptr null, ptr %11, align 8, !tbaa !5
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %168, i32 0, i32 10
  %170 = getelementptr inbounds %struct._LIST_ENTRY, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !43
  store ptr %171, ptr %10, align 8, !tbaa !5
  br label %172

172:                                              ; preds = %240, %167
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %174, i32 0, i32 10
  %176 = icmp ne ptr %173, %175
  br i1 %176, label %177, label %244

177:                                              ; preds = %172
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = ptrtoint ptr %178 to i64
  %180 = sub i64 %179, ptrtoint (ptr getelementptr inbounds (%struct.ARP_INSTANCE_DATA, ptr null, i32 0, i32 4) to i64)
  %181 = inttoptr i64 %180 to ptr
  store ptr %181, ptr %11, align 8, !tbaa !5
  br label %182

182:                                              ; preds = %177
  %183 = call zeroext i8 @DebugAssertEnabled()
  %184 = icmp ne i8 %183, 0
  br i1 %184, label %185, label %195

185:                                              ; preds = %182
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %193

188:                                              ; preds = %185
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %189, i32 0, i32 0
  %191 = load i32, ptr %190, align 8, !tbaa !44
  %192 = icmp eq i32 %191, 1230000705
  br i1 %192, label %194, label %193

193:                                              ; preds = %188, %185
  call void @DebugAssert(ptr noundef @.str, i64 noundef 174, ptr noundef @.str.2)
  br label %194

194:                                              ; preds = %193, %188
  br label %195

195:                                              ; preds = %194, %182
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %198, i32 0, i32 5
  store ptr %199, ptr %12, align 8, !tbaa !5
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %200, i32 0, i32 6
  %202 = load i8, ptr %201, align 8, !tbaa !48
  %203 = zext i8 %202 to i32
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %239

205:                                              ; preds = %197
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ARP_HEAD, ptr %206, i32 0, i32 1
  %208 = load i16, ptr %207, align 1, !tbaa !27
  %209 = zext i16 %208 to i32
  %210 = load ptr, ptr %12, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %210, i32 0, i32 0
  %212 = load i16, ptr %211, align 8, !tbaa !49
  %213 = zext i16 %212 to i32
  %214 = icmp eq i32 %209, %213
  br i1 %214, label %215, label %239

215:                                              ; preds = %205
  %216 = load ptr, ptr %7, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ARP_HEAD, ptr %216, i32 0, i32 3
  %218 = load i8, ptr %217, align 1, !tbaa !36
  %219 = zext i8 %218 to i32
  %220 = load ptr, ptr %12, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %220, i32 0, i32 1
  %222 = load i8, ptr %221, align 2, !tbaa !50
  %223 = zext i8 %222 to i32
  %224 = icmp eq i32 %219, %223
  br i1 %224, label %225, label %239

225:                                              ; preds = %215
  store i8 1, ptr %14, align 1, !tbaa !21
  %226 = getelementptr inbounds %struct.ARP_ADDRESS, ptr %8, i32 0, i32 3
  %227 = load ptr, ptr %226, align 8, !tbaa !38
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %228, i32 0, i32 2
  %230 = load ptr, ptr %229, align 8, !tbaa !51
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %231, i32 0, i32 1
  %233 = load i8, ptr %232, align 2, !tbaa !50
  %234 = zext i8 %233 to i64
  %235 = call i64 @CompareMem(ptr noundef %227, ptr noundef %230, i64 noundef %234)
  %236 = icmp eq i64 0, %235
  br i1 %236, label %237, label %238

237:                                              ; preds = %225
  store i8 1, ptr %15, align 1, !tbaa !21
  br label %244

238:                                              ; preds = %225
  br label %239

239:                                              ; preds = %238, %215, %205, %197
  br label %240

240:                                              ; preds = %239
  %241 = load ptr, ptr %10, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._LIST_ENTRY, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !52
  store ptr %243, ptr %10, align 8, !tbaa !5
  br label %172, !llvm.loop !53

244:                                              ; preds = %237, %172
  %245 = load i8, ptr %14, align 1, !tbaa !21
  %246 = icmp ne i8 %245, 0
  br i1 %246, label %248, label %247

247:                                              ; preds = %244
  br label %313

248:                                              ; preds = %244
  store i8 0, ptr %16, align 1, !tbaa !21
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %249, i32 0, i32 13
  %251 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %252 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef %250, ptr noundef null, i32 noundef 1, ptr noundef %251, ptr noundef null)
  store ptr %252, ptr %9, align 8, !tbaa !5
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %263

255:                                              ; preds = %248
  %256 = load ptr, ptr %9, align 8, !tbaa !5
  %257 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  call void @ArpFillAddressInCacheEntry(ptr noundef %256, ptr noundef %257, ptr noundef null)
  %258 = load ptr, ptr %9, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %258, i32 0, i32 2
  %260 = load i32, ptr %259, align 4, !tbaa !55
  %261 = load ptr, ptr %9, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %261, i32 0, i32 3
  store i32 %260, ptr %262, align 8, !tbaa !57
  store i8 1, ptr %16, align 1, !tbaa !21
  br label %263

263:                                              ; preds = %255, %248
  %264 = load i8, ptr %15, align 1, !tbaa !21
  %265 = icmp ne i8 %264, 0
  br i1 %265, label %267, label %266

266:                                              ; preds = %263
  br label %313

267:                                              ; preds = %263
  %268 = load i8, ptr %16, align 1, !tbaa !21
  %269 = icmp ne i8 %268, 0
  br i1 %269, label %303, label %270

270:                                              ; preds = %267
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %271, i32 0, i32 11
  %273 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  %274 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef %272, ptr noundef null, i32 noundef 1, ptr noundef %273, ptr noundef null)
  store ptr %274, ptr %9, align 8, !tbaa !5
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = icmp eq ptr %275, null
  br i1 %276, label %277, label %283

277:                                              ; preds = %270
  %278 = call ptr @ArpAllocCacheEntry(ptr noundef null)
  store ptr %278, ptr %9, align 8, !tbaa !5
  %279 = load ptr, ptr %9, align 8, !tbaa !5
  %280 = icmp eq ptr %279, null
  br i1 %280, label %281, label %282

281:                                              ; preds = %277
  br label %313

282:                                              ; preds = %277
  br label %283

283:                                              ; preds = %282, %270
  %284 = load ptr, ptr %9, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %284, i32 0, i32 0
  %286 = call zeroext i8 @IsListEmpty(ptr noundef %285)
  %287 = icmp ne i8 %286, 0
  br i1 %287, label %292, label %288

288:                                              ; preds = %283
  %289 = load ptr, ptr %9, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %289, i32 0, i32 0
  %291 = call ptr @RemoveEntryList(ptr noundef %290)
  br label %292

292:                                              ; preds = %288, %283
  %293 = load ptr, ptr %9, align 8, !tbaa !5
  %294 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 0
  %295 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %13, i64 0, i64 1
  call void @ArpFillAddressInCacheEntry(ptr noundef %293, ptr noundef %294, ptr noundef %295)
  %296 = load ptr, ptr %9, align 8, !tbaa !5
  %297 = call i64 @ArpAddressResolved(ptr noundef %296, ptr noundef null, ptr noundef null)
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %298, i32 0, i32 13
  %300 = load ptr, ptr %9, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %300, i32 0, i32 0
  %302 = call ptr @InsertHeadList(ptr noundef %299, ptr noundef %301)
  br label %303

303:                                              ; preds = %292, %267
  %304 = load ptr, ptr %7, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.ARP_HEAD, ptr %304, i32 0, i32 4
  %306 = load i16, ptr %305, align 1, !tbaa !28
  %307 = zext i16 %306 to i32
  %308 = icmp eq i32 %307, 1
  br i1 %308, label %309, label %312

309:                                              ; preds = %303
  %310 = load ptr, ptr %11, align 8, !tbaa !5
  %311 = load ptr, ptr %9, align 8, !tbaa !5
  call void @ArpSendFrame(ptr noundef %310, ptr noundef %311, i16 noundef zeroext 2)
  br label %312

312:                                              ; preds = %309, %303
  br label %313

313:                                              ; preds = %312, %281, %266, %247, %166, %100
  %314 = load ptr, ptr @gBS, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %314, i32 0, i32 11
  %316 = load ptr, ptr %315, align 8, !tbaa !58
  %317 = load ptr, ptr %6, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %317, i32 0, i32 1
  %319 = load ptr, ptr %318, align 8, !tbaa !61
  %320 = call i64 %316(ptr noundef %319)
  br label %321

321:                                              ; preds = %313, %48
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %322, i32 0, i32 5
  %324 = load ptr, ptr %323, align 8, !tbaa !62
  %325 = getelementptr inbounds %struct._EFI_MANAGED_NETWORK_PROTOCOL, ptr %324, i32 0, i32 5
  %326 = load ptr, ptr %325, align 8, !tbaa !63
  %327 = load ptr, ptr %4, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %327, i32 0, i32 5
  %329 = load ptr, ptr %328, align 8, !tbaa !62
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = call i64 %326(ptr noundef %329, ptr noundef %330)
  store i64 %331, ptr %3, align 8, !tbaa !65
  br label %332

332:                                              ; preds = %321
  %333 = call zeroext i8 @DebugCodeEnabled()
  %334 = icmp ne i8 %333, 0
  br i1 %334, label %335, label %357

335:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #3
  %336 = load i64, ptr %3, align 8, !tbaa !65
  %337 = icmp slt i64 %336, 0
  br i1 %337, label %338, label %354

338:                                              ; preds = %335
  br label %339

339:                                              ; preds = %338
  %340 = call zeroext i8 @DebugPrintEnabled()
  %341 = icmp ne i8 %340, 0
  br i1 %341, label %342, label %351

342:                                              ; preds = %339
  br label %343

343:                                              ; preds = %342
  %344 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %345 = icmp ne i8 %344, 0
  br i1 %345, label %346, label %348

346:                                              ; preds = %343
  %347 = load i64, ptr %3, align 8, !tbaa !65
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.3, i64 noundef %347)
  br label %348

348:                                              ; preds = %346, %343
  br label %349

349:                                              ; preds = %348
  br label %350

350:                                              ; preds = %349
  br label %351

351:                                              ; preds = %350, %339
  br label %352

352:                                              ; preds = %351
  br label %353

353:                                              ; preds = %352
  br label %354

354:                                              ; preds = %353, %335
  store i8 0, ptr %18, align 1, !tbaa !21
  %355 = load i8, ptr %18, align 1, !tbaa !21
  %356 = add i8 %355, 1
  store i8 %356, ptr %18, align 1, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #3
  br label %357

357:                                              ; preds = %354, %332
  br label %358

358:                                              ; preds = %357
  br label %359

359:                                              ; preds = %358
  store i32 0, ptr %17, align 4
  br label %360

360:                                              ; preds = %359, %42
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 96, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %361 = load i32, ptr %17, align 4
  switch i32 %361, label %363 [
    i32 0, label %362
    i32 1, label %362
  ]

362:                                              ; preds = %360, %360
  ret void

363:                                              ; preds = %360
  unreachable
}

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpFindDeniedCacheEntry(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpFindNextCacheEntryInTable(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpAllocCacheEntry(ptr noundef) #1

declare zeroext i8 @IsListEmpty(ptr noundef) #0

declare ptr @RemoveEntryList(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @ArpSendFrame(ptr noundef, ptr noundef, i16 noundef zeroext) #1

declare zeroext i8 @DebugCodeEnabled() #0

declare zeroext i8 @DebugPrintEnabled() #0

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #0

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

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

attributes #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_ARP_SERVICE_DATA", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !15, i64 80, !17, i64 104, !16, i64 760, !19, i64 768, !19, i64 784, !19, i64 800, !19, i64 816, !6, i64 832}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!13 = !{!"", !11, i64 0, !11, i64 4, !14, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"", !6, i64 0, !16, i64 8, !7, i64 16}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"", !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, !18, i64 552, !18, i64 584, !18, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!18 = !{!"", !7, i64 0}
!19 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!20 = !{!15, !16, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 72}
!23 = !{!"", !24, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !14, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!24 = !{!"", !14, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !14, i64 12, !7, i64 14, !7, i64 15}
!25 = !{!26, !14, i64 0}
!26 = !{!"", !14, i64 0, !14, i64 2, !7, i64 4, !7, i64 5, !14, i64 6}
!27 = !{!26, !14, i64 2}
!28 = !{!26, !14, i64 6}
!29 = !{!10, !7, i64 752}
!30 = !{!26, !7, i64 4}
!31 = !{!10, !11, i64 108}
!32 = !{!23, !14, i64 44}
!33 = !{!34, !6, i64 0}
!34 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!35 = !{!34, !6, i64 8}
!36 = !{!26, !7, i64 5}
!37 = !{!34, !6, i64 16}
!38 = !{!34, !6, i64 24}
!39 = !{!40, !14, i64 0}
!40 = !{!"", !14, i64 0, !7, i64 2, !6, i64 8, !7, i64 16}
!41 = !{!40, !7, i64 2}
!42 = !{!40, !6, i64 8}
!43 = !{!10, !6, i64 768}
!44 = !{!45, !11, i64 0}
!45 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !46, i64 24, !19, i64 80, !47, i64 96, !7, i64 128, !7, i64 129}
!46 = !{!"_EFI_ARP_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!47 = !{!"", !14, i64 0, !7, i64 2, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!48 = !{!45, !7, i64 128}
!49 = !{!47, !14, i64 0}
!50 = !{!47, !7, i64 2}
!51 = !{!47, !6, i64 8}
!52 = !{!19, !6, i64 0}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = !{!56, !11, i64 20}
!56 = !{!"", !19, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !19, i64 128}
!57 = !{!56, !11, i64 24}
!58 = !{!59, !6, i64 104}
!59 = !{!"", !60, 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}
!60 = !{!"", !16, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!61 = !{!23, !6, i64 16}
!62 = !{!10, !6, i64 48}
!63 = !{!64, !6, i64 40}
!64 = !{!"_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}
!65 = !{!16, !16, i64 0}


; 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 [119 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [115 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [54 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @ArpOnFrameRcvdDpc(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca [2 x %struct.NET_ARP_ADDRESS], align 16
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %2) #3
  %3 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %9, label %4

4:                                                ; preds = %1
  %.not87 = icmp eq ptr %0, null
  br i1 %.not87, label %8, label %5

5:                                                ; preds = %4
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 1397772865
  br i1 %7, label %9, label %8

8:                                                ; preds = %5, %4
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 92, ptr noundef nonnull @.str.1) #3
  br label %9

9:                                                ; preds = %5, %8, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  %12 = load i64, ptr %11, align 8, !tbaa !19
  %13 = icmp eq i64 %12, -9223372036854775787
  br i1 %13, label %137, label %14

14:                                               ; preds = %9
  %15 = icmp slt i64 %12, 0
  br i1 %15, label %124, label %16

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 96
  %18 = load ptr, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %18, i64 72
  %20 = load ptr, ptr %19, align 8, !tbaa !21
  %21 = load i16, ptr %20, align 1, !tbaa !24
  %22 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %21) #3
  store i16 %22, ptr %20, align 1, !tbaa !24
  %23 = getelementptr inbounds i8, ptr %20, i64 2
  %24 = load i16, ptr %23, align 1, !tbaa !26
  %25 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %24) #3
  store i16 %25, ptr %23, align 1, !tbaa !26
  %26 = getelementptr inbounds i8, ptr %20, i64 6
  %27 = load i16, ptr %26, align 1, !tbaa !27
  %28 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %27) #3
  store i16 %28, ptr %26, align 1, !tbaa !27
  %29 = load i16, ptr %20, align 1, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %0, i64 752
  %31 = load i8, ptr %30, align 8, !tbaa !28
  %32 = zext i8 %31 to i16
  %.not88 = icmp eq i16 %29, %32
  br i1 %.not88, label %33, label %._crit_edge.thread

33:                                               ; preds = %16
  %34 = getelementptr inbounds i8, ptr %20, i64 4
  %35 = load i8, ptr %34, align 1, !tbaa !29
  %36 = zext i8 %35 to i32
  %37 = getelementptr inbounds i8, ptr %0, i64 108
  %38 = load i32, ptr %37, align 4, !tbaa !30
  %.not89 = icmp eq i32 %38, %36
  br i1 %.not89, label %39, label %._crit_edge.thread

39:                                               ; preds = %33
  %40 = getelementptr inbounds i8, ptr %18, i64 44
  %41 = load i16, ptr %40, align 4, !tbaa !31
  %.not90 = icmp eq i16 %41, 2054
  br i1 %.not90, label %42, label %._crit_edge.thread

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %20, i64 8
  %44 = zext i8 %35 to i64
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  %46 = getelementptr inbounds i8, ptr %20, i64 5
  %47 = load i8, ptr %46, align 1, !tbaa !32
  %48 = zext i8 %47 to i64
  %49 = getelementptr inbounds i8, ptr %45, i64 %48
  %50 = getelementptr inbounds i8, ptr %49, i64 %44
  store i16 %29, ptr %2, align 16, !tbaa !33
  %51 = getelementptr inbounds i8, ptr %2, i64 2
  store i8 %35, ptr %51, align 2, !tbaa !35
  %52 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %43, ptr %52, align 8, !tbaa !36
  %53 = load i16, ptr %23, align 1, !tbaa !26
  %54 = getelementptr inbounds i8, ptr %2, i64 48
  store i16 %53, ptr %54, align 16, !tbaa !33
  %55 = getelementptr inbounds i8, ptr %2, i64 50
  store i8 %47, ptr %55, align 2, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %2, i64 56
  store ptr %45, ptr %56, align 8, !tbaa !36
  %57 = call ptr @ArpFindDeniedCacheEntry(ptr noundef nonnull %0, ptr noundef nonnull %54, ptr noundef nonnull %2)
  %.not91 = icmp eq ptr %57, null
  br i1 %.not91, label %58, label %._crit_edge.thread

58:                                               ; preds = %42
  %59 = getelementptr inbounds i8, ptr %0, i64 768
  %.076121 = load ptr, ptr %59, align 8, !tbaa !37
  %.not92122 = icmp eq ptr %.076121, %59
  br i1 %.not92122, label %._crit_edge.thread, label %.lr.ph.outer

.lr.ph.outer:                                     ; preds = %58, %.thread127
  %.076124.ph = phi ptr [ %.076129, %.thread127 ], [ %.076121, %58 ]
  %60 = phi i1 [ false, %.thread127 ], [ true, %58 ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.outer, %89
  %.076124 = phi ptr [ %.076, %89 ], [ %.076124.ph, %.lr.ph.outer ]
  %61 = ptrtoint ptr %.076124 to i64
  %62 = add i64 %61, -80
  %63 = inttoptr i64 %62 to ptr
  %64 = call zeroext i8 @DebugAssertEnabled() #3
  %.not93 = icmp eq i8 %64, 0
  br i1 %.not93, label %70, label %65

65:                                               ; preds = %.lr.ph
  %.not94 = icmp eq i64 %62, 0
  br i1 %.not94, label %69, label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %63, align 8, !tbaa !38
  %68 = icmp eq i32 %67, 1230000705
  br i1 %68, label %70, label %69

69:                                               ; preds = %66, %65
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 174, ptr noundef nonnull @.str.2) #3
  br label %70

70:                                               ; preds = %66, %69, %.lr.ph
  %71 = getelementptr inbounds i8, ptr %63, i64 128
  %72 = load i8, ptr %71, align 8, !tbaa !42
  %.not95 = icmp eq i8 %72, 0
  br i1 %.not95, label %89, label %73

73:                                               ; preds = %70
  %74 = getelementptr inbounds i8, ptr %63, i64 96
  %75 = load i16, ptr %23, align 1, !tbaa !26
  %76 = load i16, ptr %74, align 8, !tbaa !43
  %77 = icmp eq i16 %75, %76
  br i1 %77, label %78, label %89

78:                                               ; preds = %73
  %79 = load i8, ptr %46, align 1, !tbaa !32
  %80 = getelementptr inbounds i8, ptr %63, i64 98
  %81 = load i8, ptr %80, align 2, !tbaa !44
  %82 = icmp eq i8 %79, %81
  br i1 %82, label %83, label %89

83:                                               ; preds = %78
  %84 = getelementptr inbounds i8, ptr %63, i64 104
  %85 = load ptr, ptr %84, align 8, !tbaa !45
  %86 = zext i8 %79 to i64
  %87 = call i64 @CompareMem(ptr noundef nonnull %50, ptr noundef %85, i64 noundef %86) #3
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %.thread.thread, label %.thread127

89:                                               ; preds = %70, %73, %78
  %.076 = load ptr, ptr %.076124, align 8, !tbaa !37
  %.not92 = icmp eq ptr %.076, %59
  br i1 %.not92, label %._crit_edge, label %.lr.ph, !llvm.loop !46

.thread127:                                       ; preds = %83
  %.076129 = load ptr, ptr %.076124, align 8, !tbaa !37
  %.not92130 = icmp eq ptr %.076129, %59
  br i1 %.not92130, label %.thread, label %.lr.ph.outer, !llvm.loop !46

._crit_edge:                                      ; preds = %89
  br i1 %60, label %._crit_edge.thread, label %.thread

.thread:                                          ; preds = %.thread127, %._crit_edge
  %90 = getelementptr inbounds i8, ptr %0, i64 816
  %91 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef nonnull %90, ptr noundef null, i32 noundef 1, ptr noundef nonnull %54, ptr noundef null)
  %.not97 = icmp eq ptr %91, null
  br i1 %.not97, label %._crit_edge.thread, label %.thread108

.thread.thread:                                   ; preds = %83
  %92 = getelementptr inbounds i8, ptr %0, i64 816
  %93 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef nonnull %92, ptr noundef null, i32 noundef 1, ptr noundef nonnull %54, ptr noundef null)
  %.not97111 = icmp eq ptr %93, null
  br i1 %.not97111, label %100, label %.thread109

.thread108:                                       ; preds = %.thread
  call void @ArpFillAddressInCacheEntry(ptr noundef nonnull %91, ptr noundef nonnull %2, ptr noundef null)
  %94 = getelementptr inbounds i8, ptr %91, i64 20
  %95 = load i32, ptr %94, align 4, !tbaa !48
  %96 = getelementptr inbounds i8, ptr %91, i64 24
  store i32 %95, ptr %96, align 8, !tbaa !50
  br label %._crit_edge.thread

.thread109:                                       ; preds = %.thread.thread
  call void @ArpFillAddressInCacheEntry(ptr noundef nonnull %93, ptr noundef nonnull %2, ptr noundef null)
  %97 = getelementptr inbounds i8, ptr %93, i64 20
  %98 = load i32, ptr %97, align 4, !tbaa !48
  %99 = getelementptr inbounds i8, ptr %93, i64 24
  store i32 %98, ptr %99, align 8, !tbaa !50
  br label %114

100:                                              ; preds = %.thread.thread
  %101 = getelementptr inbounds i8, ptr %0, i64 784
  %102 = call ptr @ArpFindNextCacheEntryInTable(ptr noundef nonnull %101, ptr noundef null, i32 noundef 1, ptr noundef nonnull %54, ptr noundef null)
  %103 = icmp eq ptr %102, null
  br i1 %103, label %104, label %107

104:                                              ; preds = %100
  %105 = call ptr @ArpAllocCacheEntry(ptr noundef null)
  %106 = icmp eq ptr %105, null
  br i1 %106, label %._crit_edge.thread, label %107

107:                                              ; preds = %104, %100
  %.0 = phi ptr [ %105, %104 ], [ %102, %100 ]
  %108 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %.0) #3
  %.not100 = icmp eq i8 %108, 0
  br i1 %.not100, label %109, label %111

109:                                              ; preds = %107
  %110 = call ptr @RemoveEntryList(ptr noundef nonnull %.0) #3
  br label %111

111:                                              ; preds = %109, %107
  call void @ArpFillAddressInCacheEntry(ptr noundef nonnull %.0, ptr noundef nonnull %2, ptr noundef nonnull %54)
  %112 = call i64 @ArpAddressResolved(ptr noundef nonnull %.0, ptr noundef null, ptr noundef null)
  %113 = call ptr @InsertHeadList(ptr noundef nonnull %92, ptr noundef nonnull %.0) #3
  br label %114

114:                                              ; preds = %.thread109, %111
  %.1 = phi ptr [ %.0, %111 ], [ %93, %.thread109 ]
  %115 = load i16, ptr %26, align 1, !tbaa !27
  %116 = icmp eq i16 %115, 1
  br i1 %116, label %117, label %._crit_edge.thread

117:                                              ; preds = %114
  call void @ArpSendFrame(ptr noundef nonnull %63, ptr noundef nonnull %.1, i16 noundef zeroext 2)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %58, %.thread108, %.thread, %114, %117, %104, %._crit_edge, %42, %16, %33, %39
  %118 = load ptr, ptr @gBS, align 8, !tbaa !51
  %119 = getelementptr inbounds i8, ptr %118, i64 104
  %120 = load ptr, ptr %119, align 8, !tbaa !52
  %121 = getelementptr inbounds i8, ptr %18, i64 16
  %122 = load ptr, ptr %121, align 8, !tbaa !55
  %123 = call i64 %120(ptr noundef %122) #3
  br label %124

124:                                              ; preds = %14, %._crit_edge.thread
  %125 = getelementptr inbounds i8, ptr %0, i64 48
  %126 = load ptr, ptr %125, align 8, !tbaa !56
  %127 = getelementptr inbounds i8, ptr %126, i64 40
  %128 = load ptr, ptr %127, align 8, !tbaa !57
  %129 = call i64 %128(ptr noundef %126, ptr noundef nonnull %10) #3
  %130 = call zeroext i8 @DebugCodeEnabled() #3
  %.not101 = icmp ne i8 %130, 0
  %131 = icmp slt i64 %129, 0
  %or.cond = select i1 %.not101, i1 %131, i1 false
  br i1 %or.cond, label %132, label %137

132:                                              ; preds = %124
  %133 = call zeroext i8 @DebugPrintEnabled() #3
  %.not102 = icmp eq i8 %133, 0
  br i1 %.not102, label %137, label %134

134:                                              ; preds = %132
  %135 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not103 = icmp eq i8 %135, 0
  br i1 %.not103, label %137, label %136

136:                                              ; preds = %134
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.3, i64 noundef %129) #3
  br label %137

137:                                              ; preds = %124, %132, %136, %134, %9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %2) #3
  ret void
}

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpFindDeniedCacheEntry(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpFindNextCacheEntryInTable(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ArpAllocCacheEntry(ptr noundef) local_unnamed_addr #1

declare zeroext i8 @IsListEmpty(ptr noundef) local_unnamed_addr #0

declare ptr @RemoveEntryList(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @ArpSendFrame(ptr noundef, ptr noundef, i16 noundef zeroext) local_unnamed_addr #1

declare zeroext i8 @DebugCodeEnabled() local_unnamed_addr #0

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #0

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

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

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

attributes #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_ARP_SERVICE_DATA", !7, i64 0, !10, i64 8, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !12, i64 56, !14, i64 80, !16, i64 104, !15, i64 760, !18, i64 768, !18, i64 784, !18, i64 800, !18, i64 816, !11, i64 832}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 4, !13, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!13 = !{!"short", !8, i64 0}
!14 = !{!"", !11, i64 0, !15, i64 8, !8, i64 16}
!15 = !{!"long long", !8, i64 0}
!16 = !{!"", !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, !17, i64 552, !17, i64 584, !17, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!17 = !{!"", !8, i64 0}
!18 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!19 = !{!14, !15, i64 8}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !11, i64 72}
!22 = !{!"", !23, i64 0, !11, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !8, i64 41, !8, i64 42, !13, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72}
!23 = !{!"", !13, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !7, i64 8, !13, i64 12, !8, i64 14, !8, i64 15}
!24 = !{!25, !13, i64 0}
!25 = !{!"", !13, i64 0, !13, i64 2, !8, i64 4, !8, i64 5, !13, i64 6}
!26 = !{!25, !13, i64 2}
!27 = !{!25, !13, i64 6}
!28 = !{!6, !8, i64 752}
!29 = !{!25, !8, i64 4}
!30 = !{!6, !7, i64 108}
!31 = !{!22, !13, i64 44}
!32 = !{!25, !8, i64 5}
!33 = !{!34, !13, i64 0}
!34 = !{!"", !13, i64 0, !8, i64 2, !11, i64 8, !8, i64 16}
!35 = !{!34, !8, i64 2}
!36 = !{!34, !11, i64 8}
!37 = !{!18, !11, i64 0}
!38 = !{!39, !7, i64 0}
!39 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !40, i64 24, !18, i64 80, !41, i64 96, !8, i64 128, !8, i64 129}
!40 = !{!"_EFI_ARP_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!41 = !{!"", !13, i64 0, !8, i64 2, !11, i64 8, !7, i64 16, !7, i64 20, !7, i64 24}
!42 = !{!39, !8, i64 128}
!43 = !{!41, !13, i64 0}
!44 = !{!41, !8, i64 2}
!45 = !{!41, !11, i64 8}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = !{!49, !7, i64 20}
!49 = !{!"", !18, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !18, i64 128}
!50 = !{!49, !7, i64 24}
!51 = !{!11, !11, i64 0}
!52 = !{!53, !11, i64 104}
!53 = !{!"", !54, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368}
!54 = !{!"", !15, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!55 = !{!22, !11, i64 16}
!56 = !{!6, !11, i64 48}
!57 = !{!58, !11, i64 40}
!58 = !{!"_EFI_MANAGED_NETWORK_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}


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