; 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::VPoint" = type { double, double }
%"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::Halfedge" = type { ptr, ptr, ptr, i32, i8, ptr, double, ptr }

; 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
declare dso_local noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELleftbndEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %"class.fastjet::VPoint", ptr %9, i32 0, i32 0
  %11 = load double, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 11
  %13 = load double, ptr %12, align 8, !tbaa !12
  %14 = fcmp olt double %11, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %52

16:                                               ; preds = %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.fastjet::VPoint", ptr %17, i32 0, i32 0
  %19 = load double, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 12
  %21 = load double, ptr %20, align 8, !tbaa !17
  %22 = fcmp oge double %19, %21
  br i1 %22, label %23, label %27

23:                                               ; preds = %16
  %24 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 6
  %25 = load i32, ptr %24, align 8, !tbaa !18
  %26 = sub nsw i32 %25, 1
  store i32 %26, ptr %6, align 4, !tbaa !16
  br label %51

27:                                               ; preds = %16
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.fastjet::VPoint", ptr %28, i32 0, i32 0
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 11
  %32 = load double, ptr %31, align 8, !tbaa !12
  %33 = fsub double %30, %32
  %34 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 15
  %35 = load double, ptr %34, align 8, !tbaa !19
  %36 = fdiv double %33, %35
  %37 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 6
  %38 = load i32, ptr %37, align 8, !tbaa !18
  %39 = sitofp i32 %38 to double
  %40 = fmul double %36, %39
  %41 = fptosi double %40 to i32
  store i32 %41, ptr %6, align 4, !tbaa !16
  %42 = load i32, ptr %6, align 4, !tbaa !16
  %43 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 6
  %44 = load i32, ptr %43, align 8, !tbaa !18
  %45 = icmp sge i32 %42, %44
  br i1 %45, label %46, label %50

46:                                               ; preds = %27
  %47 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 6
  %48 = load i32, ptr %47, align 8, !tbaa !18
  %49 = sub nsw i32 %48, 1
  store i32 %49, ptr %6, align 4, !tbaa !16
  br label %50

50:                                               ; preds = %46, %27
  br label %51

51:                                               ; preds = %50, %23
  br label %52

52:                                               ; preds = %51, %15
  %53 = load i32, ptr %6, align 4, !tbaa !16
  %54 = call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %8, i32 noundef %53)
  store ptr %54, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = icmp eq ptr %55, null
  br i1 %56, label %57, label %82

57:                                               ; preds = %52
  store i32 1, ptr %5, align 4, !tbaa !16
  br label %58

58:                                               ; preds = %74, %57
  br i1 true, label %59, label %77

59:                                               ; preds = %58
  %60 = load i32, ptr %6, align 4, !tbaa !16
  %61 = load i32, ptr %5, align 4, !tbaa !16
  %62 = sub nsw i32 %60, %61
  %63 = call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %8, i32 noundef %62)
  store ptr %63, ptr %7, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %66

65:                                               ; preds = %59
  br label %77

66:                                               ; preds = %59
  %67 = load i32, ptr %6, align 4, !tbaa !16
  %68 = load i32, ptr %5, align 4, !tbaa !16
  %69 = add nsw i32 %67, %68
  %70 = call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %8, i32 noundef %69)
  store ptr %70, ptr %7, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %73

72:                                               ; preds = %66
  br label %77

73:                                               ; preds = %66
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %5, align 4, !tbaa !16
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %5, align 4, !tbaa !16
  br label %58, !llvm.loop !20

77:                                               ; preds = %72, %65, %58
  %78 = load i32, ptr %5, align 4, !tbaa !16
  %79 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 31
  %80 = load i32, ptr %79, align 4, !tbaa !22
  %81 = add nsw i32 %80, %78
  store i32 %81, ptr %79, align 4, !tbaa !22
  br label %82

82:                                               ; preds = %77, %52
  %83 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 30
  %84 = load i32, ptr %83, align 8, !tbaa !23
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 8, !tbaa !23
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !24
  %89 = icmp eq ptr %86, %88
  br i1 %89, label %100, label %90

90:                                               ; preds = %82
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 5
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = icmp ne ptr %91, %93
  br i1 %94, label %95, label %121

95:                                               ; preds = %90
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %8, ptr noundef %96, ptr noundef %97)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %121

100:                                              ; preds = %95, %82
  br label %101

101:                                              ; preds = %115, %100
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.fastjet::Halfedge", ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !26
  store ptr %104, ptr %7, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %101
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 5
  %108 = load ptr, ptr %107, align 8, !tbaa !25
  %109 = icmp ne ptr %106, %108
  br i1 %109, label %110, label %115

110:                                              ; preds = %105
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %8, ptr noundef %111, ptr noundef %112)
  %114 = icmp ne i32 %113, 0
  br label %115

115:                                              ; preds = %110, %105
  %116 = phi i1 [ false, %105 ], [ %114, %110 ]
  br i1 %116, label %101, label %117, !llvm.loop !28

117:                                              ; preds = %115
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %"class.fastjet::Halfedge", ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !29
  store ptr %120, ptr %7, align 8, !tbaa !5
  br label %140

121:                                              ; preds = %95, %90
  br label %122

122:                                              ; preds = %137, %121
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.fastjet::Halfedge", ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !29
  store ptr %125, ptr %7, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %122
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !24
  %130 = icmp ne ptr %127, %129
  br i1 %130, label %131, label %137

131:                                              ; preds = %126
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %8, ptr noundef %132, ptr noundef %133)
  %135 = icmp ne i32 %134, 0
  %136 = xor i1 %135, true
  br label %137

137:                                              ; preds = %131, %126
  %138 = phi i1 [ false, %126 ], [ %136, %131 ]
  br i1 %138, label %122, label %139, !llvm.loop !30

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139, %117
  %141 = load i32, ptr %6, align 4, !tbaa !16
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %183

143:                                              ; preds = %140
  %144 = load i32, ptr %6, align 4, !tbaa !16
  %145 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 6
  %146 = load i32, ptr %145, align 8, !tbaa !18
  %147 = sub nsw i32 %146, 1
  %148 = icmp slt i32 %144, %147
  br i1 %148, label %149, label %183

149:                                              ; preds = %143
  %150 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !31
  %152 = load i32, ptr %6, align 4, !tbaa !16
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds ptr, ptr %151, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %167

157:                                              ; preds = %149
  %158 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !31
  %160 = load i32, ptr %6, align 4, !tbaa !16
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds %"class.fastjet::Halfedge", ptr %163, i32 0, i32 3
  %165 = load i32, ptr %164, align 8, !tbaa !32
  %166 = sub nsw i32 %165, 1
  store i32 %166, ptr %164, align 8, !tbaa !32
  br label %167

167:                                              ; preds = %157, %149
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 2
  %170 = load ptr, ptr %169, align 8, !tbaa !31
  %171 = load i32, ptr %6, align 4, !tbaa !16
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds ptr, ptr %170, i64 %172
  store ptr %168, ptr %173, align 8, !tbaa !5
  %174 = getelementptr inbounds %"class.fastjet::VoronoiDiagramGenerator", ptr %8, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !31
  %176 = load i32, ptr %6, align 4, !tbaa !16
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds ptr, ptr %175, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !5
  %180 = getelementptr inbounds %"class.fastjet::Halfedge", ptr %179, i32 0, i32 3
  %181 = load i32, ptr %180, align 8, !tbaa !32
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %180, align 8, !tbaa !32
  br label %183

183:                                              ; preds = %167, %143, %140
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret ptr %184
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef, ptr noundef) #2 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 = { 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 #3 = { 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, !11, i64 0}
!10 = !{!"_ZTSN7fastjet6VPointE", !11, i64 0, !11, i64 8}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !11, i64 80}
!13 = !{!"_ZTSN7fastjet23VoronoiDiagramGeneratorE", !6, i64 0, !14, i64 8, !6, i64 16, !15, i64 24, !6, i64 40, !6, i64 48, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !6, i64 128, !14, i64 136, !14, i64 140, !14, i64 144, !14, i64 148, !15, i64 152, !6, i64 168, !14, i64 176, !15, i64 184, !14, i64 200, !6, i64 208, !14, i64 216, !14, i64 220, !14, i64 224, !14, i64 228, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !14, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !11, i64 344}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN7fastjet8FreelistE", !6, i64 0, !14, i64 8}
!16 = !{!14, !14, i64 0}
!17 = !{!13, !11, i64 88}
!18 = !{!13, !14, i64 56}
!19 = !{!13, !11, i64 112}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!13, !14, i64 228}
!23 = !{!13, !14, i64 224}
!24 = !{!13, !6, i64 40}
!25 = !{!13, !6, i64 48}
!26 = !{!27, !6, i64 8}
!27 = !{!"_ZTSN7fastjet8HalfedgeE", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !7, i64 28, !6, i64 32, !11, i64 40, !6, i64 48}
!28 = distinct !{!28, !21}
!29 = !{!27, !6, i64 0}
!30 = distinct !{!30, !21}
!31 = !{!13, !6, i64 16}
!32 = !{!27, !14, i64 24}


; 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 noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELleftbndEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = load double, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 80
  %5 = load double, ptr %4, align 8, !tbaa !10
  %6 = fcmp olt double %3, %5
  br i1 %6, label %26, label %7

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  %9 = load double, ptr %8, align 8, !tbaa !15
  %10 = fcmp ult double %3, %9
  br i1 %10, label %15, label %11

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = load i32, ptr %12, align 8, !tbaa !16
  %14 = add nsw i32 %13, -1
  br label %26

15:                                               ; preds = %7
  %16 = fsub double %3, %5
  %17 = getelementptr inbounds i8, ptr %0, i64 112
  %18 = load double, ptr %17, align 8, !tbaa !17
  %19 = fdiv double %16, %18
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = sitofp i32 %21 to double
  %23 = fmul double %19, %22
  %24 = fptosi double %23 to i32
  %.not = icmp sgt i32 %21, %24
  %25 = add nsw i32 %21, -1
  %spec.select = select i1 %.not, i32 %24, i32 %25
  br label %26

26:                                               ; preds = %15, %2, %11
  %.035 = phi i32 [ %14, %11 ], [ 0, %2 ], [ %spec.select, %15 ]
  %27 = tail call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %.035)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %.preheader, label %40

.preheader:                                       ; preds = %26
  %29 = add nsw i32 %.035, -1
  %30 = tail call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %29)
  %.not4858 = icmp eq ptr %30, null
  br i1 %.not4858, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %33
  %.03659 = phi i32 [ %34, %33 ], [ 1, %.preheader ]
  %31 = add nsw i32 %.03659, %.035
  %32 = tail call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %31)
  %.not49 = icmp eq ptr %32, null
  br i1 %.not49, label %33, label %._crit_edge

33:                                               ; preds = %.lr.ph
  %34 = add nuw nsw i32 %.03659, 1
  %35 = sub nsw i32 %.035, %34
  %36 = tail call noundef ptr @_ZN7fastjet23VoronoiDiagramGenerator9ELgethashEi(ptr noundef nonnull align 8 dereferenceable(352) %0, i32 noundef %35)
  %.not48 = icmp eq ptr %36, null
  br i1 %.not48, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %33, %.lr.ph, %.preheader
  %.036.lcssa = phi i32 [ 1, %.preheader ], [ %.03659, %.lr.ph ], [ %34, %33 ]
  %.0 = phi ptr [ %30, %.preheader ], [ %32, %.lr.ph ], [ %36, %33 ]
  %37 = getelementptr inbounds i8, ptr %0, i64 228
  %38 = load i32, ptr %37, align 4, !tbaa !20
  %39 = add nsw i32 %38, %.036.lcssa
  store i32 %39, ptr %37, align 4, !tbaa !20
  br label %40

40:                                               ; preds = %._crit_edge, %26
  %.1 = phi ptr [ %.0, %._crit_edge ], [ %27, %26 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 224
  %42 = load i32, ptr %41, align 8, !tbaa !21
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %41, align 8, !tbaa !21
  %44 = getelementptr inbounds i8, ptr %0, i64 40
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = icmp eq ptr %.1, %45
  br i1 %46, label %52, label %47

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %0, i64 48
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %.not50 = icmp eq ptr %.1, %49
  br i1 %.not50, label %.preheader67, label %50

.preheader67:                                     ; preds = %50, %47
  br label %61

50:                                               ; preds = %47
  %51 = tail call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef nonnull %.1, ptr noundef nonnull %1)
  %.not51 = icmp eq i32 %51, 0
  br i1 %.not51, label %.preheader67, label %52

52:                                               ; preds = %50, %40
  %53 = getelementptr inbounds i8, ptr %0, i64 48
  br label %54

54:                                               ; preds = %58, %52
  %.2 = phi ptr [ %.1, %52 ], [ %56, %58 ]
  %55 = getelementptr inbounds i8, ptr %.2, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %57 = load ptr, ptr %53, align 8, !tbaa !23
  %.not54 = icmp eq ptr %56, %57
  br i1 %.not54, label %.critedge, label %58

58:                                               ; preds = %54
  %59 = tail call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %56, ptr noundef nonnull %1)
  %.not55 = icmp eq i32 %59, 0
  br i1 %.not55, label %.critedge, label %54, !llvm.loop !26

.critedge:                                        ; preds = %54, %58
  %60 = load ptr, ptr %56, align 8, !tbaa !27
  br label %.critedge2

61:                                               ; preds = %.preheader67, %64
  %.3 = phi ptr [ %62, %64 ], [ %.1, %.preheader67 ]
  %62 = load ptr, ptr %.3, align 8, !tbaa !27
  %63 = load ptr, ptr %44, align 8, !tbaa !22
  %.not52 = icmp eq ptr %62, %63
  br i1 %.not52, label %.critedge2, label %64

64:                                               ; preds = %61
  %65 = tail call noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %62, ptr noundef nonnull %1)
  %.not53 = icmp eq i32 %65, 0
  br i1 %.not53, label %61, label %.critedge2, !llvm.loop !28

.critedge2:                                       ; preds = %61, %64, %.critedge
  %.4 = phi ptr [ %60, %.critedge ], [ %62, %64 ], [ %62, %61 ]
  %66 = icmp sgt i32 %.035, 0
  br i1 %66, label %67, label %89

67:                                               ; preds = %.critedge2
  %68 = getelementptr inbounds i8, ptr %0, i64 56
  %69 = load i32, ptr %68, align 8, !tbaa !16
  %70 = add nsw i32 %69, -1
  %71 = icmp slt i32 %.035, %70
  br i1 %71, label %72, label %89

72:                                               ; preds = %67
  %73 = getelementptr inbounds i8, ptr %0, i64 16
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  %75 = zext nneg i32 %.035 to i64
  %76 = getelementptr inbounds ptr, ptr %74, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !30
  %.not56 = icmp eq ptr %77, null
  br i1 %.not56, label %82, label %78

78:                                               ; preds = %72
  %79 = getelementptr inbounds i8, ptr %77, i64 24
  %80 = load i32, ptr %79, align 8, !tbaa !31
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr %79, align 8, !tbaa !31
  br label %82

82:                                               ; preds = %78, %72
  store ptr %.4, ptr %76, align 8, !tbaa !30
  %83 = load ptr, ptr %73, align 8, !tbaa !29
  %84 = getelementptr inbounds ptr, ptr %83, i64 %75
  %85 = load ptr, ptr %84, align 8, !tbaa !30
  %86 = getelementptr inbounds i8, ptr %85, i64 24
  %87 = load i32, ptr %86, align 8, !tbaa !31
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 8, !tbaa !31
  br label %89

89:                                               ; preds = %82, %67, %.critedge2
  ret ptr %.4
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7fastjet23VoronoiDiagramGenerator8right_ofEPNS_8HalfedgeEPNS_6VPointE(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef, ptr noundef) local_unnamed_addr #1 align 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 = { 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" }

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


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