; LLVM IR from Zhefan-Xu/Intent-MPC :: trajectory_planner/include/trajectory_planner/clustering (Kmeans)

; 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.KMeans = type { i32, i32, ptr }

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #0

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6KMeans8ClassifyEPd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #4 align 2

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6KMeans7ClusterEiPPd(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, ptr noundef %2) #6 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store double 0.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %21, i64 4)
  %23 = extractvalue { i64, i1 } %22, 1
  %24 = extractvalue { i64, i1 } %22, 0
  %25 = select i1 %23, i64 -1, i64 %24
  %26 = call noalias noundef nonnull ptr @_Znam(i64 noundef %25) #8
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %27 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = sext i32 %28 to i64
  %30 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %29, i64 8)
  %31 = extractvalue { i64, i1 } %30, 1
  %32 = extractvalue { i64, i1 } %30, 0
  %33 = select i1 %31, i64 -1, i64 %32
  %34 = call noalias noundef nonnull ptr @_Znam(i64 noundef %33) #8
  store ptr %34, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %51, %3
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %54

40:                                               ; preds = %35
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds ptr, ptr %41, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = call noundef i32 @_ZN6KMeans8ClassifyEPd(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %45)
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  store i32 %46, ptr %50, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %40
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %10, align 4, !tbaa !9
  br label %35, !llvm.loop !15

54:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %199, %54
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %202

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store double 0.000000e+00, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %73, %61
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !13
  %66 = icmp slt i32 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %76

68:                                               ; preds = %62
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = load i32, ptr %15, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  store double 0.000000e+00, ptr %72, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %68
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %15, align 4, !tbaa !9
  br label %62, !llvm.loop !18

76:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %120, %76
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %123

82:                                               ; preds = %77
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = icmp eq i32 %87, %88
  br i1 %89, label %90, label %119

90:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %113, %90
  %92 = load i32, ptr %17, align 4, !tbaa !9
  %93 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !13
  %95 = icmp slt i32 %92, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %116

97:                                               ; preds = %91
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load i32, ptr %17, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = load i32, ptr %17, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fadd double %111, %106
  store double %112, ptr %110, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %97
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %17, align 4, !tbaa !9
  br label %91, !llvm.loop !19

116:                                              ; preds = %96
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %13, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %116, %82
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %16, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %16, align 4, !tbaa !9
  br label %77, !llvm.loop !20

123:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %191, %123
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 0
  %127 = load i32, ptr %126, align 8, !tbaa !13
  %128 = icmp slt i32 %125, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %124
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %194

130:                                              ; preds = %124
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %142

133:                                              ; preds = %130
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = sitofp i32 %134 to double
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load i32, ptr %18, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !11
  %141 = fdiv double %140, %135
  store double %141, ptr %139, align 8, !tbaa !11
  br label %142

142:                                              ; preds = %133, %130
  %143 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load i32, ptr %18, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = load i32, ptr %18, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = fsub double %152, %157
  %159 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 2
  %160 = load ptr, ptr %159, align 8, !tbaa !21
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds ptr, ptr %160, i64 %162
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = load i32, ptr %18, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = load i32, ptr %18, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds double, ptr %169, i64 %171
  %173 = load double, ptr %172, align 8, !tbaa !11
  %174 = fsub double %168, %173
  %175 = load double, ptr %14, align 8, !tbaa !11
  %176 = call double @llvm.fmuladd.f64(double %158, double %174, double %175)
  store double %176, ptr %14, align 8, !tbaa !11
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = load i32, ptr %18, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %177, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !11
  %182 = getelementptr inbounds %class.KMeans, ptr %19, i32 0, i32 2
  %183 = load ptr, ptr %182, align 8, !tbaa !21
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds ptr, ptr %183, i64 %185
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = load i32, ptr %18, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  store double %181, ptr %190, align 8, !tbaa !11
  br label %191

191:                                              ; preds = %142
  %192 = load i32, ptr %18, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %18, align 4, !tbaa !9
  br label %124, !llvm.loop !22

194:                                              ; preds = %129
  %195 = load double, ptr %14, align 8, !tbaa !11
  %196 = call double @sqrt(double noundef %195) #7
  %197 = load double, ptr %7, align 8, !tbaa !11
  %198 = fadd double %197, %196
  store double %198, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %199

199:                                              ; preds = %194
  %200 = load i32, ptr %11, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %11, align 4, !tbaa !9
  br label %55, !llvm.loop !23

202:                                              ; preds = %60
  %203 = load ptr, ptr %8, align 8, !tbaa !5
  %204 = icmp eq ptr %203, null
  br i1 %204, label %206, label %205

205:                                              ; preds = %202
  call void @_ZdaPv(ptr noundef %203) #9
  br label %206

206:                                              ; preds = %205, %202
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = icmp eq ptr %207, null
  br i1 %208, label %210, label %209

209:                                              ; preds = %206
  call void @_ZdaPv(ptr noundef %207) #9
  br label %210

210:                                              ; preds = %209, %206
  %211 = load double, ptr %7, align 8, !tbaa !11
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret double %211
}

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin 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 = { 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 #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 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS6KMeans", !10, i64 0, !10, i64 4, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!14, !10, i64 4}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = !{!14, !6, i64 8}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}


; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6KMeans8ClassifyEPd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6KMeans7ClusterEiPPd(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #5 align 2 {
  %4 = zext i32 %1 to i64
  %5 = icmp slt i32 %1, 0
  %6 = shl nuw nsw i64 %4, 2
  %7 = select i1 %5, i64 -1, i64 %6
  %8 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %7) #8
  %9 = load i32, ptr %0, align 8, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = icmp slt i32 %9, 0
  %12 = shl nsw i64 %10, 3
  %13 = select i1 %11, i64 -1, i64 %12
  %14 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %13) #8
  %15 = icmp sgt i32 %1, 0
  br i1 %15, label %.lr.ph, label %.preheader64

.preheader64:                                     ; preds = %.lr.ph, %3
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !11
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader63.lr.ph, label %._crit_edge82

.preheader63.lr.ph:                               ; preds = %.preheader64
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %min.iters.check140 = icmp ult i32 %1, 8
  %n.vec143 = and i64 %4, 2147483640
  %cmp.n151 = icmp eq i64 %n.vec143, %4
  br label %.preheader63

.lr.ph:                                           ; preds = %3, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %3 ]
  %20 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = tail call noundef i32 @_ZN6KMeans8ClassifyEPd(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %21)
  %23 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  store i32 %22, ptr %23, align 4, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %4
  br i1 %exitcond.not, label %.preheader64, label %.lr.ph, !llvm.loop !14

.preheader63:                                     ; preds = %.preheader63.lr.ph, %._crit_edge
  %indvars.iv117 = phi i64 [ 0, %.preheader63.lr.ph ], [ %indvars.iv.next118, %._crit_edge ]
  %.05979 = phi double [ 0.000000e+00, %.preheader63.lr.ph ], [ %124, %._crit_edge ]
  %24 = load i32, ptr %0, align 8, !tbaa !5
  %.fr83 = freeze i32 %24
  %25 = icmp sgt i32 %.fr83, 0
  br i1 %25, label %.preheader62, label %.preheader62.thread

.preheader62:                                     ; preds = %.preheader63
  %26 = zext nneg i32 %.fr83 to i64
  %27 = shl nuw nsw i64 %26, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %14, i8 0, i64 %27, i1 false), !tbaa !16
  br i1 %15, label %.lr.ph72.split.us.preheader, label %.lr.ph76.thread

.preheader62.thread:                              ; preds = %.preheader63
  br i1 %15, label %.lr.ph72.split.preheader, label %._crit_edge

.lr.ph72.split.preheader:                         ; preds = %.preheader62.thread
  br i1 %min.iters.check140, label %.lr.ph72.split.preheader153, label %vector.ph141

.lr.ph72.split.preheader153:                      ; preds = %middle.block138, %.lr.ph72.split.preheader
  %indvars.iv92.ph = phi i64 [ 0, %.lr.ph72.split.preheader ], [ %n.vec143, %middle.block138 ]
  %.05670.ph = phi i32 [ 0, %.lr.ph72.split.preheader ], [ %39, %middle.block138 ]
  br label %.lr.ph72.split

vector.ph141:                                     ; preds = %.lr.ph72.split.preheader
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %indvars.iv117, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  br label %vector.body145

vector.body145:                                   ; preds = %vector.body145, %vector.ph141
  %index146 = phi i64 [ 0, %vector.ph141 ], [ %index.next150, %vector.body145 ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph141 ], [ %36, %vector.body145 ]
  %vec.phi147 = phi <4 x i32> [ zeroinitializer, %vector.ph141 ], [ %37, %vector.body145 ]
  %28 = getelementptr inbounds i32, ptr %8, i64 %index146
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load148 = load <4 x i32>, ptr %28, align 4, !tbaa !13
  %wide.load149 = load <4 x i32>, ptr %29, align 4, !tbaa !13
  %30 = zext <4 x i32> %wide.load148 to <4 x i64>
  %31 = zext <4 x i32> %wide.load149 to <4 x i64>
  %32 = icmp eq <4 x i64> %broadcast.splat, %30
  %33 = icmp eq <4 x i64> %broadcast.splat, %31
  %34 = zext <4 x i1> %32 to <4 x i32>
  %35 = zext <4 x i1> %33 to <4 x i32>
  %36 = add <4 x i32> %vec.phi, %34
  %37 = add <4 x i32> %vec.phi147, %35
  %index.next150 = add nuw i64 %index146, 8
  %38 = icmp eq i64 %index.next150, %n.vec143
  br i1 %38, label %middle.block138, label %vector.body145, !llvm.loop !18

middle.block138:                                  ; preds = %vector.body145
  %bin.rdx = add <4 x i32> %37, %36
  %39 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n151, label %.preheader61, label %.lr.ph72.split.preheader153

.lr.ph72.split.us.preheader:                      ; preds = %.preheader62
  %wide.trip.count100 = zext nneg i32 %.fr83 to i64
  %40 = shl nuw nsw i64 %wide.trip.count100, 3
  %scevgep = getelementptr i8, ptr %14, i64 %40
  %min.iters.check = icmp ult i32 %.fr83, 4
  %n.vec = and i64 %wide.trip.count100, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count100
  %xtraiter = and i64 %wide.trip.count100, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph72.split.us

.lr.ph72.split.us:                                ; preds = %.lr.ph72.split.us.preheader, %45
  %indvars.iv102 = phi i64 [ 0, %.lr.ph72.split.us.preheader ], [ %indvars.iv.next103, %45 ]
  %.05670.us = phi i32 [ 0, %.lr.ph72.split.us.preheader ], [ %.1.us, %45 ]
  %41 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv102
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = zext i32 %42 to i64
  %44 = icmp eq i64 %indvars.iv117, %43
  br i1 %44, label %.preheader.us, label %45

45:                                               ; preds = %._crit_edge.us, %.lr.ph72.split.us
  %.1.us = phi i32 [ %82, %._crit_edge.us ], [ %.05670.us, %.lr.ph72.split.us ]
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %4
  br i1 %exitcond106.not, label %.preheader61, label %.lr.ph72.split.us, !llvm.loop !21

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv97 = phi i64 [ %indvars.iv.next98.3, %scalar.ph ], [ %indvars.iv97.unr, %scalar.ph.prol.loopexit ]
  %46 = getelementptr inbounds double, ptr %67, i64 %indvars.iv97
  %47 = load double, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds double, ptr %14, i64 %indvars.iv97
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = fadd double %47, %49
  store double %50, ptr %48, align 8, !tbaa !16
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %51 = getelementptr inbounds double, ptr %67, i64 %indvars.iv.next98
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next98
  %54 = load double, ptr %53, align 8, !tbaa !16
  %55 = fadd double %52, %54
  store double %55, ptr %53, align 8, !tbaa !16
  %indvars.iv.next98.1 = add nuw nsw i64 %indvars.iv97, 2
  %56 = getelementptr inbounds double, ptr %67, i64 %indvars.iv.next98.1
  %57 = load double, ptr %56, align 8, !tbaa !16
  %58 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next98.1
  %59 = load double, ptr %58, align 8, !tbaa !16
  %60 = fadd double %57, %59
  store double %60, ptr %58, align 8, !tbaa !16
  %indvars.iv.next98.2 = add nuw nsw i64 %indvars.iv97, 3
  %61 = getelementptr inbounds double, ptr %67, i64 %indvars.iv.next98.2
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next98.2
  %64 = load double, ptr %63, align 8, !tbaa !16
  %65 = fadd double %62, %64
  store double %65, ptr %63, align 8, !tbaa !16
  %indvars.iv.next98.3 = add nuw nsw i64 %indvars.iv97, 4
  %exitcond101.not.3 = icmp eq i64 %indvars.iv.next98.3, %wide.trip.count100
  br i1 %exitcond101.not.3, label %._crit_edge.us, label %scalar.ph, !llvm.loop !22

