; LLVM IR from chromia/lichtenberg :: src/tree.ll (ZNK11lichtenberg4Tree10get_leavesEv)

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

%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl" }
%"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl" = type { %"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl_data" }
%"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.lichtenberg::Leaf" = type <{ ptr, i32, [4 x i8] }>
%"class.lichtenberg::Tree" = type { i32, i32, %"class.lichtenberg::TreeNode", %"class.std::vector" }
%"class.lichtenberg::TreeNode" = type <{ ptr, ptr, ptr, ptr, %"class.std::tuple", [4 x i8] }>
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<lichtenberg::TreeNode, std::allocator<lichtenberg::TreeNode>>::_Vector_impl" }
%"struct.std::_Vector_base<lichtenberg::TreeNode, std::allocator<lichtenberg::TreeNode>>::_Vector_impl" = type { %"struct.std::_Vector_base<lichtenberg::TreeNode, std::allocator<lichtenberg::TreeNode>>::_Vector_impl_data" }
%"struct.std::_Vector_base<lichtenberg::TreeNode, std::allocator<lichtenberg::TreeNode>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt6vectorIN11lichtenberg8TreeNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK11lichtenberg4Tree10get_leavesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.20") align 8 %0, ptr noundef nonnull align 8 dereferenceable(80) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.lichtenberg::Leaf", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %19 = getelementptr inbounds %"class.lichtenberg::Tree", ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !9
  store i32 %20, ptr %6, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %21 = getelementptr inbounds %"class.lichtenberg::Tree", ptr %18, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !25
  store i32 %22, ptr %7, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !24
  br label %23

23:                                               ; preds = %77, %2
  %24 = load i32, ptr %8, align 4, !tbaa !24
  %25 = load i32, ptr %7, align 4, !tbaa !24
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %80

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %29 = load i32, ptr %8, align 4, !tbaa !24
  %30 = load i32, ptr %6, align 4, !tbaa !24
  %31 = mul nsw i32 %29, %30
  store i32 %31, ptr %10, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !24
  br label %32

32:                                               ; preds = %73, %28
  %33 = load i32, ptr %11, align 4, !tbaa !24
  %34 = load i32, ptr %6, align 4, !tbaa !24
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %76

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %38 = getelementptr inbounds %"class.lichtenberg::Tree", ptr %18, i32 0, i32 3
  %39 = load i32, ptr %10, align 4, !tbaa !24
  %40 = load i32, ptr %11, align 4, !tbaa !24
  %41 = add nsw i32 %39, %40
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt6vectorIN11lichtenberg8TreeNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %42) #4
  store ptr %43, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.lichtenberg::TreeNode", ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %47 = icmp ne ptr %46, null
  br i1 %47, label %49, label %48

48:                                               ; preds = %37
  store i32 7, ptr %9, align 4
  br label %70

49:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %50, ptr %14, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %54, %49
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  %55 = load i32, ptr %13, align 4, !tbaa !24
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %13, align 4, !tbaa !24
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.lichtenberg::TreeNode", ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !27
  store ptr %59, ptr %14, align 8, !tbaa !5
  br label %51, !llvm.loop !28

60:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i32, ptr %13, align 4, !tbaa !24
  invoke void @_ZN11lichtenberg4LeafC1EPKNS_8TreeNodeEi(ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef %61, i32 noundef %62)
          to label %63 unwind label %65

63:                                               ; preds = %60
  invoke void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(12) %15)
          to label %64 unwind label %65

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %69

65:                                               ; preds = %63, %60
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %16, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %84

69:                                               ; preds = %64
  store i32 0, ptr %9, align 4
  br label %70

70:                                               ; preds = %69, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %71 = load i32, ptr %9, align 4
  switch i32 %71, label %89 [
    i32 0, label %72
    i32 7, label %73
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %70
  %74 = load i32, ptr %11, align 4, !tbaa !24
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %11, align 4, !tbaa !24
  br label %32, !llvm.loop !30

76:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %8, align 4, !tbaa !24
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %8, align 4, !tbaa !24
  br label %23, !llvm.loop !31

80:                                               ; preds = %27
  store i1 true, ptr %5, align 1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %81 = load i1, ptr %5, align 1
  br i1 %81, label %83, label %82

82:                                               ; preds = %80
  call void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %83

83:                                               ; preds = %82, %80
  ret void

84:                                               ; preds = %65
  %85 = load ptr, ptr %16, align 8
  %86 = load i32, ptr %17, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88

89:                                               ; preds = %70
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare void @_ZN11lichtenberg4LeafC1EPKNS_8TreeNodeEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 = { "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 #4 = { 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++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN11lichtenberg4TreeE", !11, i64 0, !11, i64 4, !12, i64 8, !20, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN11lichtenberg8TreeNodeE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32}
!13 = !{!"_ZTSSt5tupleIJiiiEE", !14, i64 0}
!14 = !{!"_ZTSSt11_Tuple_implILm0EJiiiEE", !15, i64 0, !19, i64 8}
!15 = !{!"_ZTSSt11_Tuple_implILm1EJiiEE", !16, i64 0, !18, i64 4}
!16 = !{!"_ZTSSt11_Tuple_implILm2EJiEE", !17, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm2EiLb0EE", !11, i64 0}
!18 = !{!"_ZTSSt10_Head_baseILm1EiLb0EE", !11, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EiLb0EE", !11, i64 0}
!20 = !{!"_ZTSSt6vectorIN11lichtenberg8TreeNodeESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!11, !11, i64 0}
!25 = !{!10, !11, i64 4}
!26 = !{!12, !6, i64 24}
!27 = !{!12, !6, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


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

%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl" }
%"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl" = type { %"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl_data" }
%"struct.std::_Vector_base<lichtenberg::Leaf, std::allocator<lichtenberg::Leaf>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.lichtenberg::Leaf" = type <{ ptr, i32, [4 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt6vectorIN11lichtenberg8TreeNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK11lichtenberg4Tree10get_leavesEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.20") align 8 %0, ptr noundef nonnull align 8 dereferenceable(80) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.lichtenberg::Leaf", align 8
  tail call void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %4 = load i32, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !23
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph29, label %._crit_edge30

.lr.ph29:                                         ; preds = %2
  %8 = icmp sgt i32 %4, 0
  %9 = getelementptr inbounds i8, ptr %1, i64 56
  br i1 %8, label %.lr.ph.us.preheader, label %._crit_edge30

.lr.ph.us.preheader:                              ; preds = %.lr.ph29
  %10 = zext nneg i32 %4 to i64
  %wide.trip.count36 = zext nneg i32 %6 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv33 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next34, %._crit_edge.us ]
  %11 = mul nuw nsw i64 %indvars.iv33, %10
  br label %12

12:                                               ; preds = %.lr.ph.us, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %22 ]
  %13 = add nuw nsw i64 %indvars.iv, %11
  %14 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZNKSt6vectorIN11lichtenberg8TreeNodeESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %13) #4
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !24
  %.not.us = icmp eq ptr %16, null
  br i1 %.not.us, label %22, label %.preheader.us

.preheader.us:                                    ; preds = %12, %.preheader.us
  %.02025.us = phi ptr [ %18, %.preheader.us ], [ %14, %12 ]
  %.02124.us = phi i32 [ %17, %.preheader.us ], [ 0, %12 ]
  %17 = add nuw nsw i32 %.02124.us, 1
  %18 = load ptr, ptr %.02025.us, align 8, !tbaa !25
  %.not23.us = icmp eq ptr %18, null
  br i1 %.not23.us, label %19, label %.preheader.us, !llvm.loop !26

19:                                               ; preds = %.preheader.us
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  invoke void @_ZN11lichtenberg4LeafC1EPKNS_8TreeNodeEi(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull %14, i32 noundef %17)
          to label %20 unwind label %.split.us

20:                                               ; preds = %19
  invoke void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(12) %3)
          to label %21 unwind label %.split.us

21:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %22

22:                                               ; preds = %21, %12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %10
  br i1 %exitcond.not, label %._crit_edge.us, label %12, !llvm.loop !28

._crit_edge.us:                                   ; preds = %22
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %exitcond37.not = icmp eq i64 %indvars.iv.next34, %wide.trip.count36
  br i1 %exitcond37.not, label %._crit_edge30, label %.lr.ph.us, !llvm.loop !29

.split.us:                                        ; preds = %20, %19
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %23

._crit_edge30:                                    ; preds = %._crit_edge.us, %.lr.ph29, %2
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

declare void @_ZN11lichtenberg4LeafC1EPKNS_8TreeNodeEi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN11lichtenberg4LeafESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 = { "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 #4 = { 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 = !{!"_ZTSN11lichtenberg4TreeE", !7, i64 0, !7, i64 4, !10, i64 8, !19, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11lichtenberg8TreeNodeE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSSt5tupleIJiiiEE", !13, i64 0}
!13 = !{!"_ZTSSt11_Tuple_implILm0EJiiiEE", !14, i64 0, !18, i64 8}
!14 = !{!"_ZTSSt11_Tuple_implILm1EJiiEE", !15, i64 0, !17, i64 4}
!15 = !{!"_ZTSSt11_Tuple_implILm2EJiEE", !16, i64 0}
!16 = !{!"_ZTSSt10_Head_baseILm2EiLb0EE", !7, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm1EiLb0EE", !7, i64 0}
!18 = !{!"_ZTSSt10_Head_baseILm0EiLb0EE", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIN11lichtenberg8TreeNodeESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN11lichtenberg8TreeNodeESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!23 = !{!6, !7, i64 4}
!24 = !{!10, !11, i64 24}
!25 = !{!10, !11, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass