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

; 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_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%struct._IP4_PROTOCOL = type { i32, %struct._EFI_IP4_PROTOCOL, ptr, i64, ptr, %struct._LIST_ENTRY, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_LOCK, ptr, %struct._LIST_ENTRY, ptr, ptr, i32, ptr, i32, %struct.EFI_IP4_CONFIG_DATA }
%struct._EFI_IP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._IP4_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, i32, i32, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, %struct._LIST_ENTRY, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 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._IP4_ROUTE_TABLE = type { i64, i32, [33 x %struct._LIST_ENTRY], ptr, %struct.IP4_ROUTE_CACHE }
%struct.IP4_ROUTE_CACHE = type { [31 x %struct._LIST_ENTRY] }

@gBS = external global ptr, align 8
@gEfiArpProtocolGuid = external global %struct.GUID, align 4
@gIp4DriverBinding = external global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8

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

declare void @Ip4FreeRouteTable(ptr noundef) #0

declare void @FreePool(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip4CleanProtocol(ptr noundef %0) #1 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = call i64 @Ip4Cancel(ptr noundef %4, ptr noundef null)
  %6 = icmp slt i64 %5, 0
  br i1 %6, label %7, label %8

7:                                                ; preds = %1
  store i64 -9223372036854775801, ptr %2, align 8
  br label %111

8:                                                ; preds = %1
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = call i64 @Ip4Groups(ptr noundef %9, i8 noundef zeroext 0, ptr noundef null)
  %11 = icmp slt i64 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  store i64 -9223372036854775801, ptr %2, align 8
  br label %111

13:                                               ; preds = %8
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %14, i32 0, i32 9
  %16 = call zeroext i8 @IsListEmpty(ptr noundef %15)
  %17 = icmp ne i8 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  br label %19

19:                                               ; preds = %18, %13
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %20, i32 0, i32 11
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %56

24:                                               ; preds = %19
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %25, i32 0, i32 12
  %27 = call ptr @RemoveEntryList(ptr noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %28, i32 0, i32 11
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct._IP4_INTERFACE, ptr %30, i32 0, i32 11
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %48

34:                                               ; preds = %24
  %35 = load ptr, ptr @gBS, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %35, i32 0, i32 34
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %38, i32 0, i32 11
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct._IP4_INTERFACE, ptr %40, i32 0, i32 12
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = load ptr, ptr getelementptr inbounds (%struct._EFI_DRIVER_BINDING_PROTOCOL, ptr @gIp4DriverBinding, i32 0, i32 5), align 8, !tbaa !25
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !27
  %47 = call i64 %37(ptr noundef %42, ptr noundef @gEfiArpProtocolGuid, ptr noundef %43, ptr noundef %46)
  br label %48

48:                                               ; preds = %34, %24
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %49, i32 0, i32 11
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = call i64 @Ip4FreeInterface(ptr noundef %51, ptr noundef %52)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %54, i32 0, i32 11
  store ptr null, ptr %55, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %48, %19
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %57, i32 0, i32 13
  %59 = load ptr, ptr %58, align 8, !tbaa !28
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %80

61:                                               ; preds = %56
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %62, i32 0, i32 13
  %64 = load ptr, ptr %63, align 8, !tbaa !28
  %65 = getelementptr inbounds %struct._IP4_ROUTE_TABLE, ptr %64, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !29
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %74

68:                                               ; preds = %61
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %69, i32 0, i32 13
  %71 = load ptr, ptr %70, align 8, !tbaa !28
  %72 = getelementptr inbounds %struct._IP4_ROUTE_TABLE, ptr %71, i32 0, i32 3
  %73 = load ptr, ptr %72, align 8, !tbaa !29
  call void @Ip4FreeRouteTable(ptr noundef %73)
  br label %74

74:                                               ; preds = %68, %61
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %75, i32 0, i32 13
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  call void @Ip4FreeRouteTable(ptr noundef %77)
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %78, i32 0, i32 13
  store ptr null, ptr %79, align 8, !tbaa !28
  br label %80

80:                                               ; preds = %74, %56
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %81, i32 0, i32 14
  %83 = load ptr, ptr %82, align 8, !tbaa !31
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %93

85:                                               ; preds = %80
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %86, i32 0, i32 14
  %88 = load ptr, ptr %87, align 8, !tbaa !31
  call void @FreePool(ptr noundef %88)
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %89, i32 0, i32 14
  store ptr null, ptr %90, align 8, !tbaa !31
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %91, i32 0, i32 15
  store i32 0, ptr %92, align 8, !tbaa !32
  br label %93

93:                                               ; preds = %85, %80
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %94, i32 0, i32 16
  %96 = load ptr, ptr %95, align 8, !tbaa !33
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %106

98:                                               ; preds = %93
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %99, i32 0, i32 16
  %101 = load ptr, ptr %100, align 8, !tbaa !33
  call void @FreePool(ptr noundef %101)
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %102, i32 0, i32 16
  store ptr null, ptr %103, align 8, !tbaa !33
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %104, i32 0, i32 17
  store i32 0, ptr %105, align 8, !tbaa !34
  br label %106

106:                                              ; preds = %98, %93
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %107, i32 0, i32 7
  call void @NetMapClean(ptr noundef %108)
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %109, i32 0, i32 6
  call void @NetMapClean(ptr noundef %110)
  store i64 0, ptr %2, align 8
  br label %111

111:                                              ; preds = %106, %12, %7
  %112 = load i64, ptr %2, align 8
  ret i64 %112
}

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

declare zeroext i8 @IsListEmpty(ptr noundef) #0

declare ptr @RemoveEntryList(ptr noundef) #0

declare void @NetMapClean(ptr noundef) #0

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

!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 248}
!10 = !{!"_IP4_PROTOCOL", !11, i64 0, !12, i64 8, !6, i64 72, !13, i64 80, !6, i64 88, !14, i64 96, !15, i64 112, !15, i64 152, !14, i64 192, !14, i64 208, !16, i64 224, !6, i64 248, !14, i64 256, !6, i64 272, !6, i64 280, !11, i64 288, !6, i64 296, !11, i64 304, !17, i64 308}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_IP4_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}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !14, i64 0, !14, i64 16, !13, i64 32}
!16 = !{!"", !13, i64 0, !13, i64 8, !11, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !18, i64 6, !18, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!18 = !{!"", !7, i64 0}
!19 = !{!20, !6, i64 80}
!20 = !{!"_IP4_INTERFACE", !11, i64 0, !14, i64 8, !13, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !7, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !14, i64 96, !14, i64 112, !6, i64 128, !18, i64 136, !18, i64 168, !11, i64 200, !14, i64 208, !7, i64 224}
!21 = !{!22, !6, i64 288}
!22 = !{!"", !23, 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}
!23 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!24 = !{!20, !6, i64 88}
!25 = !{!26, !6, i64 40}
!26 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !6, i64 40}
!27 = !{!10, !6, i64 72}
!28 = !{!10, !6, i64 272}
!29 = !{!30, !6, i64 544}
!30 = !{!"_IP4_ROUTE_TABLE", !13, i64 0, !11, i64 8, !7, i64 16, !6, i64 544, !18, i64 552}
!31 = !{!10, !6, i64 280}
!32 = !{!10, !11, i64 288}
!33 = !{!10, !6, i64 296}
!34 = !{!10, !11, i64 304}


