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

@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._ZN7fastjet9PseudoJet5boostERKS0_ = external hidden unnamed_addr constant [56 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZN7fastjet9PseudoJet5boostERKS0_(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
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %10)
  %12 = fcmp oeq double %11, 0.000000e+00
  br i1 %12, label %13, label %22

13:                                               ; preds = %2
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %14)
  %16 = fcmp oeq double %15, 0.000000e+00
  br i1 %16, label %17, label %22

17:                                               ; preds = %13
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %18)
  %20 = fcmp oeq double %19, 0.000000e+00
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  store ptr %9, ptr %3, align 8
  br label %77

22:                                               ; preds = %17, %13, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef double @_ZNK7fastjet9PseudoJet1mEv(ptr noundef nonnull align 8 dereferenceable(88) %23)
  store double %24, ptr %6, align 8, !tbaa !9
  %25 = load double, ptr %6, align 8, !tbaa !9
  %26 = fcmp une double %25, 0.000000e+00
  br i1 %26, label %27, label %28

27:                                               ; preds = %22
  br label %30

28:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 264, ptr noundef @__PRETTY_FUNCTION__._ZN7fastjet9PseudoJet5boostERKS0_) #6
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %31 = call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %32)
  %34 = call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %35)
  %37 = fmul double %34, %36
  %38 = call double @llvm.fmuladd.f64(double %31, double %33, double %37)
  %39 = call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %40)
  %42 = call double @llvm.fmuladd.f64(double %39, double %41, double %38)
  %43 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %44)
  %46 = call double @llvm.fmuladd.f64(double %43, double %45, double %42)
  %47 = load double, ptr %6, align 8, !tbaa !9
  %48 = fdiv double %46, %47
  store double %48, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %49 = load double, ptr %7, align 8, !tbaa !9
  %50 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  %51 = fadd double %49, %50
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %52)
  %54 = load double, ptr %6, align 8, !tbaa !9
  %55 = fadd double %53, %54
  %56 = fdiv double %51, %55
  store double %56, ptr %8, align 8, !tbaa !9
  %57 = load double, ptr %8, align 8, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %58)
  %60 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %9, i32 0, i32 3
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = call double @llvm.fmuladd.f64(double %57, double %59, double %61)
  store double %62, ptr %60, align 8, !tbaa !11
  %63 = load double, ptr %8, align 8, !tbaa !9
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %64)
  %66 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %9, i32 0, i32 4
  %67 = load double, ptr %66, align 8, !tbaa !16
  %68 = call double @llvm.fmuladd.f64(double %63, double %65, double %67)
  store double %68, ptr %66, align 8, !tbaa !16
  %69 = load double, ptr %8, align 8, !tbaa !9
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %70)
  %72 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %9, i32 0, i32 5
  %73 = load double, ptr %72, align 8, !tbaa !17
  %74 = call double @llvm.fmuladd.f64(double %69, double %71, double %73)
  store double %74, ptr %72, align 8, !tbaa !17
  %75 = load double, ptr %7, align 8, !tbaa !9
  %76 = getelementptr inbounds %"class.fastjet::PseudoJet", ptr %9, i32 0, i32 6
  store double %75, ptr %76, align 8, !tbaa !18
  call void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88) %9)
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %77

77:                                               ; preds = %30, %21
  %78 = load ptr, ptr %3, align 8
  ret ptr %78
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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}
!11 = !{!12, !10, i64 24}
!12 = !{!"_ZTSN7fastjet9PseudoJetE", !13, i64 8, !14, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !15, i64 80, !15, i64 84}
!13 = !{!"_ZTSN7fastjet9SharedPtrINS_22PseudoJetStructureBaseEEE", !6, i64 0}
!14 = !{!"_ZTSN7fastjet9SharedPtrINS_9PseudoJet12UserInfoBaseEEE", !6, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!12, !10, i64 32}
!17 = !{!12, !10, i64 40}
!18 = !{!12, !10, 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"

@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [130 x i8], align 1
@__PRETTY_FUNCTION__._ZN7fastjet9PseudoJet5boostERKS0_ = external hidden unnamed_addr constant [56 x i8], align 1

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZN7fastjet9PseudoJet5boostERKS0_(ptr noundef nonnull returned align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %1) local_unnamed_addr #0 align 2 {
  %3 = tail call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %4 = fcmp oeq double %3, 0.000000e+00
  br i1 %4, label %5, label %11

5:                                                ; preds = %2
  %6 = tail call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %7 = fcmp oeq double %6, 0.000000e+00
  br i1 %7, label %8, label %11

8:                                                ; preds = %5
  %9 = tail call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %10 = fcmp oeq double %9, 0.000000e+00
  br i1 %10, label %47, label %11

11:                                               ; preds = %8, %5, %2
  %12 = tail call noundef double @_ZNK7fastjet9PseudoJet1mEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %13 = fcmp une double %12, 0.000000e+00
  br i1 %13, label %15, label %14

14:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 264, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7fastjet9PseudoJet5boostERKS0_) #4
  unreachable

15:                                               ; preds = %11
  %16 = tail call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %17 = tail call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %18 = tail call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %19 = tail call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %20 = fmul double %18, %19
  %21 = tail call double @llvm.fmuladd.f64(double %16, double %17, double %20)
  %22 = tail call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %23 = tail call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %24 = tail call double @llvm.fmuladd.f64(double %22, double %23, double %21)
  %25 = tail call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %26 = tail call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %27 = tail call double @llvm.fmuladd.f64(double %25, double %26, double %24)
  %28 = fdiv double %27, %12
  %29 = tail call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  %30 = fadd double %29, %28
  %31 = tail call noundef double @_ZNK7fastjet9PseudoJet1EEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %32 = fadd double %12, %31
  %33 = fdiv double %30, %32
  %34 = tail call noundef double @_ZNK7fastjet9PseudoJet2pxEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %35 = getelementptr inbounds i8, ptr %0, i64 24
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = tail call double @llvm.fmuladd.f64(double %33, double %34, double %36)
  store double %37, ptr %35, align 8, !tbaa !5
  %38 = tail call noundef double @_ZNK7fastjet9PseudoJet2pyEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %39 = getelementptr inbounds i8, ptr %0, i64 32
  %40 = load double, ptr %39, align 8, !tbaa !14
  %41 = tail call double @llvm.fmuladd.f64(double %33, double %38, double %40)
  store double %41, ptr %39, align 8, !tbaa !14
  %42 = tail call noundef double @_ZNK7fastjet9PseudoJet2pzEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %43 = getelementptr inbounds i8, ptr %0, i64 40
  %44 = load double, ptr %43, align 8, !tbaa !15
  %45 = tail call double @llvm.fmuladd.f64(double %33, double %42, double %44)
  store double %45, ptr %43, align 8, !tbaa !15
  %46 = getelementptr inbounds i8, ptr %0, i64 48
  store double %28, ptr %46, align 8, !tbaa !16
  tail call void @_ZN7fastjet9PseudoJet12_finish_initEv(ptr noundef nonnull align 8 dereferenceable(88) %0)
  br label %47

47:                                               ; preds = %8, %15
  ret ptr %0
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { noreturn 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 #4 = { noreturn 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, !12, i64 24}
!6 = !{!"_ZTSN7fastjet9PseudoJetE", !7, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !13, i64 80, !13, i64 84}
!7 = !{!"_ZTSN7fastjet9SharedPtrINS_22PseudoJetStructureBaseEEE", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN7fastjet9SharedPtrINS_9PseudoJet12UserInfoBaseEEE", !8, i64 0}
!12 = !{!"double", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!6, !12, i64 32}
!15 = !{!6, !12, i64 40}
!16 = !{!6, !12, i64 48}


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