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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7fastjet23VoronoiDiagramGeneratorC2Ev(ptr noundef nonnull align 8 dereferenceable(352) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 3
  %5 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 22
  %6 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 25
  %7 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 19
  store i32 0, ptr %7, align 4, !tbaa !9
  %8 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 17
  store ptr null, ptr %8, align 8, !tbaa !14
  %9 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 0
  store ptr null, ptr %9, align 8, !tbaa !15
  %10 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #2
  %11 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 42
  store ptr %10, ptr %11, align 8, !tbaa !16
  %12 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 42
  %13 = load ptr, ptr %12, align 8, !tbaa !16
  %14 = getelementptr inbounds %"class.fastjet::FreeNodeArrayList", ptr %13, i32 0, i32 0
  store ptr null, ptr %14, align 8, !tbaa !17
  %15 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 42
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds %"class.fastjet::FreeNodeArrayList", ptr %16, i32 0, i32 1
  store ptr null, ptr %17, align 8, !tbaa !19
  %18 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 42
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 43
  store ptr %19, ptr %20, align 8, !tbaa !20
  %21 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 44
  store ptr null, ptr %21, align 8, !tbaa !21
  %22 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 45
  store ptr null, ptr %22, align 8, !tbaa !22
  %23 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 46
  store double 0.000000e+00, ptr %23, align 8, !tbaa !23
  %24 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 2
  store ptr null, ptr %24, align 8, !tbaa !24
  %25 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %3, i32 0, i32 27
  store ptr null, ptr %25, align 8, !tbaa !25
  ret void
}

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

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 = { 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 #2 = { builtin allocsize(0) }

!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, !11, i64 140}
!10 = !{!"_ZTSN7fastjet23VoronoiDiagramGeneratorE", !6, i64 0, !11, i64 8, !6, i64 16, !12, i64 24, !6, i64 40, !6, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !6, i64 128, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !12, i64 152, !6, i64 168, !11, i64 176, !12, i64 184, !11, i64 200, !6, i64 208, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !13, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !11, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !13, i64 344}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN7fastjet8FreelistE", !6, i64 0, !11, i64 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !6, i64 128}
!15 = !{!10, !6, i64 0}
!16 = !{!10, !6, i64 312}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSN7fastjet17FreeNodeArrayListE", !6, i64 0, !6, i64 8}
!19 = !{!18, !6, i64 8}
!20 = !{!10, !6, i64 320}
!21 = !{!10, !6, i64 328}
!22 = !{!10, !6, i64 336}
!23 = !{!10, !13, i64 344}
!24 = !{!10, !6, i64 16}
!25 = !{!10, !6, i64 208}


; 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
define dso_local void @_ZN7fastjet23VoronoiDiagramGeneratorC2Ev(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(352) %0) unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 0, ptr %2, align 4, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr null, ptr %3, align 8, !tbaa !13
  store ptr null, ptr %0, align 8, !tbaa !14
  %4 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 312
  store ptr %4, ptr %5, align 8, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 320
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  store ptr %4, ptr %6, align 8, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %0, i64 328
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr null, ptr %8, align 8, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %0, i64 208
  store ptr null, ptr %9, align 8, !tbaa !18
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { builtin allocsize(0) }

!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, !10, i64 140}
!6 = !{!"_ZTSN7fastjet23VoronoiDiagramGeneratorE", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !7, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !11, i64 152, !7, i64 168, !10, i64 176, !11, i64 184, !10, i64 200, !7, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !10, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !12, i64 344}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN7fastjet8FreelistE", !7, i64 0, !10, i64 8}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !7, i64 128}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 312}
!16 = !{!6, !7, i64 320}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !7, i64 208}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass