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

; 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.fastjet::ClosestPair2D" = type <{ %"class.fastjet::ClosestPair2DBase", %"class.fastjet::ClosestPair2D::triplet.0", %"class.std::auto_ptr.1", %"class.std::vector", %"class.std::stack", %"class.std::vector.5", %"class.fastjet::Coord2D", double, %"class.fastjet::ClosestPair2D::triplet.7", %"class.fastjet::ClosestPair2D::triplet.7", i32, [4 x i8] }>
%"class.fastjet::ClosestPair2DBase" = type { ptr }
%"class.fastjet::ClosestPair2D::triplet.0" = type { [3 x %"class.std::auto_ptr"] }
%"class.std::auto_ptr" = type { ptr }
%"class.std::auto_ptr.1" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<fastjet::ClosestPair2D::Point, std::allocator<fastjet::ClosestPair2D::Point>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::ClosestPair2D::Point, std::allocator<fastjet::ClosestPair2D::Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::ClosestPair2D::Point, std::allocator<fastjet::ClosestPair2D::Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::ClosestPair2D::Point, std::allocator<fastjet::ClosestPair2D::Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Deque_impl" }
%"struct.std::_Deque_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Deque_impl" = type { %"struct.std::_Deque_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::ClosestPair2D::Point *, std::allocator<fastjet::ClosestPair2D::Point *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.fastjet::Coord2D" = type { double, double }
%"class.fastjet::ClosestPair2D::triplet.7" = type { [3 x i32] }
%"class.fastjet::ClosestPair2D::Point" = type <{ %"class.fastjet::Coord2D", ptr, double, %"class.fastjet::ClosestPair2D::triplet", i32, [4 x i8] }>
%"class.fastjet::ClosestPair2D::triplet" = type { [3 x %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator"] }
%"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator" = type { ptr }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7fastjet13ClosestPair2D3_IDEPKNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D27_deal_with_points_to_reviewEv(ptr noundef nonnull align 8 dereferenceable(220)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D24_insert_into_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) #4 align 2

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

14:                                               ; preds = %30, %4
  %15 = load i32, ptr %9, align 4, !tbaa !9
  %16 = zext i32 %15 to i64
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %19 = icmp ult i64 %16, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %33

21:                                               ; preds = %14
  %22 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %13, i32 0, i32 3
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25) #5
  %27 = load i32, ptr %26, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = call noundef nonnull align 8 dereferenceable(60) ptr @_ZNSt6vectorIN7fastjet13ClosestPair2D5PointESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %28) #5
  call void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %13, ptr noundef %29)
  br label %30

30:                                               ; preds = %21
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = add i32 %31, 1
  store i32 %32, ptr %9, align 4, !tbaa !9
  br label %14, !llvm.loop !11

33:                                               ; preds = %20
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %57, %33
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = call noundef i64 @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  %40 = icmp ult i64 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %60

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %43 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %13, i32 0, i32 4
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %43)
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  store ptr %45, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %13, i32 0, i32 4
  call void @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %46)
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #5
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %51, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %50, i64 16, i1 false), !tbaa.struct !13
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D24_insert_into_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %13, ptr noundef %53)
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = call noundef i32 @_ZNK7fastjet13ClosestPair2D3_IDEPKNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %13, ptr noundef %55)
  store i32 %56, ptr %12, align 4, !tbaa !9
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %57

57:                                               ; preds = %42
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = add i32 %58, 1
  store i32 %59, ptr %10, align 4, !tbaa !9
  br label %35, !llvm.loop !16

60:                                               ; preds = %41
  call void @_ZN7fastjet13ClosestPair2D27_deal_with_points_to_reviewEv(ptr noundef nonnull align 8 dereferenceable(220) %13)
  ret void
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #4 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !12}


; 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 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 noundef i64 @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7fastjet13ClosestPair2D3_IDEPKNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D27_deal_with_points_to_reviewEv(ptr noundef nonnull align 8 dereferenceable(220)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D24_insert_into_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet13ClosestPair2D12replace_manyERKSt6vectorIjSaIjEERKS1_INS_7Coord2DESaIS6_EERS3_(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) unnamed_addr #4 align 2 {
  %5 = alloca i32, align 4
  %6 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  br label %10

._crit_edge:                                      ; preds = %10, %4
  tail call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0)
  %8 = tail call noundef i64 @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %.not23 = icmp eq i64 %8, 0
  br i1 %.not23, label %._crit_edge22, label %.lr.ph21

.lr.ph21:                                         ; preds = %._crit_edge
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  br label %20

10:                                               ; preds = %.lr.ph, %10
  %11 = phi i64 [ 0, %.lr.ph ], [ %17, %10 ]
  %.018 = phi i32 [ 0, %.lr.ph ], [ %16, %10 ]
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %11) #5
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = tail call noundef nonnull align 8 dereferenceable(60) ptr @_ZNSt6vectorIN7fastjet13ClosestPair2D5PointESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %14) #5
  tail call void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %15)
  %16 = add i32 %.018, 1
  %17 = zext i32 %16 to i64
  %18 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %19 = icmp ugt i64 %18, %17
  br i1 %19, label %10, label %._crit_edge, !llvm.loop !9

._crit_edge22:                                    ; preds = %20, %._crit_edge
  call void @_ZN7fastjet13ClosestPair2D27_deal_with_points_to_reviewEv(ptr noundef nonnull align 8 dereferenceable(220) %0)
  ret void

20:                                               ; preds = %.lr.ph21, %20
  %21 = phi i64 [ 0, %.lr.ph21 ], [ %27, %20 ]
  %.01519 = phi i32 [ 0, %.lr.ph21 ], [ %26, %20 ]
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  call void @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %21) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %24, i64 16, i1 false), !tbaa.struct !13
  call void @_ZN7fastjet13ClosestPair2D24_insert_into_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %25 = call noundef i32 @_ZNK7fastjet13ClosestPair2D3_IDEPKNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %23)
  store i32 %25, ptr %5, align 4, !tbaa !5
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %26 = add i32 %.01519, 1
  %27 = zext i32 %26 to i64
  %28 = call noundef i64 @_ZNKSt6vectorIN7fastjet7Coord2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %29 = icmp ugt i64 %28, %27
  br i1 %29, label %20, label %._crit_edge22, !llvm.loop !16
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !10}


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