; LLVM IR from fcimeson/cbTSP :: cbLKH/SRC (Delaunay)

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

%struct.Node = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8 }
%struct.point = type { double, double, i32, ptr }

@FirstNode = external dso_local global ptr, align 8
@p_array = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.delaunay = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @delaunay(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %9 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  store ptr %9, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %10 = load i32, ptr %2, align 4, !tbaa !5
  call void @alloc_memory(i32 noundef %10)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %48, %1
  %12 = load i32, ptr %7, align 4, !tbaa !5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %51

15:                                               ; preds = %11
  %16 = load ptr, ptr %6, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 46
  %18 = load double, ptr %17, align 8, !tbaa !11
  %19 = load ptr, ptr @p_array, align 8, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %struct.point, ptr %19, i64 %21
  %23 = getelementptr inbounds %struct.point, ptr %22, i32 0, i32 0
  store double %18, ptr %23, align 8, !tbaa !14
  %24 = load ptr, ptr %6, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 47
  %26 = load double, ptr %25, align 8, !tbaa !16
  %27 = load ptr, ptr @p_array, align 8, !tbaa !9
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds %struct.point, ptr %27, i64 %29
  %31 = getelementptr inbounds %struct.point, ptr %30, i32 0, i32 1
  store double %26, ptr %31, align 8, !tbaa !17
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.Node, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = load ptr, ptr @p_array, align 8, !tbaa !9
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %struct.point, ptr %35, i64 %37
  %39 = getelementptr inbounds %struct.point, ptr %38, i32 0, i32 2
  store i32 %34, ptr %39, align 8, !tbaa !19
  %40 = load ptr, ptr @p_array, align 8, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.point, ptr %40, i64 %42
  %44 = getelementptr inbounds %struct.point, ptr %43, i32 0, i32 3
  store ptr null, ptr %44, align 8, !tbaa !20
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.Node, ptr %45, i32 0, i32 16
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  store ptr %47, ptr %6, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %15
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !5
  br label %11, !llvm.loop !22

51:                                               ; preds = %11
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = mul i64 %53, 8
  %55 = call noalias ptr @malloc(i64 noundef %54) #7
  store ptr %55, ptr %5, align 8, !tbaa !9
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  br label %59

58:                                               ; preds = %51
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__.delaunay) #8
  unreachable

59:                                               ; preds = %57
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %73, %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %76

64:                                               ; preds = %60
  %65 = load ptr, ptr @p_array, align 8, !tbaa !9
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.point, ptr %65, i64 %67
  %69 = load ptr, ptr %5, align 8, !tbaa !9
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %69, i64 %71
  store ptr %68, ptr %72, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %64
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !5
  br label %60, !llvm.loop !24

76:                                               ; preds = %60
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  call void @qsort(ptr noundef %77, i64 noundef %79, i64 noundef 8, ptr noundef @compare)
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %161, %76
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %84, label %164

84:                                               ; preds = %80
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %8, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %129, %84
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %91, label %132

91:                                               ; preds = %87
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.point, ptr %96, i32 0, i32 0
  %98 = load double, ptr %97, align 8, !tbaa !14
  %99 = fptrunc double %98 to float
  %100 = load ptr, ptr %5, align 8, !tbaa !9
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.point, ptr %104, i32 0, i32 0
  %106 = load double, ptr %105, align 8, !tbaa !14
  %107 = fptrunc double %106 to float
  %108 = fcmp une float %99, %107
  br i1 %108, label %127, label %109

109:                                              ; preds = %91
  %110 = load ptr, ptr %5, align 8, !tbaa !9
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %110, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.point, ptr %114, i32 0, i32 1
  %116 = load double, ptr %115, align 8, !tbaa !17
  %117 = fptrunc double %116 to float
  %118 = load ptr, ptr %5, align 8, !tbaa !9
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.point, ptr %122, i32 0, i32 1
  %124 = load double, ptr %123, align 8, !tbaa !17
  %125 = fptrunc double %124 to float
  %126 = fcmp une float %117, %125
  br i1 %126, label %127, label %128

127:                                              ; preds = %109, %91
  br label %132

128:                                              ; preds = %109
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %8, align 4, !tbaa !5
  br label %87, !llvm.loop !25

132:                                              ; preds = %127, %87
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr %8, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %157, %132
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %139, label %160

139:                                              ; preds = %135
  %140 = load ptr, ptr %5, align 8, !tbaa !9
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds ptr, ptr %140, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.point, ptr %144, i32 0, i32 1
  %146 = load double, ptr %145, align 8, !tbaa !17
  %147 = fptrunc double %146 to float
  %148 = call float @nextafterf(float noundef %147, float noundef 0x47EFFFFFE0000000) #6
  %149 = fpext float %148 to double
  %150 = load ptr, ptr %5, align 8, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds ptr, ptr %150, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.point, ptr %155, i32 0, i32 1
  store double %149, ptr %156, align 8, !tbaa !17
  br label %157

157:                                              ; preds = %139
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %7, align 4, !tbaa !5
  br label %135, !llvm.loop !26

160:                                              ; preds = %135
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %7, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %7, align 4, !tbaa !5
  br label %80, !llvm.loop !27

164:                                              ; preds = %80
  %165 = load ptr, ptr %5, align 8, !tbaa !9
  %166 = load i32, ptr %2, align 4, !tbaa !5
  %167 = sub nsw i32 %166, 1
  call void @divide(ptr noundef %165, i32 noundef 0, i32 noundef %167, ptr noundef %3, ptr noundef %4)
  %168 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %168) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @alloc_memory(i32 noundef) #0

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @compare(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare float @nextafterf(float noundef, float noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @divide(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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

attributes #0 = { 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 = { nounwind 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 #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 = { "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 "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 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 312}
!12 = !{!"Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"point", !13, i64 0, !13, i64 8, !6, i64 16, !10, i64 24}
!16 = !{!12, !13, i64 320}
!17 = !{!15, !13, i64 8}
!18 = !{!12, !6, i64 0}
!19 = !{!15, !6, i64 16}
!20 = !{!15, !10, i64 24}
!21 = !{!12, !10, i64 72}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}


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

%struct.point = type { double, double, i32, ptr }

@FirstNode = external dso_local local_unnamed_addr global ptr, align 8
@p_array = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.delaunay = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @delaunay(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %4 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  tail call void @alloc_memory(i32 noundef %0)
  %5 = icmp sgt i32 %0, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %1
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.04751 = phi ptr [ %4, %.lr.ph.preheader ], [ %14, %.lr.ph ]
  %6 = getelementptr inbounds i8, ptr %.04751, i64 312
  %7 = load ptr, ptr @p_array, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.point, ptr %7, i64 %indvars.iv
  %9 = load <2 x double>, ptr %6, align 8, !tbaa !9
  store <2 x double> %9, ptr %8, align 8, !tbaa !9
  %10 = load i32, ptr %.04751, align 8, !tbaa !11
  %11 = getelementptr inbounds %struct.point, ptr %7, i64 %indvars.iv, i32 2
  store i32 %10, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds %struct.point, ptr %7, i64 %indvars.iv, i32 3
  store ptr null, ptr %12, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %.04751, i64 72
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %1
  %15 = sext i32 %0 to i64
  %16 = shl nsw i64 %15, 3
  %17 = tail call noalias ptr @malloc(i64 noundef %16) #9
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %24, label %.preheader50

.preheader50:                                     ; preds = %._crit_edge
  br i1 %5, label %.lr.ph54, label %._crit_edge55.thread

._crit_edge55.thread:                             ; preds = %.preheader50
  tail call void @qsort(ptr noundef nonnull %17, i64 noundef %15, i64 noundef 8, ptr noundef nonnull @compare) #8
  br label %._crit_edge61

.lr.ph54:                                         ; preds = %.preheader50
  %18 = load ptr, ptr @p_array, align 8, !tbaa !5
  %wide.trip.count66 = zext nneg i32 %0 to i64
  %min.iters.check = icmp ult i32 %0, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph54
  %indvars.iv63.ph = phi i64 [ 0, %.lr.ph54 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph54
  %n.vec = and i64 %wide.trip.count66, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %19 = getelementptr inbounds %struct.point, ptr %18, <2 x i64> %vec.ind
  %20 = getelementptr inbounds %struct.point, ptr %18, <2 x i64> %step.add
  %21 = getelementptr inbounds ptr, ptr %17, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store <2 x ptr> %19, ptr %21, align 8, !tbaa !5
  store <2 x ptr> %20, ptr %22, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count66
  br i1 %cmp.n, label %._crit_edge55, label %scalar.ph.preheader

24:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 77, ptr noundef nonnull @__PRETTY_FUNCTION__.delaunay) #10
  unreachable

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %scalar.ph ], [ %indvars.iv63.ph, %scalar.ph.preheader ]
  %25 = getelementptr inbounds %struct.point, ptr %18, i64 %indvars.iv63
  %26 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv63
  store ptr %25, ptr %26, align 8, !tbaa !5
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count66
  br i1 %exitcond67.not, label %._crit_edge55, label %scalar.ph, !llvm.loop !23

._crit_edge55:                                    ; preds = %scalar.ph, %middle.block
  tail call void @qsort(ptr noundef nonnull %17, i64 noundef %15, i64 noundef 8, ptr noundef nonnull @compare) #8
  br i1 %5, label %.preheader, label %._crit_edge61

.preheader:                                       ; preds = %._crit_edge55, %._crit_edge59
  %.260 = phi i32 [ %.pre-phi, %._crit_edge59 ], [ 0, %._crit_edge55 ]
  %27 = sext i32 %.260 to i64
  %28 = getelementptr inbounds ptr, ptr %17, i64 %27
  %29 = add nsw i32 %.260, 1
  %smax = tail call i32 @llvm.smax.i32(i32 %0, i32 %29)
  %30 = add nsw i32 %smax, -1
  br label %31

31:                                               ; preds = %.preheader, %42
  %indvars.iv68 = phi i64 [ %27, %.preheader ], [ %indvars.iv.next69, %42 ]
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, 1
  %32 = icmp slt i64 %indvars.iv.next69, %15
  br i1 %32, label %33, label %.split.loop.exit80

33:                                               ; preds = %31
  %34 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv.next69
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = load double, ptr %35, align 8, !tbaa !24
  %37 = fptrunc double %36 to float
  %38 = load ptr, ptr %28, align 8, !tbaa !5
  %39 = load double, ptr %38, align 8, !tbaa !24
  %40 = fptrunc double %39 to float
  %41 = fcmp une float %37, %40
  br i1 %41, label %.split.loop.exit, label %42

42:                                               ; preds = %33
  %43 = getelementptr inbounds i8, ptr %35, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !25
  %45 = fptrunc double %44 to float
  %46 = getelementptr inbounds i8, ptr %38, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !25
  %48 = fptrunc double %47 to float
  %49 = fcmp une float %45, %48
  br i1 %49, label %.split.loop.exit78, label %31, !llvm.loop !26

.split.loop.exit:                                 ; preds = %33
  %50 = trunc nsw i64 %indvars.iv68 to i32
  br label %.split.loop.exit80

.split.loop.exit78:                               ; preds = %42
  %51 = trunc nsw i64 %indvars.iv68 to i32
  br label %.split.loop.exit80

.split.loop.exit80:                               ; preds = %31, %.split.loop.exit78, %.split.loop.exit
  %.0.in.lcssa = phi i32 [ %50, %.split.loop.exit ], [ %51, %.split.loop.exit78 ], [ %30, %31 ]
  %52 = icmp slt i32 %.260, %.0.in.lcssa
  br i1 %52, label %.lr.ph58.preheader, label %._crit_edge59

.lr.ph58.preheader:                               ; preds = %.split.loop.exit80
  %wide.trip.count74 = sext i32 %.0.in.lcssa to i64
  %.pre = load ptr, ptr %28, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 8
  %.pre76 = load double, ptr %.phi.trans.insert, align 8, !tbaa !25
  br label %.lr.ph58

.lr.ph58:                                         ; preds = %.lr.ph58.preheader, %.lr.ph58
  %53 = phi double [ %.pre76, %.lr.ph58.preheader ], [ %56, %.lr.ph58 ]
  %indvars.iv71 = phi i64 [ %27, %.lr.ph58.preheader ], [ %indvars.iv.next72, %.lr.ph58 ]
  %54 = fptrunc double %53 to float
  %55 = tail call float @nextafterf(float noundef %54, float noundef 0x47EFFFFFE0000000) #8
  %56 = fpext float %55 to double
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, 1
  %57 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv.next72
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  store double %56, ptr %59, align 8, !tbaa !25
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge59.loopexit, label %.lr.ph58, !llvm.loop !27

._crit_edge59.loopexit:                           ; preds = %.lr.ph58
  %.pre77 = add nsw i32 %.0.in.lcssa, 1
  br label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge59.loopexit, %.split.loop.exit80
  %.pre-phi = phi i32 [ %.pre77, %._crit_edge59.loopexit ], [ %29, %.split.loop.exit80 ]
  %60 = icmp slt i32 %.pre-phi, %0
  br i1 %60, label %.preheader, label %._crit_edge61, !llvm.loop !28

._crit_edge61:                                    ; preds = %._crit_edge59, %._crit_edge55.thread, %._crit_edge55
  %61 = add nsw i32 %0, -1
  call void @divide(ptr noundef nonnull %17, i32 noundef 0, i32 noundef %61, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @free(ptr noundef %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret void
}

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

; Function Attrs: nounwind uwtable
declare hidden void @alloc_memory(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @compare(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare float @nextafterf(float noundef, float noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @divide(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

attributes #0 = { 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 = { nofree "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 "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"Node", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 16}
!15 = !{!"point", !10, i64 0, !10, i64 8, !13, i64 16, !6, i64 24}
!16 = !{!15, !6, i64 24}
!17 = !{!12, !6, i64 72}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !19, !22, !21}
!24 = !{!15, !10, i64 0}
!25 = !{!15, !10, i64 8}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass