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

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

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@gBS = external global ptr, align 8
@gEfiManagedNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiArpServiceBindingProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @ArpDriverBindingStop(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, 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 i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store 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
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = call ptr @NetLibGetNicHandle(ptr noundef %16, ptr noundef @gEfiManagedNetworkProtocolGuid)
  store ptr %17, ptr %11, align 8, !tbaa !5
  %18 = load ptr, ptr %11, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %4
  store i64 0, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %134

21:                                               ; preds = %4
  %22 = load ptr, ptr @gBS, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %22, i32 0, i32 33
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %26, i32 0, i32 5
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call i64 %24(ptr noundef %25, ptr noundef @gEfiArpServiceBindingProtocolGuid, ptr noundef %12, ptr noundef %28, ptr noundef %29, i32 noundef 2)
  store i64 %30, ptr %10, align 8, !tbaa !9
  %31 = load i64, ptr %10, align 8, !tbaa !9
  %32 = icmp slt i64 %31, 0
  br i1 %32, label %33, label %49

33:                                               ; preds = %21
  br label %34

34:                                               ; preds = %33
  %35 = call zeroext i8 @DebugPrintEnabled()
  %36 = icmp ne i8 %35, 0
  br i1 %36, label %37, label %46

37:                                               ; preds = %34
  br label %38

38:                                               ; preds = %37
  %39 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %40 = icmp ne i8 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = load i64, ptr %10, align 8, !tbaa !9
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.4, i64 noundef %42)
  br label %43

43:                                               ; preds = %41, %38
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45, %34
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %134

49:                                               ; preds = %21
  %50 = call zeroext i8 @DebugAssertEnabled()
  %51 = zext i8 %50 to i32
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %63

53:                                               ; preds = %49
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = ptrtoint ptr %54 to i64
  %56 = sub i64 %55, ptrtoint (ptr getelementptr inbounds (%struct._ARP_SERVICE_DATA, ptr null, i32 0, i32 1) to i64)
  %57 = inttoptr i64 %56 to ptr
  %58 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !17
  %60 = icmp ne i32 %59, 1397772865
  br i1 %60, label %61, label %63

61:                                               ; preds = %53
  call void @DebugAssert(ptr noundef @.str, i64 noundef 505, ptr noundef @.str.3)
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  br label %68

63:                                               ; preds = %53, %49
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = ptrtoint ptr %64 to i64
  %66 = sub i64 %65, ptrtoint (ptr getelementptr inbounds (%struct._ARP_SERVICE_DATA, ptr null, i32 0, i32 1) to i64)
  %67 = inttoptr i64 %66 to ptr
  br label %68

68:                                               ; preds = %63, %61
  %69 = phi ptr [ %62, %61 ], [ %67, %63 ]
  store ptr %69, ptr %13, align 8, !tbaa !5
  %70 = load i64, ptr %8, align 8, !tbaa !9
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %72, label %117

72:                                               ; preds = %68
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %73, i32 0, i32 10
  store ptr %74, ptr %14, align 8, !tbaa !5
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = call i64 @NetDestroyLinkList(ptr noundef %75, ptr noundef @ArpDestroyChildEntryInHandleBuffer, ptr noundef %76, ptr noundef null)
  store i64 %77, ptr %10, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %72
  %79 = call zeroext i8 @DebugAssertEnabled()
  %80 = icmp ne i8 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %78
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %82, i32 0, i32 11
  %84 = call zeroext i8 @IsListEmpty(ptr noundef %83)
  %85 = icmp ne i8 %84, 0
  br i1 %85, label %87, label %86

86:                                               ; preds = %81
  call void @DebugAssert(ptr noundef @.str, i64 noundef 518, ptr noundef @.str.5)
  br label %87

87:                                               ; preds = %86, %81
  br label %88

88:                                               ; preds = %87, %78
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = call zeroext i8 @DebugAssertEnabled()
  %93 = icmp ne i8 %92, 0
  br i1 %93, label %94, label %101

94:                                               ; preds = %91
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %95, i32 0, i32 12
  %97 = call zeroext i8 @IsListEmpty(ptr noundef %96)
  %98 = icmp ne i8 %97, 0
  br i1 %98, label %100, label %99

99:                                               ; preds = %94
  call void @DebugAssert(ptr noundef @.str, i64 noundef 519, ptr noundef @.str.6)
  br label %100

100:                                              ; preds = %99, %94
  br label %101

101:                                              ; preds = %100, %91
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  %105 = call zeroext i8 @DebugAssertEnabled()
  %106 = icmp ne i8 %105, 0
  br i1 %106, label %107, label %114

107:                                              ; preds = %104
  %108 = load ptr, ptr %13, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %108, i32 0, i32 13
  %110 = call zeroext i8 @IsListEmpty(ptr noundef %109)
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %113, label %112

112:                                              ; preds = %107
  call void @DebugAssert(ptr noundef @.str, i64 noundef 520, ptr noundef @.str.7)
  br label %113

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

114:                                              ; preds = %113, %104
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  br label %133

117:                                              ; preds = %68
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %118, i32 0, i32 10
  %120 = call zeroext i8 @IsListEmpty(ptr noundef %119)
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %132

122:                                              ; preds = %117
  %123 = load ptr, ptr @gBS, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %123, i32 0, i32 40
  %125 = load ptr, ptr %124, align 8, !tbaa !26
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %127, i32 0, i32 1
  %129 = call i64 (ptr, ...) %125(ptr noundef %126, ptr noundef @gEfiArpServiceBindingProtocolGuid, ptr noundef %128, ptr noundef null)
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  call void @ArpCleanService(ptr noundef %130)
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %131)
  br label %132

132:                                              ; preds = %122, %117
  br label %133

133:                                              ; preds = %132, %116
  store i64 0, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %134

134:                                              ; preds = %133, %48, %20
  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
  %135 = load i64, ptr %5, align 8
  ret i64 %135
}

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

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

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

declare void @FreePool(ptr noundef) #2

declare ptr @NetLibGetNicHandle(ptr noundef, ptr noundef) #2

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

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

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

declare zeroext i8 @IsListEmpty(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 280}
!12 = !{!"", !13, 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}
!13 = !{!"", !10, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 40}
!16 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !6, i64 40}
!17 = !{!18, !14, i64 0}
!18 = !{!"_ARP_SERVICE_DATA", !14, i64 0, !19, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !20, i64 56, !22, i64 80, !23, i64 104, !10, i64 760, !25, i64 768, !25, i64 784, !25, i64 800, !25, i64 816, !6, i64 832}
!19 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!20 = !{!"", !14, i64 0, !14, i64 4, !21, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!21 = !{!"short", !7, i64 0}
!22 = !{!"", !6, i64 0, !10, i64 8, !7, i64 16}
!23 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, 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 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!26 = !{!12, !6, i64 336}


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

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiManagedNetworkProtocolGuid = external global %struct.GUID, align 4
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@gEfiArpServiceBindingProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775801, 1) i64 @ArpDriverBindingStop(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = tail call ptr @NetLibGetNicHandle(ptr noundef %1, ptr noundef nonnull @gEfiManagedNetworkProtocolGuid) #3
  %7 = icmp eq ptr %6, null
  br i1 %7, label %57, label %8

8:                                                ; preds = %4
  %9 = load ptr, ptr @gBS, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 280
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = call i64 %11(ptr noundef nonnull %6, ptr noundef nonnull @gEfiArpServiceBindingProtocolGuid, ptr noundef nonnull %5, ptr noundef %13, ptr noundef %1, i32 noundef 2) #3
  %15 = icmp slt i64 %14, 0
  br i1 %15, label %16, label %21

16:                                               ; preds = %8
  %17 = call zeroext i8 @DebugPrintEnabled() #3
  %.not29 = icmp eq i8 %17, 0
  br i1 %.not29, label %57, label %18

18:                                               ; preds = %16
  %19 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not30 = icmp eq i8 %19, 0
  br i1 %.not30, label %57, label %20

20:                                               ; preds = %18
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.4, i64 noundef %14) #3
  br label %57

21:                                               ; preds = %8
  %22 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %22, 0
  %.pre = load ptr, ptr %5, align 8, !tbaa !5
  %.pre31 = ptrtoint ptr %.pre to i64
  %.pre32 = add i64 %.pre31, -8
  %.pre34 = inttoptr i64 %.pre32 to ptr
  br i1 %.not, label %._crit_edge, label %23

23:                                               ; preds = %21
  %24 = load i32, ptr %.pre34, align 8, !tbaa !16
  %.not20 = icmp eq i32 %24, 1397772865
  br i1 %.not20, label %._crit_edge, label %25

25:                                               ; preds = %23
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 505, ptr noundef nonnull @.str.3) #3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %21, %23, %25
  %27 = phi ptr [ %26, %25 ], [ %.pre, %23 ], [ %.pre, %21 ]
  %28 = phi ptr [ %26, %25 ], [ %.pre34, %23 ], [ %.pre34, %21 ]
  %.not21 = icmp eq i64 %2, 0
  %29 = getelementptr inbounds i8, ptr %28, i64 768
  br i1 %.not21, label %49, label %30

30:                                               ; preds = %._crit_edge
  %31 = call i64 @NetDestroyLinkList(ptr noundef nonnull %29, ptr noundef nonnull @ArpDestroyChildEntryInHandleBuffer, ptr noundef %27, ptr noundef null) #3
  %32 = call zeroext i8 @DebugAssertEnabled() #3
  %.not23 = icmp eq i8 %32, 0
  br i1 %.not23, label %37, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %28, i64 784
  %35 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %34) #3
  %.not24 = icmp eq i8 %35, 0
  br i1 %.not24, label %36, label %37

36:                                               ; preds = %33
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 518, ptr noundef nonnull @.str.5) #3
  br label %37

37:                                               ; preds = %30, %36, %33
  %38 = call zeroext i8 @DebugAssertEnabled() #3
  %.not25 = icmp eq i8 %38, 0
  br i1 %.not25, label %43, label %39

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %28, i64 800
  %41 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %40) #3
  %.not26 = icmp eq i8 %41, 0
  br i1 %.not26, label %42, label %43

42:                                               ; preds = %39
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 519, ptr noundef nonnull @.str.6) #3
  br label %43

43:                                               ; preds = %37, %42, %39
  %44 = call zeroext i8 @DebugAssertEnabled() #3
  %.not27 = icmp eq i8 %44, 0
  br i1 %.not27, label %57, label %45

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %28, i64 816
  %47 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %46) #3
  %.not28 = icmp eq i8 %47, 0
  br i1 %.not28, label %48, label %57

48:                                               ; preds = %45
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 520, ptr noundef nonnull @.str.7) #3
  br label %57

49:                                               ; preds = %._crit_edge
  %50 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %29) #3
  %.not22 = icmp eq i8 %50, 0
  br i1 %.not22, label %57, label %51

51:                                               ; preds = %49
  %52 = load ptr, ptr @gBS, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 336
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %28, i64 8
  %56 = call i64 (ptr, ...) %54(ptr noundef nonnull %6, ptr noundef nonnull @gEfiArpServiceBindingProtocolGuid, ptr noundef nonnull %55, ptr noundef null) #3
  call void @ArpCleanService(ptr noundef %28)
  call void @FreePool(ptr noundef %28) #3
  br label %57

57:                                               ; preds = %45, %48, %43, %51, %49, %16, %20, %18, %4
  %.0 = phi i64 [ 0, %4 ], [ -9223372036854775801, %18 ], [ -9223372036854775801, %20 ], [ -9223372036854775801, %16 ], [ 0, %49 ], [ 0, %51 ], [ 0, %43 ], [ 0, %48 ], [ 0, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i64 %.0
}

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare ptr @NetLibGetNicHandle(ptr noundef, ptr noundef) local_unnamed_addr #2

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 280}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 40}
!15 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!17, !13, i64 0}
!17 = !{!"_ARP_SERVICE_DATA", !13, i64 0, !18, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !19, i64 56, !21, i64 80, !22, i64 104, !12, i64 760, !24, i64 768, !24, i64 784, !24, i64 800, !24, i64 816, !6, i64 832}
!18 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!19 = !{!"", !13, i64 0, !13, i64 4, !20, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!20 = !{!"short", !7, i64 0}
!21 = !{!"", !6, i64 0, !12, i64 8, !7, i64 16}
!22 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !7, i64 40, !23, i64 552, !23, i64 584, !23, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!23 = !{!"", !7, i64 0}
!24 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!25 = !{!10, !6, i64 336}


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