; LLVM IR from mickypaganini/SSI2016-jet-clustering :: spartyjet-4.0.2_mac/External/fastjet-3.0.0/plugins/EECambridge/EECambridgePlugin_d87413c1 (15ClusterSequenceE)

; 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::NNH" = type { ptr, ptr, ptr, i32, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet17EECambridgePlugin14run_clusteringERNS_15ClusterSequenceE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(276) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.fastjet::NNH", align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %19)
  %21 = call noundef i64 @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %23)
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEEC2ERKSt6vectorINS_9PseudoJetESaIS5_EE(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(24) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = invoke noundef double @_ZNK7fastjet15ClusterSequence2Q2Ev(ptr noundef nonnull align 8 dereferenceable(276) %25)
          to label %27 unwind label %87

27:                                               ; preds = %2
  store double %26, ptr %7, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %143, %27
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %148

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %32 = invoke noundef double @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE7dij_minERiS4_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %33 unwind label %91

33:                                               ; preds = %31
  store double %32, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = icmp sge i32 %34, 0
  br i1 %35, label %36, label %111

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %37)
          to label %39 unwind label %95

39:                                               ; preds = %36
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %41) #4
  %43 = invoke noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %42)
          to label %44 unwind label %95

44:                                               ; preds = %39
  store double %43, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %45)
          to label %47 unwind label %99

47:                                               ; preds = %44
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %49) #4
  %51 = invoke noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %50)
          to label %52 unwind label %99

52:                                               ; preds = %47
  store double %51, ptr %17, align 8, !tbaa !11
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %54 unwind label %99

54:                                               ; preds = %52
  %55 = load double, ptr %53, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  store double %55, ptr %15, align 8, !tbaa !11
  %56 = load double, ptr %13, align 8, !tbaa !11
  %57 = fmul double 2.000000e+00, %56
  %58 = load double, ptr %15, align 8, !tbaa !11
  %59 = fmul double %57, %58
  %60 = load double, ptr %15, align 8, !tbaa !11
  %61 = fmul double %59, %60
  store double %61, ptr %14, align 8, !tbaa !11
  %62 = load double, ptr %14, align 8, !tbaa !11
  %63 = load double, ptr %7, align 8, !tbaa !11
  %64 = invoke noundef double @_ZNK7fastjet17EECambridgePlugin4ycutEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %65 unwind label %104

65:                                               ; preds = %54
  %66 = fmul double %63, %64
  %67 = fcmp ogt double %62, %66
  br i1 %67, label %68, label %109

68:                                               ; preds = %65
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %69)
          to label %71 unwind label %104

71:                                               ; preds = %68
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %73) #4
  %75 = invoke noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %74)
          to label %76 unwind label %104

76:                                               ; preds = %71
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %77)
          to label %79 unwind label %104

79:                                               ; preds = %76
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %81) #4
  %83 = invoke noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %82)
          to label %84 unwind label %104

84:                                               ; preds = %79
  %85 = fcmp ogt double %75, %83
  br i1 %85, label %86, label %108

86:                                               ; preds = %84
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) #4
  br label %108

87:                                               ; preds = %2
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %8, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %9, align 4
  br label %149

91:                                               ; preds = %31
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %8, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %9, align 4
  br label %147

95:                                               ; preds = %39, %36
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  br label %103

99:                                               ; preds = %52, %47, %44
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %8, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %103

103:                                              ; preds = %99, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %110

104:                                              ; preds = %79, %76, %71, %68, %54
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %8, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %9, align 4
  br label %110

108:                                              ; preds = %86, %84
  store i32 -1, ptr %11, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %108, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %113

110:                                              ; preds = %104, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %146

111:                                              ; preds = %33
  %112 = load double, ptr %7, align 8, !tbaa !11
  store double %112, ptr %14, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %111, %109
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = icmp sge i32 %114, 0
  br i1 %115, label %116, label %136

116:                                              ; preds = %113
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = load double, ptr %14, align 8, !tbaa !11
  invoke void @_ZN7fastjet15ClusterSequence30plugin_record_ij_recombinationEiidRi(ptr noundef nonnull align 8 dereferenceable(276) %117, i32 noundef %118, i32 noundef %119, double noundef %120, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %121 unwind label %132

121:                                              ; preds = %116
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %124)
          to label %126 unwind label %132

126:                                              ; preds = %121
  %127 = load i32, ptr %12, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %128) #4
  %130 = load i32, ptr %12, align 4, !tbaa !9
  invoke void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE10merge_jetsEiiRKNS_9PseudoJetEi(ptr noundef nonnull align 8 dereferenceable(56) %6, i32 noundef %122, i32 noundef %123, ptr noundef nonnull align 8 dereferenceable(88) %129, i32 noundef %130)
          to label %131 unwind label %132

131:                                              ; preds = %126
  br label %143

132:                                              ; preds = %140, %136, %126, %121, %116
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %8, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %9, align 4
  br label %146

