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

; 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::PseudoJet" = type { ptr, %"class.fastjet::SharedPtr.3", %"class.fastjet::SharedPtr.4", double, double, double, double, double, double, double, i32, i32 }
%"class.fastjet::SharedPtr.3" = type { ptr }
%"class.fastjet::SharedPtr.4" = type { ptr }
%"class.fastjet::GhostedAreaSpec" = type { double, double, i32, double, double, double, double, i8, %"class.fastjet::Selector", double, double, double, i32, i32, i32, %"class.std::vector" }
%"class.fastjet::Selector" = type { ptr, %"class.fastjet::SharedPtr" }
%"class.fastjet::SharedPtr" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet15GhostedAreaSpec10add_ghostsERSt6vectorINS_9PseudoJetESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %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
  %18 = alloca double, align 8
  %19 = alloca %"class.fastjet::PseudoJet", align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %23 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 7
  %24 = load i8, ptr %23, align 8, !tbaa !9, !range !20, !noundef !21
  %25 = trunc i8 %24 to i1
  br i1 %25, label %26, label %29

26:                                               ; preds = %2
  store double 0.000000e+00, ptr %5, align 8, !tbaa !22
  %27 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 14
  %28 = load i32, ptr %27, align 8, !tbaa !23
  store i32 %28, ptr %6, align 4, !tbaa !24
  br label %33

29:                                               ; preds = %2
  store double 5.000000e-01, ptr %5, align 8, !tbaa !22
  %30 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 14
  %31 = load i32, ptr %30, align 8, !tbaa !23
  %32 = sub nsw i32 %31, 1
  store i32 %32, ptr %6, align 4, !tbaa !24
  br label %33

33:                                               ; preds = %29, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %34 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 14
  %35 = load i32, ptr %34, align 8, !tbaa !23
  %36 = sub nsw i32 0, %35
  store i32 %36, ptr %7, align 4, !tbaa !24
  br label %37

37:                                               ; preds = %153, %33
  %38 = load i32, ptr %7, align 4, !tbaa !24
  %39 = load i32, ptr %6, align 4, !tbaa !24
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !24
  br label %43

43:                                               ; preds = %149, %42
  %44 = load i32, ptr %9, align 4, !tbaa !24
  %45 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 13
  %46 = load i32, ptr %45, align 4, !tbaa !25
  %47 = icmp slt i32 %44, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %152

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %50 = load i32, ptr %9, align 4, !tbaa !24
  %51 = sitofp i32 %50 to double
  %52 = fadd double %51, 5.000000e-01
  %53 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 10
  %54 = load double, ptr %53, align 8, !tbaa !26
  %55 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 10
  %56 = load double, ptr %55, align 8, !tbaa !26
  %57 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %22)
  %58 = fsub double %57, 5.000000e-01
  %59 = fmul double %56, %58
  %60 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 4
  %61 = load double, ptr %60, align 8, !tbaa !27
  %62 = fmul double %59, %61
  %63 = call double @llvm.fmuladd.f64(double %52, double %54, double %62)
  store double %63, ptr %10, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %64 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 7
  %65 = load i8, ptr %64, align 8, !tbaa !9, !range !20, !noundef !21
  %66 = trunc i8 %65 to i1
  br i1 %66, label %67, label %70

67:                                               ; preds = %49
  %68 = load double, ptr %10, align 8, !tbaa !22
  %69 = fsub double 0x3FF921FB54442D18, %68
  store double %69, ptr %11, align 8, !tbaa !22
  br label %72

70:                                               ; preds = %49
  %71 = load double, ptr %10, align 8, !tbaa !22
  store double %71, ptr %11, align 8, !tbaa !22
  br label %72

72:                                               ; preds = %70, %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %73 = load i32, ptr %7, align 4, !tbaa !24
  %74 = sitofp i32 %73 to double
  %75 = load double, ptr %5, align 8, !tbaa !22
  %76 = fadd double %74, %75
  %77 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 11
  %78 = load double, ptr %77, align 8, !tbaa !28
  %79 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 11
  %80 = load double, ptr %79, align 8, !tbaa !28
  %81 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %22)
  %82 = fsub double %81, 5.000000e-01
  %83 = fmul double %80, %82
  %84 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 4
  %85 = load double, ptr %84, align 8, !tbaa !27
  %86 = fmul double %83, %85
  %87 = call double @llvm.fmuladd.f64(double %76, double %78, double %86)
  %88 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 1
  %89 = load double, ptr %88, align 8, !tbaa !29
  %90 = fadd double %87, %89
  store double %90, ptr %12, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %91 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 6
  %92 = load double, ptr %91, align 8, !tbaa !30
  %93 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %22)
  %94 = fsub double %93, 5.000000e-01
  %95 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 5
  %96 = load double, ptr %95, align 8, !tbaa !31
  %97 = call double @llvm.fmuladd.f64(double %94, double %96, double 1.000000e+00)
  %98 = fmul double %92, %97
  store double %98, ptr %13, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %99 = load double, ptr %12, align 8, !tbaa !22
  %100 = call double @exp(double noundef %99) #8
  store double %100, ptr %14, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %101 = load double, ptr %13, align 8, !tbaa !22
  %102 = load double, ptr %14, align 8, !tbaa !22
  %103 = fdiv double %101, %102
  store double %103, ptr %15, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %104 = load double, ptr %13, align 8, !tbaa !22
  %105 = load double, ptr %14, align 8, !tbaa !22
  %106 = fmul double %104, %105
  store double %106, ptr %16, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %107 = load double, ptr %13, align 8, !tbaa !22
  %108 = load double, ptr %11, align 8, !tbaa !22
  %109 = call double @cos(double noundef %108) #8
  %110 = fmul double %107, %109
  store double %110, ptr %17, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %111 = load double, ptr %13, align 8, !tbaa !22
  %112 = load double, ptr %11, align 8, !tbaa !22
  %113 = call double @sin(double noundef %112) #8
  %114 = fmul double %111, %113
  store double %114, ptr %18, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 88, ptr %19) #8
  %115 = load double, ptr %17, align 8, !tbaa !22
  %116 = load double, ptr %18, align 8, !tbaa !22
  %117 = load double, ptr %16, align 8, !tbaa !22
  %118 = load double, ptr %15, align 8, !tbaa !22
  %119 = fsub double %117, %118
  %120 = fmul double 5.000000e-01, %119
  %121 = load double, ptr %16, align 8, !tbaa !22
  %122 = load double, ptr %15, align 8, !tbaa !22
  %123 = fadd double %121, %122
  %124 = fmul double 5.000000e-01, %123
  call void @_ZN7fastjet9PseudoJetC1Edddd(ptr noundef nonnull align 8 dereferenceable(88) %19, double noundef %115, double noundef %116, double noundef %120, double noundef %124)
  %125 = load double, ptr %12, align 8, !tbaa !22
  %126 = load double, ptr %11, align 8, !tbaa !22
  invoke void @_ZN7fastjet9PseudoJet18set_cached_rap_phiEdd(ptr noundef nonnull align 8 dereferenceable(88) %19, double noundef %125, double noundef %126)
          to label %127 unwind label %139

127:                                              ; preds = %72
  %128 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 8
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7fastjet8Selector6workerEv(ptr noundef nonnull align 8 dereferenceable(16) %128)
          to label %130 unwind label %139

130:                                              ; preds = %127
  %131 = invoke noundef ptr @_ZNK7fastjet9SharedPtrINS_14SelectorWorkerEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %129)
          to label %132 unwind label %139

132:                                              ; preds = %130
  %133 = icmp ne ptr %131, null
  br i1 %133, label %134, label %143

134:                                              ; preds = %132
  %135 = getelementptr inbounds %"class.fastjet::GhostedAreaSpec", ptr %22, i32 0, i32 8
  %136 = invoke noundef zeroext i1 @_ZNK7fastjet8Selector4passERKNS_9PseudoJetE(ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(88) %19)
          to label %137 unwind label %139

137:                                              ; preds = %134
  br i1 %136, label %143, label %138

138:                                              ; preds = %137
  store i32 7, ptr %8, align 4
  br label %146

139:                                              ; preds = %143, %134, %130, %127, %72
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %20, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %21, align 4
  call void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %19) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %157

143:                                              ; preds = %137, %132
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 8 dereferenceable(88) %19)
          to label %145 unwind label %139

145:                                              ; preds = %143
  store i32 0, ptr %8, align 4
  br label %146

146:                                              ; preds = %145, %138
  call void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %19) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  %147 = load i32, ptr %8, align 4
  switch i32 %147, label %162 [
    i32 0, label %148
    i32 7, label %149
  ]

148:                                              ; preds = %146
  br label %149

149:                                              ; preds = %148, %146
  %150 = load i32, ptr %9, align 4, !tbaa !24
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %9, align 4, !tbaa !24
  br label %43, !llvm.loop !32

152:                                              ; preds = %48
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %7, align 4, !tbaa !24
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %7, align 4, !tbaa !24
  br label %37, !llvm.loop !34

156:                                              ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

157:                                              ; preds = %139
  %158 = load ptr, ptr %20, align 8
  %159 = load i32, ptr %21, align 4
  %160 = insertvalue { ptr, i32 } poison, ptr %158, 0
  %161 = insertvalue { ptr, i32 } %160, i32 %159, 1
  resume { ptr, i32 } %161

162:                                              ; preds = %146
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144)) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nounwind
declare double @exp(double noundef) #4

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

declare void @_ZN7fastjet9PseudoJetC1Edddd(ptr noundef nonnull align 8 dereferenceable(88), double noundef, double noundef, double noundef, double noundef) unnamed_addr #5

declare void @_ZN7fastjet9PseudoJet18set_cached_rap_phiEdd(ptr noundef nonnull align 8 dereferenceable(88), double noundef, double noundef) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7fastjet8Selector4passERKNS_9PseudoJetE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { 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 #8 = { 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, !13, i64 56}
!10 = !{!"_ZTSN7fastjet15GhostedAreaSpecE", !11, i64 0, !11, i64 8, !12, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !13, i64 56, !14, i64 64, !11, i64 80, !11, i64 88, !11, i64 96, !12, i64 104, !12, i64 108, !12, i64 112, !16, i64 120}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN7fastjet8SelectorE", !15, i64 8}
!15 = !{!"_ZTSN7fastjet9SharedPtrINS_14SelectorWorkerEEE", !6, i64 0}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!11, !11, i64 0}
!23 = !{!10, !12, i64 112}
!24 = !{!12, !12, i64 0}
!25 = !{!10, !12, i64 108}
!26 = !{!10, !11, i64 88}
!27 = !{!10, !11, i64 32}
!28 = !{!10, !11, i64 96}
!29 = !{!10, !11, i64 8}
!30 = !{!10, !11, i64 48}
!31 = !{!10, !11, i64 40}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


; 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::PseudoJet" = type { ptr, %"class.fastjet::SharedPtr.3", %"class.fastjet::SharedPtr.4", double, double, double, double, double, double, double, i32, i32 }
%"class.fastjet::SharedPtr.3" = type { ptr }
%"class.fastjet::SharedPtr.4" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7fastjet15GhostedAreaSpec10add_ghostsERSt6vectorINS_9PseudoJetESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.fastjet::PseudoJet", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !19, !noundef !20
  %6 = trunc nuw i8 %5 to i1
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  %8 = load i32, ptr %7, align 8
  %not. = xor i1 %6, true
  %9 = sext i1 %not. to i32
  %.030 = add i32 %8, %9
  %.0 = select i1 %6, double 0.000000e+00, double 5.000000e-01
  %10 = sub nsw i32 0, %8
  %.not36 = icmp slt i32 %.030, %10
  br i1 %.not36, label %._crit_edge38, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 108
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  %19 = load i32, ptr %11, align 4, !tbaa !21
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.preheader, label %._crit_edge38

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %21 = phi i32 [ %25, %._crit_edge ], [ %19, %.preheader.lr.ph ]
  %.03137 = phi i32 [ %26, %._crit_edge ], [ %10, %.preheader.lr.ph ]
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %23 = sitofp i32 %.03137 to double
  %24 = fadd double %.0, %23
  br label %27

._crit_edge38:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %2
  ret void

._crit_edge:                                      ; preds = %75, %.preheader
  %25 = phi i32 [ %21, %.preheader ], [ %77, %75 ]
  %26 = add i32 %.03137, 1
  %exitcond.not = icmp eq i32 %.03137, %.030
  br i1 %exitcond.not, label %._crit_edge38, label %.preheader, !llvm.loop !22

27:                                               ; preds = %.lr.ph, %75
  %.03235 = phi i32 [ 0, %.lr.ph ], [ %76, %75 ]
  %28 = uitofp nneg i32 %.03235 to double
  %29 = fadd double %28, 5.000000e-01
  %30 = load double, ptr %12, align 8, !tbaa !25
  %31 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %32 = fadd double %31, -5.000000e-01
  %33 = fmul double %30, %32
  %34 = load double, ptr %13, align 8, !tbaa !26
  %35 = fmul double %34, %33
  %36 = call double @llvm.fmuladd.f64(double %29, double %30, double %35)
  %37 = load i8, ptr %4, align 8, !tbaa !5, !range !19, !noundef !20
  %38 = trunc nuw i8 %37 to i1
  %39 = fsub double 0x3FF921FB54442D18, %36
  %.033 = select i1 %38, double %39, double %36
  %40 = load double, ptr %14, align 8, !tbaa !27
  %41 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %42 = fadd double %41, -5.000000e-01
  %43 = fmul double %40, %42
  %44 = load double, ptr %13, align 8, !tbaa !26
  %45 = fmul double %44, %43
  %46 = call double @llvm.fmuladd.f64(double %24, double %40, double %45)
  %47 = load double, ptr %15, align 8, !tbaa !28
  %48 = fadd double %47, %46
  %49 = load double, ptr %16, align 8, !tbaa !29
  %50 = call noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144) %0)
  %51 = fadd double %50, -5.000000e-01
  %52 = load double, ptr %17, align 8, !tbaa !30
  %53 = call double @llvm.fmuladd.f64(double %51, double %52, double 1.000000e+00)
  %54 = fmul double %49, %53
  %55 = call double @exp(double noundef %48) #8
  %56 = fdiv double %54, %55
  %57 = fmul double %55, %54
  %58 = call double @cos(double noundef %.033) #8
  %59 = fmul double %54, %58
  %60 = call double @sin(double noundef %.033) #8
  %61 = fmul double %54, %60
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %3) #8
  %62 = fsub double %57, %56
  %63 = fmul double %62, 5.000000e-01
  %64 = fadd double %57, %56
  %65 = fmul double %64, 5.000000e-01
  call void @_ZN7fastjet9PseudoJetC1Edddd(ptr noundef nonnull align 8 dereferenceable(88) %3, double noundef %59, double noundef %61, double noundef %63, double noundef %65)
  invoke void @_ZN7fastjet9PseudoJet18set_cached_rap_phiEdd(ptr noundef nonnull align 8 dereferenceable(88) %3, double noundef %48, double noundef %.033)
          to label %66 unwind label %72

66:                                               ; preds = %27
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7fastjet8Selector6workerEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %68 = call noundef ptr @_ZNK7fastjet9SharedPtrINS_14SelectorWorkerEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %67)
  %.not34 = icmp eq ptr %68, null
  br i1 %.not34, label %74, label %69

69:                                               ; preds = %66
  %70 = invoke noundef zeroext i1 @_ZNK7fastjet8Selector4passERKNS_9PseudoJetE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %71 unwind label %72

71:                                               ; preds = %69
  br i1 %70, label %74, label %75

72:                                               ; preds = %74, %69, %27
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  resume { ptr, i32 } %73

74:                                               ; preds = %71, %66
  invoke void @_ZNSt6vectorIN7fastjet9PseudoJetESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %75 unwind label %72

75:                                               ; preds = %74, %71
  call void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  %76 = add nuw nsw i32 %.03235, 1
  %77 = load i32, ptr %11, align 4, !tbaa !21
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %27, label %._crit_edge, !llvm.loop !31
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK7fastjet15GhostedAreaSpec9_our_randEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #4

declare void @_ZN7fastjet9PseudoJetC1Edddd(ptr noundef nonnull align 8 dereferenceable(88), double noundef, double noundef, double noundef, double noundef) unnamed_addr #5

declare void @_ZN7fastjet9PseudoJet18set_cached_rap_phiEdd(ptr noundef nonnull align 8 dereferenceable(88), double noundef, double noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7fastjet8Selector4passERKNS_9PseudoJetE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7fastjet9PseudoJetD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 = { "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 = { 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 #7 = { 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 #8 = { 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, !11, i64 56}
!6 = !{!"_ZTSN7fastjet15GhostedAreaSpecE", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !11, i64 56, !12, i64 64, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !15, i64 120}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN7fastjet8SelectorE", !13, i64 8}
!13 = !{!"_ZTSN7fastjet9SharedPtrINS_14SelectorWorkerEEE", !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !10, i64 108}
!22 = distinct !{!22, !23, !24}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.unswitch.partial.disable"}
!25 = !{!6, !7, i64 88}
!26 = !{!6, !7, i64 32}
!27 = !{!6, !7, i64 96}
!28 = !{!6, !7, i64 8}
!29 = !{!6, !7, i64 48}
!30 = !{!6, !7, i64 40}
!31 = distinct !{!31, !23}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass