; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/Ip6Dxe (Ip6CancelFrames)

; 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._IP6_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, i8, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i8 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._IP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP6_LINK_RX_TOKEN, %struct.IP6_ASSEMBLE_TABLE, %struct.IP6_MLD_SERVICE_DATA, %struct.EFI_IPv6_ADDRESS, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i8, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, %struct._IP6_CONFIG_INSTANCE, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.IP6_LINK_RX_TOKEN = type { i32, ptr, ptr, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.IP6_ASSEMBLE_TABLE = type { [127 x %struct._LIST_ENTRY] }
%struct.IP6_MLD_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%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._IP6_CONFIG_INSTANCE = type { i32, i8, %struct._LIST_ENTRY, i16, %struct.EFI_IP6_CONFIG_INTERFACE_INFO, %struct.EFI_IP6_CONFIG_INTERFACE_ID, i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, [7 x %struct.IP6_CONFIG_DATA_ITEM], %struct.NET_MAP, %struct.NET_MAP, %struct._EFI_IP6_CONFIG_PROTOCOL, ptr, ptr, ptr, ptr, i8, i32, ptr, i32, ptr, i32, %struct._IP6_FORM_CALLBACK_INFO, %struct.IP6_CONFIG_NVDATA }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_ID = type { [8 x i8] }
%struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS = type { i32 }
%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%union.IP6_CONFIG_DATA = type { ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._EFI_IP6_CONFIG_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._IP6_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }
%struct.IP6_CONFIG_NVDATA = type { i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, %struct.EFI_IP6_CONFIG_INTERFACE_ID, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32 }
%struct._IP6_NEIGHBOR_ENTRY = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, i32, i32, %struct._LIST_ENTRY, ptr, ptr }
%struct.IP6_LINK_TX_TOKEN = type { i32, %struct._LIST_ENTRY, ptr, ptr, ptr, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA }
%struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA = type { ptr, ptr, i16, i32, i16, i16, [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA] }
%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }
%struct._EFI_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [131 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @Ip6CancelFrames(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  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 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %15, i32 0, i32 6
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  store ptr %17, ptr %12, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %4
  %19 = call zeroext i8 @DebugAssertEnabled()
  %20 = icmp ne i8 %19, 0
  br i1 %20, label %21, label %31

21:                                               ; preds = %18
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %29

24:                                               ; preds = %21
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._IP6_SERVICE, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !15
  %28 = icmp eq i32 %27, 1396068425
  br i1 %28, label %30, label %29

29:                                               ; preds = %24, %21
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1041, ptr noundef @.str.2)
  br label %30

30:                                               ; preds = %29, %24
  br label %31

31:                                               ; preds = %30, %18
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %34, i32 0, i32 9
  %36 = getelementptr inbounds %struct._LIST_ENTRY, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !33
  store ptr %37, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._LIST_ENTRY, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !34
  store ptr %40, ptr %10, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %83, %33
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %43, i32 0, i32 9
  %45 = icmp ne ptr %42, %44
  br i1 %45, label %46, label %88

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = ptrtoint ptr %47 to i64
  %49 = sub i64 %48, ptrtoint (ptr getelementptr inbounds (%struct._IP6_NEIGHBOR_ENTRY, ptr null, i32 0, i32 1) to i64)
  %50 = inttoptr i64 %49 to ptr
  store ptr %50, ptr %13, align 8, !tbaa !5
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = load i64, ptr %6, align 8, !tbaa !9
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = call i64 @Ip6FreeNeighborEntry(ptr noundef %51, ptr noundef %52, i8 noundef zeroext 0, i8 noundef zeroext 0, i64 noundef %53, ptr noundef %54, ptr noundef %55)
  store i64 %56, ptr %14, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %46
  %58 = call zeroext i8 @DebugAssertEnabled()
  %59 = icmp ne i8 %58, 0
  br i1 %59, label %60, label %80

60:                                               ; preds = %57
  %61 = load i64, ptr %14, align 8, !tbaa !9
  %62 = icmp slt i64 %61, 0
  br i1 %62, label %63, label %79

63:                                               ; preds = %60
  br label %64

64:                                               ; preds = %63
  %65 = call zeroext i8 @DebugPrintEnabled()
  %66 = icmp ne i8 %65, 0
  br i1 %66, label %67, label %76

67:                                               ; preds = %64
  br label %68

68:                                               ; preds = %67
  %69 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %68
  %72 = load i64, ptr %14, align 8, !tbaa !9
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.11, i64 noundef %72)
  br label %73

73:                                               ; preds = %71, %68
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %64
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1058, ptr noundef @.str.12)
  br label %79

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

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

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %84, ptr %9, align 8, !tbaa !5
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._LIST_ENTRY, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !34
  store ptr %87, ptr %10, align 8, !tbaa !5
  br label %41, !llvm.loop !35

88:                                               ; preds = %41
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %89, i32 0, i32 10
  %91 = getelementptr inbounds %struct._LIST_ENTRY, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !37
  store ptr %92, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._LIST_ENTRY, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !34
  store ptr %95, ptr %10, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %128, %88
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %98, i32 0, i32 10
  %100 = icmp ne ptr %97, %99
  br i1 %100, label %101, label %133

101:                                              ; preds = %96
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = ptrtoint ptr %102 to i64
  %104 = sub i64 %103, ptrtoint (ptr getelementptr inbounds (%struct.IP6_LINK_TX_TOKEN, ptr null, i32 0, i32 1) to i64)
  %105 = inttoptr i64 %104 to ptr
  store ptr %105, ptr %11, align 8, !tbaa !5
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = icmp eq ptr %106, null
  br i1 %107, label %115, label %108

108:                                              ; preds = %101
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = call zeroext i8 %109(ptr noundef %110, ptr noundef %111)
  %113 = zext i8 %112 to i32
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %127

115:                                              ; preds = %108, %101
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._IP6_SERVICE, ptr %116, i32 0, i32 34
  %118 = load ptr, ptr %117, align 8, !tbaa !38
  %119 = getelementptr inbounds %struct._EFI_MANAGED_NETWORK_PROTOCOL, ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !39
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._IP6_SERVICE, ptr %121, i32 0, i32 34
  %123 = load ptr, ptr %122, align 8, !tbaa !38
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.IP6_LINK_TX_TOKEN, ptr %124, i32 0, i32 8
  %126 = call i64 %120(ptr noundef %123, ptr noundef %125)
  br label %127

127:                                              ; preds = %115, %108
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %129, ptr %9, align 8, !tbaa !5
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._LIST_ENTRY, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !34
  store ptr %132, ptr %10, align 8, !tbaa !5
  br label %96, !llvm.loop !41

133:                                              ; preds = %96
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

declare i64 @Ip6FreeNeighborEntry(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) #1

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 56}
!12 = !{!"_IP6_INTERFACE", !13, i64 0, !14, i64 8, !10, i64 24, !14, i64 32, !13, i64 48, !7, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !14, i64 80, !14, i64 96, !13, i64 112, !14, i64 120, !14, i64 136, !14, i64 152, !7, i64 168}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!16, !13, i64 0}
!16 = !{!"_IP6_SERVICE", !13, i64 0, !17, i64 8, !10, i64 24, !10, i64 32, !14, i64 40, !14, i64 56, !6, i64 72, !6, i64 80, !18, i64 88, !20, i64 136, !21, i64 2168, !20, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !13, i64 2216, !13, i64 2220, !13, i64 2224, !13, i64 2228, !14, i64 2232, !14, i64 2248, !14, i64 2264, !14, i64 2280, !13, i64 2296, !7, i64 2300, !6, i64 2304, !7, i64 2312, !7, i64 2313, !13, i64 2316, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !22, i64 2352, !24, i64 2372, !6, i64 3032, !6, i64 3040, !25, i64 3048, !6, i64 4176, !13, i64 4184, !13, i64 4188}
!17 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!18 = !{!"", !13, i64 0, !6, i64 8, !6, i64 16, !19, i64 24}
!19 = !{!"", !6, i64 0, !10, i64 8, !7, i64 16}
!20 = !{!"", !7, i64 0}
!21 = !{!"", !10, i64 0, !14, i64 8}
!22 = !{!"", !13, i64 0, !13, i64 4, !23, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!23 = !{!"short", !7, i64 0}
!24 = !{!"", !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, !20, i64 552, !20, i64 584, !20, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!25 = !{!"_IP6_CONFIG_INSTANCE", !13, i64 0, !7, i64 4, !14, i64 8, !23, i64 24, !26, i64 32, !20, i64 168, !13, i64 176, !27, i64 180, !7, i64 184, !28, i64 800, !28, i64 840, !29, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !13, i64 948, !6, i64 952, !13, i64 960, !6, i64 968, !13, i64 976, !30, i64 984, !32, i64 1040}
!26 = !{!"", !7, i64 0, !7, i64 64, !13, i64 68, !20, i64 72, !13, i64 104, !6, i64 112, !13, i64 120, !6, i64 128}
!27 = !{!"", !13, i64 0}
!28 = !{!"", !14, i64 0, !14, i64 16, !10, i64 32}
!29 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!"_IP6_FORM_CALLBACK_INFO", !13, i64 0, !6, i64 8, !31, i64 16, !6, i64 40, !6, i64 48}
!31 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"", !13, i64 0, !27, i64 4, !20, i64 8, !14, i64 16, !13, i64 32, !14, i64 40, !13, i64 56, !14, i64 64, !13, i64 80}
!33 = !{!12, !6, i64 80}
!34 = !{!14, !6, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!12, !6, i64 96}
!38 = !{!16, !6, i64 2344}
!39 = !{!40, !6, i64 48}
!40 = !{!"_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}
!41 = distinct !{!41, !36}


; 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 [131 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 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 @Ip6CancelFrames(ptr noundef readonly %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %13, label %8

8:                                                ; preds = %4
  %.not36 = icmp eq ptr %6, null
  br i1 %.not36, label %12, label %9

9:                                                ; preds = %8
  %10 = load i32, ptr %6, align 8, !tbaa !13
  %11 = icmp eq i32 %10, 1396068425
  br i1 %11, label %13, label %12

12:                                               ; preds = %9, %8
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1041, ptr noundef nonnull @.str.2) #2
  br label %13

13:                                               ; preds = %9, %12, %4
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  %15 = load ptr, ptr %14, align 8, !tbaa !31
  %.not3743 = icmp eq ptr %15, %14
  br i1 %.not3743, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13, %29
  %.044 = phi ptr [ %.03145, %29 ], [ %15, %13 ]
  %.03145 = load ptr, ptr %.044, align 8, !tbaa !32
  %16 = ptrtoint ptr %.044 to i64
  %17 = add i64 %16, -16
  %18 = inttoptr i64 %17 to ptr
  %19 = tail call i64 @Ip6FreeNeighborEntry(ptr noundef %6, ptr noundef %18, i8 noundef zeroext 0, i8 noundef zeroext 0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #2
  %20 = tail call zeroext i8 @DebugAssertEnabled() #2
  %21 = icmp ne i8 %20, 0
  %22 = icmp slt i64 %19, 0
  %or.cond = select i1 %21, i1 %22, i1 false
  br i1 %or.cond, label %23, label %29

23:                                               ; preds = %.lr.ph
  %24 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not40 = icmp eq i8 %24, 0
  br i1 %.not40, label %28, label %25

25:                                               ; preds = %23
  %26 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not41 = icmp eq i8 %26, 0
  br i1 %.not41, label %28, label %27

27:                                               ; preds = %25
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.11, i64 noundef %19) #2
  br label %28

28:                                               ; preds = %25, %27, %23
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1058, ptr noundef nonnull @.str.12) #2
  br label %29

29:                                               ; preds = %.lr.ph, %28
  %.not37 = icmp eq ptr %.03145, %14
  br i1 %.not37, label %._crit_edge, label %.lr.ph, !llvm.loop !33

._crit_edge:                                      ; preds = %29, %13
  %30 = getelementptr inbounds i8, ptr %0, i64 96
  %31 = load ptr, ptr %30, align 8, !tbaa !35
  %.not3847 = icmp eq ptr %31, %30
  br i1 %.not3847, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %._crit_edge
  %.13246 = load ptr, ptr %31, align 8, !tbaa !32
  %32 = icmp eq ptr %2, null
  %33 = getelementptr inbounds i8, ptr %6, i64 2344
  br i1 %32, label %.lr.ph51.split.us, label %.lr.ph51.split

.lr.ph51.split.us:                                ; preds = %.lr.ph51, %.lr.ph51.split.us
  %.13249.us = phi ptr [ %.132.us, %.lr.ph51.split.us ], [ %.13246, %.lr.ph51 ]
  %.148.us = phi ptr [ %.13249.us, %.lr.ph51.split.us ], [ %31, %.lr.ph51 ]
  %34 = ptrtoint ptr %.148.us to i64
  %35 = add i64 %34, -8
  %36 = inttoptr i64 %35 to ptr
  %37 = load ptr, ptr %33, align 8, !tbaa !36
  %38 = getelementptr inbounds i8, ptr %37, i64 48
  %39 = load ptr, ptr %38, align 8, !tbaa !37
  %40 = getelementptr inbounds i8, ptr %36, i64 120
  %41 = tail call i64 %39(ptr noundef %37, ptr noundef nonnull %40) #2
  %.132.us = load ptr, ptr %.13249.us, align 8, !tbaa !32
  %.not38.us = icmp eq ptr %.13249.us, %30
  br i1 %.not38.us, label %._crit_edge52, label %.lr.ph51.split.us, !llvm.loop !39

.lr.ph51.split:                                   ; preds = %.lr.ph51, %52
  %.13249 = phi ptr [ %.132, %52 ], [ %.13246, %.lr.ph51 ]
  %.148 = phi ptr [ %.13249, %52 ], [ %31, %.lr.ph51 ]
  %42 = ptrtoint ptr %.148 to i64
  %43 = add i64 %42, -8
  %44 = inttoptr i64 %43 to ptr
  %45 = tail call zeroext i8 %2(ptr noundef %44, ptr noundef %3) #2
  %.not39 = icmp eq i8 %45, 0
  br i1 %.not39, label %52, label %46

46:                                               ; preds = %.lr.ph51.split
  %47 = load ptr, ptr %33, align 8, !tbaa !36
  %48 = getelementptr inbounds i8, ptr %47, i64 48
  %49 = load ptr, ptr %48, align 8, !tbaa !37
  %50 = getelementptr inbounds i8, ptr %44, i64 120
  %51 = tail call i64 %49(ptr noundef %47, ptr noundef nonnull %50) #2
  br label %52

52:                                               ; preds = %.lr.ph51.split, %46
  %.132 = load ptr, ptr %.13249, align 8, !tbaa !32
  %.not38 = icmp eq ptr %.13249, %30
  br i1 %.not38, label %._crit_edge52, label %.lr.ph51.split, !llvm.loop !39

._crit_edge52:                                    ; preds = %52, %.lr.ph51.split.us, %._crit_edge
  ret void
}

declare i64 @Ip6FreeNeighborEntry(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) 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

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 56}
!6 = !{!"_IP6_INTERFACE", !7, i64 0, !10, i64 8, !12, i64 24, !10, i64 32, !7, i64 48, !8, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 96, !7, i64 112, !10, i64 120, !10, i64 136, !10, i64 152, !8, i64 168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"_IP6_SERVICE", !7, i64 0, !15, i64 8, !12, i64 24, !12, i64 32, !10, i64 40, !10, i64 56, !11, i64 72, !11, i64 80, !16, i64 88, !18, i64 136, !19, i64 2168, !18, i64 2192, !8, i64 2208, !8, i64 2209, !8, i64 2210, !8, i64 2211, !8, i64 2212, !7, i64 2216, !7, i64 2220, !7, i64 2224, !7, i64 2228, !10, i64 2232, !10, i64 2248, !10, i64 2264, !10, i64 2280, !7, i64 2296, !8, i64 2300, !11, i64 2304, !8, i64 2312, !8, i64 2313, !7, i64 2316, !11, i64 2320, !11, i64 2328, !11, i64 2336, !11, i64 2344, !20, i64 2352, !22, i64 2372, !11, i64 3032, !11, i64 3040, !23, i64 3048, !11, i64 4176, !7, i64 4184, !7, i64 4188}
!15 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!16 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !17, i64 24}
!17 = !{!"", !11, i64 0, !12, i64 8, !8, i64 16}
!18 = !{!"", !8, i64 0}
!19 = !{!"", !12, i64 0, !10, i64 8}
!20 = !{!"", !7, i64 0, !7, i64 4, !21, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!21 = !{!"short", !8, i64 0}
!22 = !{!"", !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, !18, i64 552, !18, i64 584, !18, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!23 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !10, i64 8, !21, i64 24, !24, i64 32, !18, i64 168, !7, i64 176, !25, i64 180, !8, i64 184, !26, i64 800, !26, i64 840, !27, i64 880, !11, i64 912, !11, i64 920, !11, i64 928, !11, i64 936, !8, i64 944, !7, i64 948, !11, i64 952, !7, i64 960, !11, i64 968, !7, i64 976, !28, i64 984, !30, i64 1040}
!24 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !18, i64 72, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!25 = !{!"", !7, i64 0}
!26 = !{!"", !10, i64 0, !10, i64 16, !12, i64 32}
!27 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!28 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !11, i64 8, !29, i64 16, !11, i64 40, !11, i64 48}
!29 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!30 = !{!"", !7, i64 0, !25, i64 4, !18, i64 8, !10, i64 16, !7, i64 32, !10, i64 40, !7, i64 56, !10, i64 64, !7, i64 80}
!31 = !{!6, !11, i64 80}
!32 = !{!10, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!6, !11, i64 96}
!36 = !{!14, !11, i64 2344}
!37 = !{!38, !11, i64 48}
!38 = !{!"_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}
!39 = distinct !{!39, !34}


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