136:                                              ; preds = %113
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = load double, ptr %14, align 8, !tbaa !11
  invoke void @_ZN7fastjet15ClusterSequence30plugin_record_iB_recombinationEid(ptr noundef nonnull align 8 dereferenceable(276) %137, i32 noundef %138, double noundef %139)
          to label %140 unwind label %132

140:                                              ; preds = %136
  %141 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE10remove_jetEi(ptr noundef nonnull align 8 dereferenceable(56) %6, i32 noundef %141)
          to label %142 unwind label %132

142:                                              ; preds = %140
  br label %143

143:                                              ; preds = %142, %131
  %144 = load i32, ptr %5, align 4, !tbaa !9
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %28, !llvm.loop !13

146:                                              ; preds = %132, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %147

147:                                              ; preds = %146, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %149

148:                                              ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void

149:                                              ; preds = %147, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %150

150:                                              ; preds = %149
  %151 = load ptr, ptr %8, align 8
  %152 = load i32, ptr %9, align 4
  %153 = insertvalue { ptr, i32 } poison, ptr %151, 0
  %154 = insertvalue { ptr, i32 } %153, i32 %152, 1
  resume { ptr, i32 } %154
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.fastjet::NNH" = type { ptr, ptr, ptr, i32, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *, std::allocator<fastjet::NNH<fastjet::EECamBriefJet>::NNBJ *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet17EECambridgePlugin14run_clusteringERNS_15ClusterSequenceE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(276) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.fastjet::NNH", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %10 = tail call noundef i64 @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %11 = trunc i64 %10 to i32
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #4
  %12 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEEC2ERKSt6vectorINS_9PseudoJetESaIS5_EE(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(24) %12)
  %13 = call noundef double @_ZNK7fastjet15ClusterSequence2Q2Ev(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %14 = icmp sgt i32 %11, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %71
  %.029 = phi i32 [ %72, %71 ], [ %11, %2 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %15 = invoke noundef double @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE7dij_minERiS4_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %16 unwind label %51

16:                                               ; preds = %.lr.ph
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, -1
  br i1 %18, label %19, label %.thread

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %22) #4
  %24 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %23)
  store double %24, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %27) #4
  %29 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %28)
  store double %29, ptr %8, align 8, !tbaa !9
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %31 = load double, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %32 = fmul double %15, 2.000000e+00
  %33 = fmul double %32, %31
  %34 = fmul double %31, %33
  %35 = call noundef double @_ZNK7fastjet17EECambridgePlugin4ycutEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %36 = fmul double %13, %35
  %37 = fcmp ogt double %34, %36
  br i1 %37, label %38, label %54

38:                                               ; preds = %19
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #4
  %43 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %42)
  %44 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #4
  %48 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %47)
  %49 = fcmp ogt double %43, %48
  br i1 %49, label %50, label %53

50:                                               ; preds = %38
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5) #4
  br label %53

51:                                               ; preds = %.lr.ph
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %74

53:                                               ; preds = %50, %38
  store i32 -1, ptr %5, align 4, !tbaa !5
  br label %.thread

54:                                               ; preds = %19
  %.pr = load i32, ptr %5, align 4, !tbaa !5
  %55 = icmp sgt i32 %.pr, -1
  br i1 %55, label %56, label %.thread

56:                                               ; preds = %54
  %57 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN7fastjet15ClusterSequence30plugin_record_ij_recombinationEiidRi(ptr noundef nonnull align 8 dereferenceable(276) %1, i32 noundef %57, i32 noundef %.pr, double noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %58 unwind label %66

58:                                               ; preds = %56
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276) %1)
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN7fastjet9PseudoJetESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #4
  %65 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE10merge_jetsEiiRKNS_9PseudoJetEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %59, i32 noundef %60, ptr noundef nonnull align 8 dereferenceable(88) %64, i32 noundef %65)
          to label %71 unwind label %66

66:                                               ; preds = %.thread, %58, %56
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %74

.thread:                                          ; preds = %53, %16, %54
  %.02228 = phi double [ %34, %54 ], [ %13, %16 ], [ %34, %53 ]
  %68 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN7fastjet15ClusterSequence30plugin_record_iB_recombinationEid(ptr noundef nonnull align 8 dereferenceable(276) %1, i32 noundef %68, double noundef %.02228)
          to label %69 unwind label %66

69:                                               ; preds = %.thread
  %70 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEE10remove_jetEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %70)
  br label %71

71:                                               ; preds = %58, %69
  %72 = add nsw i32 %.029, -1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  %73 = icmp sgt i32 %.029, 1
  br i1 %73, label %.lr.ph, label %._crit_edge, !llvm.loop !11

74:                                               ; preds = %66, %51
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %71, %2
  call void @_ZN7fastjet3NNHINS_13EECamBriefJetENS_7_NoInfoEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7fastjet15ClusterSequence4jetsEv(ptr noundef nonnull align 8 dereferenceable(276)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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