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

; 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_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.ARP_CACHE_ENTRY = type { %struct._LIST_ENTRY, i32, i32, i32, i32, [2 x %struct.NET_ARP_ADDRESS], %struct._LIST_ENTRY }
%struct.NET_ARP_ADDRESS = type { i16, i8, ptr, %union.NET_ARP_ADDRESS_UNION }
%union.NET_ARP_ADDRESS_UNION = type { [32 x i8] }
%struct.USER_REQUEST_CONTEXT = type { %struct._LIST_ENTRY, ptr, ptr, ptr }
%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 }

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() #0

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

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

declare zeroext i8 @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) #2

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

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

declare void @FreePool(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @ArpTimerHandler(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  br label %11

11:                                               ; preds = %2
  %12 = call zeroext i8 @DebugAssertEnabled()
  %13 = icmp ne i8 %12, 0
  br i1 %13, label %14, label %19

14:                                               ; preds = %11
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @DebugAssert(ptr noundef @.str, i64 noundef 417, ptr noundef @.str.4)
  br label %18

18:                                               ; preds = %17, %14
  br label %19

19:                                               ; preds = %18, %11
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %22, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %23, i32 0, i32 11
  %25 = getelementptr inbounds %struct._LIST_ENTRY, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %26, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._LIST_ENTRY, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  store ptr %29, ptr %7, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %114, %21
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %32, i32 0, i32 11
  %34 = icmp ne ptr %31, %33
  br i1 %34, label %35, label %119

35:                                               ; preds = %30
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = ptrtoint ptr %36 to i64
  %38 = sub i64 %37, 0
  %39 = inttoptr i64 %38 to ptr
  store ptr %39, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %40, i32 0, i32 4
  %42 = load i32, ptr %41, align 4, !tbaa !21
  %43 = icmp ule i32 %42, 5000000
  br i1 %43, label %44, label %108

44:                                               ; preds = %35
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !23
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %69

49:                                               ; preds = %44
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = call i64 @ArpAddressResolved(ptr noundef %50, ptr noundef null, ptr noundef null)
  br label %52

52:                                               ; preds = %49
  %53 = call zeroext i8 @DebugAssertEnabled()
  %54 = icmp ne i8 %53, 0
  br i1 %54, label %55, label %62

55:                                               ; preds = %52
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %56, i32 0, i32 6
  %58 = call zeroext i8 @IsListEmpty(ptr noundef %57)
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  call void @DebugAssert(ptr noundef @.str, i64 noundef 437, ptr noundef @.str.6)
  br label %61

61:                                               ; preds = %60, %55
  br label %62

62:                                               ; preds = %61, %52
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %65, i32 0, i32 0
  %67 = call ptr @RemoveEntryList(ptr noundef %66)
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  call void @FreePool(ptr noundef %68)
  br label %107

69:                                               ; preds = %44
  br label %70

70:                                               ; preds = %69
  %71 = call zeroext i8 @DebugAssertEnabled()
  %72 = icmp ne i8 %71, 0
  br i1 %72, label %73, label %80

73:                                               ; preds = %70
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %74, i32 0, i32 6
  %76 = call zeroext i8 @IsListEmpty(ptr noundef %75)
  %77 = icmp ne i8 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  call void @DebugAssert(ptr noundef @.str, i64 noundef 445, ptr noundef @.str.7)
  br label %79

79:                                               ; preds = %78, %73
  br label %80

80:                                               ; preds = %79, %70
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %83, i32 0, i32 6
  %85 = getelementptr inbounds %struct._LIST_ENTRY, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !24
  store ptr %86, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = ptrtoint ptr %87 to i64
  %89 = sub i64 %88, 0
  %90 = inttoptr i64 %89 to ptr
  store ptr %90, ptr %10, align 8, !tbaa !5
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  call void @ArpSendFrame(ptr noundef %93, ptr noundef %94, i16 noundef zeroext 1)
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !23
  %98 = add i32 %97, -1
  store i32 %98, ptr %96, align 8, !tbaa !23
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.USER_REQUEST_CONTEXT, ptr %99, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %101, i32 0, i32 5
  %103 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %102, i32 0, i32 5
  %104 = load i32, ptr %103, align 8, !tbaa !27
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %105, i32 0, i32 4
  store i32 %104, ptr %106, align 4, !tbaa !21
  br label %107

107:                                              ; preds = %82, %64
  br label %113

108:                                              ; preds = %35
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %109, i32 0, i32 4
  %111 = load i32, ptr %110, align 4, !tbaa !21
  %112 = sub i32 %111, 5000000
  store i32 %112, ptr %110, align 4, !tbaa !21
  br label %113

113:                                              ; preds = %108, %107
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %115, ptr %6, align 8, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._LIST_ENTRY, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !20
  store ptr %118, ptr %7, align 8, !tbaa !5
  br label %30, !llvm.loop !31

119:                                              ; preds = %30
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %120, i32 0, i32 12
  %122 = getelementptr inbounds %struct._LIST_ENTRY, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !33
  store ptr %123, ptr %6, align 8, !tbaa !5
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._LIST_ENTRY, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !20
  store ptr %126, ptr %7, align 8, !tbaa !5
  br label %127

127:                                              ; preds = %171, %119
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %129, i32 0, i32 12
  %131 = icmp ne ptr %128, %130
  br i1 %131, label %132, label %176

132:                                              ; preds = %127
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = ptrtoint ptr %133 to i64
  %135 = sub i64 %134, 0
  %136 = inttoptr i64 %135 to ptr
  store ptr %136, ptr %9, align 8, !tbaa !5
  br label %137

137:                                              ; preds = %132
  %138 = call zeroext i8 @DebugAssertEnabled()
  %139 = icmp ne i8 %138, 0
  br i1 %139, label %140, label %147

140:                                              ; preds = %137
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %141, i32 0, i32 6
  %143 = call zeroext i8 @IsListEmpty(ptr noundef %142)
  %144 = icmp ne i8 %143, 0
  br i1 %144, label %146, label %145

145:                                              ; preds = %140
  call void @DebugAssert(ptr noundef @.str, i64 noundef 468, ptr noundef @.str.6)
  br label %146

146:                                              ; preds = %145, %140
  br label %147

147:                                              ; preds = %146, %137
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %150, i32 0, i32 2
  %152 = load i32, ptr %151, align 4, !tbaa !34
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  br label %171

155:                                              ; preds = %149
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 8, !tbaa !35
  %159 = icmp ule i32 %158, 5000000
  br i1 %159, label %160, label %165

160:                                              ; preds = %155
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %161, i32 0, i32 0
  %163 = call ptr @RemoveEntryList(ptr noundef %162)
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  call void @FreePool(ptr noundef %164)
  br label %170

165:                                              ; preds = %155
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %166, i32 0, i32 3
  %168 = load i32, ptr %167, align 8, !tbaa !35
  %169 = sub i32 %168, 5000000
  store i32 %169, ptr %167, align 8, !tbaa !35
  br label %170

170:                                              ; preds = %165, %160
  br label %171

171:                                              ; preds = %170, %154
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %172, ptr %6, align 8, !tbaa !5
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._LIST_ENTRY, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !20
  store ptr %175, ptr %7, align 8, !tbaa !5
  br label %127, !llvm.loop !36

176:                                              ; preds = %127
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %177, i32 0, i32 13
  %179 = getelementptr inbounds %struct._LIST_ENTRY, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !37
  store ptr %180, ptr %6, align 8, !tbaa !5
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._LIST_ENTRY, ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !20
  store ptr %183, ptr %7, align 8, !tbaa !5
  br label %184

184:                                              ; preds = %228, %176
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %186, i32 0, i32 13
  %188 = icmp ne ptr %185, %187
  br i1 %188, label %189, label %233

189:                                              ; preds = %184
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = ptrtoint ptr %190 to i64
  %192 = sub i64 %191, 0
  %193 = inttoptr i64 %192 to ptr
  store ptr %193, ptr %9, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %189
  %195 = call zeroext i8 @DebugAssertEnabled()
  %196 = icmp ne i8 %195, 0
  br i1 %196, label %197, label %204

197:                                              ; preds = %194
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %198, i32 0, i32 6
  %200 = call zeroext i8 @IsListEmpty(ptr noundef %199)
  %201 = icmp ne i8 %200, 0
  br i1 %201, label %203, label %202

202:                                              ; preds = %197
  call void @DebugAssert(ptr noundef @.str, i64 noundef 496, ptr noundef @.str.6)
  br label %203

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

204:                                              ; preds = %203, %194
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %207, i32 0, i32 2
  %209 = load i32, ptr %208, align 4, !tbaa !34
  %210 = icmp eq i32 %209, 0
  br i1 %210, label %211, label %212

211:                                              ; preds = %206
  br label %228

212:                                              ; preds = %206
  %213 = load ptr, ptr %9, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %213, i32 0, i32 3
  %215 = load i32, ptr %214, align 8, !tbaa !35
  %216 = icmp ule i32 %215, 5000000
  br i1 %216, label %217, label %222

217:                                              ; preds = %212
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %218, i32 0, i32 0
  %220 = call ptr @RemoveEntryList(ptr noundef %219)
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  call void @FreePool(ptr noundef %221)
  br label %227

222:                                              ; preds = %212
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %223, i32 0, i32 3
  %225 = load i32, ptr %224, align 8, !tbaa !35
  %226 = sub i32 %225, 5000000
  store i32 %226, ptr %224, align 8, !tbaa !35
  br label %227

227:                                              ; preds = %222, %217
  br label %228

228:                                              ; preds = %227, %211
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %229, ptr %6, align 8, !tbaa !5
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._LIST_ENTRY, ptr %230, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !20
  store ptr %232, ptr %7, align 8, !tbaa !5
  br label %184, !llvm.loop !38

233:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 784}
!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 = !{!19, !6, i64 0}
!21 = !{!22, !11, i64 28}
!22 = !{!"", !19, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !19, i64 128}
!23 = !{!22, !11, i64 16}
!24 = !{!22, !6, i64 128}
!25 = !{!26, !6, i64 16}
!26 = !{!"", !19, i64 0, !6, i64 16, !6, i64 24, !6, i64 32}
!27 = !{!28, !11, i64 120}
!28 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !29, i64 24, !19, i64 80, !30, i64 96, !7, i64 128, !7, i64 129}
!29 = !{!"_EFI_ARP_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!30 = !{!"", !14, i64 0, !7, i64 2, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!10, !6, i64 800}
!34 = !{!22, !11, i64 20}
!35 = !{!22, !11, i64 24}
!36 = distinct !{!36, !32}
!37 = !{!10, !6, i64 816}
!38 = distinct !{!38, !32}


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

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [43 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

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @ArpTimerHandler(ptr nocapture noundef readnone %0, ptr noundef readonly %1) local_unnamed_addr #1 {
  %3 = tail call zeroext i8 @DebugAssertEnabled() #2
  %4 = icmp eq i8 %3, 0
  %5 = icmp ne ptr %1, null
  %or.cond = or i1 %5, %4
  br i1 %or.cond, label %7, label %6

6:                                                ; preds = %2
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 417, ptr noundef nonnull @.str.4) #2
  br label %7

7:                                                ; preds = %6, %2
  %8 = getelementptr inbounds i8, ptr %1, i64 784
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %.not68 = icmp eq ptr %9, %8
  br i1 %.not68, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %7, %44
  %.069 = phi ptr [ %.05170, %44 ], [ %9, %7 ]
  %.05170 = load ptr, ptr %.069, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %.069, i64 28
  %11 = load i32, ptr %10, align 4, !tbaa !20
  %12 = icmp ult i32 %11, 5000001
  br i1 %12, label %13, label %42

13:                                               ; preds = %.lr.ph
  %14 = getelementptr inbounds i8, ptr %.069, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !22
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %26

17:                                               ; preds = %13
  %18 = tail call i64 @ArpAddressResolved(ptr noundef nonnull %.069, ptr noundef null, ptr noundef null)
  %19 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not65 = icmp eq i8 %19, 0
  br i1 %.not65, label %24, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %.069, i64 128
  %22 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %21) #2
  %.not66 = icmp eq i8 %22, 0
  br i1 %.not66, label %23, label %24

23:                                               ; preds = %20
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 437, ptr noundef nonnull @.str.6) #2
  br label %24

24:                                               ; preds = %20, %23, %17
  %25 = tail call ptr @RemoveEntryList(ptr noundef nonnull %.069) #2
  tail call void @FreePool(ptr noundef nonnull %.069) #2
  br label %44

26:                                               ; preds = %13
  %27 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not63 = icmp eq i8 %27, 0
  br i1 %.not63, label %32, label %28

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %.069, i64 128
  %30 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %29) #2
  %.not64 = icmp eq i8 %30, 0
  br i1 %.not64, label %32, label %31

31:                                               ; preds = %28
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 445, ptr noundef nonnull @.str.7) #2
  br label %32

32:                                               ; preds = %28, %31, %26
  %33 = getelementptr inbounds i8, ptr %.069, i64 128
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load ptr, ptr %35, align 8, !tbaa !24
  tail call void @ArpSendFrame(ptr noundef %36, ptr noundef nonnull %.069, i16 noundef zeroext 1)
  %37 = load i32, ptr %14, align 8, !tbaa !22
  %38 = add i32 %37, -1
  store i32 %38, ptr %14, align 8, !tbaa !22
  %39 = load ptr, ptr %35, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %39, i64 120
  %41 = load i32, ptr %40, align 8, !tbaa !26
  store i32 %41, ptr %10, align 4, !tbaa !20
  br label %44

42:                                               ; preds = %.lr.ph
  %43 = add i32 %11, -5000000
  store i32 %43, ptr %10, align 4, !tbaa !20
  br label %44

44:                                               ; preds = %42, %32, %24
  %.not = icmp eq ptr %.05170, %8
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !30

._crit_edge:                                      ; preds = %44, %7
  %45 = getelementptr inbounds i8, ptr %1, i64 800
  %46 = load ptr, ptr %45, align 8, !tbaa !32
  %.not5772 = icmp eq ptr %46, %45
  br i1 %.not5772, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %._crit_edge, %64
  %.173 = phi ptr [ %.15274, %64 ], [ %46, %._crit_edge ]
  %.15274 = load ptr, ptr %.173, align 8, !tbaa !19
  %47 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not61 = icmp eq i8 %47, 0
  br i1 %.not61, label %52, label %48

48:                                               ; preds = %.lr.ph76
  %49 = getelementptr inbounds i8, ptr %.173, i64 128
  %50 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %49) #2
  %.not62 = icmp eq i8 %50, 0
  br i1 %.not62, label %51, label %52

51:                                               ; preds = %48
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 468, ptr noundef nonnull @.str.6) #2
  br label %52

52:                                               ; preds = %48, %51, %.lr.ph76
  %53 = getelementptr inbounds i8, ptr %.173, i64 20
  %54 = load i32, ptr %53, align 4, !tbaa !33
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %64, label %56

56:                                               ; preds = %52
  %57 = getelementptr inbounds i8, ptr %.173, i64 24
  %58 = load i32, ptr %57, align 8, !tbaa !34
  %59 = icmp ult i32 %58, 5000001
  br i1 %59, label %60, label %62

60:                                               ; preds = %56
  %61 = tail call ptr @RemoveEntryList(ptr noundef nonnull %.173) #2
  tail call void @FreePool(ptr noundef nonnull %.173) #2
  br label %64

62:                                               ; preds = %56
  %63 = add i32 %58, -5000000
  store i32 %63, ptr %57, align 8, !tbaa !34
  br label %64

64:                                               ; preds = %60, %62, %52
  %.not57 = icmp eq ptr %.15274, %45
  br i1 %.not57, label %._crit_edge77, label %.lr.ph76, !llvm.loop !35

._crit_edge77:                                    ; preds = %64, %._crit_edge
  %65 = getelementptr inbounds i8, ptr %1, i64 816
  %66 = load ptr, ptr %65, align 8, !tbaa !36
  %.not5879 = icmp eq ptr %66, %65
  br i1 %.not5879, label %._crit_edge84, label %.lr.ph83

.lr.ph83:                                         ; preds = %._crit_edge77, %84
  %.280 = phi ptr [ %.25381, %84 ], [ %66, %._crit_edge77 ]
  %.25381 = load ptr, ptr %.280, align 8, !tbaa !19
  %67 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not59 = icmp eq i8 %67, 0
  br i1 %.not59, label %72, label %68

68:                                               ; preds = %.lr.ph83
  %69 = getelementptr inbounds i8, ptr %.280, i64 128
  %70 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %69) #2
  %.not60 = icmp eq i8 %70, 0
  br i1 %.not60, label %71, label %72

71:                                               ; preds = %68
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 496, ptr noundef nonnull @.str.6) #2
  br label %72

72:                                               ; preds = %68, %71, %.lr.ph83
  %73 = getelementptr inbounds i8, ptr %.280, i64 20
  %74 = load i32, ptr %73, align 4, !tbaa !33
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %84, label %76

76:                                               ; preds = %72
  %77 = getelementptr inbounds i8, ptr %.280, i64 24
  %78 = load i32, ptr %77, align 8, !tbaa !34
  %79 = icmp ult i32 %78, 5000001
  br i1 %79, label %80, label %82

80:                                               ; preds = %76
  %81 = tail call ptr @RemoveEntryList(ptr noundef nonnull %.280) #2
  tail call void @FreePool(ptr noundef nonnull %.280) #2
  br label %84

82:                                               ; preds = %76
  %83 = add i32 %78, -5000000
  store i32 %83, ptr %77, align 8, !tbaa !34
  br label %84

84:                                               ; preds = %80, %82, %72
  %.not58 = icmp eq ptr %.25381, %65
  br i1 %.not58, label %._crit_edge84, label %.lr.ph83, !llvm.loop !37

._crit_edge84:                                    ; preds = %84, %._crit_edge77
  ret void
}

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 = { 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, !11, i64 784}
!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 = !{!18, !11, i64 0}
!20 = !{!21, !7, i64 28}
!21 = !{!"", !18, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !18, i64 128}
!22 = !{!21, !7, i64 16}
!23 = !{!21, !11, i64 128}
!24 = !{!25, !11, i64 16}
!25 = !{!"", !18, i64 0, !11, i64 16, !11, i64 24, !11, i64 32}
!26 = !{!27, !7, i64 120}
!27 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !28, i64 24, !18, i64 80, !29, i64 96, !8, i64 128, !8, i64 129}
!28 = !{!"_EFI_ARP_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!29 = !{!"", !13, i64 0, !8, i64 2, !11, i64 8, !7, i64 16, !7, i64 20, !7, i64 24}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!6, !11, i64 800}
!33 = !{!21, !7, i64 20}
!34 = !{!21, !7, i64 24}
!35 = distinct !{!35, !31}
!36 = !{!6, !11, i64 816}
!37 = distinct !{!37, !31}


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