; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (dataanalysis)

; 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.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::hqrndstate" = type { i64, i64, i64 }
%"struct.alglib_impl::kmeansbuffers" = type { %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::apbuffers", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::apbuffers" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix" }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

declare void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #2

declare void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, i64 noundef %7, i1 noundef zeroext %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, i1 noundef zeroext %12, ptr noundef %13, i1 noundef zeroext %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18) #4 {
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i8, align 1
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i8, align 1
  %33 = alloca ptr, align 8
  %34 = alloca i8, align 1
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %"struct.alglib_impl::ae_frame", align 8
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca i8, align 1
  %48 = alloca i8, align 1
  %49 = alloca i64, align 8
  %50 = alloca i64, align 8
  %51 = alloca %"struct.alglib_impl::hqrndstate", align 8
  %52 = alloca i32, align 4
  store ptr %0, ptr %20, align 8, !tbaa !5
  store i64 %1, ptr %21, align 8, !tbaa !9
  store i64 %2, ptr %22, align 8, !tbaa !9
  store i64 %3, ptr %23, align 8, !tbaa !9
  store i64 %4, ptr %24, align 8, !tbaa !9
  store i64 %5, ptr %25, align 8, !tbaa !9
  store i64 %6, ptr %26, align 8, !tbaa !9
  store i64 %7, ptr %27, align 8, !tbaa !9
  %53 = zext i1 %8 to i8
  store i8 %53, ptr %28, align 1, !tbaa !11
  store ptr %9, ptr %29, align 8, !tbaa !5
  store ptr %10, ptr %30, align 8, !tbaa !5
  store ptr %11, ptr %31, align 8, !tbaa !5
  %54 = zext i1 %12 to i8
  store i8 %54, ptr %32, align 1, !tbaa !11
  store ptr %13, ptr %33, align 8, !tbaa !5
  %55 = zext i1 %14 to i8
  store i8 %55, ptr %34, align 1, !tbaa !11
  store ptr %15, ptr %35, align 8, !tbaa !5
  store ptr %16, ptr %36, align 8, !tbaa !5
  store ptr %17, ptr %37, align 8, !tbaa !5
  store ptr %18, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %47) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %48) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %51) #5
  %56 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %56, ptr noundef %39)
  call void @llvm.memset.p0.i64(ptr align 8 %51, i8 0, i64 24, i1 false)
  %57 = load ptr, ptr %29, align 8, !tbaa !5
  store i64 0, ptr %57, align 8, !tbaa !9
  %58 = load ptr, ptr %30, align 8, !tbaa !5
  store i64 0, ptr %58, align 8, !tbaa !9
  %59 = load ptr, ptr %31, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %59)
  %60 = load ptr, ptr %33, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %60)
  %61 = load ptr, ptr %35, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %61)
  %62 = load ptr, ptr %36, align 8, !tbaa !5
  store double 0.000000e+00, ptr %62, align 8, !tbaa !13
  %63 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef %51, ptr noundef %63, i1 noundef zeroext true)
  %64 = load i64, ptr %21, align 8, !tbaa !9
  %65 = load i64, ptr %23, align 8, !tbaa !9
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %76, label %67

67:                                               ; preds = %19
  %68 = load i64, ptr %22, align 8, !tbaa !9
  %69 = icmp slt i64 %68, 1
  br i1 %69, label %76, label %70

70:                                               ; preds = %67
  %71 = load i64, ptr %23, align 8, !tbaa !9
  %72 = icmp slt i64 %71, 1
  br i1 %72, label %76, label %73

73:                                               ; preds = %70
  %74 = load i64, ptr %27, align 8, !tbaa !9
  %75 = icmp slt i64 %74, 1
  br i1 %75, label %76, label %80

76:                                               ; preds = %73, %70, %67, %19
  %77 = load ptr, ptr %29, align 8, !tbaa !5
  store i64 -1, ptr %77, align 8, !tbaa !9
  %78 = load ptr, ptr %30, align 8, !tbaa !5
  store i64 0, ptr %78, align 8, !tbaa !9
  %79 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %79)
  store i32 1, ptr %52, align 4
  br label %613

80:                                               ; preds = %73
  %81 = load ptr, ptr %29, align 8, !tbaa !5
  store i64 1, ptr %81, align 8, !tbaa !9
  %82 = load ptr, ptr %30, align 8, !tbaa !5
  store i64 0, ptr %82, align 8, !tbaa !9
  %83 = load i64, ptr %25, align 8, !tbaa !9
  %84 = icmp sle i64 %83, 0
  br i1 %84, label %85, label %87

85:                                               ; preds = %80
  %86 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef %51, ptr noundef %86)
  br label %90

87:                                               ; preds = %80
  %88 = load i64, ptr %25, align 8, !tbaa !9
  %89 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl9hqrndseedEllPNS_10hqrndstateEPNS_8ae_stateE(i64 noundef 325355, i64 noundef %88, ptr noundef %51, ptr noundef %89)
  br label %90

90:                                               ; preds = %87, %85
  %91 = load ptr, ptr %35, align 8, !tbaa !5
  %92 = load i64, ptr %21, align 8, !tbaa !9
  %93 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %91, i64 noundef %92, ptr noundef %93)
  %94 = load ptr, ptr %37, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %94, i32 0, i32 0
  %96 = load i64, ptr %23, align 8, !tbaa !9
  %97 = load i64, ptr %22, align 8, !tbaa !9
  %98 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %95, i64 noundef %96, i64 noundef %97, ptr noundef %98)
  %99 = load ptr, ptr %37, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %99, i32 0, i32 1
  %101 = load i64, ptr %23, align 8, !tbaa !9
  %102 = load i64, ptr %22, align 8, !tbaa !9
  %103 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %100, i64 noundef %101, i64 noundef %102, ptr noundef %103)
  %104 = load ptr, ptr %37, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %104, i32 0, i32 3
  %106 = load i64, ptr %21, align 8, !tbaa !9
  %107 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %105, i64 noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %37, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %108, i32 0, i32 2
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %109, i64 noundef %110, ptr noundef %111)
  %112 = load ptr, ptr %37, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %112, i32 0, i32 4
  %114 = load i64, ptr %21, align 8, !tbaa !9
  %115 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %113, i64 noundef %114, ptr noundef %115)
  %116 = load ptr, ptr %37, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %116, i32 0, i32 5
  %118 = load i64, ptr %23, align 8, !tbaa !9
  %119 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %117, i64 noundef %118, ptr noundef %119)
  %120 = load ptr, ptr %36, align 8, !tbaa !5
  store double 1.000000e+300, ptr %120, align 8, !tbaa !13
  store i64 1, ptr %49, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %552, %90
  %122 = load i64, ptr %49, align 8, !tbaa !9
  %123 = load i64, ptr %27, align 8, !tbaa !9
  %124 = icmp sle i64 %122, %123
  br i1 %124, label %125, label %555

125:                                              ; preds = %121
  %126 = load ptr, ptr %20, align 8, !tbaa !5
  %127 = load i64, ptr %21, align 8, !tbaa !9
  %128 = load i64, ptr %22, align 8, !tbaa !9
  %129 = load i64, ptr %24, align 8, !tbaa !9
  %130 = load i64, ptr %23, align 8, !tbaa !9
  %131 = load ptr, ptr %37, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %37, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %133, i32 0, i32 6
  %135 = load ptr, ptr %37, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %135, i32 0, i32 7
  %137 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_implL31clustering_selectinitialcentersEPNS_9ae_matrixElllPNS_10hqrndstateElS1_PNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %126, i64 noundef %127, i64 noundef %128, i64 noundef %129, ptr noundef %51, i64 noundef %130, ptr noundef %132, ptr noundef %134, ptr noundef %136, ptr noundef %137)
  %138 = load i8, ptr %28, align 1, !tbaa !11, !range !15, !noundef !16
  %139 = trunc i8 %138 to i1
  br i1 %139, label %476, label %140

140:                                              ; preds = %125
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %152, %140
  %142 = load i64, ptr %40, align 8, !tbaa !9
  %143 = load i64, ptr %21, align 8, !tbaa !9
  %144 = sub nsw i64 %143, 1
  %145 = icmp sle i64 %142, %144
  br i1 %145, label %146, label %155

146:                                              ; preds = %141
  %147 = load ptr, ptr %35, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !17
  %150 = load i64, ptr %40, align 8, !tbaa !9
  %151 = getelementptr inbounds i64, ptr %149, i64 %150
  store i64 -1, ptr %151, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %146
  %153 = load i64, ptr %40, align 8, !tbaa !9
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %40, align 8, !tbaa !9
  br label %141, !llvm.loop !18

155:                                              ; preds = %141
  store double 1.000000e+300, ptr %44, align 8, !tbaa !13
  store double 1.000000e+300, ptr %43, align 8, !tbaa !13
  store i64 0, ptr %50, align 8, !tbaa !9
  br label %156

156:                                              ; preds = %473, %409, %155
  %157 = load i64, ptr %26, align 8, !tbaa !9
  %158 = icmp eq i64 %157, 0
  br i1 %158, label %163, label %159

159:                                              ; preds = %156
  %160 = load i64, ptr %50, align 8, !tbaa !9
  %161 = load i64, ptr %26, align 8, !tbaa !9
  %162 = icmp slt i64 %160, %161
  br label %163

163:                                              ; preds = %159, %156
  %164 = phi i1 [ true, %156 ], [ %162, %159 ]
  br i1 %164, label %165, label %475

165:                                              ; preds = %163
  %166 = load i64, ptr %50, align 8, !tbaa !9
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %50, align 8, !tbaa !9
  %168 = load ptr, ptr %30, align 8, !tbaa !5
  %169 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef %168, ptr noundef %169)
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %188, %165
  %171 = load i64, ptr %40, align 8, !tbaa !9
  %172 = load i64, ptr %21, align 8, !tbaa !9
  %173 = sub nsw i64 %172, 1
  %174 = icmp sle i64 %171, %173
  br i1 %174, label %175, label %191

175:                                              ; preds = %170
  %176 = load ptr, ptr %35, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %176, i32 0, i32 4
  %178 = load ptr, ptr %177, align 8, !tbaa !17
  %179 = load i64, ptr %40, align 8, !tbaa !9
  %180 = getelementptr inbounds i64, ptr %178, i64 %179
  %181 = load i64, ptr %180, align 8, !tbaa !9
  %182 = load ptr, ptr %37, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %182, i32 0, i32 3
  %184 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %183, i32 0, i32 4
  %185 = load ptr, ptr %184, align 8, !tbaa !17
  %186 = load i64, ptr %40, align 8, !tbaa !9
  %187 = getelementptr inbounds i64, ptr %185, i64 %186
  store i64 %181, ptr %187, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %175
  %189 = load i64, ptr %40, align 8, !tbaa !9
  %190 = add nsw i64 %189, 1
  store i64 %190, ptr %40, align 8, !tbaa !9
  br label %170, !llvm.loop !20

191:                                              ; preds = %170
  %192 = load ptr, ptr %20, align 8, !tbaa !5
  %193 = load i64, ptr %21, align 8, !tbaa !9
  %194 = load i64, ptr %22, align 8, !tbaa !9
  %195 = load ptr, ptr %37, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %195, i32 0, i32 0
  %197 = load i64, ptr %23, align 8, !tbaa !9
  %198 = load ptr, ptr %35, align 8, !tbaa !5
  %199 = load ptr, ptr %37, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %199, i32 0, i32 4
  %201 = load ptr, ptr %37, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %201, i32 0, i32 7
  %203 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %192, i64 noundef 0, i64 noundef %193, i64 noundef %194, ptr noundef %196, i64 noundef 0, i64 noundef %197, ptr noundef %198, ptr noundef %200, ptr noundef %202, ptr noundef %203)
  store i8 0, ptr %47, align 1, !tbaa !11
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %204

204:                                              ; preds = %230, %191
  %205 = load i64, ptr %40, align 8, !tbaa !9
  %206 = load i64, ptr %21, align 8, !tbaa !9
  %207 = sub nsw i64 %206, 1
  %208 = icmp sle i64 %205, %207
  br i1 %208, label %209, label %233

209:                                              ; preds = %204
  %210 = load i8, ptr %47, align 1, !tbaa !11, !range !15, !noundef !16
  %211 = trunc i8 %210 to i1
  br i1 %211, label %227, label %212

212:                                              ; preds = %209
  %213 = load ptr, ptr %35, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %213, i32 0, i32 4
  %215 = load ptr, ptr %214, align 8, !tbaa !17
  %216 = load i64, ptr %40, align 8, !tbaa !9
  %217 = getelementptr inbounds i64, ptr %215, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !9
  %219 = load ptr, ptr %37, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %219, i32 0, i32 3
  %221 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %220, i32 0, i32 4
  %222 = load ptr, ptr %221, align 8, !tbaa !17
  %223 = load i64, ptr %40, align 8, !tbaa !9
  %224 = getelementptr inbounds i64, ptr %222, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !9
  %226 = icmp ne i64 %218, %225
  br label %227

227:                                              ; preds = %212, %209
  %228 = phi i1 [ true, %209 ], [ %226, %212 ]
  %229 = zext i1 %228 to i8
  store i8 %229, ptr %47, align 1, !tbaa !11
  br label %230

230:                                              ; preds = %227
  %231 = load i64, ptr %40, align 8, !tbaa !9
  %232 = add nsw i64 %231, 1
  store i64 %232, ptr %40, align 8, !tbaa !9
  br label %204, !llvm.loop !21

233:                                              ; preds = %204
  store i64 0, ptr %41, align 8, !tbaa !9
  br label %234

234:                                              ; preds = %246, %233
  %235 = load i64, ptr %41, align 8, !tbaa !9
  %236 = load i64, ptr %23, align 8, !tbaa !9
  %237 = sub nsw i64 %236, 1
  %238 = icmp sle i64 %235, %237
  br i1 %238, label %239, label %249

239:                                              ; preds = %234
  %240 = load ptr, ptr %37, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %240, i32 0, i32 5
  %242 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %241, i32 0, i32 4
  %243 = load ptr, ptr %242, align 8, !tbaa !17
  %244 = load i64, ptr %41, align 8, !tbaa !9
  %245 = getelementptr inbounds i64, ptr %243, i64 %244
  store i64 0, ptr %245, align 8, !tbaa !9
  br label %246

246:                                              ; preds = %239
  %247 = load i64, ptr %41, align 8, !tbaa !9
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %41, align 8, !tbaa !9
  br label %234, !llvm.loop !22

249:                                              ; preds = %234
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %250

250:                                              ; preds = %275, %249
  %251 = load i64, ptr %40, align 8, !tbaa !9
  %252 = load i64, ptr %23, align 8, !tbaa !9
  %253 = sub nsw i64 %252, 1
  %254 = icmp sle i64 %251, %253
  br i1 %254, label %255, label %278

255:                                              ; preds = %250
  store i64 0, ptr %41, align 8, !tbaa !9
  br label %256

256:                                              ; preds = %271, %255
  %257 = load i64, ptr %41, align 8, !tbaa !9
  %258 = load i64, ptr %22, align 8, !tbaa !9
  %259 = sub nsw i64 %258, 1
  %260 = icmp sle i64 %257, %259
  br i1 %260, label %261, label %274

261:                                              ; preds = %256
  %262 = load ptr, ptr %37, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %262, i32 0, i32 0
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %263, i32 0, i32 6
  %265 = load ptr, ptr %264, align 8, !tbaa !17
  %266 = load i64, ptr %40, align 8, !tbaa !9
  %267 = getelementptr inbounds ptr, ptr %265, i64 %266
  %268 = load ptr, ptr %267, align 8, !tbaa !5
  %269 = load i64, ptr %41, align 8, !tbaa !9
  %270 = getelementptr inbounds double, ptr %268, i64 %269
  store double 0.000000e+00, ptr %270, align 8, !tbaa !13
  br label %271

271:                                              ; preds = %261
  %272 = load i64, ptr %41, align 8, !tbaa !9
  %273 = add nsw i64 %272, 1
  store i64 %273, ptr %41, align 8, !tbaa !9
  br label %256, !llvm.loop !23

274:                                              ; preds = %256
  br label %275

275:                                              ; preds = %274
  %276 = load i64, ptr %40, align 8, !tbaa !9
  %277 = add nsw i64 %276, 1
  store i64 %277, ptr %40, align 8, !tbaa !9
  br label %250, !llvm.loop !24

278:                                              ; preds = %250
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %279

279:                                              ; preds = %332, %278
  %280 = load i64, ptr %40, align 8, !tbaa !9
  %281 = load i64, ptr %21, align 8, !tbaa !9
  %282 = sub nsw i64 %281, 1
  %283 = icmp sle i64 %280, %282
  br i1 %283, label %284, label %335

284:                                              ; preds = %279
  %285 = load ptr, ptr %37, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %285, i32 0, i32 5
  %287 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %286, i32 0, i32 4
  %288 = load ptr, ptr %287, align 8, !tbaa !17
  %289 = load ptr, ptr %35, align 8, !tbaa !5
  %290 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %289, i32 0, i32 4
  %291 = load ptr, ptr %290, align 8, !tbaa !17
  %292 = load i64, ptr %40, align 8, !tbaa !9
  %293 = getelementptr inbounds i64, ptr %291, i64 %292
  %294 = load i64, ptr %293, align 8, !tbaa !9
  %295 = getelementptr inbounds i64, ptr %288, i64 %294
  %296 = load i64, ptr %295, align 8, !tbaa !9
  %297 = add nsw i64 %296, 1
  %298 = load ptr, ptr %37, align 8, !tbaa !5
  %299 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %298, i32 0, i32 5
  %300 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %299, i32 0, i32 4
  %301 = load ptr, ptr %300, align 8, !tbaa !17
  %302 = load ptr, ptr %35, align 8, !tbaa !5
  %303 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %302, i32 0, i32 4
  %304 = load ptr, ptr %303, align 8, !tbaa !17
  %305 = load i64, ptr %40, align 8, !tbaa !9
  %306 = getelementptr inbounds i64, ptr %304, i64 %305
  %307 = load i64, ptr %306, align 8, !tbaa !9
  %308 = getelementptr inbounds i64, ptr %301, i64 %307
  store i64 %297, ptr %308, align 8, !tbaa !9
  %309 = load ptr, ptr %37, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %310, i32 0, i32 6
  %312 = load ptr, ptr %311, align 8, !tbaa !17
  %313 = load ptr, ptr %35, align 8, !tbaa !5
  %314 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %313, i32 0, i32 4
  %315 = load ptr, ptr %314, align 8, !tbaa !17
  %316 = load i64, ptr %40, align 8, !tbaa !9
  %317 = getelementptr inbounds i64, ptr %315, i64 %316
  %318 = load i64, ptr %317, align 8, !tbaa !9
  %319 = getelementptr inbounds ptr, ptr %312, i64 %318
  %320 = load ptr, ptr %319, align 8, !tbaa !5
  %321 = getelementptr inbounds double, ptr %320, i64 0
  %322 = load ptr, ptr %20, align 8, !tbaa !5
  %323 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %322, i32 0, i32 6
  %324 = load ptr, ptr %323, align 8, !tbaa !17
  %325 = load i64, ptr %40, align 8, !tbaa !9
  %326 = getelementptr inbounds ptr, ptr %324, i64 %325
  %327 = load ptr, ptr %326, align 8, !tbaa !5
  %328 = getelementptr inbounds double, ptr %327, i64 0
  %329 = load i64, ptr %22, align 8, !tbaa !9
  %330 = sub nsw i64 %329, 1
  %331 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %330)
  call void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef %321, i64 noundef 1, ptr noundef %328, i64 noundef 1, i64 noundef %331)
  br label %332

332:                                              ; preds = %284
  %333 = load i64, ptr %40, align 8, !tbaa !9
  %334 = add nsw i64 %333, 1
  store i64 %334, ptr %40, align 8, !tbaa !9
  br label %279, !llvm.loop !25

335:                                              ; preds = %279
  store i8 0, ptr %48, align 1, !tbaa !11
  store i64 0, ptr %41, align 8, !tbaa !9
  br label %336

336:                                              ; preds = %387, %335
  %337 = load i64, ptr %41, align 8, !tbaa !9
  %338 = load i64, ptr %23, align 8, !tbaa !9
  %339 = sub nsw i64 %338, 1
  %340 = icmp sle i64 %337, %339
  br i1 %340, label %341, label %390

341:                                              ; preds = %336
  %342 = load ptr, ptr %37, align 8, !tbaa !5
  %343 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %342, i32 0, i32 5
  %344 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %343, i32 0, i32 4
  %345 = load ptr, ptr %344, align 8, !tbaa !17
  %346 = load i64, ptr %41, align 8, !tbaa !9
  %347 = getelementptr inbounds i64, ptr %345, i64 %346
  %348 = load i64, ptr %347, align 8, !tbaa !9
  %349 = icmp ne i64 %348, 0
  br i1 %349, label %350, label %372

350:                                              ; preds = %341
  %351 = load ptr, ptr %37, align 8, !tbaa !5
  %352 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %351, i32 0, i32 5
  %353 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %352, i32 0, i32 4
  %354 = load ptr, ptr %353, align 8, !tbaa !17
  %355 = load i64, ptr %41, align 8, !tbaa !9
  %356 = getelementptr inbounds i64, ptr %354, i64 %355
  %357 = load i64, ptr %356, align 8, !tbaa !9
  %358 = sitofp i64 %357 to double
  %359 = fdiv double 1.000000e+00, %358
  store double %359, ptr %45, align 8, !tbaa !13
  %360 = load ptr, ptr %37, align 8, !tbaa !5
  %361 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %360, i32 0, i32 0
  %362 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %361, i32 0, i32 6
  %363 = load ptr, ptr %362, align 8, !tbaa !17
  %364 = load i64, ptr %41, align 8, !tbaa !9
  %365 = getelementptr inbounds ptr, ptr %363, i64 %364
  %366 = load ptr, ptr %365, align 8, !tbaa !5
  %367 = getelementptr inbounds double, ptr %366, i64 0
  %368 = load i64, ptr %22, align 8, !tbaa !9
  %369 = sub nsw i64 %368, 1
  %370 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %369)
  %371 = load double, ptr %45, align 8, !tbaa !13
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %367, i64 noundef 1, i64 noundef %370, double noundef %371)
  br label %372

372:                                              ; preds = %350, %341
  %373 = load i8, ptr %48, align 1, !tbaa !11, !range !15, !noundef !16
  %374 = trunc i8 %373 to i1
  br i1 %374, label %384, label %375

375:                                              ; preds = %372
  %376 = load ptr, ptr %37, align 8, !tbaa !5
  %377 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %376, i32 0, i32 5
  %378 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %377, i32 0, i32 4
  %379 = load ptr, ptr %378, align 8, !tbaa !17
  %380 = load i64, ptr %41, align 8, !tbaa !9
  %381 = getelementptr inbounds i64, ptr %379, i64 %380
  %382 = load i64, ptr %381, align 8, !tbaa !9
  %383 = icmp eq i64 %382, 0
  br label %384

384:                                              ; preds = %375, %372
  %385 = phi i1 [ true, %372 ], [ %383, %375 ]
  %386 = zext i1 %385 to i8
  store i8 %386, ptr %48, align 1, !tbaa !11
  br label %387

387:                                              ; preds = %384
  %388 = load i64, ptr %41, align 8, !tbaa !9
  %389 = add nsw i64 %388, 1
  store i64 %389, ptr %41, align 8, !tbaa !9
  br label %336, !llvm.loop !26

390:                                              ; preds = %336
  %391 = load i8, ptr %48, align 1, !tbaa !11, !range !15, !noundef !16
  %392 = trunc i8 %391 to i1
  br i1 %392, label %393, label %412

393:                                              ; preds = %390
  %394 = load ptr, ptr %20, align 8, !tbaa !5
  %395 = load i64, ptr %21, align 8, !tbaa !9
  %396 = load i64, ptr %22, align 8, !tbaa !9
  %397 = load ptr, ptr %37, align 8, !tbaa !5
  %398 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %397, i32 0, i32 0
  %399 = load i64, ptr %23, align 8, !tbaa !9
  %400 = load ptr, ptr %37, align 8, !tbaa !5
  %401 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %400, i32 0, i32 6
  %402 = load ptr, ptr %37, align 8, !tbaa !5
  %403 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %402, i32 0, i32 7
  %404 = load ptr, ptr %38, align 8, !tbaa !5
  %405 = call noundef zeroext i1 @_ZN11alglib_implL21clustering_fixcentersEPNS_9ae_matrixEllS1_lPNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %394, i64 noundef %395, i64 noundef %396, ptr noundef %398, i64 noundef %399, ptr noundef %401, ptr noundef %403, ptr noundef %404)
  br i1 %405, label %409, label %406

406:                                              ; preds = %393
  %407 = load ptr, ptr %29, align 8, !tbaa !5
  store i64 -3, ptr %407, align 8, !tbaa !9
  %408 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %408)
  store i32 1, ptr %52, align 4
  br label %613

409:                                              ; preds = %393
  %410 = load i64, ptr %50, align 8, !tbaa !9
  %411 = sub nsw i64 %410, 1
  store i64 %411, ptr %50, align 8, !tbaa !9
  br label %156, !llvm.loop !27

412:                                              ; preds = %390
  store double 0.000000e+00, ptr %43, align 8, !tbaa !13
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %413

413:                                              ; preds = %462, %412
  %414 = load i64, ptr %40, align 8, !tbaa !9
  %415 = load i64, ptr %21, align 8, !tbaa !9
  %416 = sub nsw i64 %415, 1
  %417 = icmp sle i64 %414, %416
  br i1 %417, label %418, label %465

418:                                              ; preds = %413
  store double 0.000000e+00, ptr %45, align 8, !tbaa !13
  %419 = load ptr, ptr %35, align 8, !tbaa !5
  %420 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %419, i32 0, i32 4
  %421 = load ptr, ptr %420, align 8, !tbaa !17
  %422 = load i64, ptr %40, align 8, !tbaa !9
  %423 = getelementptr inbounds i64, ptr %421, i64 %422
  %424 = load i64, ptr %423, align 8, !tbaa !9
  store i64 %424, ptr %42, align 8, !tbaa !9
  store i64 0, ptr %41, align 8, !tbaa !9
  br label %425

425:                                              ; preds = %455, %418
  %426 = load i64, ptr %41, align 8, !tbaa !9
  %427 = load i64, ptr %22, align 8, !tbaa !9
  %428 = sub nsw i64 %427, 1
  %429 = icmp sle i64 %426, %428
  br i1 %429, label %430, label %458

430:                                              ; preds = %425
  %431 = load ptr, ptr %20, align 8, !tbaa !5
  %432 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %431, i32 0, i32 6
  %433 = load ptr, ptr %432, align 8, !tbaa !17
  %434 = load i64, ptr %40, align 8, !tbaa !9
  %435 = getelementptr inbounds ptr, ptr %433, i64 %434
  %436 = load ptr, ptr %435, align 8, !tbaa !5
  %437 = load i64, ptr %41, align 8, !tbaa !9
  %438 = getelementptr inbounds double, ptr %436, i64 %437
  %439 = load double, ptr %438, align 8, !tbaa !13
  %440 = load ptr, ptr %37, align 8, !tbaa !5
  %441 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %440, i32 0, i32 0
  %442 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %441, i32 0, i32 6
  %443 = load ptr, ptr %442, align 8, !tbaa !17
  %444 = load i64, ptr %42, align 8, !tbaa !9
  %445 = getelementptr inbounds ptr, ptr %443, i64 %444
  %446 = load ptr, ptr %445, align 8, !tbaa !5
  %447 = load i64, ptr %41, align 8, !tbaa !9
  %448 = getelementptr inbounds double, ptr %446, i64 %447
  %449 = load double, ptr %448, align 8, !tbaa !13
  %450 = fsub double %439, %449
  store double %450, ptr %46, align 8, !tbaa !13
  %451 = load double, ptr %45, align 8, !tbaa !13
  %452 = load double, ptr %46, align 8, !tbaa !13
  %453 = load double, ptr %46, align 8, !tbaa !13
  %454 = call double @llvm.fmuladd.f64(double %452, double %453, double %451)
  store double %454, ptr %45, align 8, !tbaa !13
  br label %455

455:                                              ; preds = %430
  %456 = load i64, ptr %41, align 8, !tbaa !9
  %457 = add nsw i64 %456, 1
  store i64 %457, ptr %41, align 8, !tbaa !9
  br label %425, !llvm.loop !28

458:                                              ; preds = %425
  %459 = load double, ptr %43, align 8, !tbaa !13
  %460 = load double, ptr %45, align 8, !tbaa !13
  %461 = fadd double %459, %460
  store double %461, ptr %43, align 8, !tbaa !13
  br label %462

462:                                              ; preds = %458
  %463 = load i64, ptr %40, align 8, !tbaa !9
  %464 = add nsw i64 %463, 1
  store i64 %464, ptr %40, align 8, !tbaa !9
  br label %413, !llvm.loop !29

465:                                              ; preds = %413
  %466 = load i8, ptr %47, align 1, !tbaa !11, !range !15, !noundef !16
  %467 = trunc i8 %466 to i1
  br i1 %467, label %468, label %472

468:                                              ; preds = %465
  %469 = load double, ptr %43, align 8, !tbaa !13
  %470 = load double, ptr %44, align 8, !tbaa !13
  %471 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %469, double noundef %470)
  br i1 %471, label %472, label %473

472:                                              ; preds = %468, %465
  br label %475

473:                                              ; preds = %468
  %474 = load double, ptr %43, align 8, !tbaa !13
  store double %474, ptr %44, align 8, !tbaa !13
  br label %156, !llvm.loop !27

475:                                              ; preds = %472, %163
  br label %508

476:                                              ; preds = %125
  %477 = load ptr, ptr %20, align 8, !tbaa !5
  %478 = load i64, ptr %21, align 8, !tbaa !9
  %479 = load i64, ptr %22, align 8, !tbaa !9
  %480 = load ptr, ptr %37, align 8, !tbaa !5
  %481 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %480, i32 0, i32 0
  %482 = load i64, ptr %23, align 8, !tbaa !9
  %483 = load ptr, ptr %35, align 8, !tbaa !5
  %484 = load ptr, ptr %37, align 8, !tbaa !5
  %485 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %484, i32 0, i32 4
  %486 = load ptr, ptr %37, align 8, !tbaa !5
  %487 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %486, i32 0, i32 7
  %488 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %477, i64 noundef 0, i64 noundef %478, i64 noundef %479, ptr noundef %481, i64 noundef 0, i64 noundef %482, ptr noundef %483, ptr noundef %485, ptr noundef %487, ptr noundef %488)
  store double 0.000000e+00, ptr %43, align 8, !tbaa !13
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %489

489:                                              ; preds = %504, %476
  %490 = load i64, ptr %40, align 8, !tbaa !9
  %491 = load i64, ptr %21, align 8, !tbaa !9
  %492 = sub nsw i64 %491, 1
  %493 = icmp sle i64 %490, %492
  br i1 %493, label %494, label %507

494:                                              ; preds = %489
  %495 = load double, ptr %43, align 8, !tbaa !13
  %496 = load ptr, ptr %37, align 8, !tbaa !5
  %497 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %496, i32 0, i32 4
  %498 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %497, i32 0, i32 4
  %499 = load ptr, ptr %498, align 8, !tbaa !17
  %500 = load i64, ptr %40, align 8, !tbaa !9
  %501 = getelementptr inbounds double, ptr %499, i64 %500
  %502 = load double, ptr %501, align 8, !tbaa !13
  %503 = fadd double %495, %502
  store double %503, ptr %43, align 8, !tbaa !13
  br label %504

504:                                              ; preds = %494
  %505 = load i64, ptr %40, align 8, !tbaa !9
  %506 = add nsw i64 %505, 1
  store i64 %506, ptr %40, align 8, !tbaa !9
  br label %489, !llvm.loop !30

507:                                              ; preds = %489
  br label %508

508:                                              ; preds = %507, %475
  %509 = load double, ptr %43, align 8, !tbaa !13
  %510 = load ptr, ptr %36, align 8, !tbaa !5
  %511 = load double, ptr %510, align 8, !tbaa !13
  %512 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %509, double noundef %511)
  br i1 %512, label %513, label %551

513:                                              ; preds = %508
  %514 = load double, ptr %43, align 8, !tbaa !13
  %515 = load ptr, ptr %36, align 8, !tbaa !5
  store double %514, ptr %515, align 8, !tbaa !13
  %516 = load ptr, ptr %37, align 8, !tbaa !5
  %517 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %516, i32 0, i32 0
  %518 = load i64, ptr %23, align 8, !tbaa !9
  %519 = sub nsw i64 %518, 1
  %520 = load i64, ptr %22, align 8, !tbaa !9
  %521 = sub nsw i64 %520, 1
  %522 = load ptr, ptr %37, align 8, !tbaa !5
  %523 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %522, i32 0, i32 1
  %524 = load i64, ptr %23, align 8, !tbaa !9
  %525 = sub nsw i64 %524, 1
  %526 = load i64, ptr %22, align 8, !tbaa !9
  %527 = sub nsw i64 %526, 1
  %528 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl10copymatrixEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef %517, i64 noundef 0, i64 noundef %519, i64 noundef 0, i64 noundef %521, ptr noundef %523, i64 noundef 0, i64 noundef %525, i64 noundef 0, i64 noundef %527, ptr noundef %528)
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %529

529:                                              ; preds = %547, %513
  %530 = load i64, ptr %40, align 8, !tbaa !9
  %531 = load i64, ptr %21, align 8, !tbaa !9
  %532 = sub nsw i64 %531, 1
  %533 = icmp sle i64 %530, %532
  br i1 %533, label %534, label %550

534:                                              ; preds = %529
  %535 = load ptr, ptr %35, align 8, !tbaa !5
  %536 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %535, i32 0, i32 4
  %537 = load ptr, ptr %536, align 8, !tbaa !17
  %538 = load i64, ptr %40, align 8, !tbaa !9
  %539 = getelementptr inbounds i64, ptr %537, i64 %538
  %540 = load i64, ptr %539, align 8, !tbaa !9
  %541 = load ptr, ptr %37, align 8, !tbaa !5
  %542 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %541, i32 0, i32 2
  %543 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %542, i32 0, i32 4
  %544 = load ptr, ptr %543, align 8, !tbaa !17
  %545 = load i64, ptr %40, align 8, !tbaa !9
  %546 = getelementptr inbounds i64, ptr %544, i64 %545
  store i64 %540, ptr %546, align 8, !tbaa !9
  br label %547

547:                                              ; preds = %534
  %548 = load i64, ptr %40, align 8, !tbaa !9
  %549 = add nsw i64 %548, 1
  store i64 %549, ptr %40, align 8, !tbaa !9
  br label %529, !llvm.loop !31

550:                                              ; preds = %529
  br label %551

551:                                              ; preds = %550, %508
  br label %552

552:                                              ; preds = %551
  %553 = load i64, ptr %49, align 8, !tbaa !9
  %554 = add nsw i64 %553, 1
  store i64 %554, ptr %49, align 8, !tbaa !9
  br label %121, !llvm.loop !32

555:                                              ; preds = %121
  %556 = load i8, ptr %32, align 1, !tbaa !11, !range !15, !noundef !16
  %557 = trunc i8 %556 to i1
  br i1 %557, label %558, label %575

558:                                              ; preds = %555
  %559 = load ptr, ptr %31, align 8, !tbaa !5
  %560 = load i64, ptr %22, align 8, !tbaa !9
  %561 = load i64, ptr %23, align 8, !tbaa !9
  %562 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %559, i64 noundef %560, i64 noundef %561, ptr noundef %562)
  %563 = load ptr, ptr %37, align 8, !tbaa !5
  %564 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %563, i32 0, i32 1
  %565 = load i64, ptr %23, align 8, !tbaa !9
  %566 = sub nsw i64 %565, 1
  %567 = load i64, ptr %22, align 8, !tbaa !9
  %568 = sub nsw i64 %567, 1
  %569 = load ptr, ptr %31, align 8, !tbaa !5
  %570 = load i64, ptr %22, align 8, !tbaa !9
  %571 = sub nsw i64 %570, 1
  %572 = load i64, ptr %23, align 8, !tbaa !9
  %573 = sub nsw i64 %572, 1
  %574 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef %564, i64 noundef 0, i64 noundef %566, i64 noundef 0, i64 noundef %568, ptr noundef %569, i64 noundef 0, i64 noundef %571, i64 noundef 0, i64 noundef %573, ptr noundef %574)
  br label %575

575:                                              ; preds = %558, %555
  %576 = load i8, ptr %34, align 1, !tbaa !11, !range !15, !noundef !16
  %577 = trunc i8 %576 to i1
  br i1 %577, label %578, label %589

578:                                              ; preds = %575
  %579 = load ptr, ptr %33, align 8, !tbaa !5
  %580 = load i64, ptr %23, align 8, !tbaa !9
  %581 = load i64, ptr %22, align 8, !tbaa !9
  %582 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %579, i64 noundef %580, i64 noundef %581, ptr noundef %582)
  %583 = load i64, ptr %23, align 8, !tbaa !9
  %584 = load i64, ptr %22, align 8, !tbaa !9
  %585 = load ptr, ptr %37, align 8, !tbaa !5
  %586 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %585, i32 0, i32 1
  %587 = load ptr, ptr %33, align 8, !tbaa !5
  %588 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %583, i64 noundef %584, ptr noundef %586, i64 noundef 0, i64 noundef 0, ptr noundef %587, i64 noundef 0, i64 noundef 0, ptr noundef %588)
  br label %589

589:                                              ; preds = %578, %575
  store i64 0, ptr %40, align 8, !tbaa !9
  br label %590

590:                                              ; preds = %608, %589
  %591 = load i64, ptr %40, align 8, !tbaa !9
  %592 = load i64, ptr %21, align 8, !tbaa !9
  %593 = sub nsw i64 %592, 1
  %594 = icmp sle i64 %591, %593
  br i1 %594, label %595, label %611

595:                                              ; preds = %590
  %596 = load ptr, ptr %37, align 8, !tbaa !5
  %597 = getelementptr inbounds %"struct.alglib_impl::kmeansbuffers", ptr %596, i32 0, i32 2
  %598 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %597, i32 0, i32 4
  %599 = load ptr, ptr %598, align 8, !tbaa !17
  %600 = load i64, ptr %40, align 8, !tbaa !9
  %601 = getelementptr inbounds i64, ptr %599, i64 %600
  %602 = load i64, ptr %601, align 8, !tbaa !9
  %603 = load ptr, ptr %35, align 8, !tbaa !5
  %604 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %603, i32 0, i32 4
  %605 = load ptr, ptr %604, align 8, !tbaa !17
  %606 = load i64, ptr %40, align 8, !tbaa !9
  %607 = getelementptr inbounds i64, ptr %605, i64 %606
  store i64 %602, ptr %607, align 8, !tbaa !9
  br label %608

608:                                              ; preds = %595
  %609 = load i64, ptr %40, align 8, !tbaa !9
  %610 = add nsw i64 %609, 1
  store i64 %610, ptr %40, align 8, !tbaa !9
  br label %590, !llvm.loop !33

611:                                              ; preds = %590
  %612 = load ptr, ptr %38, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %612)
  store i32 0, ptr %52, align 4
  br label %613

613:                                              ; preds = %611, %406, %76
  call void @llvm.lifetime.end.p0(i64 24, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #5
  %614 = load i32, ptr %52, align 4
  switch i32 %614, label %616 [
    i32 0, label %615
    i32 1, label %615
  ]

615:                                              ; preds = %613, %613
  ret void

616:                                              ; preds = %613
  unreachable
}

declare void @_ZN11alglib_impl9hqrndseedEllPNS_10hqrndstateEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL31clustering_selectinitialcentersEPNS_9ae_matrixElllPNS_10hqrndstateElS1_PNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL21clustering_fixcentersEPNS_9ae_matrixEllS1_lPNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare void @_ZN11alglib_impl10copymatrixEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = distinct !{!29, !19}
!30 = distinct !{!30, !19}
!31 = distinct !{!31, !19}
!32 = distinct !{!32, !19}
!33 = distinct !{!33, !19}


; 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.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::hqrndstate" = type { i64, i64, i64 }

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

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

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, i64 noundef %7, i1 noundef zeroext %8, ptr nocapture noundef writeonly %9, ptr noundef %10, ptr noundef %11, i1 noundef zeroext %12, ptr noundef %13, i1 noundef zeroext %14, ptr noundef %15, ptr nocapture noundef %16, ptr noundef %17, ptr noundef %18) local_unnamed_addr #4 {
  %20 = alloca %"struct.alglib_impl::ae_frame", align 8
  %21 = alloca %"struct.alglib_impl::hqrndstate", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %18, ptr noundef nonnull %20)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %21, i8 0, i64 24, i1 false)
  store i64 0, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %11)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %13)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %15)
  store double 0.000000e+00, ptr %16, align 8, !tbaa !9
  call void @_ZN11alglib_impl16_hqrndstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %21, ptr noundef %18, i1 noundef zeroext true)
  %22 = icmp slt i64 %1, %3
  %23 = icmp slt i64 %2, 1
  %or.cond = or i1 %23, %22
  %24 = icmp slt i64 %3, 1
  %or.cond3 = or i1 %24, %or.cond
  %25 = icmp slt i64 %7, 1
  %or.cond5 = or i1 %or.cond3, %25
  br i1 %or.cond5, label %26, label %27

26:                                               ; preds = %19
  store i64 -1, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %._crit_edge352

27:                                               ; preds = %19
  store i64 1, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !5
  %28 = icmp slt i64 %5, 1
  br i1 %28, label %29, label %30

29:                                               ; preds = %27
  call void @_ZN11alglib_impl14hqrndrandomizeEPNS_10hqrndstateEPNS_8ae_stateE(ptr noundef nonnull %21, ptr noundef %18)
  br label %.lr.ph346

30:                                               ; preds = %27
  call void @_ZN11alglib_impl9hqrndseedEllPNS_10hqrndstateEPNS_8ae_stateE(i64 noundef 325355, i64 noundef %5, ptr noundef nonnull %21, ptr noundef %18)
  br label %.lr.ph346

.lr.ph346:                                        ; preds = %29, %30
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %1, ptr noundef %18)
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %17, i64 noundef %3, i64 noundef %2, ptr noundef %18)
  %31 = getelementptr inbounds i8, ptr %17, i64 80
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %31, i64 noundef %3, i64 noundef %2, ptr noundef %18)
  %32 = getelementptr inbounds i8, ptr %17, i64 224
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %32, i64 noundef %1, ptr noundef %18)
  %33 = getelementptr inbounds i8, ptr %17, i64 160
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %33, i64 noundef %1, ptr noundef %18)
  %34 = getelementptr inbounds i8, ptr %17, i64 288
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %34, i64 noundef %1, ptr noundef %18)
  %35 = getelementptr inbounds i8, ptr %17, i64 352
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %35, i64 noundef %3, ptr noundef %18)
  store double 1.000000e+300, ptr %16, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %17, i64 416
  %37 = getelementptr inbounds i8, ptr %17, i64 1152
  %.not262.not289 = icmp sgt i64 %1, 0
  %38 = getelementptr inbounds i8, ptr %15, i64 56
  %39 = icmp ne i64 %6, 0
  %40 = getelementptr inbounds i8, ptr %17, i64 280
  %41 = getelementptr inbounds i8, ptr %17, i64 408
  %42 = getelementptr inbounds i8, ptr %17, i64 72
  %43 = getelementptr inbounds i8, ptr %0, i64 72
  %44 = add nsw i64 %2, -1
  %45 = icmp sgt i64 %6, -1
  %46 = getelementptr inbounds i8, ptr %17, i64 344
  %47 = add nsw i64 %3, -1
  %48 = getelementptr inbounds i8, ptr %17, i64 216
  br i1 %8, label %.lr.ph346.split.us.preheader, label %.preheader284.preheader

.preheader284.preheader:                          ; preds = %.lr.ph346
  %49 = add i64 %1, -1
  %50 = add nsw i64 %3, -1
  %51 = add nsw i64 %2, -1
  %xtraiter = and i64 %1, 3
  %52 = icmp ult i64 %49, 3
  %unroll_iter = and i64 %1, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter402 = and i64 %1, 3
  %53 = icmp ult i64 %49, 3
  %unroll_iter405 = and i64 %1, 9223372036854775804
  %lcmp.mod404.not = icmp eq i64 %xtraiter402, 0
  %xtraiter407 = and i64 %1, 1
  %54 = icmp eq i64 %49, 0
  %unroll_iter411 = and i64 %1, 9223372036854775806
  %lcmp.mod409.not = icmp eq i64 %xtraiter407, 0
  %xtraiter413 = and i64 %3, 3
  %55 = icmp ult i64 %50, 3
  %unroll_iter416 = and i64 %3, 9223372036854775804
  %lcmp.mod415.not = icmp eq i64 %xtraiter413, 0
  %xtraiter418 = and i64 %2, 3
  %56 = icmp ult i64 %51, 3
  %unroll_iter421 = and i64 %2, 9223372036854775804
  %lcmp.mod420.not = icmp eq i64 %xtraiter418, 0
  %xtraiter424 = and i64 %2, 3
  %57 = icmp ult i64 %51, 3
  %unroll_iter428 = and i64 %2, 9223372036854775804
  %lcmp.mod426.not = icmp eq i64 %xtraiter424, 0
  %xtraiter430 = and i64 %1, 3
  %58 = icmp ult i64 %49, 3
  %unroll_iter433 = and i64 %1, 9223372036854775804
  %lcmp.mod432.not = icmp eq i64 %xtraiter430, 0
  br label %.preheader284

.lr.ph346.split.us.preheader:                     ; preds = %.lr.ph346
  %59 = add i64 %1, -1
  %xtraiter436 = and i64 %1, 7
  %60 = icmp ult i64 %59, 7
  %unroll_iter440 = and i64 %1, 9223372036854775800
  %lcmp.mod438.not = icmp eq i64 %xtraiter436, 0
  %xtraiter442 = and i64 %1, 3
  %61 = icmp ult i64 %59, 3
  %unroll_iter445 = and i64 %1, 9223372036854775804
  %lcmp.mod444.not = icmp eq i64 %xtraiter442, 0
  br label %.lr.ph346.split.us

.lr.ph346.split.us:                               ; preds = %.lr.ph346.split.us.preheader, %.loopexit.us
  %.0239344.us = phi i64 [ %69, %.loopexit.us ], [ 1, %.lr.ph346.split.us.preheader ]
  call void @_ZN11alglib_implL31clustering_selectinitialcentersEPNS_9ae_matrixElllPNS_10hqrndstateElS1_PNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %4, ptr noundef nonnull %21, i64 noundef %3, ptr noundef %17, ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef %18)
  call void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef 0, i64 noundef %1, i64 noundef %2, ptr noundef %17, i64 noundef 0, i64 noundef %3, ptr noundef %15, ptr noundef nonnull %34, ptr noundef nonnull %37, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph337.us, label %.loopexit280.us

62:                                               ; preds = %.loopexit280.us
  store double %.2247.lcssa.us, ptr %16, align 8, !tbaa !9
  call void @_ZN11alglib_impl10copymatrixEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef %17, i64 noundef 0, i64 noundef %47, i64 noundef 0, i64 noundef %44, ptr noundef nonnull %31, i64 noundef 0, i64 noundef %47, i64 noundef 0, i64 noundef %44, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph342.us.preheader, label %.loopexit.us

.lr.ph342.us.preheader:                           ; preds = %62
  br i1 %61, label %.loopexit.us.loopexit.unr-lcssa, label %.lr.ph342.us

.loopexit.us.loopexit.unr-lcssa:                  ; preds = %.lr.ph342.us, %.lr.ph342.us.preheader
  %.7340.us.unr = phi i64 [ 0, %.lr.ph342.us.preheader ], [ %93, %.lr.ph342.us ]
  br i1 %lcmp.mod444.not, label %.loopexit.us, label %.lr.ph342.us.epil

.lr.ph342.us.epil:                                ; preds = %.loopexit.us.loopexit.unr-lcssa, %.lr.ph342.us.epil
  %.7340.us.epil = phi i64 [ %68, %.lr.ph342.us.epil ], [ %.7340.us.unr, %.loopexit.us.loopexit.unr-lcssa ]
  %epil.iter443 = phi i64 [ %epil.iter443.next, %.lr.ph342.us.epil ], [ 0, %.loopexit.us.loopexit.unr-lcssa ]
  %63 = load ptr, ptr %38, align 8, !tbaa !11
  %64 = getelementptr inbounds i64, ptr %63, i64 %.7340.us.epil
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = load ptr, ptr %48, align 8, !tbaa !11
  %67 = getelementptr inbounds i64, ptr %66, i64 %.7340.us.epil
  store i64 %65, ptr %67, align 8, !tbaa !5
  %68 = add nuw nsw i64 %.7340.us.epil, 1
  %epil.iter443.next = add i64 %epil.iter443, 1
  %epil.iter443.cmp.not = icmp eq i64 %epil.iter443.next, %xtraiter442
  br i1 %epil.iter443.cmp.not, label %.loopexit.us, label %.lr.ph342.us.epil, !llvm.loop !12

.loopexit.us:                                     ; preds = %.loopexit.us.loopexit.unr-lcssa, %.lr.ph342.us.epil, %62, %.loopexit280.us
  %69 = add nuw i64 %.0239344.us, 1
  %exitcond381.not = icmp eq i64 %.0239344.us, %7
  br i1 %exitcond381.not, label %._crit_edge347, label %.lr.ph346.split.us, !llvm.loop !14

.lr.ph342.us:                                     ; preds = %.lr.ph342.us.preheader, %.lr.ph342.us
  %.7340.us = phi i64 [ %93, %.lr.ph342.us ], [ 0, %.lr.ph342.us.preheader ]
  %niter446 = phi i64 [ %niter446.next.3, %.lr.ph342.us ], [ 0, %.lr.ph342.us.preheader ]
  %70 = load ptr, ptr %38, align 8, !tbaa !11
  %71 = getelementptr inbounds i64, ptr %70, i64 %.7340.us
  %72 = load i64, ptr %71, align 8, !tbaa !5
  %73 = load ptr, ptr %48, align 8, !tbaa !11
  %74 = getelementptr inbounds i64, ptr %73, i64 %.7340.us
  store i64 %72, ptr %74, align 8, !tbaa !5
  %75 = or disjoint i64 %.7340.us, 1
  %76 = load ptr, ptr %38, align 8, !tbaa !11
  %77 = getelementptr inbounds i64, ptr %76, i64 %75
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = load ptr, ptr %48, align 8, !tbaa !11
  %80 = getelementptr inbounds i64, ptr %79, i64 %75
  store i64 %78, ptr %80, align 8, !tbaa !5
  %81 = or disjoint i64 %.7340.us, 2
  %82 = load ptr, ptr %38, align 8, !tbaa !11
  %83 = getelementptr inbounds i64, ptr %82, i64 %81
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = load ptr, ptr %48, align 8, !tbaa !11
  %86 = getelementptr inbounds i64, ptr %85, i64 %81
  store i64 %84, ptr %86, align 8, !tbaa !5
  %87 = or disjoint i64 %.7340.us, 3
  %88 = load ptr, ptr %38, align 8, !tbaa !11
  %89 = getelementptr inbounds i64, ptr %88, i64 %87
  %90 = load i64, ptr %89, align 8, !tbaa !5
  %91 = load ptr, ptr %48, align 8, !tbaa !11
  %92 = getelementptr inbounds i64, ptr %91, i64 %87
  store i64 %90, ptr %92, align 8, !tbaa !5
  %93 = add nuw nsw i64 %.7340.us, 4
  %niter446.next.3 = add i64 %niter446, 4
  %niter446.ncmp.3 = icmp eq i64 %niter446.next.3, %unroll_iter445
  br i1 %niter446.ncmp.3, label %.loopexit.us.loopexit.unr-lcssa, label %.lr.ph342.us, !llvm.loop !16

.lr.ph337.us.new:                                 ; preds = %.lr.ph337.us, %.lr.ph337.us.new
  %.6335.us = phi i64 [ %125, %.lr.ph337.us.new ], [ 0, %.lr.ph337.us ]
  %.2247334.us = phi double [ %124, %.lr.ph337.us.new ], [ 0.000000e+00, %.lr.ph337.us ]
  %niter441 = phi i64 [ %niter441.next.7, %.lr.ph337.us.new ], [ 0, %.lr.ph337.us ]
  %94 = getelementptr inbounds double, ptr %132, i64 %.6335.us
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = fadd double %.2247334.us, %95
  %97 = or disjoint i64 %.6335.us, 1
  %98 = getelementptr inbounds double, ptr %132, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !9
  %100 = fadd double %96, %99
  %101 = or disjoint i64 %.6335.us, 2
  %102 = getelementptr inbounds double, ptr %132, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !9
  %104 = fadd double %100, %103
  %105 = or disjoint i64 %.6335.us, 3
  %106 = getelementptr inbounds double, ptr %132, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = fadd double %104, %107
  %109 = or disjoint i64 %.6335.us, 4
  %110 = getelementptr inbounds double, ptr %132, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !9
  %112 = fadd double %108, %111
  %113 = or disjoint i64 %.6335.us, 5
  %114 = getelementptr inbounds double, ptr %132, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = fadd double %112, %115
  %117 = or disjoint i64 %.6335.us, 6
  %118 = getelementptr inbounds double, ptr %132, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !9
  %120 = fadd double %116, %119
  %121 = or disjoint i64 %.6335.us, 7
  %122 = getelementptr inbounds double, ptr %132, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = fadd double %120, %123
  %125 = add nuw nsw i64 %.6335.us, 8
  %niter441.next.7 = add i64 %niter441, 8
  %niter441.ncmp.7 = icmp eq i64 %niter441.next.7, %unroll_iter440
  br i1 %niter441.ncmp.7, label %.loopexit280.us.loopexit.unr-lcssa, label %.lr.ph337.us.new, !llvm.loop !17

.loopexit280.us.loopexit.unr-lcssa:               ; preds = %.lr.ph337.us.new, %.lr.ph337.us
  %.lcssa.ph = phi double [ poison, %.lr.ph337.us ], [ %124, %.lr.ph337.us.new ]
  %.6335.us.unr = phi i64 [ 0, %.lr.ph337.us ], [ %125, %.lr.ph337.us.new ]
  %.2247334.us.unr = phi double [ 0.000000e+00, %.lr.ph337.us ], [ %124, %.lr.ph337.us.new ]
  br i1 %lcmp.mod438.not, label %.loopexit280.us, label %.epil.preheader435

.epil.preheader435:                               ; preds = %.loopexit280.us.loopexit.unr-lcssa, %.epil.preheader435
  %.6335.us.epil = phi i64 [ %129, %.epil.preheader435 ], [ %.6335.us.unr, %.loopexit280.us.loopexit.unr-lcssa ]
  %.2247334.us.epil = phi double [ %128, %.epil.preheader435 ], [ %.2247334.us.unr, %.loopexit280.us.loopexit.unr-lcssa ]
  %epil.iter437 = phi i64 [ %epil.iter437.next, %.epil.preheader435 ], [ 0, %.loopexit280.us.loopexit.unr-lcssa ]
  %126 = getelementptr inbounds double, ptr %132, i64 %.6335.us.epil
  %127 = load double, ptr %126, align 8, !tbaa !9
  %128 = fadd double %.2247334.us.epil, %127
  %129 = add nuw nsw i64 %.6335.us.epil, 1
  %epil.iter437.next = add i64 %epil.iter437, 1
  %epil.iter437.cmp.not = icmp eq i64 %epil.iter437.next, %xtraiter436
  br i1 %epil.iter437.cmp.not, label %.loopexit280.us, label %.epil.preheader435, !llvm.loop !18

.loopexit280.us:                                  ; preds = %.loopexit280.us.loopexit.unr-lcssa, %.epil.preheader435, %.lr.ph346.split.us
  %.2247.lcssa.us = phi double [ 0.000000e+00, %.lr.ph346.split.us ], [ %.lcssa.ph, %.loopexit280.us.loopexit.unr-lcssa ], [ %128, %.epil.preheader435 ]
  %130 = load double, ptr %16, align 8, !tbaa !9
  %131 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %.2247.lcssa.us, double noundef %130)
  br i1 %131, label %62, label %.loopexit.us

.lr.ph337.us:                                     ; preds = %.lr.ph346.split.us
  %132 = load ptr, ptr %46, align 8, !tbaa !11
  br i1 %60, label %.loopexit280.us.loopexit.unr-lcssa, label %.lr.ph337.us.new

.preheader284:                                    ; preds = %.preheader284.preheader, %.loopexit
  %.0239344 = phi i64 [ %367, %.loopexit ], [ 1, %.preheader284.preheader ]
  call void @_ZN11alglib_implL31clustering_selectinitialcentersEPNS_9ae_matrixElllPNS_10hqrndstateElS1_PNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %4, ptr noundef nonnull %21, i64 noundef %3, ptr noundef %17, ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph.preheader, label %.preheader281

.lr.ph.preheader:                                 ; preds = %.preheader284
  br i1 %52, label %.preheader281.loopexit.unr-lcssa, label %.lr.ph

.preheader281.loopexit.unr-lcssa:                 ; preds = %.lr.ph, %.lr.ph.preheader
  %.0242290.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %147, %.lr.ph ]
  br i1 %lcmp.mod.not, label %.preheader281, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader281.loopexit.unr-lcssa, %.lr.ph.epil
  %.0242290.epil = phi i64 [ %135, %.lr.ph.epil ], [ %.0242290.unr, %.preheader281.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader281.loopexit.unr-lcssa ]
  %133 = load ptr, ptr %38, align 8, !tbaa !11
  %134 = getelementptr inbounds i64, ptr %133, i64 %.0242290.epil
  store i64 -1, ptr %134, align 8, !tbaa !5
  %135 = add nuw nsw i64 %.0242290.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader281, label %.lr.ph.epil, !llvm.loop !19

.preheader281:                                    ; preds = %.preheader281.loopexit.unr-lcssa, %.lr.ph.epil, %.preheader284
  br i1 %45, label %.outer.split, label %.loopexit282

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.0242290 = phi i64 [ %147, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %136 = load ptr, ptr %38, align 8, !tbaa !11
  %137 = getelementptr inbounds i64, ptr %136, i64 %.0242290
  store i64 -1, ptr %137, align 8, !tbaa !5
  %138 = or disjoint i64 %.0242290, 1
  %139 = load ptr, ptr %38, align 8, !tbaa !11
  %140 = getelementptr inbounds i64, ptr %139, i64 %138
  store i64 -1, ptr %140, align 8, !tbaa !5
  %141 = or disjoint i64 %.0242290, 2
  %142 = load ptr, ptr %38, align 8, !tbaa !11
  %143 = getelementptr inbounds i64, ptr %142, i64 %141
  store i64 -1, ptr %143, align 8, !tbaa !5
  %144 = or disjoint i64 %.0242290, 3
  %145 = load ptr, ptr %38, align 8, !tbaa !11
  %146 = getelementptr inbounds i64, ptr %145, i64 %144
  store i64 -1, ptr %146, align 8, !tbaa !5
  %147 = add nuw nsw i64 %.0242290, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader281.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !20

148:                                              ; preds = %.outer.split, %._crit_edge315.thread
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph293.preheader, label %._crit_edge.thread

.lr.ph293.preheader:                              ; preds = %148
  br i1 %53, label %._crit_edge.unr-lcssa, label %.lr.ph293

._crit_edge.thread:                               ; preds = %148
  call void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef 0, i64 noundef %1, i64 noundef %2, ptr noundef %17, i64 noundef 0, i64 noundef %3, ptr noundef %15, ptr noundef nonnull %34, ptr noundef nonnull %37, ptr noundef %18)
  br label %.lr.ph301.preheader

.lr.ph293:                                        ; preds = %.lr.ph293.preheader, %.lr.ph293
  %.1292 = phi i64 [ %172, %.lr.ph293 ], [ 0, %.lr.ph293.preheader ]
  %niter406 = phi i64 [ %niter406.next.3, %.lr.ph293 ], [ 0, %.lr.ph293.preheader ]
  %149 = load ptr, ptr %38, align 8, !tbaa !11
  %150 = getelementptr inbounds i64, ptr %149, i64 %.1292
  %151 = load i64, ptr %150, align 8, !tbaa !5
  %152 = load ptr, ptr %40, align 8, !tbaa !11
  %153 = getelementptr inbounds i64, ptr %152, i64 %.1292
  store i64 %151, ptr %153, align 8, !tbaa !5
  %154 = or disjoint i64 %.1292, 1
  %155 = load ptr, ptr %38, align 8, !tbaa !11
  %156 = getelementptr inbounds i64, ptr %155, i64 %154
  %157 = load i64, ptr %156, align 8, !tbaa !5
  %158 = load ptr, ptr %40, align 8, !tbaa !11
  %159 = getelementptr inbounds i64, ptr %158, i64 %154
  store i64 %157, ptr %159, align 8, !tbaa !5
  %160 = or disjoint i64 %.1292, 2
  %161 = load ptr, ptr %38, align 8, !tbaa !11
  %162 = getelementptr inbounds i64, ptr %161, i64 %160
  %163 = load i64, ptr %162, align 8, !tbaa !5
  %164 = load ptr, ptr %40, align 8, !tbaa !11
  %165 = getelementptr inbounds i64, ptr %164, i64 %160
  store i64 %163, ptr %165, align 8, !tbaa !5
  %166 = or disjoint i64 %.1292, 3
  %167 = load ptr, ptr %38, align 8, !tbaa !11
  %168 = getelementptr inbounds i64, ptr %167, i64 %166
  %169 = load i64, ptr %168, align 8, !tbaa !5
  %170 = load ptr, ptr %40, align 8, !tbaa !11
  %171 = getelementptr inbounds i64, ptr %170, i64 %166
  store i64 %169, ptr %171, align 8, !tbaa !5
  %172 = add nuw nsw i64 %.1292, 4
  %niter406.next.3 = add i64 %niter406, 4
  %niter406.ncmp.3 = icmp eq i64 %niter406.next.3, %unroll_iter405
  br i1 %niter406.ncmp.3, label %._crit_edge.unr-lcssa, label %.lr.ph293, !llvm.loop !21

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph293, %.lr.ph293.preheader
  %.1292.unr = phi i64 [ 0, %.lr.ph293.preheader ], [ %172, %.lr.ph293 ]
  br i1 %lcmp.mod404.not, label %._crit_edge, label %.lr.ph293.epil

.lr.ph293.epil:                                   ; preds = %._crit_edge.unr-lcssa, %.lr.ph293.epil
  %.1292.epil = phi i64 [ %178, %.lr.ph293.epil ], [ %.1292.unr, %._crit_edge.unr-lcssa ]
  %epil.iter403 = phi i64 [ %epil.iter403.next, %.lr.ph293.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %173 = load ptr, ptr %38, align 8, !tbaa !11
  %174 = getelementptr inbounds i64, ptr %173, i64 %.1292.epil
  %175 = load i64, ptr %174, align 8, !tbaa !5
  %176 = load ptr, ptr %40, align 8, !tbaa !11
  %177 = getelementptr inbounds i64, ptr %176, i64 %.1292.epil
  store i64 %175, ptr %177, align 8, !tbaa !5
  %178 = add nuw nsw i64 %.1292.epil, 1
  %epil.iter403.next = add i64 %epil.iter403, 1
  %epil.iter403.cmp.not = icmp eq i64 %epil.iter403.next, %xtraiter402
  br i1 %epil.iter403.cmp.not, label %._crit_edge, label %.lr.ph293.epil, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph293.epil, %._crit_edge.unr-lcssa
  call void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef 0, i64 noundef %1, i64 noundef %2, ptr noundef nonnull %17, i64 noundef 0, i64 noundef %3, ptr noundef nonnull %15, ptr noundef nonnull %34, ptr noundef nonnull %37, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph298.preheader, label %.lr.ph301.preheader

.lr.ph298.preheader:                              ; preds = %._crit_edge
  br i1 %54, label %.lr.ph301.preheader.loopexit.unr-lcssa, label %.lr.ph298

.lr.ph301.preheader.loopexit.unr-lcssa:           ; preds = %.critedge, %.lr.ph298.preheader
  %.lcssa397.ph = phi i1 [ poison, %.lr.ph298.preheader ], [ %203, %.critedge ]
  %.0241296.unr = phi i1 [ false, %.lr.ph298.preheader ], [ %203, %.critedge ]
  %.2295.unr = phi i64 [ 0, %.lr.ph298.preheader ], [ %204, %.critedge ]
  %brmerge = select i1 %lcmp.mod409.not, i1 true, i1 %.0241296.unr
  %.lcssa397.ph.mux = select i1 %lcmp.mod409.not, i1 %.lcssa397.ph, i1 true
  br i1 %brmerge, label %.lr.ph301.preheader, label %179

179:                                              ; preds = %.lr.ph301.preheader.loopexit.unr-lcssa
  %180 = load ptr, ptr %38, align 8, !tbaa !11
  %181 = getelementptr inbounds i64, ptr %180, i64 %.2295.unr
  %182 = load i64, ptr %181, align 8, !tbaa !5
  %183 = load ptr, ptr %40, align 8, !tbaa !11
  %184 = getelementptr inbounds i64, ptr %183, i64 %.2295.unr
  %185 = load i64, ptr %184, align 8, !tbaa !5
  %186 = icmp ne i64 %182, %185
  br label %.lr.ph301.preheader

.lr.ph301.preheader:                              ; preds = %.lr.ph301.preheader.loopexit.unr-lcssa, %179, %._crit_edge, %._crit_edge.thread
  %.0241.lcssa = phi i1 [ false, %._crit_edge ], [ false, %._crit_edge.thread ], [ %.lcssa397.ph.mux, %.lr.ph301.preheader.loopexit.unr-lcssa ], [ %186, %179 ]
  br i1 %55, label %.preheader.us.preheader.unr-lcssa, label %.lr.ph301

.lr.ph298:                                        ; preds = %.lr.ph298.preheader, %.critedge
  %.0241296 = phi i1 [ %203, %.critedge ], [ false, %.lr.ph298.preheader ]
  %.2295 = phi i64 [ %204, %.critedge ], [ 0, %.lr.ph298.preheader ]
  %niter412 = phi i64 [ %niter412.next.1, %.critedge ], [ 0, %.lr.ph298.preheader ]
  br i1 %.0241296, label %.critedge, label %.lr.ph298.1

.lr.ph298.1:                                      ; preds = %.lr.ph298
  %187 = load ptr, ptr %38, align 8, !tbaa !11
  %188 = getelementptr inbounds i64, ptr %187, i64 %.2295
  %189 = load i64, ptr %188, align 8, !tbaa !5
  %190 = load ptr, ptr %40, align 8, !tbaa !11
  %191 = getelementptr inbounds i64, ptr %190, i64 %.2295
  %192 = load i64, ptr %191, align 8, !tbaa !5
  %193 = icmp ne i64 %189, %192
  br i1 %193, label %.critedge, label %194

194:                                              ; preds = %.lr.ph298.1
  %195 = or disjoint i64 %.2295, 1
  %196 = load ptr, ptr %38, align 8, !tbaa !11
  %197 = getelementptr inbounds i64, ptr %196, i64 %195
  %198 = load i64, ptr %197, align 8, !tbaa !5
  %199 = load ptr, ptr %40, align 8, !tbaa !11
  %200 = getelementptr inbounds i64, ptr %199, i64 %195
  %201 = load i64, ptr %200, align 8, !tbaa !5
  %202 = icmp ne i64 %198, %201
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph298, %194, %.lr.ph298.1
  %203 = phi i1 [ true, %.lr.ph298.1 ], [ %202, %194 ], [ true, %.lr.ph298 ]
  %204 = add nuw nsw i64 %.2295, 2
  %niter412.next.1 = add i64 %niter412, 2
  %niter412.ncmp.1 = icmp eq i64 %niter412.next.1, %unroll_iter411
  br i1 %niter412.ncmp.1, label %.lr.ph301.preheader.loopexit.unr-lcssa, label %.lr.ph298, !llvm.loop !23

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge305.us
  %.3307.us = phi i64 [ %230, %._crit_edge305.us ], [ 0, %.preheader.us.preheader ]
  br i1 %56, label %._crit_edge305.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.1250303.us = phi i64 [ %224, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter422 = phi i64 [ %niter422.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %205 = load ptr, ptr %42, align 8, !tbaa !11
  %206 = getelementptr inbounds ptr, ptr %205, i64 %.3307.us
  %207 = load ptr, ptr %206, align 8, !tbaa !24
  %208 = getelementptr inbounds double, ptr %207, i64 %.1250303.us
  store double 0.000000e+00, ptr %208, align 8, !tbaa !9
  %209 = or disjoint i64 %.1250303.us, 1
  %210 = load ptr, ptr %42, align 8, !tbaa !11
  %211 = getelementptr inbounds ptr, ptr %210, i64 %.3307.us
  %212 = load ptr, ptr %211, align 8, !tbaa !24
  %213 = getelementptr inbounds double, ptr %212, i64 %209
  store double 0.000000e+00, ptr %213, align 8, !tbaa !9
  %214 = or disjoint i64 %.1250303.us, 2
  %215 = load ptr, ptr %42, align 8, !tbaa !11
  %216 = getelementptr inbounds ptr, ptr %215, i64 %.3307.us
  %217 = load ptr, ptr %216, align 8, !tbaa !24
  %218 = getelementptr inbounds double, ptr %217, i64 %214
  store double 0.000000e+00, ptr %218, align 8, !tbaa !9
  %219 = or disjoint i64 %.1250303.us, 3
  %220 = load ptr, ptr %42, align 8, !tbaa !11
  %221 = getelementptr inbounds ptr, ptr %220, i64 %.3307.us
  %222 = load ptr, ptr %221, align 8, !tbaa !24
  %223 = getelementptr inbounds double, ptr %222, i64 %219
  store double 0.000000e+00, ptr %223, align 8, !tbaa !9
  %224 = add nuw nsw i64 %.1250303.us, 4
  %niter422.next.3 = add i64 %niter422, 4
  %niter422.ncmp.3 = icmp eq i64 %niter422.next.3, %unroll_iter421
  br i1 %niter422.ncmp.3, label %._crit_edge305.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !26

._crit_edge305.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.1250303.us.unr = phi i64 [ 0, %.preheader.us ], [ %224, %.preheader.us.new ]
  br i1 %lcmp.mod420.not, label %._crit_edge305.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge305.us.unr-lcssa, %.epil.preheader
  %.1250303.us.epil = phi i64 [ %229, %.epil.preheader ], [ %.1250303.us.unr, %._crit_edge305.us.unr-lcssa ]
  %epil.iter419 = phi i64 [ %epil.iter419.next, %.epil.preheader ], [ 0, %._crit_edge305.us.unr-lcssa ]
  %225 = load ptr, ptr %42, align 8, !tbaa !11
  %226 = getelementptr inbounds ptr, ptr %225, i64 %.3307.us
  %227 = load ptr, ptr %226, align 8, !tbaa !24
  %228 = getelementptr inbounds double, ptr %227, i64 %.1250303.us.epil
  store double 0.000000e+00, ptr %228, align 8, !tbaa !9
  %229 = add nuw nsw i64 %.1250303.us.epil, 1
  %epil.iter419.next = add i64 %epil.iter419, 1
  %epil.iter419.cmp.not = icmp eq i64 %epil.iter419.next, %xtraiter418
  br i1 %epil.iter419.cmp.not, label %._crit_edge305.us, label %.epil.preheader, !llvm.loop !27

._crit_edge305.us:                                ; preds = %.epil.preheader, %._crit_edge305.us.unr-lcssa
  %230 = add nuw nsw i64 %.3307.us, 1
  %exitcond372.not = icmp eq i64 %230, %3
  br i1 %exitcond372.not, label %.preheader277, label %.preheader.us, !llvm.loop !28

.lr.ph301:                                        ; preds = %.lr.ph301.preheader, %.lr.ph301
  %.0249300 = phi i64 [ %242, %.lr.ph301 ], [ 0, %.lr.ph301.preheader ]
  %niter417 = phi i64 [ %niter417.next.3, %.lr.ph301 ], [ 0, %.lr.ph301.preheader ]
  %231 = load ptr, ptr %41, align 8, !tbaa !11
  %232 = getelementptr inbounds i64, ptr %231, i64 %.0249300
  store i64 0, ptr %232, align 8, !tbaa !5
  %233 = or disjoint i64 %.0249300, 1
  %234 = load ptr, ptr %41, align 8, !tbaa !11
  %235 = getelementptr inbounds i64, ptr %234, i64 %233
  store i64 0, ptr %235, align 8, !tbaa !5
  %236 = or disjoint i64 %.0249300, 2
  %237 = load ptr, ptr %41, align 8, !tbaa !11
  %238 = getelementptr inbounds i64, ptr %237, i64 %236
  store i64 0, ptr %238, align 8, !tbaa !5
  %239 = or disjoint i64 %.0249300, 3
  %240 = load ptr, ptr %41, align 8, !tbaa !11
  %241 = getelementptr inbounds i64, ptr %240, i64 %239
  store i64 0, ptr %241, align 8, !tbaa !5
  %242 = add nuw nsw i64 %.0249300, 4
  %niter417.next.3 = add i64 %niter417, 4
  %niter417.ncmp.3 = icmp eq i64 %niter417.next.3, %unroll_iter416
  br i1 %niter417.ncmp.3, label %.preheader.us.preheader.unr-lcssa, label %.lr.ph301, !llvm.loop !29

.preheader.us.preheader.unr-lcssa:                ; preds = %.lr.ph301, %.lr.ph301.preheader
  %.0249300.unr = phi i64 [ 0, %.lr.ph301.preheader ], [ %242, %.lr.ph301 ]
  br i1 %lcmp.mod415.not, label %.preheader.us.preheader, label %.lr.ph301.epil

.lr.ph301.epil:                                   ; preds = %.preheader.us.preheader.unr-lcssa, %.lr.ph301.epil
  %.0249300.epil = phi i64 [ %245, %.lr.ph301.epil ], [ %.0249300.unr, %.preheader.us.preheader.unr-lcssa ]
  %epil.iter414 = phi i64 [ %epil.iter414.next, %.lr.ph301.epil ], [ 0, %.preheader.us.preheader.unr-lcssa ]
  %243 = load ptr, ptr %41, align 8, !tbaa !11
  %244 = getelementptr inbounds i64, ptr %243, i64 %.0249300.epil
  store i64 0, ptr %244, align 8, !tbaa !5
  %245 = add nuw nsw i64 %.0249300.epil, 1
  %epil.iter414.next = add i64 %epil.iter414, 1
  %epil.iter414.cmp.not = icmp eq i64 %epil.iter414.next, %xtraiter413
  br i1 %epil.iter414.cmp.not, label %.preheader.us.preheader, label %.lr.ph301.epil, !llvm.loop !30

.preheader.us.preheader:                          ; preds = %.lr.ph301.epil, %.preheader.us.preheader.unr-lcssa
  br label %.preheader.us

.preheader277:                                    ; preds = %._crit_edge305.us
  br i1 %.not262.not289, label %.lr.ph310, label %.lr.ph314.preheader

.lr.ph310:                                        ; preds = %.preheader277, %.lr.ph310
  %.4309 = phi i64 [ %263, %.lr.ph310 ], [ 0, %.preheader277 ]
  %246 = load ptr, ptr %41, align 8, !tbaa !11
  %247 = load ptr, ptr %38, align 8, !tbaa !11
  %248 = getelementptr inbounds i64, ptr %247, i64 %.4309
  %249 = load i64, ptr %248, align 8, !tbaa !5
  %250 = getelementptr inbounds i64, ptr %246, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !5
  %252 = add nsw i64 %251, 1
  store i64 %252, ptr %250, align 8, !tbaa !5
  %253 = load ptr, ptr %42, align 8, !tbaa !11
  %254 = load ptr, ptr %38, align 8, !tbaa !11
  %255 = getelementptr inbounds i64, ptr %254, i64 %.4309
  %256 = load i64, ptr %255, align 8, !tbaa !5
  %257 = getelementptr inbounds ptr, ptr %253, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !24
  %259 = load ptr, ptr %43, align 8, !tbaa !11
  %260 = getelementptr inbounds ptr, ptr %259, i64 %.4309
  %261 = load ptr, ptr %260, align 8, !tbaa !24
  %262 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %44)
  call void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef %258, i64 noundef 1, ptr noundef %261, i64 noundef 1, i64 noundef %262)
  %263 = add nuw nsw i64 %.4309, 1
  %exitcond373.not = icmp eq i64 %263, %1
  br i1 %exitcond373.not, label %.lr.ph314.preheader, label %.lr.ph310, !llvm.loop !31

.lr.ph314.preheader:                              ; preds = %.lr.ph310, %.preheader277
  br label %.lr.ph314

.lr.ph314:                                        ; preds = %.lr.ph314.backedge, %.lr.ph314.preheader
  %.0240313 = phi i1 [ false, %.lr.ph314.preheader ], [ %.0240313.be, %.lr.ph314.backedge ]
  %.2251312 = phi i64 [ 0, %.lr.ph314.preheader ], [ %.2251312.be, %.lr.ph314.backedge ]
  %264 = load ptr, ptr %41, align 8, !tbaa !11
  %265 = getelementptr inbounds i64, ptr %264, i64 %.2251312
  %266 = load i64, ptr %265, align 8, !tbaa !5
  %.not271 = icmp eq i64 %266, 0
  br i1 %.not271, label %274, label %267

267:                                              ; preds = %.lr.ph314
  %268 = sitofp i64 %266 to double
  %269 = fdiv double 1.000000e+00, %268
  %270 = load ptr, ptr %42, align 8, !tbaa !11
  %271 = getelementptr inbounds ptr, ptr %270, i64 %.2251312
  %272 = load ptr, ptr %271, align 8, !tbaa !24
  %273 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %44)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %272, i64 noundef 1, i64 noundef %273, double noundef %269)
  br label %274

274:                                              ; preds = %267, %.lr.ph314
  br i1 %.0240313, label %.thread, label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %41, align 8, !tbaa !11
  %277 = getelementptr inbounds i64, ptr %276, i64 %.2251312
  %278 = load i64, ptr %277, align 8, !tbaa !5
  %279 = icmp eq i64 %278, 0
  %280 = add nuw nsw i64 %.2251312, 1
  %exitcond374.not = icmp eq i64 %280, %3
  br i1 %exitcond374.not, label %._crit_edge315, label %.lr.ph314.backedge

.lr.ph314.backedge:                               ; preds = %275, %.thread
  %.0240313.be = phi i1 [ %279, %275 ], [ true, %.thread ]
  %.2251312.be = phi i64 [ %280, %275 ], [ %281, %.thread ]
  br label %.lr.ph314, !llvm.loop !32

.thread:                                          ; preds = %274
  %281 = add nuw nsw i64 %.2251312, 1
  %exitcond374.not383 = icmp eq i64 %281, %3
  br i1 %exitcond374.not383, label %._crit_edge315.thread, label %.lr.ph314.backedge

._crit_edge315:                                   ; preds = %275
  br i1 %279, label %._crit_edge315.thread, label %.preheader275

.preheader275:                                    ; preds = %._crit_edge315
  %282 = add nuw nsw i64 %.0.ph331, 1
  br i1 %.not262.not289, label %.lr.ph327, label %._crit_edge328

.lr.ph327:                                        ; preds = %.preheader275
  %283 = load ptr, ptr %38, align 8, !tbaa !11
  %284 = load ptr, ptr %43, align 8, !tbaa !11
  %285 = load ptr, ptr %42, align 8, !tbaa !11
  br label %.lr.ph321.us

.lr.ph321.us:                                     ; preds = %._crit_edge322.us, %.lr.ph327
  %.5326.us = phi i64 [ 0, %.lr.ph327 ], [ %328, %._crit_edge322.us ]
  %.1246325.us = phi double [ 0.000000e+00, %.lr.ph327 ], [ %327, %._crit_edge322.us ]
  %286 = getelementptr inbounds i64, ptr %283, i64 %.5326.us
  %287 = load i64, ptr %286, align 8, !tbaa !5
  %288 = getelementptr inbounds ptr, ptr %284, i64 %.5326.us
  %289 = load ptr, ptr %288, align 8, !tbaa !24
  %290 = getelementptr inbounds ptr, ptr %285, i64 %287
  %291 = load ptr, ptr %290, align 8, !tbaa !24
  br i1 %57, label %._crit_edge322.us.unr-lcssa, label %.lr.ph321.us.new

.lr.ph321.us.new:                                 ; preds = %.lr.ph321.us, %.lr.ph321.us.new
  %.0243319.us = phi double [ %318, %.lr.ph321.us.new ], [ 0.000000e+00, %.lr.ph321.us ]
  %.3252318.us = phi i64 [ %319, %.lr.ph321.us.new ], [ 0, %.lr.ph321.us ]
  %niter429 = phi i64 [ %niter429.next.3, %.lr.ph321.us.new ], [ 0, %.lr.ph321.us ]
  %292 = getelementptr inbounds double, ptr %289, i64 %.3252318.us
  %293 = load double, ptr %292, align 8, !tbaa !9
  %294 = getelementptr inbounds double, ptr %291, i64 %.3252318.us
  %295 = load double, ptr %294, align 8, !tbaa !9
  %296 = fsub double %293, %295
  %297 = call double @llvm.fmuladd.f64(double %296, double %296, double %.0243319.us)
  %298 = or disjoint i64 %.3252318.us, 1
  %299 = getelementptr inbounds double, ptr %289, i64 %298
  %300 = load double, ptr %299, align 8, !tbaa !9
  %301 = getelementptr inbounds double, ptr %291, i64 %298
  %302 = load double, ptr %301, align 8, !tbaa !9
  %303 = fsub double %300, %302
  %304 = call double @llvm.fmuladd.f64(double %303, double %303, double %297)
  %305 = or disjoint i64 %.3252318.us, 2
  %306 = getelementptr inbounds double, ptr %289, i64 %305
  %307 = load double, ptr %306, align 8, !tbaa !9
  %308 = getelementptr inbounds double, ptr %291, i64 %305
  %309 = load double, ptr %308, align 8, !tbaa !9
  %310 = fsub double %307, %309
  %311 = call double @llvm.fmuladd.f64(double %310, double %310, double %304)
  %312 = or disjoint i64 %.3252318.us, 3
  %313 = getelementptr inbounds double, ptr %289, i64 %312
  %314 = load double, ptr %313, align 8, !tbaa !9
  %315 = getelementptr inbounds double, ptr %291, i64 %312
  %316 = load double, ptr %315, align 8, !tbaa !9
  %317 = fsub double %314, %316
  %318 = call double @llvm.fmuladd.f64(double %317, double %317, double %311)
  %319 = add nuw nsw i64 %.3252318.us, 4
  %niter429.next.3 = add i64 %niter429, 4
  %niter429.ncmp.3 = icmp eq i64 %niter429.next.3, %unroll_iter428
  br i1 %niter429.ncmp.3, label %._crit_edge322.us.unr-lcssa, label %.lr.ph321.us.new, !llvm.loop !33

._crit_edge322.us.unr-lcssa:                      ; preds = %.lr.ph321.us.new, %.lr.ph321.us
  %.lcssa400.ph = phi double [ poison, %.lr.ph321.us ], [ %318, %.lr.ph321.us.new ]
  %.0243319.us.unr = phi double [ 0.000000e+00, %.lr.ph321.us ], [ %318, %.lr.ph321.us.new ]
  %.3252318.us.unr = phi i64 [ 0, %.lr.ph321.us ], [ %319, %.lr.ph321.us.new ]
  br i1 %lcmp.mod426.not, label %._crit_edge322.us, label %.epil.preheader423

.epil.preheader423:                               ; preds = %._crit_edge322.us.unr-lcssa, %.epil.preheader423
  %.0243319.us.epil = phi double [ %325, %.epil.preheader423 ], [ %.0243319.us.unr, %._crit_edge322.us.unr-lcssa ]
  %.3252318.us.epil = phi i64 [ %326, %.epil.preheader423 ], [ %.3252318.us.unr, %._crit_edge322.us.unr-lcssa ]
  %epil.iter425 = phi i64 [ %epil.iter425.next, %.epil.preheader423 ], [ 0, %._crit_edge322.us.unr-lcssa ]
  %320 = getelementptr inbounds double, ptr %289, i64 %.3252318.us.epil
  %321 = load double, ptr %320, align 8, !tbaa !9
  %322 = getelementptr inbounds double, ptr %291, i64 %.3252318.us.epil
  %323 = load double, ptr %322, align 8, !tbaa !9
  %324 = fsub double %321, %323
  %325 = call double @llvm.fmuladd.f64(double %324, double %324, double %.0243319.us.epil)
  %326 = add nuw nsw i64 %.3252318.us.epil, 1
  %epil.iter425.next = add i64 %epil.iter425, 1
  %epil.iter425.cmp.not = icmp eq i64 %epil.iter425.next, %xtraiter424
  br i1 %epil.iter425.cmp.not, label %._crit_edge322.us, label %.epil.preheader423, !llvm.loop !34

._crit_edge322.us:                                ; preds = %.epil.preheader423, %._crit_edge322.us.unr-lcssa
  %.lcssa400 = phi double [ %.lcssa400.ph, %._crit_edge322.us.unr-lcssa ], [ %325, %.epil.preheader423 ]
  %327 = fadd double %.1246325.us, %.lcssa400
  %328 = add nuw nsw i64 %.5326.us, 1
  %exitcond376.not = icmp eq i64 %328, %1
  br i1 %exitcond376.not, label %._crit_edge328, label %.lr.ph321.us, !llvm.loop !35

._crit_edge315.thread:                            ; preds = %.thread, %._crit_edge315
  %329 = call noundef zeroext i1 @_ZN11alglib_implL21clustering_fixcentersEPNS_9ae_matrixEllS1_lPNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef nonnull %17, i64 noundef %3, ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef %18)
  br i1 %329, label %148, label %330, !llvm.loop !36

330:                                              ; preds = %._crit_edge315.thread
  store i64 -3, ptr %9, align 8, !tbaa !5
  br label %._crit_edge352

._crit_edge328:                                   ; preds = %._crit_edge322.us, %.preheader275
  %.1246.lcssa = phi double [ 0.000000e+00, %.preheader275 ], [ %327, %._crit_edge322.us ]
  br i1 %.0241.lcssa, label %331, label %.loopexit282

331:                                              ; preds = %._crit_edge328
  %332 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %.1246.lcssa, double noundef %.0244.ph330)
  %333 = icmp sge i64 %282, %6
  %.not359 = select i1 %39, i1 %333, i1 false
  %or.cond355.not = select i1 %332, i1 true, i1 %.not359
  br i1 %or.cond355.not, label %.loopexit282, label %.outer.split, !llvm.loop !36

.outer.split:                                     ; preds = %.preheader281, %331
  %.0.ph331 = phi i64 [ %282, %331 ], [ 0, %.preheader281 ]
  %.0244.ph330 = phi double [ %.1246.lcssa, %331 ], [ 1.000000e+300, %.preheader281 ]
  br label %148

.loopexit282:                                     ; preds = %._crit_edge328, %331, %.preheader281
  %.3248.ph = phi double [ 1.000000e+300, %.preheader281 ], [ %.1246.lcssa, %331 ], [ %.1246.lcssa, %._crit_edge328 ]
  %334 = load double, ptr %16, align 8, !tbaa !9
  %335 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %.3248.ph, double noundef %334)
  br i1 %335, label %336, label %.loopexit

336:                                              ; preds = %.loopexit282
  store double %.3248.ph, ptr %16, align 8, !tbaa !9
  call void @_ZN11alglib_impl10copymatrixEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef %17, i64 noundef 0, i64 noundef %47, i64 noundef 0, i64 noundef %44, ptr noundef nonnull %31, i64 noundef 0, i64 noundef %47, i64 noundef 0, i64 noundef %44, ptr noundef %18)
  br i1 %.not262.not289, label %.lr.ph342.preheader, label %.loopexit

.lr.ph342.preheader:                              ; preds = %336
  br i1 %58, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph342

.lr.ph342:                                        ; preds = %.lr.ph342.preheader, %.lr.ph342
  %.7340 = phi i64 [ %360, %.lr.ph342 ], [ 0, %.lr.ph342.preheader ]
  %niter434 = phi i64 [ %niter434.next.3, %.lr.ph342 ], [ 0, %.lr.ph342.preheader ]
  %337 = load ptr, ptr %38, align 8, !tbaa !11
  %338 = getelementptr inbounds i64, ptr %337, i64 %.7340
  %339 = load i64, ptr %338, align 8, !tbaa !5
  %340 = load ptr, ptr %48, align 8, !tbaa !11
  %341 = getelementptr inbounds i64, ptr %340, i64 %.7340
  store i64 %339, ptr %341, align 8, !tbaa !5
  %342 = or disjoint i64 %.7340, 1
  %343 = load ptr, ptr %38, align 8, !tbaa !11
  %344 = getelementptr inbounds i64, ptr %343, i64 %342
  %345 = load i64, ptr %344, align 8, !tbaa !5
  %346 = load ptr, ptr %48, align 8, !tbaa !11
  %347 = getelementptr inbounds i64, ptr %346, i64 %342
  store i64 %345, ptr %347, align 8, !tbaa !5
  %348 = or disjoint i64 %.7340, 2
  %349 = load ptr, ptr %38, align 8, !tbaa !11
  %350 = getelementptr inbounds i64, ptr %349, i64 %348
  %351 = load i64, ptr %350, align 8, !tbaa !5
  %352 = load ptr, ptr %48, align 8, !tbaa !11
  %353 = getelementptr inbounds i64, ptr %352, i64 %348
  store i64 %351, ptr %353, align 8, !tbaa !5
  %354 = or disjoint i64 %.7340, 3
  %355 = load ptr, ptr %38, align 8, !tbaa !11
  %356 = getelementptr inbounds i64, ptr %355, i64 %354
  %357 = load i64, ptr %356, align 8, !tbaa !5
  %358 = load ptr, ptr %48, align 8, !tbaa !11
  %359 = getelementptr inbounds i64, ptr %358, i64 %354
  store i64 %357, ptr %359, align 8, !tbaa !5
  %360 = add nuw nsw i64 %.7340, 4
  %niter434.next.3 = add i64 %niter434, 4
  %niter434.ncmp.3 = icmp eq i64 %niter434.next.3, %unroll_iter433
  br i1 %niter434.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph342, !llvm.loop !16

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph342, %.lr.ph342.preheader
  %.7340.unr = phi i64 [ 0, %.lr.ph342.preheader ], [ %360, %.lr.ph342 ]
  br i1 %lcmp.mod432.not, label %.loopexit, label %.lr.ph342.epil

.lr.ph342.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph342.epil
  %.7340.epil = phi i64 [ %366, %.lr.ph342.epil ], [ %.7340.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter431 = phi i64 [ %epil.iter431.next, %.lr.ph342.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %361 = load ptr, ptr %38, align 8, !tbaa !11
  %362 = getelementptr inbounds i64, ptr %361, i64 %.7340.epil
  %363 = load i64, ptr %362, align 8, !tbaa !5
  %364 = load ptr, ptr %48, align 8, !tbaa !11
  %365 = getelementptr inbounds i64, ptr %364, i64 %.7340.epil
  store i64 %363, ptr %365, align 8, !tbaa !5
  %366 = add nuw nsw i64 %.7340.epil, 1
  %epil.iter431.next = add i64 %epil.iter431, 1
  %epil.iter431.cmp.not = icmp eq i64 %epil.iter431.next, %xtraiter430
  br i1 %epil.iter431.cmp.not, label %.loopexit, label %.lr.ph342.epil, !llvm.loop !37

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph342.epil, %336, %.loopexit282
  %367 = add nuw i64 %.0239344, 1
  %exitcond378.not = icmp eq i64 %.0239344, %7
  br i1 %exitcond378.not, label %._crit_edge347, label %.preheader284, !llvm.loop !14

._crit_edge347:                                   ; preds = %.loopexit, %.loopexit.us
  br i1 %12, label %368, label %371

368:                                              ; preds = %._crit_edge347
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %11, i64 noundef %2, i64 noundef %3, ptr noundef %18)
  %369 = add nsw i64 %3, -1
  %370 = add nsw i64 %2, -1
  call void @_ZN11alglib_impl16copyandtransposeEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef nonnull %31, i64 noundef 0, i64 noundef %369, i64 noundef 0, i64 noundef %370, ptr noundef %11, i64 noundef 0, i64 noundef %370, i64 noundef 0, i64 noundef %369, ptr noundef %18)
  br label %371

371:                                              ; preds = %368, %._crit_edge347
  br i1 %14, label %372, label %373

372:                                              ; preds = %371
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %13, i64 noundef %3, i64 noundef %2, ptr noundef %18)
  call void @_ZN11alglib_impl11rmatrixcopyEllPNS_9ae_matrixEllS1_llPNS_8ae_stateE(i64 noundef %3, i64 noundef %2, ptr noundef nonnull %31, i64 noundef 0, i64 noundef 0, ptr noundef %13, i64 noundef 0, i64 noundef 0, ptr noundef %18)
  br label %373

373:                                              ; preds = %372, %371
  %.not261.not348 = icmp sgt i64 %1, 0
  br i1 %.not261.not348, label %.lr.ph351, label %._crit_edge352

.lr.ph351:                                        ; preds = %373
  %374 = getelementptr inbounds i8, ptr %17, i64 216
  %375 = getelementptr inbounds i8, ptr %15, i64 56
  %376 = add nsw i64 %1, -1
  %xtraiter448 = and i64 %1, 3
  %377 = icmp ult i64 %376, 3
  br i1 %377, label %._crit_edge352.loopexit.unr-lcssa, label %.lr.ph351.new

.lr.ph351.new:                                    ; preds = %.lr.ph351
  %unroll_iter451 = and i64 %1, 9223372036854775804
  br label %378

378:                                              ; preds = %378, %.lr.ph351.new
  %.8349 = phi i64 [ 0, %.lr.ph351.new ], [ %402, %378 ]
  %niter452 = phi i64 [ 0, %.lr.ph351.new ], [ %niter452.next.3, %378 ]
  %379 = load ptr, ptr %374, align 8, !tbaa !11
  %380 = getelementptr inbounds i64, ptr %379, i64 %.8349
  %381 = load i64, ptr %380, align 8, !tbaa !5
  %382 = load ptr, ptr %375, align 8, !tbaa !11
  %383 = getelementptr inbounds i64, ptr %382, i64 %.8349
  store i64 %381, ptr %383, align 8, !tbaa !5
  %384 = or disjoint i64 %.8349, 1
  %385 = load ptr, ptr %374, align 8, !tbaa !11
  %386 = getelementptr inbounds i64, ptr %385, i64 %384
  %387 = load i64, ptr %386, align 8, !tbaa !5
  %388 = load ptr, ptr %375, align 8, !tbaa !11
  %389 = getelementptr inbounds i64, ptr %388, i64 %384
  store i64 %387, ptr %389, align 8, !tbaa !5
  %390 = or disjoint i64 %.8349, 2
  %391 = load ptr, ptr %374, align 8, !tbaa !11
  %392 = getelementptr inbounds i64, ptr %391, i64 %390
  %393 = load i64, ptr %392, align 8, !tbaa !5
  %394 = load ptr, ptr %375, align 8, !tbaa !11
  %395 = getelementptr inbounds i64, ptr %394, i64 %390
  store i64 %393, ptr %395, align 8, !tbaa !5
  %396 = or disjoint i64 %.8349, 3
  %397 = load ptr, ptr %374, align 8, !tbaa !11
  %398 = getelementptr inbounds i64, ptr %397, i64 %396
  %399 = load i64, ptr %398, align 8, !tbaa !5
  %400 = load ptr, ptr %375, align 8, !tbaa !11
  %401 = getelementptr inbounds i64, ptr %400, i64 %396
  store i64 %399, ptr %401, align 8, !tbaa !5
  %402 = add nuw nsw i64 %.8349, 4
  %niter452.next.3 = add i64 %niter452, 4
  %niter452.ncmp.3 = icmp eq i64 %niter452.next.3, %unroll_iter451
  br i1 %niter452.ncmp.3, label %._crit_edge352.loopexit.unr-lcssa, label %378, !llvm.loop !38

._crit_edge352.loopexit.unr-lcssa:                ; preds = %378, %.lr.ph351
  %.8349.unr = phi i64 [ 0, %.lr.ph351 ], [ %402, %378 ]
  %lcmp.mod450.not = icmp eq i64 %xtraiter448, 0
  br i1 %lcmp.mod450.not, label %._crit_edge352, label %.epil.preheader447

.epil.preheader447:                               ; preds = %._crit_edge352.loopexit.unr-lcssa, %.epil.preheader447
  %.8349.epil = phi i64 [ %408, %.epil.preheader447 ], [ %.8349.unr, %._crit_edge352.loopexit.unr-lcssa ]
  %epil.iter449 = phi i64 [ %epil.iter449.next, %.epil.preheader447 ], [ 0, %._crit_edge352.loopexit.unr-lcssa ]
  %403 = load ptr, ptr %374, align 8, !tbaa !11
  %404 = getelementptr inbounds i64, ptr %403, i64 %.8349.epil
  %405 = load i64, ptr %404, align 8, !tbaa !5
  %406 = load ptr, ptr %375, align 8, !tbaa !11
  %407 = getelementptr inbounds i64, ptr %406, i64 %.8349.epil
  store i64 %405, ptr %407, align 8, !tbaa !5
  %408 = add nuw nsw i64 %.8349.epil, 1
  %epil.iter449.next = add i64 %epil.iter449, 1
  %epil.iter449.cmp.not = icmp eq i64 %epil.iter449.next, %xtraiter448
  br i1 %epil.iter449.cmp.not, label %._crit_edge352, label %.epil.preheader447, !llvm.loop !39

._crit_edge352:                                   ; preds = %._crit_edge352.loopexit.unr-lcssa, %.epil.preheader447, %373, %330, %26
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #5
  ret void
}

declare void @_ZN11alglib_impl9hqrndseedEllPNS_10hqrndstateEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL31clustering_selectinitialcentersEPNS_9ae_matrixElllPNS_10hqrndstateElS1_PNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl21kmeansupdatedistancesEPNS_9ae_matrixElllS1_llPNS_9ae_vectorES3_PNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL21clustering_fixcentersEPNS_9ae_matrixEllS1_lPNS_9apbuffersEPNS_14ae_shared_poolEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN11alglib_impl10copymatrixEPNS_9ae_matrixEllllS1_llllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "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 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 }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !15}
!24 = !{!25, !25, i64 0}
!25 = !{!"any pointer", !7, i64 0}
!26 = distinct !{!26, !15}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !15}
!29 = distinct !{!29, !15}
!30 = distinct !{!30, !13}
!31 = distinct !{!31, !15}
!32 = distinct !{!32, !15}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !13}
!35 = distinct !{!35, !15}
!36 = distinct !{!36, !15}
!37 = distinct !{!37, !13}
!38 = distinct !{!38, !15}
!39 = distinct !{!39, !13}


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