; LLVM IR from mickypaganini/SSI2016-jet-clustering :: spartyjet-4.0.2_mac/External/fastjet-3.0.0/src (ClusterSequence)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<const fastjet::ClusterSequence::history_element *, const fastjet::ClusterSequence::history_element *, std::_Identity<const fastjet::ClusterSequence::history_element *>, std::less<const fastjet::ClusterSequence::history_element *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const fastjet::ClusterSequence::history_element *, const fastjet::ClusterSequence::history_element *, std::_Identity<const fastjet::ClusterSequence::history_element *>, std::less<const fastjet::ClusterSequence::history_element *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.fastjet::ClusterSequence" = type <{ ptr, %"class.fastjet::JetDefinition", %"class.std::vector", %"class.std::vector.1", i8, [3 x i8], i32, double, double, double, double, i32, i32, %"class.fastjet::SharedPtr.6", i32, i8, i8, [2 x i8], %"class.fastjet::SharedPtr.7", %"class.std::vector.8", double, double, double, double, i32, i32, i32, [4 x i8] }>
%"class.fastjet::JetDefinition" = type { i32, double, double, i32, ptr, %"class.fastjet::SharedPtr", %"class.fastjet::JetDefinition::DefaultRecombiner", ptr, %"class.fastjet::SharedPtr.0" }
%"class.fastjet::SharedPtr" = type { ptr }
%"class.fastjet::JetDefinition::DefaultRecombiner" = type <{ %"class.fastjet::JetDefinition::Recombiner", i32, [4 x i8] }>
%"class.fastjet::JetDefinition::Recombiner" = type { ptr }
%"class.fastjet::SharedPtr.0" = type { ptr }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<fastjet::ClusterSequence::history_element, std::allocator<fastjet::ClusterSequence::history_element>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::ClusterSequence::history_element, std::allocator<fastjet::ClusterSequence::history_element>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::ClusterSequence::history_element, std::allocator<fastjet::ClusterSequence::history_element>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::ClusterSequence::history_element, std::allocator<fastjet::ClusterSequence::history_element>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.fastjet::SharedPtr.6" = type { ptr }
%"class.fastjet::SharedPtr.7" = type { ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<fastjet::ClusterSequence::Tile, std::allocator<fastjet::ClusterSequence::Tile>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::ClusterSequence::Tile, std::allocator<fastjet::ClusterSequence::Tile>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::ClusterSequence::Tile, std::allocator<fastjet::ClusterSequence::Tile>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::ClusterSequence::Tile, std::allocator<fastjet::ClusterSequence::Tile>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.fastjet::ClusterSequence::history_element" = type { i32, i32, i32, i32, double, double }

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet15ClusterSequence17exclusive_subjetsERKNS_9PseudoJetERKd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(276) %1, ptr noundef nonnull align 8 dereferenceable(88) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::set", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #3
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = load double, ptr %18, align 8, !tbaa !9
  invoke void @_ZNK7fastjet15ClusterSequence15get_subhist_setERSt3setIPKNS0_15history_elementESt4lessIS4_ESaIS4_EERKNS_9PseudoJetEdi(ptr noundef nonnull align 8 dereferenceable(276) %16, ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(88) %17, double noundef %19, i32 noundef 0)
          to label %20 unwind label %30

20:                                               ; preds = %4
  store i1 false, ptr %12, align 1
  call void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %21 = call noundef i64 @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %21)
          to label %22 unwind label %34

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %23 = call ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  %24 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  br label %25

25:                                               ; preds = %47, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %26 = call ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  %27 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  %28 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEES7_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br i1 %28, label %38, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %54

30:                                               ; preds = %4
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %10, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %11, align 4
  br label %59

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %10, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %11, align 4
  br label %58

38:                                               ; preds = %25
  %39 = getelementptr inbounds %"class.fastjet::ClusterSequence", ptr %16, i32 0, i32 2
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.fastjet::ClusterSequence::history_element", ptr %41, i32 0, i32 3
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %44) #3
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(88) %45)
          to label %46 unwind label %50

46:                                               ; preds = %38
  br label %47

47:                                               ; preds = %46
  %48 = call ptr @_ZNSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #3
  %49 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  br label %25, !llvm.loop !14

50:                                               ; preds = %38
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %58

54:                                               ; preds = %29
  store i1 true, ptr %12, align 1
  %55 = load i1, ptr %12, align 1
  br i1 %55, label %57, label %56

56:                                               ; preds = %54
  call void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %57

57:                                               ; preds = %56, %54
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #3
  ret void

58:                                               ; preds = %50, %34
  call void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %59

59:                                               ; preds = %58, %30
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #3
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %10, align 8
  %62 = load i32, ptr %11, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7fastjet15ClusterSequence15get_subhist_setERSt3setIPKNS0_15history_elementESt4lessIS4_ESaIS4_EERKNS_9PseudoJetEdi(ptr noundef nonnull align 8 dereferenceable(276), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(88), double noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEES7_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 12}
!12 = !{!"_ZTSN7fastjet15ClusterSequence15history_elementE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !10, i64 16, !10, i64 24}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::PseudoJet, std::allocator<fastjet::PseudoJet>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<const fastjet::ClusterSequence::history_element *, const fastjet::ClusterSequence::history_element *, std::_Identity<const fastjet::ClusterSequence::history_element *>, std::less<const fastjet::ClusterSequence::history_element *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const fastjet::ClusterSequence::history_element *, const fastjet::ClusterSequence::history_element *, std::_Identity<const fastjet::ClusterSequence::history_element *>, std::less<const fastjet::ClusterSequence::history_element *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet15ClusterSequence17exclusive_subjetsERKNS_9PseudoJetERKd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(276) %1, ptr noundef nonnull align 8 dereferenceable(88) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::set", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #3
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  %8 = load double, ptr %3, align 8, !tbaa !5
  invoke void @_ZNK7fastjet15ClusterSequence15get_subhist_setERSt3setIPKNS0_15history_elementESt4lessIS4_ESaIS4_EERKNS_9PseudoJetEdi(ptr noundef nonnull align 8 dereferenceable(276) %1, ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(88) %2, double noundef %8, i32 noundef 0)
          to label %9 unwind label %16

9:                                                ; preds = %4
  call void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %10 = call noundef i64 @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %10)
          to label %11 unwind label %18

11:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %12 = call ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  store ptr %12, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %13 = call ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  store ptr %13, ptr %7, align 8
  %14 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 88
  br label %20

._crit_edge:                                      ; preds = %27, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #3
  ret void

16:                                               ; preds = %4
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %34

18:                                               ; preds = %9
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %33

20:                                               ; preds = %.lr.ph, %27
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %25) #3
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(88) %26)
          to label %27 unwind label %31

27:                                               ; preds = %20
  %28 = call ptr @_ZNSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %29 = call ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  store ptr %29, ptr %7, align 8
  %30 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br i1 %30, label %20, label %._crit_edge, !llvm.loop !14

31:                                               ; preds = %20
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %33

33:                                               ; preds = %31, %18
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %19, %18 ]
  call void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %34

34:                                               ; preds = %33, %16
  %.pn.pn = phi { ptr, i32 } [ %.pn, %33 ], [ %17, %16 ]
  call void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #3
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7fastjet15ClusterSequence15get_subhist_setERSt3setIPKNS0_15history_elementESt4lessIS4_ESaIS4_EERKNS_9PseudoJetEdi(ptr noundef nonnull align 8 dereferenceable(276), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(88), double noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEES7_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIPKN7fastjet15ClusterSequence15history_elementEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIPKN7fastjet15ClusterSequence15history_elementESt4lessIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 12}
!12 = !{!"_ZTSN7fastjet15ClusterSequence15history_elementE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !6, i64 16, !6, i64 24}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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