; LLVM IR from mickypaganini/SSI2016-jet-clustering :: spartyjet-4.0.2_mac/External/fastjet-3.0.0/plugins/SISCone/siscone/siscone/sph_aa296188 (clearEv)

; 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.siscone_spherical::CSphsplit_merge" = type <{ i32, [4 x i8], %"class.std::vector.3", %"class.std::vector.8", i32, [4 x i8], %"class.std::vector.3", %"class.std::vector.3", i32, [4 x i8], double, %"class.std::vector.13", ptr, i32, i8, [3 x i8], %"class.siscone_spherical::CSphsplit_merge_ptcomparison", double, double, %"class.std::auto_ptr", double, i8, [7 x i8] }>
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<siscone_spherical::CSphmomentum, std::allocator<siscone_spherical::CSphmomentum>>::_Vector_impl" }
%"struct.std::_Vector_base<siscone_spherical::CSphmomentum, std::allocator<siscone_spherical::CSphmomentum>>::_Vector_impl" = type { %"struct.std::_Vector_base<siscone_spherical::CSphmomentum, std::allocator<siscone_spherical::CSphmomentum>>::_Vector_impl_data" }
%"struct.std::_Vector_base<siscone_spherical::CSphmomentum, std::allocator<siscone_spherical::CSphmomentum>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<siscone_spherical::CSphjet, std::allocator<siscone_spherical::CSphjet>>::_Vector_impl" }
%"struct.std::_Vector_base<siscone_spherical::CSphjet, std::allocator<siscone_spherical::CSphjet>>::_Vector_impl" = type { %"struct.std::_Vector_base<siscone_spherical::CSphjet, std::allocator<siscone_spherical::CSphjet>>::_Vector_impl_data" }
%"struct.std::_Vector_base<siscone_spherical::CSphjet, std::allocator<siscone_spherical::CSphjet>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.siscone_spherical::CSphsplit_merge_ptcomparison" = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.std::auto_ptr" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17siscone_spherical15CSphsplit_merge10full_clearEv(ptr noundef nonnull align 8 dereferenceable(225) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = call noundef i32 @_ZN17siscone_spherical15CSphsplit_merge13partial_clearEv(ptr noundef nonnull align 8 dereferenceable(225) %3)
  %5 = getelementptr inbounds %"class.siscone_spherical::CSphsplit_merge", ptr %3, i32 0, i32 12
  %6 = load ptr, ptr %5, align 8, !tbaa !9
  %7 = icmp ne ptr %6, null
  br i1 %7, label %8, label %14

8:                                                ; preds = %1
  %9 = getelementptr inbounds %"class.siscone_spherical::CSphsplit_merge", ptr %3, i32 0, i32 12
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = icmp eq ptr %10, null
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  call void @_ZdaPv(ptr noundef %10) #3
  br label %13

13:                                               ; preds = %12, %8
  br label %14

14:                                               ; preds = %13, %1
  %15 = getelementptr inbounds %"class.siscone_spherical::CSphsplit_merge", ptr %3, i32 0, i32 2
  call void @_ZNSt6vectorIN17siscone_spherical12CSphmomentumESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17siscone_spherical15CSphsplit_merge13partial_clearEv(ptr noundef nonnull align 8 dereferenceable(225)) #0 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #2

attributes #0 = { 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 #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 = { nobuiltin nounwind "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 = { builtin nounwind }
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, !6, i64 152}
!10 = !{!"_ZTSN17siscone_spherical15CSphsplit_mergeE", !11, i64 0, !12, i64 8, !16, i64 32, !11, i64 56, !12, i64 64, !12, i64 88, !11, i64 112, !20, i64 120, !21, i64 128, !6, i64 152, !11, i64 160, !25, i64 164, !26, i64 168, !20, i64 192, !20, i64 200, !28, i64 208, !20, i64 216, !25, i64 224}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIN17siscone_spherical12CSphmomentumESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIN17siscone_spherical7CSphjetESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSN17siscone_spherical28CSphsplit_merge_ptcomparisonE", !6, i64 0, !6, i64 8, !27, i64 16}
!27 = !{!"_ZTSN17siscone_spherical18Esplit_merge_scaleE", !7, i64 0}
!28 = !{!"_ZTSSt8auto_ptrISt8multisetIN17siscone_spherical7CSphjetENS1_28CSphsplit_merge_ptcomparisonESaIS2_EEE", !6, i64 0}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17siscone_spherical15CSphsplit_merge10full_clearEv(ptr noundef nonnull align 8 dereferenceable(225) %0) local_unnamed_addr #0 align 2 {
  %2 = tail call noundef i32 @_ZN17siscone_spherical15CSphsplit_merge13partial_clearEv(ptr noundef nonnull align 8 dereferenceable(225) %0)
  %3 = getelementptr inbounds i8, ptr %0, i64 152
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %6, label %5

5:                                                ; preds = %1
  tail call void @_ZdaPv(ptr noundef nonnull %4) #3
  br label %6

6:                                                ; preds = %5, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt6vectorIN17siscone_spherical12CSphmomentumESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN17siscone_spherical15CSphsplit_merge13partial_clearEv(ptr noundef nonnull align 8 dereferenceable(225)) local_unnamed_addr #0 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #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 = { nobuiltin nounwind "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 = { builtin nounwind }
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, !14, i64 152}
!6 = !{!"_ZTSN17siscone_spherical15CSphsplit_mergeE", !7, i64 0, !10, i64 8, !15, i64 32, !7, i64 56, !10, i64 64, !10, i64 88, !7, i64 112, !19, i64 120, !20, i64 128, !14, i64 152, !7, i64 160, !24, i64 164, !25, i64 168, !19, i64 192, !19, i64 200, !27, i64 208, !19, i64 216, !24, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN17siscone_spherical12CSphmomentumESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical12CSphmomentumESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"double", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIN17siscone_spherical7CSphjetESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN17siscone_spherical7CSphjetESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"bool", !8, i64 0}
!25 = !{!"_ZTSN17siscone_spherical28CSphsplit_merge_ptcomparisonE", !14, i64 0, !14, i64 8, !26, i64 16}
!26 = !{!"_ZTSN17siscone_spherical18Esplit_merge_scaleE", !8, i64 0}
!27 = !{!"_ZTSSt8auto_ptrISt8multisetIN17siscone_spherical7CSphjetENS1_28CSphsplit_merge_ptcomparisonESaIS2_EEE", !14, i64 0}


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