; 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] }
%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }

@gBS = external local_unnamed_addr global ptr, align 8
@gEfiArpProtocolGuid = external global %struct.GUID, align 4
@gIp4DriverBinding = external local_unnamed_addr global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8

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

declare void @Ip4FreeRouteTable(ptr noundef) local_unnamed_addr #0

declare void @FreePool(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775801, 1) i64 @Ip4CleanProtocol(ptr noundef %0) local_unnamed_addr #1 {
  %2 = tail call i64 @Ip4Cancel(ptr noundef %0, ptr noundef null)
  %3 = icmp slt i64 %2, 0
  br i1 %3, label %53, label %4

4:                                                ; preds = %1
  %5 = tail call i64 @Ip4Groups(ptr noundef %0, i8 noundef zeroext 0, ptr noundef null)
  %6 = icmp slt i64 %5, 0
  br i1 %6, label %53, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 208
  %9 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %8) #2
  %10 = getelementptr inbounds i8, ptr %0, i64 248
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %31, label %12

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %0, i64 256
  %14 = tail call ptr @RemoveEntryList(ptr noundef nonnull %13) #2
  %15 = load ptr, ptr %10, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 80
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %.not30 = icmp eq ptr %17, null
  br i1 %.not30, label %28, label %18

18:                                               ; preds = %12
  %19 = load ptr, ptr @gBS, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %19, i64 288
  %21 = load ptr, ptr %20, align 8, !tbaa !21
  %22 = getelementptr inbounds i8, ptr %15, i64 88
  %23 = load ptr, ptr %22, align 8, !tbaa !24
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @gIp4DriverBinding, i64 40), align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  %26 = load ptr, ptr %25, align 8, !tbaa !27
  %27 = tail call i64 %21(ptr noundef %23, ptr noundef nonnull @gEfiArpProtocolGuid, ptr noundef %24, ptr noundef %26) #2
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %18, %12
  %29 = phi ptr [ %.pre, %18 ], [ %15, %12 ]
  %30 = tail call i64 @Ip4FreeInterface(ptr noundef %29, ptr noundef nonnull %0) #2
  store ptr null, ptr %10, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %28, %7
  %32 = getelementptr inbounds i8, ptr %0, i64 272
  %33 = load ptr, ptr %32, align 8, !tbaa !28
  %.not31 = icmp eq ptr %33, null
  br i1 %.not31, label %40, label %34

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %33, i64 544
  %36 = load ptr, ptr %35, align 8, !tbaa !29
  %.not32 = icmp eq ptr %36, null
  br i1 %.not32, label %38, label %37

37:                                               ; preds = %34
  tail call void @Ip4FreeRouteTable(ptr noundef nonnull %36) #2
  %.pre35 = load ptr, ptr %32, align 8, !tbaa !28
  br label %38

38:                                               ; preds = %37, %34
  %39 = phi ptr [ %.pre35, %37 ], [ %33, %34 ]
  tail call void @Ip4FreeRouteTable(ptr noundef %39) #2
  store ptr null, ptr %32, align 8, !tbaa !28
  br label %40

40:                                               ; preds = %38, %31
  %41 = getelementptr inbounds i8, ptr %0, i64 280
  %42 = load ptr, ptr %41, align 8, !tbaa !31
  %.not33 = icmp eq ptr %42, null
  br i1 %.not33, label %45, label %43

43:                                               ; preds = %40
  tail call void @FreePool(ptr noundef nonnull %42) #2
  store ptr null, ptr %41, align 8, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %0, i64 288
  store i32 0, ptr %44, align 8, !tbaa !32
  br label %45

45:                                               ; preds = %43, %40
  %46 = getelementptr inbounds i8, ptr %0, i64 296
  %47 = load ptr, ptr %46, align 8, !tbaa !33
  %.not34 = icmp eq ptr %47, null
  br i1 %.not34, label %50, label %48

48:                                               ; preds = %45
  tail call void @FreePool(ptr noundef nonnull %47) #2
  store ptr null, ptr %46, align 8, !tbaa !33
  %49 = getelementptr inbounds i8, ptr %0, i64 304
  store i32 0, ptr %49, align 8, !tbaa !34
  br label %50

50:                                               ; preds = %48, %45
  %51 = getelementptr inbounds i8, ptr %0, i64 152
  tail call void @NetMapClean(ptr noundef nonnull %51) #2
  %52 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @NetMapClean(ptr noundef nonnull %52) #2
  br label %53

53:                                               ; preds = %4, %1, %50
  %.0 = phi i64 [ 0, %50 ], [ -9223372036854775801, %1 ], [ -9223372036854775801, %4 ]
  ret i64 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ip4Groups(ptr noundef, i8 noundef zeroext, 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

declare void @NetMapClean(ptr noundef) local_unnamed_addr #0

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 248}
!6 = !{!"_IP4_PROTOCOL", !7, i64 0, !10, i64 8, !11, i64 72, !12, i64 80, !11, i64 88, !13, i64 96, !14, i64 112, !14, i64 152, !13, i64 192, !13, i64 208, !15, i64 224, !11, i64 248, !13, i64 256, !11, i64 272, !11, i64 280, !7, i64 288, !11, i64 296, !7, i64 304, !16, i64 308}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_IP4_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}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!14 = !{!"", !13, i64 0, !13, i64 16, !12, i64 32}
!15 = !{!"", !12, i64 0, !12, i64 8, !7, i64 16}
!16 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !17, i64 6, !17, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!17 = !{!"", !8, i64 0}
!18 = !{!19, !11, i64 80}
!19 = !{!"_IP4_INTERFACE", !7, i64 0, !13, i64 8, !12, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !8, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !13, i64 96, !13, i64 112, !11, i64 128, !17, i64 136, !17, i64 168, !7, i64 200, !13, i64 208, !8, i64 224}
!20 = !{!11, !11, i64 0}
!21 = !{!22, !11, i64 288}
!22 = !{!"", !23, 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}
!23 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!24 = !{!19, !11, i64 88}
!25 = !{!26, !11, i64 40}
!26 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !11, i64 40}
!27 = !{!6, !11, i64 72}
!28 = !{!6, !11, i64 272}
!29 = !{!30, !11, i64 544}
!30 = !{!"_IP4_ROUTE_TABLE", !12, i64 0, !7, i64 8, !8, i64 16, !11, i64 544, !17, i64 552}
!31 = !{!6, !11, i64 280}
!32 = !{!6, !7, i64 288}
!33 = !{!6, !11, i64 296}
!34 = !{!6, !7, i64 304}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass