; 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::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator" = type { ptr }
%"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::ClosestPair2D::Shuffle" = type { i32, i32, 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: 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) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(60)) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %10 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %11 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %12 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %15 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %16 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %17 = alloca ptr, align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %19, i32 0, i32 4
  call void @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %20, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_set_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %19, ptr noundef %21, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %22 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %19, i32 0, i32 10
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %23 = load ptr, ptr %19, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 5
  %25 = load ptr, ptr %24, align 8
  %26 = call noundef i32 %25(ptr noundef nonnull align 8 dereferenceable(220) %19)
  %27 = sub i32 %26, 1
  store i32 %27, ptr %6, align 4, !tbaa !11
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %29 = load i32, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  store i32 %29, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %110, %2
  %31 = load i32, ptr %7, align 4, !tbaa !11
  %32 = icmp ult i32 %31, 3
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %113

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %35, i32 0, i32 3
  %37 = load i32, ptr %7, align 4, !tbaa !11
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %36, i32 noundef %37)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %38, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %39 = call ptr @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulator4nextEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %40 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %10, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  %41 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %19, i32 0, i32 1
  %42 = load i32, ptr %7, align 4, !tbaa !11
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %41, i32 noundef %42)
  %44 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #6
  call void @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6removeERNS3_10circulatorE(ptr noundef nonnull align 8 dereferenceable(60) %44, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %10, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %10, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %45

45:                                               ; preds = %53, %34
  %46 = load i32, ptr %13, align 4, !tbaa !11
  %47 = load i32, ptr %5, align 4, !tbaa !11
  %48 = icmp ult i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %56

50:                                               ; preds = %45
  %51 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0)
  %52 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %14, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  br label %53

53:                                               ; preds = %50
  %54 = load i32, ptr %13, align 4, !tbaa !11
  %55 = add i32 %54, 1
  store i32 %55, ptr %13, align 4, !tbaa !11
  br label %45, !llvm.loop !14

56:                                               ; preds = %49
  %57 = load ptr, ptr %19, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 5
  %59 = load ptr, ptr %58, align 8
  %60 = call noundef i32 %59(ptr noundef nonnull align 8 dereferenceable(220) %19)
  %61 = sub i32 %60, 1
  %62 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %19, i32 0, i32 10
  %63 = load i32, ptr %62, align 8, !tbaa !16
  %64 = icmp ult i32 %61, %63
  br i1 %64, label %65, label %70

65:                                               ; preds = %56
  %66 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0)
  %67 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %15, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  %68 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 0)
  %69 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %16, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  br label %70

70:                                               ; preds = %65, %56
  br label %71

71:                                               ; preds = %106, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %72 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %73 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Shuffle", ptr %72, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !39
  store ptr %74, ptr %17, align 8, !tbaa !5
  %75 = load ptr, ptr %17, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !41
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = icmp eq ptr %77, %78
  br i1 %79, label %80, label %82

80:                                               ; preds = %71
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %19, ptr noundef %81, i32 noundef 4)
  br label %104

82:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  %85 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Shuffle", ptr %84, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !39
  %87 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %83, ptr noundef nonnull align 8 dereferenceable(60) %86)
  store double %87, ptr %18, align 8, !tbaa !44
  %88 = load double, ptr %18, align 8, !tbaa !44
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %89, i32 0, i32 2
  %91 = load double, ptr %90, align 8, !tbaa !45
  %92 = fcmp olt double %88, %91
  br i1 %92, label %93, label %103

93:                                               ; preds = %82
  %94 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  %95 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Shuffle", ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !39
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %97, i32 0, i32 1
  store ptr %96, ptr %98, align 8, !tbaa !41
  %99 = load double, ptr %18, align 8, !tbaa !44
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %100, i32 0, i32 2
  store double %99, ptr %101, align 8, !tbaa !45
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %19, ptr noundef %102, i32 noundef 2)
  br label %103

103:                                              ; preds = %93, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %104

104:                                              ; preds = %103, %80
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %106

106:                                              ; preds = %104
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %108 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull align 8 dereferenceable(8) %12)
  br i1 %108, label %71, label %109, !llvm.loop !46

109:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %7, align 4, !tbaa !11
  %112 = add i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !11
  br label %30, !llvm.loop !47

113:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D10_set_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef, i32 noundef) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef, i32 noundef) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { inlinehint 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 #6 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !12, i64 216}
!17 = !{!"_ZTSN7fastjet13ClosestPair2DE", !18, i64 0, !19, i64 8, !20, i64 32, !21, i64 40, !25, i64 64, !32, i64 144, !36, i64 168, !37, i64 184, !38, i64 192, !38, i64 204, !12, i64 216}
!18 = !{!"_ZTSN7fastjet17ClosestPair2DBaseE"}
!19 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEE", !7, i64 0}
!20 = !{!"_ZTSSt8auto_ptrIN7fastjet7MinHeapEE", !6, i64 0}
!21 = !{!"_ZTSSt6vectorIN7fastjet13ClosestPair2D5PointESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE", !26, i64 0}
!26 = !{!"_ZTSSt5dequeIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !27, i64 0}
!27 = !{!"_ZTSSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !28, i64 0}
!28 = !{!"_ZTSNSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE11_Deque_implE", !29, i64 0}
!29 = !{!"_ZTSNSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !30, i64 8, !31, i64 16, !31, i64 48}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSSt15_Deque_iteratorIPN7fastjet13ClosestPair2D5PointERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!"_ZTSSt6vectorIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSN7fastjet7Coord2DE", !37, i64 0, !37, i64 8}
!37 = !{!"double", !7, i64 0}
!38 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletIjEE", !7, i64 0}
!39 = !{!40, !6, i64 8}
!40 = !{!"_ZTSN7fastjet13ClosestPair2D7ShuffleE", !12, i64 0, !12, i64 4, !6, i64 8}
!41 = !{!42, !6, i64 16}
!42 = !{!"_ZTSN7fastjet13ClosestPair2D5PointE", !36, i64 0, !6, i64 16, !37, i64 24, !43, i64 32, !12, i64 56}
!43 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEE", !7, i64 0}
!44 = !{!37, !37, i64 0}
!45 = !{!42, !37, i64 24}
!46 = distinct !{!46, !15}
!47 = distinct !{!47, !15}


; 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.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(60)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet13ClosestPair2D24_remove_from_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %6 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %7 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  %8 = alloca %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", align 8
  store ptr %1, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  call void @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_set_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %10, i32 noundef 1)
  %11 = getelementptr inbounds i8, ptr %0, i64 216
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %12 = load ptr, ptr %0, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %12, i64 40
  %14 = load ptr, ptr %13, align 8
  %15 = call noundef i32 %14(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %16 = add i32 %15, -1
  store i32 %16, ptr %4, align 4, !tbaa !11
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %18 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %.not = icmp eq i32 %18, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 32
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 0)
  %23 = load i64, ptr %22, align 8, !tbaa !5
  store i64 %23, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %24 = call ptr @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulator4nextEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %24, ptr %6, align 8
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 0)
  %26 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #5
  call void @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6removeERNS3_10circulatorE(ptr noundef nonnull align 8 dereferenceable(60) %26, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %27 = ptrtoint ptr %24 to i64
  store i64 %27, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 %27, ptr %8, align 8, !tbaa !5
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  %28 = load ptr, ptr %0, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 40
  %30 = load ptr, ptr %29, align 8
  %31 = call noundef i32 %30(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %32 = add i32 %31, -1
  %33 = load i32, ptr %11, align 8, !tbaa !13
  %34 = icmp ult i32 %32, %33
  br i1 %34, label %37, label %.preheader28

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.01820 = phi i32 [ %36, %.lr.ph ], [ 0, %2 ]
  %35 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %36 = add nuw i32 %.01820, 1
  %exitcond.not = icmp eq i32 %36, %18
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !36

37:                                               ; preds = %._crit_edge
  %38 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %39 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  br label %.preheader28

.preheader28:                                     ; preds = %37, %._crit_edge
  br label %40

40:                                               ; preds = %.preheader28, %60
  %41 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !38
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !40
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = icmp eq ptr %45, %46
  br i1 %47, label %.sink.split, label %48

48:                                               ; preds = %40
  %49 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !38
  %52 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %43, ptr noundef nonnull align 8 dereferenceable(60) %51)
  %53 = getelementptr inbounds i8, ptr %43, i64 24
  %54 = load double, ptr %53, align 8, !tbaa !43
  %55 = fcmp olt double %52, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %48
  %57 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !38
  store ptr %59, ptr %44, align 8, !tbaa !40
  store double %52, ptr %53, align 8, !tbaa !43
  br label %.sink.split

.sink.split:                                      ; preds = %40, %56
  %.sink = phi i32 [ 2, %56 ], [ 4, %40 ]
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %43, i32 noundef %.sink)
  br label %60

60:                                               ; preds = %.sink.split, %48
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %63 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br i1 %63, label %40, label %64, !llvm.loop !44

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 32
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %66, i32 noundef 1)
  %68 = load i64, ptr %67, align 8, !tbaa !5
  store i64 %68, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %69 = call ptr @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulator4nextEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %69, ptr %6, align 8
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 1)
  %71 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %70) #5
  call void @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6removeERNS3_10circulatorE(ptr noundef nonnull align 8 dereferenceable(60) %71, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %72 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %72, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 %72, ptr %8, align 8, !tbaa !5
  br i1 %.not, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %64, %.lr.ph.1
  %.01820.1 = phi i32 [ %74, %.lr.ph.1 ], [ 0, %64 ]
  %73 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %74 = add nuw i32 %.01820.1, 1
  %exitcond.1.not = icmp eq i32 %74, %18
  br i1 %exitcond.1.not, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !36

._crit_edge.1:                                    ; preds = %.lr.ph.1, %64
  %75 = load ptr, ptr %0, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %75, i64 40
  %77 = load ptr, ptr %76, align 8
  %78 = call noundef i32 %77(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %79 = add i32 %78, -1
  %80 = load i32, ptr %11, align 8, !tbaa !13
  %81 = icmp ult i32 %79, %80
  br i1 %81, label %82, label %.preheader27

82:                                               ; preds = %._crit_edge.1
  %83 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %84 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  br label %.preheader27

.preheader27:                                     ; preds = %82, %._crit_edge.1
  br label %85

85:                                               ; preds = %.preheader27, %105
  %86 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load ptr, ptr %87, align 8, !tbaa !38
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  %90 = load ptr, ptr %89, align 8, !tbaa !40
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = icmp eq ptr %90, %91
  br i1 %92, label %.sink.split23, label %93

93:                                               ; preds = %85
  %94 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !38
  %97 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %88, ptr noundef nonnull align 8 dereferenceable(60) %96)
  %98 = getelementptr inbounds i8, ptr %88, i64 24
  %99 = load double, ptr %98, align 8, !tbaa !43
  %100 = fcmp olt double %97, %99
  br i1 %100, label %101, label %105

101:                                              ; preds = %93
  %102 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !38
  store ptr %104, ptr %89, align 8, !tbaa !40
  store double %97, ptr %98, align 8, !tbaa !43
  br label %.sink.split23

.sink.split23:                                    ; preds = %85, %101
  %.sink24 = phi i32 [ 2, %101 ], [ 4, %85 ]
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %88, i32 noundef %.sink24)
  br label %105

105:                                              ; preds = %.sink.split23, %93
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %108 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br i1 %108, label %85, label %109, !llvm.loop !44

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 32
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %111, i32 noundef 2)
  %113 = load i64, ptr %112, align 8, !tbaa !5
  store i64 %113, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %114 = call ptr @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulator4nextEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %114, ptr %6, align 8
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 2)
  %116 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %115) #5
  call void @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6removeERNS3_10circulatorE(ptr noundef nonnull align 8 dereferenceable(60) %116, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %117 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %117, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 %117, ptr %8, align 8, !tbaa !5
  br i1 %.not, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %109, %.lr.ph.2
  %.01820.2 = phi i32 [ %119, %.lr.ph.2 ], [ 0, %109 ]
  %118 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %119 = add nuw i32 %.01820.2, 1
  %exitcond.2.not = icmp eq i32 %119, %18
  br i1 %exitcond.2.not, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !36

._crit_edge.2:                                    ; preds = %.lr.ph.2, %109
  %120 = load ptr, ptr %0, align 8, !tbaa !9
  %121 = getelementptr inbounds i8, ptr %120, i64 40
  %122 = load ptr, ptr %121, align 8
  %123 = call noundef i32 %122(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %124 = add i32 %123, -1
  %125 = load i32, ptr %11, align 8, !tbaa !13
  %126 = icmp ult i32 %124, %125
  br i1 %126, label %127, label %.preheader

127:                                              ; preds = %._crit_edge.2
  %128 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %129 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  br label %.preheader

.preheader:                                       ; preds = %127, %._crit_edge.2
  br label %130

130:                                              ; preds = %.preheader, %150
  %131 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %132 = getelementptr inbounds i8, ptr %131, i64 8
  %133 = load ptr, ptr %132, align 8, !tbaa !38
  %134 = getelementptr inbounds i8, ptr %133, i64 16
  %135 = load ptr, ptr %134, align 8, !tbaa !40
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = icmp eq ptr %135, %136
  br i1 %137, label %.sink.split25, label %138

138:                                              ; preds = %130
  %139 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %140 = getelementptr inbounds i8, ptr %139, i64 8
  %141 = load ptr, ptr %140, align 8, !tbaa !38
  %142 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %133, ptr noundef nonnull align 8 dereferenceable(60) %141)
  %143 = getelementptr inbounds i8, ptr %133, i64 24
  %144 = load double, ptr %143, align 8, !tbaa !43
  %145 = fcmp olt double %142, %144
  br i1 %145, label %146, label %150

146:                                              ; preds = %138
  %147 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %148 = getelementptr inbounds i8, ptr %147, i64 8
  %149 = load ptr, ptr %148, align 8, !tbaa !38
  store ptr %149, ptr %134, align 8, !tbaa !40
  store double %142, ptr %143, align 8, !tbaa !43
  br label %.sink.split25

.sink.split25:                                    ; preds = %130, %146
  %.sink26 = phi i32 [ 2, %146 ], [ 4, %130 ]
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %133, i32 noundef %.sink26)
  br label %150

150:                                              ; preds = %.sink.split25, %138
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %153 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br i1 %153, label %130, label %154, !llvm.loop !44

154:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6removeERNS3_10circulatorE(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { inlinehint 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 216}
!14 = !{!"_ZTSN7fastjet13ClosestPair2DE", !15, i64 0, !16, i64 8, !17, i64 32, !18, i64 40, !22, i64 64, !29, i64 144, !33, i64 168, !34, i64 184, !35, i64 192, !35, i64 204, !12, i64 216}
!15 = !{!"_ZTSN7fastjet17ClosestPair2DBaseE"}
!16 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEE", !7, i64 0}
!17 = !{!"_ZTSSt8auto_ptrIN7fastjet7MinHeapEE", !6, i64 0}
!18 = !{!"_ZTSSt6vectorIN7fastjet13ClosestPair2D5PointESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN7fastjet13ClosestPair2D5PointESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt5stackIPN7fastjet13ClosestPair2D5PointESt5dequeIS3_SaIS3_EEE", !23, i64 0}
!23 = !{!"_ZTSSt5dequeIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !24, i64 0}
!24 = !{!"_ZTSSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !25, i64 0}
!25 = !{!"_ZTSNSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE11_Deque_implE", !26, i64 0}
!26 = !{!"_ZTSNSt11_Deque_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !27, i64 8, !28, i64 16, !28, i64 48}
!27 = !{!"long", !7, i64 0}
!28 = !{!"_ZTSSt15_Deque_iteratorIPN7fastjet13ClosestPair2D5PointERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt6vectorIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPN7fastjet13ClosestPair2D5PointESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSN7fastjet7Coord2DE", !34, i64 0, !34, i64 8}
!34 = !{!"double", !7, i64 0}
!35 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletIjEE", !7, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !6, i64 8}
!39 = !{!"_ZTSN7fastjet13ClosestPair2D7ShuffleE", !12, i64 0, !12, i64 4, !6, i64 8}
!40 = !{!41, !6, i64 16}
!41 = !{!"_ZTSN7fastjet13ClosestPair2D5PointE", !33, i64 0, !6, i64 16, !34, i64 24, !42, i64 32, !12, i64 56}
!42 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEE", !7, i64 0}
!43 = !{!41, !34, i64 24}
!44 = distinct !{!44, !37}


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