.preheader.us:                                    ; preds = %.lr.ph72.split.us
  %66 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv102
  %67 = load ptr, ptr %66, align 8, !tbaa !12
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader.us
  %indvars.iv97.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv97.prol = phi i64 [ %indvars.iv.next98.prol, %scalar.ph.prol ], [ %indvars.iv97.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %68 = getelementptr inbounds double, ptr %67, i64 %indvars.iv97.prol
  %69 = load double, ptr %68, align 8, !tbaa !16
  %70 = getelementptr inbounds double, ptr %14, i64 %indvars.iv97.prol
  %71 = load double, ptr %70, align 8, !tbaa !16
  %72 = fadd double %69, %71
  store double %72, ptr %70, align 8, !tbaa !16
  %indvars.iv.next98.prol = add nuw nsw i64 %indvars.iv97.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !23

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv97.unr = phi i64 [ %indvars.iv97.ph, %scalar.ph.preheader ], [ %indvars.iv.next98.prol, %scalar.ph.prol ]
  %73 = sub nsw i64 %indvars.iv97.ph, %wide.trip.count100
  %74 = icmp ugt i64 %73, -4
  br i1 %74, label %._crit_edge.us, label %scalar.ph

vector.memcheck:                                  ; preds = %.preheader.us
  %scevgep134 = getelementptr i8, ptr %67, i64 %40
  %bound0 = icmp ult ptr %14, %scevgep134
  %bound1 = icmp ult ptr %67, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %75 = getelementptr inbounds double, ptr %67, i64 %index
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  %wide.load = load <2 x double>, ptr %75, align 8, !tbaa !16, !alias.scope !25
  %wide.load135 = load <2 x double>, ptr %76, align 8, !tbaa !16, !alias.scope !25
  %77 = getelementptr inbounds double, ptr %14, i64 %index
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %wide.load136 = load <2 x double>, ptr %77, align 8, !tbaa !16, !alias.scope !28, !noalias !25
  %wide.load137 = load <2 x double>, ptr %78, align 8, !tbaa !16, !alias.scope !28, !noalias !25
  %79 = fadd <2 x double> %wide.load, %wide.load136
  %80 = fadd <2 x double> %wide.load135, %wide.load137
  store <2 x double> %79, ptr %77, align 8, !tbaa !16, !alias.scope !28, !noalias !25
  store <2 x double> %80, ptr %78, align 8, !tbaa !16, !alias.scope !28, !noalias !25
  %index.next = add nuw i64 %index, 4
  %81 = icmp eq i64 %index.next, %n.vec
  br i1 %81, label %middle.block, label %vector.body, !llvm.loop !30

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %82 = add nsw i32 %.05670.us, 1
  br label %45

.preheader61:                                     ; preds = %.lr.ph72.split, %45, %middle.block138
  %.056.lcssa = phi i32 [ %39, %middle.block138 ], [ %.1.us, %45 ], [ %spec.select, %.lr.ph72.split ]
  br i1 %25, label %.lr.ph76, label %._crit_edge

.lr.ph76.thread:                                  ; preds = %.preheader62
  %83 = load ptr, ptr %19, align 8, !tbaa !31
  %84 = getelementptr inbounds ptr, ptr %83, i64 %indvars.iv117
  %85 = load ptr, ptr %84, align 8, !tbaa !12
  br label %.lr.ph76.split.us.preheader

.lr.ph76:                                         ; preds = %.preheader61
  %.not = icmp eq i32 %.056.lcssa, 0
  %86 = sitofp i32 %.056.lcssa to double
  %87 = load ptr, ptr %19, align 8, !tbaa !31
  %88 = getelementptr inbounds ptr, ptr %87, i64 %indvars.iv117
  %89 = load ptr, ptr %88, align 8, !tbaa !12
  br i1 %.not, label %.lr.ph76.split.us.preheader, label %.lr.ph76.split.preheader

.lr.ph76.split.preheader:                         ; preds = %.lr.ph76
  %wide.trip.count110 = zext nneg i32 %.fr83 to i64
  %xtraiter159 = and i64 %wide.trip.count110, 1
  %90 = icmp eq i32 %.fr83, 1
  br i1 %90, label %._crit_edge.loopexit152.unr-lcssa, label %.lr.ph76.split.preheader.new

.lr.ph76.split.preheader.new:                     ; preds = %.lr.ph76.split.preheader
  %unroll_iter = and i64 %wide.trip.count110, 2147483646
  br label %.lr.ph76.split

.lr.ph76.split.us.preheader:                      ; preds = %.lr.ph76.thread, %.lr.ph76
  %91 = phi ptr [ %85, %.lr.ph76.thread ], [ %89, %.lr.ph76 ]
  %wide.trip.count115 = zext nneg i32 %.fr83 to i64
  %xtraiter162 = and i64 %wide.trip.count115, 1
  %92 = icmp eq i32 %.fr83, 1
  br i1 %92, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph76.split.us.preheader.new

.lr.ph76.split.us.preheader.new:                  ; preds = %.lr.ph76.split.us.preheader
  %unroll_iter165 = and i64 %wide.trip.count115, 2147483646
  br label %.lr.ph76.split.us

.lr.ph76.split.us:                                ; preds = %.lr.ph76.split.us, %.lr.ph76.split.us.preheader.new
  %indvars.iv112 = phi i64 [ 0, %.lr.ph76.split.us.preheader.new ], [ %indvars.iv.next113.1, %.lr.ph76.split.us ]
  %.05574.us = phi double [ 0.000000e+00, %.lr.ph76.split.us.preheader.new ], [ %104, %.lr.ph76.split.us ]
  %niter166 = phi i64 [ 0, %.lr.ph76.split.us.preheader.new ], [ %niter166.next.1, %.lr.ph76.split.us ]
  %93 = getelementptr inbounds double, ptr %91, i64 %indvars.iv112
  %94 = load double, ptr %93, align 8, !tbaa !16
  %95 = getelementptr inbounds double, ptr %14, i64 %indvars.iv112
  %96 = load double, ptr %95, align 8, !tbaa !16
  %97 = fsub double %94, %96
  %98 = tail call double @llvm.fmuladd.f64(double %97, double %97, double %.05574.us)
  store double %96, ptr %93, align 8, !tbaa !16
  %indvars.iv.next113 = or disjoint i64 %indvars.iv112, 1
  %99 = getelementptr inbounds double, ptr %91, i64 %indvars.iv.next113
  %100 = load double, ptr %99, align 8, !tbaa !16
  %101 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next113
  %102 = load double, ptr %101, align 8, !tbaa !16
  %103 = fsub double %100, %102
  %104 = tail call double @llvm.fmuladd.f64(double %103, double %103, double %98)
  store double %102, ptr %99, align 8, !tbaa !16
  %indvars.iv.next113.1 = add nuw nsw i64 %indvars.iv112, 2
  %niter166.next.1 = add i64 %niter166, 2
  %niter166.ncmp.1 = icmp eq i64 %niter166.next.1, %unroll_iter165
  br i1 %niter166.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph76.split.us, !llvm.loop !32

.lr.ph72.split:                                   ; preds = %.lr.ph72.split.preheader153, %.lr.ph72.split
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph72.split ], [ %indvars.iv92.ph, %.lr.ph72.split.preheader153 ]
  %.05670 = phi i32 [ %spec.select, %.lr.ph72.split ], [ %.05670.ph, %.lr.ph72.split.preheader153 ]
  %105 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv92
  %106 = load i32, ptr %105, align 4, !tbaa !13
  %107 = zext i32 %106 to i64
  %108 = icmp eq i64 %indvars.iv117, %107
  %109 = zext i1 %108 to i32
  %spec.select = add nuw nsw i32 %.05670, %109
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %4
  br i1 %exitcond96.not, label %.preheader61, label %.lr.ph72.split, !llvm.loop !33

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph76.split.us, %.lr.ph76.split.us.preheader
  %.lcssa157.ph = phi double [ poison, %.lr.ph76.split.us.preheader ], [ %104, %.lr.ph76.split.us ]
  %indvars.iv112.unr = phi i64 [ 0, %.lr.ph76.split.us.preheader ], [ %indvars.iv.next113.1, %.lr.ph76.split.us ]
  %.05574.us.unr = phi double [ 0.000000e+00, %.lr.ph76.split.us.preheader ], [ %104, %.lr.ph76.split.us ]
  %lcmp.mod163.not = icmp eq i64 %xtraiter162, 0
  br i1 %lcmp.mod163.not, label %._crit_edge, label %.lr.ph76.split.us.epil

.lr.ph76.split.us.epil:                           ; preds = %._crit_edge.loopexit.unr-lcssa
  %110 = getelementptr inbounds double, ptr %91, i64 %indvars.iv112.unr
  %111 = load double, ptr %110, align 8, !tbaa !16
  %112 = getelementptr inbounds double, ptr %14, i64 %indvars.iv112.unr
  %113 = load double, ptr %112, align 8, !tbaa !16
  %114 = fsub double %111, %113
  %115 = tail call double @llvm.fmuladd.f64(double %114, double %114, double %.05574.us.unr)
  store double %113, ptr %110, align 8, !tbaa !16
  br label %._crit_edge

._crit_edge.loopexit152.unr-lcssa:                ; preds = %.lr.ph76.split, %.lr.ph76.split.preheader
  %.lcssa156.ph = phi double [ poison, %.lr.ph76.split.preheader ], [ %141, %.lr.ph76.split ]
  %indvars.iv107.unr = phi i64 [ 0, %.lr.ph76.split.preheader ], [ %indvars.iv.next108.1, %.lr.ph76.split ]
  %.05574.unr = phi double [ 0.000000e+00, %.lr.ph76.split.preheader ], [ %141, %.lr.ph76.split ]
  %lcmp.mod160.not = icmp eq i64 %xtraiter159, 0
  br i1 %lcmp.mod160.not, label %._crit_edge, label %.lr.ph76.split.epil

.lr.ph76.split.epil:                              ; preds = %._crit_edge.loopexit152.unr-lcssa
  %116 = getelementptr inbounds double, ptr %14, i64 %indvars.iv107.unr
  %117 = load double, ptr %116, align 8, !tbaa !16
  %118 = fdiv double %117, %86
  store double %118, ptr %116, align 8, !tbaa !16
  %119 = getelementptr inbounds double, ptr %89, i64 %indvars.iv107.unr
  %120 = load double, ptr %119, align 8, !tbaa !16
  %121 = fsub double %120, %118
  %122 = tail call double @llvm.fmuladd.f64(double %121, double %121, double %.05574.unr)
  store double %118, ptr %119, align 8, !tbaa !16
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph76.split.epil, %._crit_edge.loopexit152.unr-lcssa, %.lr.ph76.split.us.epil, %._crit_edge.loopexit.unr-lcssa, %.preheader62.thread, %.preheader61
  %.055.lcssa = phi double [ 0.000000e+00, %.preheader61 ], [ 0.000000e+00, %.preheader62.thread ], [ %.lcssa157.ph, %._crit_edge.loopexit.unr-lcssa ], [ %115, %.lr.ph76.split.us.epil ], [ %.lcssa156.ph, %._crit_edge.loopexit152.unr-lcssa ], [ %122, %.lr.ph76.split.epil ]
  %123 = tail call double @sqrt(double noundef %.055.lcssa) #9
  %124 = fadd double %.05979, %123
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %125 = load i32, ptr %16, align 4, !tbaa !11
  %126 = sext i32 %125 to i64
  %127 = icmp slt i64 %indvars.iv.next118, %126
  br i1 %127, label %.preheader63, label %._crit_edge82, !llvm.loop !34

.lr.ph76.split:                                   ; preds = %.lr.ph76.split, %.lr.ph76.split.preheader.new
  %indvars.iv107 = phi i64 [ 0, %.lr.ph76.split.preheader.new ], [ %indvars.iv.next108.1, %.lr.ph76.split ]
  %.05574 = phi double [ 0.000000e+00, %.lr.ph76.split.preheader.new ], [ %141, %.lr.ph76.split ]
  %niter = phi i64 [ 0, %.lr.ph76.split.preheader.new ], [ %niter.next.1, %.lr.ph76.split ]
  %128 = getelementptr inbounds double, ptr %14, i64 %indvars.iv107
  %129 = load double, ptr %128, align 8, !tbaa !16
  %130 = fdiv double %129, %86
  store double %130, ptr %128, align 8, !tbaa !16
  %131 = getelementptr inbounds double, ptr %89, i64 %indvars.iv107
  %132 = load double, ptr %131, align 8, !tbaa !16
  %133 = fsub double %132, %130
  %134 = tail call double @llvm.fmuladd.f64(double %133, double %133, double %.05574)
  store double %130, ptr %131, align 8, !tbaa !16
  %indvars.iv.next108 = or disjoint i64 %indvars.iv107, 1
  %135 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next108
  %136 = load double, ptr %135, align 8, !tbaa !16
  %137 = fdiv double %136, %86
  store double %137, ptr %135, align 8, !tbaa !16
  %138 = getelementptr inbounds double, ptr %89, i64 %indvars.iv.next108
  %139 = load double, ptr %138, align 8, !tbaa !16
  %140 = fsub double %139, %137
  %141 = tail call double @llvm.fmuladd.f64(double %140, double %140, double %134)
  store double %137, ptr %138, align 8, !tbaa !16
  %indvars.iv.next108.1 = add nuw nsw i64 %indvars.iv107, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit152.unr-lcssa, label %.lr.ph76.split, !llvm.loop !32

._crit_edge82:                                    ; preds = %._crit_edge, %.preheader64
  %.059.lcssa = phi double [ 0.000000e+00, %.preheader64 ], [ %124, %._crit_edge ]
  tail call void @_ZdaPv(ptr noundef nonnull %8) #10
  tail call void @_ZdaPv(ptr noundef nonnull %14) #10
  ret double %.059.lcssa
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

attributes #0 = { 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 #1 = { nobuiltin 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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, !7, i64 0}
!6 = !{!"_ZTS6KMeans", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!10, !10, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !15, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15, !19}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = !{!26}
!26 = distinct !{!26, !27}
!27 = distinct !{!27, !"LVerDomain"}
!28 = !{!29}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !15, !19, !20}
!31 = !{!6, !10, i64 8}
!32 = distinct !{!32, !15}
!33 = distinct !{!33, !15, !20, !19}
!34 = distinct !{!34, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass