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

; 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.std::auto_ptr" = type { ptr }
%"class.fastjet::JetDefinition" = type { i32, double, double, i32, ptr, %"class.fastjet::SharedPtr", %"class.fastjet::JetDefinition::DefaultRecombiner", ptr, %"class.fastjet::SharedPtr.0" }
%"class.fastjet::SharedPtr" = type { ptr }
%"class.fastjet::JetDefinition::DefaultRecombiner" = type <{ %"class.fastjet::JetDefinition::Recombiner", i32, [4 x i8] }>
%"class.fastjet::JetDefinition::Recombiner" = type { ptr }
%"class.fastjet::SharedPtr.0" = type { ptr }

@_ZN7fastjet8fwrapper6pluginE = external dso_local global %"class.std::auto_ptr", align 8
@_ZN7fastjet8fwrapper7jet_defE = external dso_local global %"class.fastjet::JetDefinition", align 8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8auto_ptrIN7fastjet13JetDefinition6PluginEE5resetEPS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13SISConePluginC2EddidbNS0_15SplitMergeScaleEd(ptr noundef nonnull align 8 dereferenceable(69), double noundef, double noundef, i32 noundef, double noundef, i1 noundef zeroext, i32 noundef, double noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZN7fastjet13JetDefinitionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @fastjetsisconewitharea_(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #2 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.fastjet::JetDefinition", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  %22 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #7
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  %24 = load double, ptr %23, align 8, !tbaa !9
  %25 = load ptr, ptr %13, align 8, !tbaa !5
  %26 = load double, ptr %25, align 8, !tbaa !9
  invoke void @_ZN7fastjet13SISConePluginC2EddidbNS0_15SplitMergeScaleEd(ptr noundef nonnull align 8 dereferenceable(69) %22, double noundef %24, double noundef %26, i32 noundef 0, double noundef 0.000000e+00, i1 noundef zeroext false, i32 noundef 3, double noundef 0.000000e+00)
          to label %27 unwind label %38

27:                                               ; preds = %9
  call void @_ZNSt8auto_ptrIN7fastjet13JetDefinition6PluginEE5resetEPS2_(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7fastjet8fwrapper6pluginE, ptr noundef %22) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #8
  %28 = call noundef ptr @_ZNKSt8auto_ptrIN7fastjet13JetDefinition6PluginEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7fastjet8fwrapper6pluginE) #8
  call void @_ZN7fastjet13JetDefinitionC2EPKNS0_6PluginE(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef %28)
  %29 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZN7fastjet13JetDefinitionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(80) @_ZN7fastjet8fwrapper7jet_defE, ptr noundef nonnull align 8 dereferenceable(80) %21)
          to label %30 unwind label %42

30:                                               ; preds = %27
  call void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #8
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %17, align 8, !tbaa !5
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load ptr, ptr %15, align 8, !tbaa !5
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN7fastjet8fwrapper25transfer_cluster_transferEPKdRKiRKNS_13JetDefinitionEPdRiRS1_S4_SA_(ptr noundef %31, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 8 dereferenceable(80) @_ZN7fastjet8fwrapper7jet_defE, ptr noundef %33, ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 8 dereferenceable(8) %37)
  ret void

38:                                               ; preds = %9
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %19, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %20, align 4
  call void @_ZdlPvm(ptr noundef %22, i64 noundef 72) #9
  br label %46

42:                                               ; preds = %27
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %19, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %20, align 4
  call void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #8
  br label %46

46:                                               ; preds = %42, %38
  %47 = load ptr, ptr %19, align 8
  %48 = load i32, ptr %20, align 4
  %49 = insertvalue { ptr, i32 } poison, ptr %47, 0
  %50 = insertvalue { ptr, i32 } %49, i32 %48, 1
  resume { ptr, i32 } %50
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #6 = { 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 #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin 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 = !{!"double", !7, i64 0}


; 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.std::auto_ptr" = type { ptr }
%"class.fastjet::JetDefinition" = type { i32, double, double, i32, ptr, %"class.fastjet::SharedPtr", %"class.fastjet::JetDefinition::DefaultRecombiner", ptr, %"class.fastjet::SharedPtr.0" }
%"class.fastjet::SharedPtr" = type { ptr }
%"class.fastjet::JetDefinition::DefaultRecombiner" = type <{ %"class.fastjet::JetDefinition::Recombiner", i32, [4 x i8] }>
%"class.fastjet::JetDefinition::Recombiner" = type { ptr }
%"class.fastjet::SharedPtr.0" = type { ptr }

@_ZN7fastjet8fwrapper6pluginE = external dso_local global %"class.std::auto_ptr", align 8
@_ZN7fastjet8fwrapper7jet_defE = external dso_local global %"class.fastjet::JetDefinition", align 8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet13SISConePluginC2EddidbNS0_15SplitMergeScaleEd(ptr noundef nonnull align 8 dereferenceable(69), double noundef, double noundef, i32 noundef, double noundef, i1 noundef zeroext, i32 noundef, double noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZN7fastjet13JetDefinitionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @fastjetsisconewitharea_(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %7, ptr noundef nonnull align 4 dereferenceable(4) %8) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.fastjet::JetDefinition", align 8
  %11 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #7
  %12 = load double, ptr %2, align 8, !tbaa !5
  %13 = load double, ptr %3, align 8, !tbaa !5
  invoke void @_ZN7fastjet13SISConePluginC2EddidbNS0_15SplitMergeScaleEd(ptr noundef nonnull align 8 dereferenceable(69) %11, double noundef %12, double noundef %13, i32 noundef 0, double noundef 0.000000e+00, i1 noundef zeroext false, i32 noundef 3, double noundef 0.000000e+00)
          to label %14 unwind label %18

14:                                               ; preds = %9
  tail call void @_ZNSt8auto_ptrIN7fastjet13JetDefinition6PluginEE5resetEPS2_(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7fastjet8fwrapper6pluginE, ptr noundef nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #8
  %15 = tail call noundef ptr @_ZNKSt8auto_ptrIN7fastjet13JetDefinition6PluginEE3getEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7fastjet8fwrapper6pluginE) #8
  call void @_ZN7fastjet13JetDefinitionC2EPKNS0_6PluginE(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef %15)
  %16 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZN7fastjet13JetDefinitionaSEOS0_(ptr noundef nonnull align 8 dereferenceable(80) @_ZN7fastjet8fwrapper7jet_defE, ptr noundef nonnull align 8 dereferenceable(80) %10)
          to label %17 unwind label %20

17:                                               ; preds = %14
  call void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #8
  call void @_ZN7fastjet8fwrapper25transfer_cluster_transferEPKdRKiRKNS_13JetDefinitionEPdRiRS1_S4_SA_(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 8 dereferenceable(80) @_ZN7fastjet8fwrapper7jet_defE, ptr noundef %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  ret void

18:                                               ; preds = %9
  %19 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 72) #9
  br label %22

20:                                               ; preds = %14
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7fastjet13JetDefinitionD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %10) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #8
  br label %22

22:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  resume { ptr, i32 } %.pn
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 #6 = { 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 #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass