; 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::Shuffle" = type { i32, i32, ptr }
%"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator" = type { ptr }
%"class.fastjet::ClosestPair2D::Point" = type <{ %"class.fastjet::Coord2D", ptr, double, %"class.fastjet::ClosestPair2D::triplet", i32, [4 x i8] }>
%"class.fastjet::Coord2D" = type { double, double }
%"class.fastjet::ClosestPair2D::triplet" = type { [3 x %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator"] }
%"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::ClosestPair2D::triplet.7" = type { [3 x i32] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #0 align 2

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

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

; 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 double @_ZNSt14numeric_limitsIdE3maxEv() #3 align 2

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

; 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) #4 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)) #4

; 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) #4 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)) #0 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: 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 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

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

33:                                               ; preds = %121, %2
  %34 = load i32, ptr %7, align 4, !tbaa !17
  %35 = icmp ult i32 %34, 3
  br i1 %35, label %37, label %36

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

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %20, i32 0, i32 8
  %40 = load i32, ptr %7, align 4, !tbaa !17
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7fastjet13ClosestPair2D7tripletIjEixEj(ptr noundef nonnull align 4 dereferenceable(12) %39, i32 noundef %40)
  %42 = load i32, ptr %41, align 4, !tbaa !17
  call void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220) %20, ptr noundef nonnull align 8 dereferenceable(60) %38, ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %42)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %43 = getelementptr inbounds %"class.fastjet::ClosestPair2D", ptr %20, i32 0, i32 1
  %44 = load i32, ptr %7, align 4, !tbaa !17
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %43, i32 noundef %44)
  %46 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #6
  %47 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60) %46, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %48 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %10, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %49, i32 0, i32 3
  %51 = load i32, ptr %7, align 4, !tbaa !17
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %50, i32 noundef %51)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %10, i64 8, i1 false), !tbaa.struct !18
  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 !18
  %53 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0)
  %54 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %12, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %10, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !17
  br label %55

55:                                               ; preds = %63, %37
  %56 = load i32, ptr %14, align 4, !tbaa !17
  %57 = load i32, ptr %5, align 4, !tbaa !17
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %66

60:                                               ; preds = %55
  %61 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0)
  %62 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %15, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  br label %63

63:                                               ; preds = %60
  %64 = load i32, ptr %14, align 4, !tbaa !17
  %65 = add i32 %64, 1
  store i32 %65, ptr %14, align 4, !tbaa !17
  br label %55, !llvm.loop !19

66:                                               ; preds = %59
  br label %67

67:                                               ; preds = %117, %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %68 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %69 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Shuffle", ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  store ptr %70, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %71 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %72 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Shuffle", ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  store ptr %73, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %74, ptr noundef nonnull align 8 dereferenceable(60) %75)
  store double %76, ptr %18, align 8, !tbaa !23
  %77 = load double, ptr %18, align 8, !tbaa !23
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %78, i32 0, i32 2
  %80 = load double, ptr %79, align 8, !tbaa !9
  %81 = fcmp olt double %77, %80
  br i1 %81, label %82, label %90

82:                                               ; preds = %67
  %83 = load double, ptr %18, align 8, !tbaa !23
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %84, i32 0, i32 2
  store double %83, ptr %85, align 8, !tbaa !9
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %87, i32 0, i32 1
  store ptr %86, ptr %88, align 8, !tbaa !24
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %20, ptr noundef %89, i32 noundef 2)
  br label %90

90:                                               ; preds = %82, %67
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = load ptr, ptr %17, align 8, !tbaa !5
  %93 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %91, ptr noundef nonnull align 8 dereferenceable(60) %92)
  store double %93, ptr %18, align 8, !tbaa !23
  %94 = load double, ptr %18, align 8, !tbaa !23
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %95, i32 0, i32 2
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = fcmp olt double %94, %97
  br i1 %98, label %99, label %106

99:                                               ; preds = %90
  %100 = load double, ptr %18, align 8, !tbaa !23
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %101, i32 0, i32 2
  store double %100, ptr %102, align 8, !tbaa !9
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %104, i32 0, i32 1
  store ptr %103, ptr %105, align 8, !tbaa !24
  br label %106

106:                                              ; preds = %99, %90
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.fastjet::ClosestPair2D::Point", ptr %107, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !24
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = icmp eq ptr %109, %110
  br i1 %111, label %112, label %114

112:                                              ; preds = %106
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %20, ptr noundef %113, i32 noundef 4)
  br label %114

114:                                              ; preds = %112, %106
  %115 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0)
  %116 = getelementptr inbounds %"class.fastjet::SearchTree<fastjet::ClosestPair2D::Shuffle>::circulator", ptr %19, i32 0, i32 0
  store ptr %115, ptr %116, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %117

117:                                              ; preds = %114
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %119 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef nonnull align 8 dereferenceable(8) %10)
  br i1 %119, label %67, label %120, !llvm.loop !25

120:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #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 16, ptr %9) #6
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %7, align 4, !tbaa !17
  %123 = add i32 %122, 1
  store i32 %123, ptr %7, align 4, !tbaa !17
  br label %33, !llvm.loop !26

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3 align 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !12, i64 24}
!10 = !{!"_ZTSN7fastjet13ClosestPair2D5PointE", !11, i64 0, !6, i64 16, !12, i64 24, !13, i64 32, !14, i64 56}
!11 = !{!"_ZTSN7fastjet7Coord2DE", !12, i64 0, !12, i64 8}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!14, !14, i64 0}
!18 = !{i64 0, i64 8, !5}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !6, i64 8}
!22 = !{!"_ZTSN7fastjet13ClosestPair2D7ShuffleE", !14, i64 0, !14, i64 4, !6, i64 8}
!23 = !{!12, !12, i64 0}
!24 = !{!10, !6, i64 16}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}


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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220), ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE3maxEv() local_unnamed_addr #2 align 2

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

; 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 #3 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 #3

; 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 #3 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 #0 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: 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 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet13ClosestPair2D24_insert_into_search_treeEPNS0_5PointE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.fastjet::ClosestPair2D::Shuffle", align 8
  %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
  tail call void @_ZN7fastjet13ClosestPair2D10_set_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %1, i32 noundef 2)
  %8 = tail call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #5
  %9 = getelementptr inbounds i8, ptr %1, i64 24
  store double %8, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 216
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %11 = load ptr, ptr %0, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %11, i64 40
  %13 = load ptr, ptr %12, align 8
  %14 = tail call noundef i32 %13(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %15 = add i32 %14, -1
  store i32 %15, ptr %3, align 4, !tbaa !16
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %17 = load i32, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  %18 = getelementptr inbounds i8, ptr %0, i64 192
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = getelementptr inbounds i8, ptr %1, i64 32
  %.not = icmp eq i32 %17, 0
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7fastjet13ClosestPair2D7tripletIjEixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 0)
  %23 = load i32, ptr %22, align 4, !tbaa !16
  call void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %23)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 0)
  %25 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  %26 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60) %25, ptr noundef nonnull align 8 dereferenceable(16) %4)
  store ptr %26, ptr %5, align 8
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef 0)
  %28 = ptrtoint ptr %26 to i64
  store i64 %28, ptr %27, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 %28, ptr %6, align 8, !tbaa !17
  %29 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i64 %28, ptr %7, align 8, !tbaa !17
  br i1 %.not, label %.preheader.preheader, label %.lr.ph

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

.preheader.preheader:                             ; preds = %.lr.ph, %2
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %54
  %32 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !20
  %38 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %34, ptr noundef nonnull align 8 dereferenceable(60) %1)
  %39 = getelementptr inbounds i8, ptr %34, i64 24
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fcmp olt double %38, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %.preheader
  store double %38, ptr %39, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %34, i64 16
  store ptr %1, ptr %43, align 8, !tbaa !22
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %34, i32 noundef 2)
  br label %44

44:                                               ; preds = %42, %.preheader
  %45 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(60) %37)
  %46 = load double, ptr %9, align 8, !tbaa !5
  %47 = fcmp olt double %45, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store double %45, ptr %9, align 8, !tbaa !5
  store ptr %37, ptr %21, align 8, !tbaa !22
  br label %49

49:                                               ; preds = %48, %44
  %50 = getelementptr inbounds i8, ptr %34, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !22
  %52 = icmp eq ptr %51, %37
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %34, i32 noundef 4)
  br label %54

54:                                               ; preds = %53, %49
  %55 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %57 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %57, label %.preheader, label %58, !llvm.loop !23

58:                                               ; preds = %54
  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.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7fastjet13ClosestPair2D7tripletIjEixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 1)
  %60 = load i32, ptr %59, align 4, !tbaa !16
  call void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %60)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 1)
  %62 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #5
  %63 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60) %62, ptr noundef nonnull align 8 dereferenceable(16) %4)
  store ptr %63, ptr %5, align 8
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef 1)
  %65 = load i64, ptr %5, align 8, !tbaa !17
  store i64 %65, ptr %64, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 %65, ptr %6, align 8, !tbaa !17
  %66 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %67 = load i64, ptr %5, align 8, !tbaa !17
  store i64 %67, ptr %7, align 8, !tbaa !17
  br i1 %.not, label %.preheader.1.preheader, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %58, %.lr.ph.1
  %.03437.1 = phi i32 [ %69, %.lr.ph.1 ], [ 0, %58 ]
  %68 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatormmEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0)
  %69 = add nuw i32 %.03437.1, 1
  %exitcond.1.not = icmp eq i32 %69, %17
  br i1 %exitcond.1.not, label %.preheader.1.preheader, label %.lr.ph.1, !llvm.loop !18

.preheader.1.preheader:                           ; preds = %.lr.ph.1, %58
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.1.preheader, %92
  %70 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  %72 = load ptr, ptr %71, align 8, !tbaa !20
  %73 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %74 = getelementptr inbounds i8, ptr %73, i64 8
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %72, ptr noundef nonnull align 8 dereferenceable(60) %1)
  %77 = getelementptr inbounds i8, ptr %72, i64 24
  %78 = load double, ptr %77, align 8, !tbaa !5
  %79 = fcmp olt double %76, %78
  br i1 %79, label %80, label %82

80:                                               ; preds = %.preheader.1
  store double %76, ptr %77, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %72, i64 16
  store ptr %1, ptr %81, align 8, !tbaa !22
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %72, i32 noundef 2)
  br label %82

82:                                               ; preds = %80, %.preheader.1
  %83 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(60) %75)
  %84 = load double, ptr %9, align 8, !tbaa !5
  %85 = fcmp olt double %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %82
  store double %83, ptr %9, align 8, !tbaa !5
  store ptr %75, ptr %21, align 8, !tbaa !22
  br label %87

87:                                               ; preds = %86, %82
  %88 = getelementptr inbounds i8, ptr %72, i64 16
  %89 = load ptr, ptr %88, align 8, !tbaa !22
  %90 = icmp eq ptr %89, %75
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %72, i32 noundef 4)
  br label %92

92:                                               ; preds = %91, %87
  %93 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %95 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %95, label %.preheader.1, label %96, !llvm.loop !23

96:                                               ; preds = %92
  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.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7fastjet13ClosestPair2D7tripletIjEixEj(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 noundef 2)
  %98 = load i32, ptr %97, align 4, !tbaa !16
  call void @_ZN7fastjet13ClosestPair2D14_point2shuffleERNS0_5PointERNS0_7ShuffleEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %98)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletISt8auto_ptrINS_10SearchTreeINS0_7ShuffleEEEEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef 2)
  %100 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet10SearchTreeINS0_13ClosestPair2D7ShuffleEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %99) #5
  %101 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60) %100, ptr noundef nonnull align 8 dereferenceable(16) %4)
  store ptr %101, ptr %5, align 8
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEixEj(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef 2)
  %103 = load i64, ptr %5, align 8, !tbaa !17
  store i64 %103, ptr %102, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 %103, ptr %6, align 8, !tbaa !17
  %104 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %105 = load i64, ptr %5, align 8, !tbaa !17
  store i64 %105, ptr %7, align 8, !tbaa !17
  br i1 %.not, label %.preheader.2.preheader, label %.lr.ph.2

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

.preheader.2.preheader:                           ; preds = %.lr.ph.2, %96
  br label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.2.preheader, %130
  %108 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %109 = getelementptr inbounds i8, ptr %108, i64 8
  %110 = load ptr, ptr %109, align 8, !tbaa !20
  %111 = call noundef ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %113 = load ptr, ptr %112, align 8, !tbaa !20
  %114 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %110, ptr noundef nonnull align 8 dereferenceable(60) %1)
  %115 = getelementptr inbounds i8, ptr %110, i64 24
  %116 = load double, ptr %115, align 8, !tbaa !5
  %117 = fcmp olt double %114, %116
  br i1 %117, label %118, label %120

118:                                              ; preds = %.preheader.2
  store double %114, ptr %115, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %110, i64 16
  store ptr %1, ptr %119, align 8, !tbaa !22
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %110, i32 noundef 2)
  br label %120

120:                                              ; preds = %118, %.preheader.2
  %121 = call noundef double @_ZNK7fastjet13ClosestPair2D5Point9distance2ERKS1_(ptr noundef nonnull align 8 dereferenceable(60) %1, ptr noundef nonnull align 8 dereferenceable(60) %113)
  %122 = load double, ptr %9, align 8, !tbaa !5
  %123 = fcmp olt double %121, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %120
  store double %121, ptr %9, align 8, !tbaa !5
  store ptr %113, ptr %21, align 8, !tbaa !22
  br label %125

125:                                              ; preds = %124, %120
  %126 = getelementptr inbounds i8, ptr %110, i64 16
  %127 = load ptr, ptr %126, align 8, !tbaa !22
  %128 = icmp eq ptr %127, %113
  br i1 %128, label %129, label %130

129:                                              ; preds = %125
  call void @_ZN7fastjet13ClosestPair2D10_add_labelEPNS0_5PointEj(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef nonnull %110, i32 noundef 4)
  br label %130

130:                                              ; preds = %129, %125
  %131 = call ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0)
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %133 = call noundef zeroext i1 @_ZNK7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorneERKS4_(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %133, label %.preheader.2, label %134, !llvm.loop !23

134:                                              ; preds = %130
  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.end.p0(i64 16, ptr nonnull %4) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE6insertERKS2_(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN7fastjet10SearchTreeINS_13ClosestPair2D7ShuffleEE10circulatorppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !8, i64 24}
!6 = !{!"_ZTSN7fastjet13ClosestPair2D5PointE", !7, i64 0, !11, i64 16, !8, i64 24, !12, i64 32, !13, i64 56}
!7 = !{!"_ZTSN7fastjet7Coord2DE", !8, i64 0, !8, i64 8}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN7fastjet13ClosestPair2D7tripletINS_10SearchTreeINS0_7ShuffleEE10circulatorEEE", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !10, i64 0}
!16 = !{!13, !13, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !11, i64 8}
!21 = !{!"_ZTSN7fastjet13ClosestPair2D7ShuffleE", !13, i64 0, !13, i64 4, !11, i64 8}
!22 = !{!6, !11, i64 16}
!23 = distinct !{!23, !19}


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