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

; 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_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._LIST_ENTRY = type { ptr, ptr }
%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_ASSEMBLE_ENTRY = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS, i32, i32, i32, i32, ptr, ptr, ptr }
%struct._EFI_IP6_HEADER = type { i16, i16, i16, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct._IP6_PROTOCOL = type { i32, %struct._EFI_IP6_PROTOCOL, ptr, i64, ptr, %struct._LIST_ENTRY, i8, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_LOCK, ptr, %struct._LIST_ENTRY, ptr, i32, %struct.EFI_IP6_CONFIG_DATA, i8 }
%struct._EFI_IP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct.EFI_IP6_CONFIG_DATA = type { i8, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32, i32 }
%struct.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%struct.IP6_CLIP_INFO = type { i32, i32, i32, i32, i32, i32, i64, i32, i16, i8, i8, i32 }

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

; 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
declare dso_local void @Ip6FreeAssembleEntry(ptr noundef) #1

declare ptr @RemoveEntryList(ptr noundef) #2

declare void @NetbufFree(ptr noundef) #2

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

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

11:                                               ; preds = %86, %1
  %12 = load i32, ptr %10, align 4, !tbaa !9
  %13 = icmp ult i32 %12, 127
  br i1 %13, label %14, label %89

14:                                               ; preds = %11
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._IP6_SERVICE, ptr %15, i32 0, i32 9
  %17 = getelementptr inbounds %struct.IP6_ASSEMBLE_TABLE, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds [127 x %struct._LIST_ENTRY], ptr %17, i64 0, i64 %19
  %21 = getelementptr inbounds %struct._LIST_ENTRY, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  store ptr %22, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._LIST_ENTRY, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  store ptr %25, ptr %5, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %80, %14
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._IP6_SERVICE, ptr %28, i32 0, i32 9
  %30 = getelementptr inbounds %struct.IP6_ASSEMBLE_TABLE, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds [127 x %struct._LIST_ENTRY], ptr %30, i64 0, i64 %32
  %34 = icmp ne ptr %27, %33
  br i1 %34, label %35, label %85

35:                                               ; preds = %26
  %36 = load ptr, ptr %4, 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 %7, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %40, i32 0, i32 7
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = icmp ugt i32 %42, 0
  br i1 %43, label %44, label %79

44:                                               ; preds = %35
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %45, i32 0, i32 7
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = add i32 %47, -1
  store i32 %48, ptr %46, align 4, !tbaa !13
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %79

50:                                               ; preds = %44
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %51, i32 0, i32 10
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %75

55:                                               ; preds = %50
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %56, i32 0, i32 8
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %58, i32 0, i32 6
  %60 = getelementptr inbounds %struct.EFI_IPv6_ADDRESS, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds [16 x i8], ptr %60, i64 0, i64 0
  %62 = load i8, ptr %61, align 1, !tbaa !18
  %63 = zext i8 %62 to i32
  %64 = icmp eq i32 %63, 255
  br i1 %64, label %75, label %65

65:                                               ; preds = %55
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %67, i32 0, i32 10
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.IP6_ASSEMBLE_ENTRY, ptr %70, i32 0, i32 8
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %72, i32 0, i32 5
  %74 = call i64 @Ip6SendIcmpError(ptr noundef %66, ptr noundef %69, ptr noundef null, ptr noundef %73, i8 noundef zeroext 3, i8 noundef zeroext 1, ptr noundef null)
  br label %75

75:                                               ; preds = %65, %55, %50
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call ptr @RemoveEntryList(ptr noundef %76)
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Ip6FreeAssembleEntry(ptr noundef %78)
  br label %79

79:                                               ; preds = %75, %44, %35
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %81, ptr %4, align 8, !tbaa !5
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._LIST_ENTRY, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  store ptr %84, ptr %5, align 8, !tbaa !5
  br label %26, !llvm.loop !19

85:                                               ; preds = %26
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = add i32 %87, 1
  store i32 %88, ptr %10, align 4, !tbaa !9
  br label %11, !llvm.loop !21

89:                                               ; preds = %11
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._IP6_SERVICE, ptr %90, i32 0, i32 4
  %92 = getelementptr inbounds %struct._LIST_ENTRY, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !22
  store ptr %93, ptr %3, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %148, %89
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._IP6_SERVICE, ptr %96, i32 0, i32 4
  %98 = icmp ne ptr %95, %97
  br i1 %98, label %99, label %152

99:                                               ; preds = %94
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = ptrtoint ptr %100 to i64
  %102 = sub i64 %101, ptrtoint (ptr getelementptr inbounds (%struct._IP6_PROTOCOL, ptr null, i32 0, i32 5) to i64)
  %103 = inttoptr i64 %102 to ptr
  store ptr %103, ptr %6, align 8, !tbaa !5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %104, i32 0, i32 9
  %106 = getelementptr inbounds %struct._LIST_ENTRY, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !40
  store ptr %107, ptr %4, align 8, !tbaa !5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._LIST_ENTRY, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  store ptr %110, ptr %5, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %139, %99
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %113, i32 0, i32 9
  %115 = icmp ne ptr %112, %114
  br i1 %115, label %116, label %144

116:                                              ; preds = %111
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = ptrtoint ptr %117 to i64
  %119 = sub i64 %118, ptrtoint (ptr getelementptr inbounds (%struct.NET_BUF, ptr null, i32 0, i32 2) to i64)
  %120 = inttoptr i64 %119 to ptr
  store ptr %120, ptr %8, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.NET_BUF, ptr %121, i32 0, i32 6
  %123 = getelementptr inbounds [64 x i8], ptr %122, i64 0, i64 0
  store ptr %123, ptr %9, align 8, !tbaa !5
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.IP6_CLIP_INFO, ptr %124, i32 0, i32 5
  %126 = load i32, ptr %125, align 4, !tbaa !45
  %127 = icmp ugt i32 %126, 0
  br i1 %127, label %128, label %138

128:                                              ; preds = %116
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.IP6_CLIP_INFO, ptr %129, i32 0, i32 5
  %131 = load i32, ptr %130, align 4, !tbaa !45
  %132 = add i32 %131, -1
  store i32 %132, ptr %130, align 4, !tbaa !45
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %138

134:                                              ; preds = %128
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = call ptr @RemoveEntryList(ptr noundef %135)
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %137)
  br label %138

138:                                              ; preds = %134, %128, %116
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %140, ptr %4, align 8, !tbaa !5
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._LIST_ENTRY, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  store ptr %143, ptr %5, align 8, !tbaa !5
  br label %111, !llvm.loop !47

144:                                              ; preds = %111
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %145, i32 0, i32 8
  %147 = call i64 @NetMapIterate(ptr noundef %146, ptr noundef @Ip6SentPacketTicking, ptr noundef null)
  br label %148

148:                                              ; preds = %144
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._LIST_ENTRY, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  store ptr %151, ptr %3, align 8, !tbaa !5
  br label %94, !llvm.loop !48

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

declare i64 @Ip6SendIcmpError(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!14, !10, i64 76}
!14 = !{!"", !12, i64 0, !12, i64 16, !15, i64 32, !15, i64 48, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !6, i64 80, !6, i64 88, !6, i64 96}
!15 = !{!"", !7, i64 0}
!16 = !{!14, !6, i64 96}
!17 = !{!14, !6, i64 80}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !6, i64 40}
!23 = !{!"_IP6_SERVICE", !10, i64 0, !24, i64 8, !25, i64 24, !25, i64 32, !12, i64 40, !12, i64 56, !6, i64 72, !6, i64 80, !26, i64 88, !15, i64 136, !28, i64 2168, !15, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !10, i64 2216, !10, i64 2220, !10, i64 2224, !10, i64 2228, !12, i64 2232, !12, i64 2248, !12, i64 2264, !12, i64 2280, !10, i64 2296, !7, i64 2300, !6, i64 2304, !7, i64 2312, !7, i64 2313, !10, i64 2316, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !29, i64 2352, !31, i64 2372, !6, i64 3032, !6, i64 3040, !32, i64 3048, !6, i64 4176, !10, i64 4184, !10, i64 4188}
!24 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!25 = !{!"long long", !7, i64 0}
!26 = !{!"", !10, i64 0, !6, i64 8, !6, i64 16, !27, i64 24}
!27 = !{!"", !6, i64 0, !25, i64 8, !7, i64 16}
!28 = !{!"", !25, i64 0, !12, i64 8}
!29 = !{!"", !10, i64 0, !10, i64 4, !30, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!30 = !{!"short", !7, i64 0}
!31 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !15, i64 552, !15, i64 584, !15, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!32 = !{!"_IP6_CONFIG_INSTANCE", !10, i64 0, !7, i64 4, !12, i64 8, !30, i64 24, !33, i64 32, !15, i64 168, !10, i64 176, !34, i64 180, !7, i64 184, !35, i64 800, !35, i64 840, !36, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !10, i64 948, !6, i64 952, !10, i64 960, !6, i64 968, !10, i64 976, !37, i64 984, !39, i64 1040}
!33 = !{!"", !7, i64 0, !7, i64 64, !10, i64 68, !15, i64 72, !10, i64 104, !6, i64 112, !10, i64 120, !6, i64 128}
!34 = !{!"", !10, i64 0}
!35 = !{!"", !12, i64 0, !12, i64 16, !25, i64 32}
!36 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!37 = !{!"_IP6_FORM_CALLBACK_INFO", !10, i64 0, !6, i64 8, !38, i64 16, !6, i64 40, !6, i64 48}
!38 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"", !10, i64 0, !34, i64 4, !15, i64 8, !12, i64 16, !10, i64 32, !12, i64 40, !10, i64 56, !12, i64 64, !10, i64 80}
!40 = !{!41, !6, i64 208}
!41 = !{!"_IP6_PROTOCOL", !10, i64 0, !42, i64 8, !6, i64 80, !25, i64 88, !6, i64 96, !12, i64 104, !7, i64 120, !35, i64 128, !35, i64 168, !12, i64 208, !12, i64 224, !43, i64 240, !6, i64 264, !12, i64 272, !6, i64 288, !10, i64 296, !44, i64 300, !7, i64 352}
!42 = !{!"_EFI_IP6_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, !6, i64 64}
!43 = !{!"", !25, i64 0, !25, i64 8, !10, i64 16}
!44 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !15, i64 4, !15, i64 20, !7, i64 36, !7, i64 37, !10, i64 40, !10, i64 44, !10, i64 48}
!45 = !{!46, !10, i64 20}
!46 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !25, i64 24, !10, i64 32, !30, i64 36, !7, i64 38, !7, i64 39, !10, i64 40}
!47 = distinct !{!47, !20}
!48 = distinct !{!48, !20}


; 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._LIST_ENTRY = type { ptr, ptr }

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

declare ptr @RemoveEntryList(ptr noundef) local_unnamed_addr #1

declare void @NetbufFree(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @Ip6PacketTimerTicking(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 136
  br label %3

3:                                                ; preds = %1, %._crit_edge
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %._crit_edge ]
  %4 = getelementptr inbounds [127 x %struct._LIST_ENTRY], ptr %2, i64 0, i64 %indvars.iv
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not4650 = icmp eq ptr %5, %4
  br i1 %.not4650, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3, %25
  %.03851 = phi ptr [ %.03952, %25 ], [ %5, %3 ]
  %.03952 = load ptr, ptr %.03851, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %.03851, i64 76
  %7 = load i32, ptr %6, align 4, !tbaa !10
  %.not47 = icmp eq i32 %7, 0
  br i1 %.not47, label %25, label %8

8:                                                ; preds = %.lr.ph
  %9 = add i32 %7, -1
  store i32 %9, ptr %6, align 4, !tbaa !10
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %25

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %.03851, i64 96
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %.not48 = icmp eq ptr %13, null
  br i1 %.not48, label %23, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %.03851, i64 80
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  %18 = load i8, ptr %17, align 1, !tbaa !16
  %19 = icmp eq i8 %18, -1
  br i1 %19, label %23, label %20

20:                                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %16, i64 8
  %22 = tail call i64 @Ip6SendIcmpError(ptr noundef %0, ptr noundef nonnull %13, ptr noundef null, ptr noundef nonnull %21, i8 noundef zeroext 3, i8 noundef zeroext 1, ptr noundef null) #2
  br label %23

23:                                               ; preds = %20, %14, %11
  %24 = tail call ptr @RemoveEntryList(ptr noundef nonnull %.03851) #2
  tail call void @Ip6FreeAssembleEntry(ptr noundef nonnull %.03851)
  br label %25

25:                                               ; preds = %.lr.ph, %8, %23
  %.not46 = icmp eq ptr %.03952, %4
  br i1 %.not46, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %25, %3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 127
  br i1 %exitcond.not, label %26, label %3, !llvm.loop !19

26:                                               ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %.03761 = load ptr, ptr %27, align 8, !tbaa !5
  %.not62 = icmp eq ptr %.03761, %27
  br i1 %.not62, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %26, %._crit_edge60
  %.03763 = phi ptr [ %.037, %._crit_edge60 ], [ %.03761, %26 ]
  %28 = ptrtoint ptr %.03763 to i64
  %29 = add i64 %28, -104
  %30 = inttoptr i64 %29 to ptr
  %31 = getelementptr inbounds i8, ptr %30, i64 208
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %.not4455 = icmp eq ptr %32, %31
  br i1 %.not4455, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph65, %43
  %.156 = phi ptr [ %.14057, %43 ], [ %32, %.lr.ph65 ]
  %.14057 = load ptr, ptr %.156, align 8, !tbaa !5
  %33 = ptrtoint ptr %.156 to i64
  %34 = add i64 %33, -16
  %35 = inttoptr i64 %34 to ptr
  %36 = getelementptr inbounds i8, ptr %35, i64 76
  %37 = load i32, ptr %36, align 4, !tbaa !27
  %.not45 = icmp eq i32 %37, 0
  br i1 %.not45, label %43, label %38

38:                                               ; preds = %.lr.ph59
  %39 = add i32 %37, -1
  store i32 %39, ptr %36, align 4, !tbaa !27
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = tail call ptr @RemoveEntryList(ptr noundef nonnull %.156) #2
  tail call void @NetbufFree(ptr noundef nonnull %35) #2
  br label %43

43:                                               ; preds = %.lr.ph59, %38, %41
  %.not44 = icmp eq ptr %.14057, %31
  br i1 %.not44, label %._crit_edge60, label %.lr.ph59, !llvm.loop !30

._crit_edge60:                                    ; preds = %43, %.lr.ph65
  %44 = getelementptr inbounds i8, ptr %30, i64 168
  %45 = tail call i64 @NetMapIterate(ptr noundef nonnull %44, ptr noundef nonnull @Ip6SentPacketTicking, ptr noundef null) #2
  %.037 = load ptr, ptr %.03763, align 8, !tbaa !5
  %.not = icmp eq ptr %.037, %27
  br i1 %.not, label %._crit_edge66, label %.lr.ph65, !llvm.loop !31

._crit_edge66:                                    ; preds = %._crit_edge60, %26
  ret void
}

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

declare i64 @NetMapIterate(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { "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, !7, i64 0}
!6 = !{!"_LIST_ENTRY", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !13, i64 76}
!11 = !{!"", !6, i64 0, !6, i64 16, !12, i64 32, !12, i64 48, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !7, i64 80, !7, i64 88, !7, i64 96}
!12 = !{!"", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!11, !7, i64 96}
!15 = !{!11, !7, i64 80}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !7, i64 208}
!21 = !{!"_IP6_PROTOCOL", !13, i64 0, !22, i64 8, !7, i64 80, !23, i64 88, !7, i64 96, !6, i64 104, !8, i64 120, !24, i64 128, !24, i64 168, !6, i64 208, !6, i64 224, !25, i64 240, !7, i64 264, !6, i64 272, !7, i64 288, !13, i64 296, !26, i64 300, !8, i64 352}
!22 = !{!"_EFI_IP6_PROTOCOL", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!23 = !{!"long long", !8, i64 0}
!24 = !{!"", !6, i64 0, !6, i64 16, !23, i64 32}
!25 = !{!"", !23, i64 0, !23, i64 8, !13, i64 16}
!26 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !12, i64 4, !12, i64 20, !8, i64 36, !8, i64 37, !13, i64 40, !13, i64 44, !13, i64 48}
!27 = !{!28, !13, i64 20}
!28 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !23, i64 24, !13, i64 32, !29, i64 36, !8, i64 38, !8, i64 39, !13, i64 40}
!29 = !{!"short", !8, i64 0}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass