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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet9PseudoJetmIERKS0_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %6, i32 0, i32 3
  %8 = load double, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %5, i32 0, i32 3
  %10 = load double, ptr %9, align 8, !tbaa !9
  %11 = fsub double %10, %8
  store double %11, ptr %9, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %12, i32 0, i32 4
  %14 = load double, ptr %13, align 8, !tbaa !15
  %15 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %5, i32 0, i32 4
  %16 = load double, ptr %15, align 8, !tbaa !15
  %17 = fsub double %16, %14
  store double %17, ptr %15, align 8, !tbaa !15
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %18, i32 0, i32 5
  %20 = load double, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %5, i32 0, i32 5
  %22 = load double, ptr %21, align 8, !tbaa !16
  %23 = fsub double %22, %20
  store double %23, ptr %21, align 8, !tbaa !16
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %24, i32 0, i32 6
  %26 = load double, ptr %25, align 8, !tbaa !17
  %27 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %5, i32 0, i32 6
  %28 = load double, ptr %27, align 8, !tbaa !17
  %29 = fsub double %28, %26
  store double %29, ptr %27, align 8, !tbaa !17
  call void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88) %5)
  ret void
}

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" }

!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 24}
!10 = !{!"_ZTSN7fastjet9PseudoJetE", !11, i64 8, !12, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !14, i64 80, !14, i64 84}
!11 = !{!"_ZTSN7fastjet9SharedPtrINS_22PseudoJetStructureBaseEEE", !6, i64 0}
!12 = !{!"_ZTSN7fastjet9SharedPtrINS_9PseudoJet12UserInfoBaseEEE", !6, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !13, i64 32}
!16 = !{!10, !13, i64 40}
!17 = !{!10, !13, i64 48}


; 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"

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet9PseudoJetmIERKS0_(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(88) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 24
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load <2 x double>, ptr %3, align 8, !tbaa !5
  %6 = load <2 x double>, ptr %4, align 8, !tbaa !5
  %7 = fsub <2 x double> %6, %5
  store <2 x double> %7, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 40
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = load <2 x double>, ptr %8, align 8, !tbaa !5
  %11 = load <2 x double>, ptr %9, align 8, !tbaa !5
  %12 = fsub <2 x double> %11, %10
  store <2 x double> %12, ptr %9, align 8, !tbaa !5
  tail call void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  ret void
}

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" }

!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: GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass