; 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::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::knnbuilder" = type { i64, i64, i64, i8, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64 }
%"struct.alglib_impl::knnmodel" = type { i64, i64, i64, double, i8, i8, %"struct.alglib_impl::kdtree", %"struct.alglib_impl::knnbuffer" }
%"struct.alglib_impl::kdtree" = type { i64, i64, i64, i64, %"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::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer", i64 }
%"struct.alglib_impl::kdtreerequestbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, i8, double, i64, %"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", double }
%"struct.alglib_impl::knnbuffer" = type { %"struct.alglib_impl::kdtreerequestbuffer", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix" }

@.str.461 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.462 = external hidden unnamed_addr constant [31 x i8], align 1

; 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_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15knncreatebufferEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23knnbuilderbuildknnmodelEPNS_10knnbuilderEldPNS_8knnmodelEPNS_9knnreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i8, align 1
  %20 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store double %2, ptr %9, align 8, !tbaa !11
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #5
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %23, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl15_knnmodel_clearEPv(ptr noundef %24)
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_knnreport_clearEPv(ptr noundef %25)
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %26, i1 noundef zeroext true)
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 2, ptr noundef %27, i1 noundef zeroext true)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %28, i32 0, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !13
  store i64 %30, ptr %18, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %31, i32 0, i32 2
  %33 = load i64, ptr %32, align 8, !tbaa !19
  store i64 %33, ptr %16, align 8, !tbaa !9
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %34, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !20
  store i64 %36, ptr %17, align 8, !tbaa !9
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %37, i32 0, i32 3
  %39 = load i8, ptr %38, align 8, !tbaa !21, !range !22, !noundef !23
  %40 = trunc i8 %39 to i1
  %41 = zext i1 %40 to i8
  store i8 %41, ptr %19, align 1, !tbaa !24
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = icmp sge i64 %42, 1
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.461, ptr noundef %44)
  %45 = load double, ptr %9, align 8, !tbaa !11
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %45, ptr noundef %46)
  br i1 %47, label %48, label %51

48:                                               ; preds = %6
  %49 = load double, ptr %9, align 8, !tbaa !11
  %50 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %49, double noundef 0.000000e+00)
  br label %51

51:                                               ; preds = %48, %6
  %52 = phi i1 [ false, %6 ], [ %50, %48 ]
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.462, ptr noundef %53)
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_implL15knn_clearreportEPNS_9knnreportEPNS_8ae_stateE(ptr noundef %54, ptr noundef %55)
  %56 = load i64, ptr %16, align 8, !tbaa !9
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %57, i32 0, i32 0
  store i64 %56, ptr %58, align 8, !tbaa !25
  %59 = load i64, ptr %17, align 8, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %60, i32 0, i32 1
  store i64 %59, ptr %61, align 8, !tbaa !30
  %62 = load i8, ptr %19, align 1, !tbaa !24, !range !22, !noundef !23
  %63 = trunc i8 %62 to i1
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %64, i32 0, i32 4
  %66 = zext i1 %63 to i8
  store i8 %66, ptr %65, align 8, !tbaa !31
  %67 = load i64, ptr %8, align 8, !tbaa !9
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %68, i32 0, i32 2
  store i64 %67, ptr %69, align 8, !tbaa !32
  %70 = load double, ptr %9, align 8, !tbaa !11
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %71, i32 0, i32 3
  store double %70, ptr %72, align 8, !tbaa !33
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %73, i32 0, i32 5
  store i8 0, ptr %74, align 1, !tbaa !34
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %75, i32 0, i32 0
  %77 = load i64, ptr %76, align 8, !tbaa !35
  %78 = icmp eq i64 %77, -1
  br i1 %78, label %79, label %83

79:                                               ; preds = %51
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %80, i32 0, i32 5
  store i8 1, ptr %81, align 1, !tbaa !34
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %82)
  store i32 1, ptr %22, align 4
  br label %256

83:                                               ; preds = %51
  %84 = load i8, ptr %19, align 1, !tbaa !24, !range !22, !noundef !23
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %164

86:                                               ; preds = %83
  %87 = load i64, ptr %18, align 8, !tbaa !9
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = add nsw i64 %88, 1
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %20, i64 noundef %87, i64 noundef %89, ptr noundef %90)
  %91 = load i64, ptr %18, align 8, !tbaa !9
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %21, i64 noundef %91, ptr noundef %92)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %152, %86
  %94 = load i64, ptr %14, align 8, !tbaa !9
  %95 = load i64, ptr %18, align 8, !tbaa !9
  %96 = sub nsw i64 %95, 1
  %97 = icmp sle i64 %94, %96
  br i1 %97, label %98, label %155

98:                                               ; preds = %93
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %122, %98
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = load i64, ptr %16, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %125

104:                                              ; preds = %99
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %105, i32 0, i32 5
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %106, i32 0, i32 6
  %108 = load ptr, ptr %107, align 8, !tbaa !36
  %109 = load i64, ptr %14, align 8, !tbaa !9
  %110 = getelementptr inbounds ptr, ptr %108, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load i64, ptr %15, align 8, !tbaa !9
  %113 = getelementptr inbounds double, ptr %111, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !36
  %117 = load i64, ptr %14, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %119, i64 %120
  store double %114, ptr %121, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %104
  %123 = load i64, ptr %15, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %15, align 8, !tbaa !9
  br label %99, !llvm.loop !37

125:                                              ; preds = %99
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %126, i32 0, i32 7
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !36
  %130 = load i64, ptr %14, align 8, !tbaa !9
  %131 = getelementptr inbounds i64, ptr %129, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = sitofp i64 %132 to double
  %134 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !36
  %136 = load i64, ptr %14, align 8, !tbaa !9
  %137 = getelementptr inbounds ptr, ptr %135, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load i64, ptr %16, align 8, !tbaa !9
  %140 = getelementptr inbounds double, ptr %138, i64 %139
  store double %133, ptr %140, align 8, !tbaa !11
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %141, i32 0, i32 7
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !36
  %145 = load i64, ptr %14, align 8, !tbaa !9
  %146 = getelementptr inbounds i64, ptr %144, i64 %145
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !36
  %150 = load i64, ptr %14, align 8, !tbaa !9
  %151 = getelementptr inbounds i64, ptr %149, i64 %150
  store i64 %147, ptr %151, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %125
  %153 = load i64, ptr %14, align 8, !tbaa !9
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %14, align 8, !tbaa !9
  br label %93, !llvm.loop !39

155:                                              ; preds = %93
  %156 = load i64, ptr %18, align 8, !tbaa !9
  %157 = load i64, ptr %16, align 8, !tbaa !9
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %158, i32 0, i32 8
  %160 = load i64, ptr %159, align 8, !tbaa !40
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %161, i32 0, i32 6
  %163 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl17kdtreebuildtaggedEPNS_9ae_matrixEPNS_9ae_vectorEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %20, ptr noundef %21, i64 noundef %156, i64 noundef %157, i64 noundef 0, i64 noundef %160, ptr noundef %162, ptr noundef %163)
  br label %246

164:                                              ; preds = %83
  %165 = load i64, ptr %18, align 8, !tbaa !9
  %166 = load i64, ptr %16, align 8, !tbaa !9
  %167 = load i64, ptr %17, align 8, !tbaa !9
  %168 = add nsw i64 %166, %167
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %20, i64 noundef %165, i64 noundef %168, ptr noundef %169)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %233, %164
  %171 = load i64, ptr %14, align 8, !tbaa !9
  %172 = load i64, ptr %18, align 8, !tbaa !9
  %173 = sub nsw i64 %172, 1
  %174 = icmp sle i64 %171, %173
  br i1 %174, label %175, label %236

175:                                              ; preds = %170
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %176

176:                                              ; preds = %199, %175
  %177 = load i64, ptr %15, align 8, !tbaa !9
  %178 = load i64, ptr %16, align 8, !tbaa !9
  %179 = sub nsw i64 %178, 1
  %180 = icmp sle i64 %177, %179
  br i1 %180, label %181, label %202

181:                                              ; preds = %176
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %182, i32 0, i32 5
  %184 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %183, i32 0, i32 6
  %185 = load ptr, ptr %184, align 8, !tbaa !36
  %186 = load i64, ptr %14, align 8, !tbaa !9
  %187 = getelementptr inbounds ptr, ptr %185, i64 %186
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = load i64, ptr %15, align 8, !tbaa !9
  %190 = getelementptr inbounds double, ptr %188, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !11
  %192 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %193 = load ptr, ptr %192, align 8, !tbaa !36
  %194 = load i64, ptr %14, align 8, !tbaa !9
  %195 = getelementptr inbounds ptr, ptr %193, i64 %194
  %196 = load ptr, ptr %195, align 8, !tbaa !5
  %197 = load i64, ptr %15, align 8, !tbaa !9
  %198 = getelementptr inbounds double, ptr %196, i64 %197
  store double %191, ptr %198, align 8, !tbaa !11
  br label %199

199:                                              ; preds = %181
  %200 = load i64, ptr %15, align 8, !tbaa !9
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %15, align 8, !tbaa !9
  br label %176, !llvm.loop !41

202:                                              ; preds = %176
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %229, %202
  %204 = load i64, ptr %15, align 8, !tbaa !9
  %205 = load i64, ptr %17, align 8, !tbaa !9
  %206 = sub nsw i64 %205, 1
  %207 = icmp sle i64 %204, %206
  br i1 %207, label %208, label %232

208:                                              ; preds = %203
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %209, i32 0, i32 6
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %210, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !36
  %213 = load i64, ptr %14, align 8, !tbaa !9
  %214 = load i64, ptr %17, align 8, !tbaa !9
  %215 = mul nsw i64 %213, %214
  %216 = load i64, ptr %15, align 8, !tbaa !9
  %217 = add nsw i64 %215, %216
  %218 = getelementptr inbounds double, ptr %212, i64 %217
  %219 = load double, ptr %218, align 8, !tbaa !11
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %221 = load ptr, ptr %220, align 8, !tbaa !36
  %222 = load i64, ptr %14, align 8, !tbaa !9
  %223 = getelementptr inbounds ptr, ptr %221, i64 %222
  %224 = load ptr, ptr %223, align 8, !tbaa !5
  %225 = load i64, ptr %16, align 8, !tbaa !9
  %226 = load i64, ptr %15, align 8, !tbaa !9
  %227 = add nsw i64 %225, %226
  %228 = getelementptr inbounds double, ptr %224, i64 %227
  store double %219, ptr %228, align 8, !tbaa !11
  br label %229

229:                                              ; preds = %208
  %230 = load i64, ptr %15, align 8, !tbaa !9
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %15, align 8, !tbaa !9
  br label %203, !llvm.loop !42

232:                                              ; preds = %203
  br label %233

233:                                              ; preds = %232
  %234 = load i64, ptr %14, align 8, !tbaa !9
  %235 = add nsw i64 %234, 1
  store i64 %235, ptr %14, align 8, !tbaa !9
  br label %170, !llvm.loop !43

236:                                              ; preds = %170
  %237 = load i64, ptr %18, align 8, !tbaa !9
  %238 = load i64, ptr %16, align 8, !tbaa !9
  %239 = load i64, ptr %17, align 8, !tbaa !9
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %240, i32 0, i32 8
  %242 = load i64, ptr %241, align 8, !tbaa !40
  %243 = load ptr, ptr %10, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %243, i32 0, i32 6
  %245 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl11kdtreebuildEPNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %20, i64 noundef %237, i64 noundef %238, i64 noundef %239, i64 noundef %242, ptr noundef %244, ptr noundef %245)
  br label %246

246:                                              ; preds = %236, %155
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %248, i32 0, i32 7
  %250 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15knncreatebufferEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef %247, ptr noundef %249, ptr noundef %250)
  %251 = load ptr, ptr %10, align 8, !tbaa !5
  %252 = load i64, ptr %18, align 8, !tbaa !9
  %253 = load ptr, ptr %11, align 8, !tbaa !5
  %254 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl12knnallerrorsEPNS_8knnmodelEPNS_9ae_matrixElPNS_9knnreportEPNS_8ae_stateE(ptr noundef %251, ptr noundef %20, i64 noundef %252, ptr noundef %253, ptr noundef %254)
  %255 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %255)
  store i32 0, ptr %22, align 4
  br label %256

256:                                              ; preds = %246, %79
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %257 = load i32, ptr %22, align 4
  switch i32 %257, label %259 [
    i32 0, label %258
    i32 1, label %258
  ]

258:                                              ; preds = %256, %256
  ret void

259:                                              ; preds = %256
  unreachable
}

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

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

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #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 zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15_knnmodel_clearEPv(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl16_knnreport_clearEPv(ptr noundef) #3

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

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

declare void @_ZN11alglib_impl11kdtreebuildEPNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr 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 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN11alglib_impl10knnbuilderE", !10, i64 0, !10, i64 8, !10, i64 16, !15, i64 24, !10, i64 32, !16, i64 40, !18, i64 120, !18, i64 184, !10, i64 248}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !15, i64 32, !17, i64 40, !7, i64 72}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !15, i64 16, !17, i64 24, !7, i64 56}
!19 = !{!14, !10, i64 16}
!20 = !{!14, !10, i64 32}
!21 = !{!14, !15, i64 24}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!15, !15, i64 0}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSN11alglib_impl8knnmodelE", !10, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !15, i64 32, !15, i64 33, !27, i64 40, !29, i64 1040}
!27 = !{!"_ZTSN11alglib_impl6kdtreeE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !16, i64 32, !18, i64 112, !18, i64 176, !18, i64 240, !18, i64 304, !18, i64 368, !28, i64 432, !10, i64 992}
!28 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !18, i64 0, !18, i64 64, !18, i64 128, !10, i64 192, !12, i64 200, !15, i64 208, !12, i64 216, !10, i64 224, !18, i64 232, !18, i64 296, !18, i64 360, !18, i64 424, !18, i64 488, !12, i64 552}
!29 = !{!"_ZTSN11alglib_impl9knnbufferE", !28, i64 0, !18, i64 560, !18, i64 624, !18, i64 688, !16, i64 752}
!30 = !{!26, !10, i64 8}
!31 = !{!26, !15, i64 32}
!32 = !{!26, !10, i64 16}
!33 = !{!26, !12, i64 24}
!34 = !{!26, !15, i64 33}
!35 = !{!14, !10, i64 0}
!36 = !{!7, !7, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}
!40 = !{!14, !10, i64 248}
!41 = distinct !{!41, !38}
!42 = distinct !{!42, !38}
!43 = distinct !{!43, !38}


; 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::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 }

@.str.461 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.462 = external hidden unnamed_addr constant [31 x i8], align 1

; 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_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15knncreatebufferEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23knnbuilderbuildknnmodelEPNS_10knnbuilderEldPNS_8knnmodelEPNS_9knnreportEPNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %8, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15_knnmodel_clearEPv(ptr noundef %3)
  call void @_ZN11alglib_impl16_knnreport_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 2, ptr noundef %5, i1 noundef zeroext true)
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i64, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = load i64, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load i8, ptr %16, align 8, !tbaa !17, !range !18, !noundef !19
  %18 = trunc nuw i8 %17 to i1
  %19 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.461, ptr noundef %5)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %2, ptr noundef %5)
  br i1 %20, label %21, label %23

21:                                               ; preds = %6
  %22 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %2, double noundef 0.000000e+00)
  br label %23

23:                                               ; preds = %21, %6
  %24 = phi i1 [ false, %6 ], [ %22, %21 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.462, ptr noundef %5)
  call void @_ZN11alglib_implL15knn_clearreportEPNS_9knnreportEPNS_8ae_stateE(ptr noundef %4, ptr noundef %5)
  store i64 %13, ptr %3, align 8, !tbaa !20
  %25 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %15, ptr %25, align 8, !tbaa !26
  %26 = getelementptr inbounds i8, ptr %3, i64 32
  store i8 %17, ptr %26, align 8, !tbaa !27
  %27 = getelementptr inbounds i8, ptr %3, i64 16
  store i64 %1, ptr %27, align 8, !tbaa !28
  %28 = getelementptr inbounds i8, ptr %3, i64 24
  store double %2, ptr %28, align 8, !tbaa !29
  %29 = getelementptr inbounds i8, ptr %3, i64 33
  store i8 0, ptr %29, align 1, !tbaa !30
  %30 = load i64, ptr %0, align 8, !tbaa !31
  %31 = icmp eq i64 %30, -1
  br i1 %31, label %32, label %33

32:                                               ; preds = %23
  store i8 1, ptr %29, align 1, !tbaa !30
  br label %264

33:                                               ; preds = %23
  br i1 %18, label %34, label %129

34:                                               ; preds = %33
  %35 = add nsw i64 %13, 1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %11, i64 noundef %35, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %11, ptr noundef %5)
  %.not.not102124 = icmp sgt i64 %11, 0
  br i1 %.not.not102124, label %.preheader.lr.ph, label %._crit_edge126

.preheader.lr.ph:                                 ; preds = %34
  %.not.not103122 = icmp sgt i64 %13, 0
  %36 = getelementptr inbounds i8, ptr %0, i64 112
  %37 = getelementptr inbounds i8, ptr %8, i64 72
  %38 = getelementptr inbounds i8, ptr %0, i64 240
  %39 = getelementptr inbounds i8, ptr %9, i64 56
  br i1 %.not.not103122, label %.preheader.us.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %xtraiter165 = and i64 %11, 1
  %40 = icmp eq i64 %11, 1
  br i1 %40, label %._crit_edge126.loopexit147.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter167 = and i64 %11, 9223372036854775806
  br label %.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %xtraiter170 = and i64 %13, 1
  %41 = icmp eq i64 %13, 1
  %unroll_iter172 = and i64 %13, 9223372036854775806
  %lcmp.mod171.not = icmp eq i64 %xtraiter170, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us127
  %.0125.us = phi i64 [ %84, %._crit_edge.us127 ], [ 0, %.preheader.us.preheader ]
  br i1 %41, label %._crit_edge.us127.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.098123.us = phi i64 [ %61, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter173 = phi i64 [ %niter173.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %42 = load ptr, ptr %36, align 8, !tbaa !32
  %43 = getelementptr inbounds ptr, ptr %42, i64 %.0125.us
  %44 = load ptr, ptr %43, align 8, !tbaa !33
  %45 = getelementptr inbounds double, ptr %44, i64 %.098123.us
  %46 = load double, ptr %45, align 8, !tbaa !34
  %47 = load ptr, ptr %37, align 8, !tbaa !32
  %48 = getelementptr inbounds ptr, ptr %47, i64 %.0125.us
  %49 = load ptr, ptr %48, align 8, !tbaa !33
  %50 = getelementptr inbounds double, ptr %49, i64 %.098123.us
  store double %46, ptr %50, align 8, !tbaa !34
  %51 = or disjoint i64 %.098123.us, 1
  %52 = load ptr, ptr %36, align 8, !tbaa !32
  %53 = getelementptr inbounds ptr, ptr %52, i64 %.0125.us
  %54 = load ptr, ptr %53, align 8, !tbaa !33
  %55 = getelementptr inbounds double, ptr %54, i64 %51
  %56 = load double, ptr %55, align 8, !tbaa !34
  %57 = load ptr, ptr %37, align 8, !tbaa !32
  %58 = getelementptr inbounds ptr, ptr %57, i64 %.0125.us
  %59 = load ptr, ptr %58, align 8, !tbaa !33
  %60 = getelementptr inbounds double, ptr %59, i64 %51
  store double %56, ptr %60, align 8, !tbaa !34
  %61 = add nuw nsw i64 %.098123.us, 2
  %niter173.next.1 = add i64 %niter173, 2
  %niter173.ncmp.1 = icmp eq i64 %niter173.next.1, %unroll_iter172
  br i1 %niter173.ncmp.1, label %._crit_edge.us127.unr-lcssa, label %.preheader.us.new, !llvm.loop !35

._crit_edge.us127.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.098123.us.unr = phi i64 [ 0, %.preheader.us ], [ %61, %.preheader.us.new ]
  br i1 %lcmp.mod171.not, label %._crit_edge.us127, label %._crit_edge.us127.epilog-lcssa

._crit_edge.us127.epilog-lcssa:                   ; preds = %._crit_edge.us127.unr-lcssa
  %62 = load ptr, ptr %36, align 8, !tbaa !32
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.0125.us
  %64 = load ptr, ptr %63, align 8, !tbaa !33
  %65 = getelementptr inbounds double, ptr %64, i64 %.098123.us.unr
  %66 = load double, ptr %65, align 8, !tbaa !34
  %67 = load ptr, ptr %37, align 8, !tbaa !32
  %68 = getelementptr inbounds ptr, ptr %67, i64 %.0125.us
  %69 = load ptr, ptr %68, align 8, !tbaa !33
  %70 = getelementptr inbounds double, ptr %69, i64 %.098123.us.unr
  store double %66, ptr %70, align 8, !tbaa !34
  br label %._crit_edge.us127

._crit_edge.us127:                                ; preds = %._crit_edge.us127.unr-lcssa, %._crit_edge.us127.epilog-lcssa
  %71 = load ptr, ptr %38, align 8, !tbaa !32
  %72 = getelementptr inbounds i64, ptr %71, i64 %.0125.us
  %73 = load i64, ptr %72, align 8, !tbaa !37
  %74 = sitofp i64 %73 to double
  %75 = load ptr, ptr %37, align 8, !tbaa !32
  %76 = getelementptr inbounds ptr, ptr %75, i64 %.0125.us
  %77 = load ptr, ptr %76, align 8, !tbaa !33
  %78 = getelementptr inbounds double, ptr %77, i64 %13
  store double %74, ptr %78, align 8, !tbaa !34
  %79 = load ptr, ptr %38, align 8, !tbaa !32
  %80 = getelementptr inbounds i64, ptr %79, i64 %.0125.us
  %81 = load i64, ptr %80, align 8, !tbaa !37
  %82 = load ptr, ptr %39, align 8, !tbaa !32
  %83 = getelementptr inbounds i64, ptr %82, i64 %.0125.us
  store i64 %81, ptr %83, align 8, !tbaa !37
  %84 = add nuw nsw i64 %.0125.us, 1
  %exitcond140.not = icmp eq i64 %84, %11
  br i1 %exitcond140.not, label %._crit_edge126, label %.preheader.us, !llvm.loop !38

.preheader:                                       ; preds = %.preheader, %.preheader.preheader.new
  %.0125 = phi i64 [ 0, %.preheader.preheader.new ], [ %112, %.preheader ]
  %niter168 = phi i64 [ 0, %.preheader.preheader.new ], [ %niter168.next.1, %.preheader ]
  %85 = load ptr, ptr %38, align 8, !tbaa !32
  %86 = getelementptr inbounds i64, ptr %85, i64 %.0125
  %87 = load i64, ptr %86, align 8, !tbaa !37
  %88 = sitofp i64 %87 to double
  %89 = load ptr, ptr %37, align 8, !tbaa !32
  %90 = getelementptr inbounds ptr, ptr %89, i64 %.0125
  %91 = load ptr, ptr %90, align 8, !tbaa !33
  %92 = getelementptr inbounds double, ptr %91, i64 %13
  store double %88, ptr %92, align 8, !tbaa !34
  %93 = load ptr, ptr %38, align 8, !tbaa !32
  %94 = getelementptr inbounds i64, ptr %93, i64 %.0125
  %95 = load i64, ptr %94, align 8, !tbaa !37
  %96 = load ptr, ptr %39, align 8, !tbaa !32
  %97 = getelementptr inbounds i64, ptr %96, i64 %.0125
  store i64 %95, ptr %97, align 8, !tbaa !37
  %98 = or disjoint i64 %.0125, 1
  %99 = load ptr, ptr %38, align 8, !tbaa !32
  %100 = getelementptr inbounds i64, ptr %99, i64 %98
  %101 = load i64, ptr %100, align 8, !tbaa !37
  %102 = sitofp i64 %101 to double
  %103 = load ptr, ptr %37, align 8, !tbaa !32
  %104 = getelementptr inbounds ptr, ptr %103, i64 %98
  %105 = load ptr, ptr %104, align 8, !tbaa !33
  %106 = getelementptr inbounds double, ptr %105, i64 %13
  store double %102, ptr %106, align 8, !tbaa !34
  %107 = load ptr, ptr %38, align 8, !tbaa !32
  %108 = getelementptr inbounds i64, ptr %107, i64 %98
  %109 = load i64, ptr %108, align 8, !tbaa !37
  %110 = load ptr, ptr %39, align 8, !tbaa !32
  %111 = getelementptr inbounds i64, ptr %110, i64 %98
  store i64 %109, ptr %111, align 8, !tbaa !37
  %112 = add nuw nsw i64 %.0125, 2
  %niter168.next.1 = add i64 %niter168, 2
  %niter168.ncmp.1 = icmp eq i64 %niter168.next.1, %unroll_iter167
  br i1 %niter168.ncmp.1, label %._crit_edge126.loopexit147.unr-lcssa, label %.preheader, !llvm.loop !38

._crit_edge126.loopexit147.unr-lcssa:             ; preds = %.preheader, %.preheader.preheader
  %.0125.unr = phi i64 [ 0, %.preheader.preheader ], [ %112, %.preheader ]
  %lcmp.mod166.not = icmp eq i64 %xtraiter165, 0
  br i1 %lcmp.mod166.not, label %._crit_edge126, label %.preheader.epil

.preheader.epil:                                  ; preds = %._crit_edge126.loopexit147.unr-lcssa
  %113 = load ptr, ptr %38, align 8, !tbaa !32
  %114 = getelementptr inbounds i64, ptr %113, i64 %.0125.unr
  %115 = load i64, ptr %114, align 8, !tbaa !37
  %116 = sitofp i64 %115 to double
  %117 = load ptr, ptr %37, align 8, !tbaa !32
  %118 = getelementptr inbounds ptr, ptr %117, i64 %.0125.unr
  %119 = load ptr, ptr %118, align 8, !tbaa !33
  %120 = getelementptr inbounds double, ptr %119, i64 %13
  store double %116, ptr %120, align 8, !tbaa !34
  %121 = load ptr, ptr %38, align 8, !tbaa !32
  %122 = getelementptr inbounds i64, ptr %121, i64 %.0125.unr
  %123 = load i64, ptr %122, align 8, !tbaa !37
  %124 = load ptr, ptr %39, align 8, !tbaa !32
  %125 = getelementptr inbounds i64, ptr %124, i64 %.0125.unr
  store i64 %123, ptr %125, align 8, !tbaa !37
  br label %._crit_edge126

._crit_edge126:                                   ; preds = %.preheader.epil, %._crit_edge126.loopexit147.unr-lcssa, %._crit_edge.us127, %34
  %126 = getelementptr inbounds i8, ptr %0, i64 248
  %127 = load i64, ptr %126, align 8, !tbaa !39
  %128 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZN11alglib_impl17kdtreebuildtaggedEPNS_9ae_matrixEPNS_9ae_vectorEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef nonnull %8, ptr noundef nonnull %9, i64 noundef %11, i64 noundef %13, i64 noundef 0, i64 noundef %127, ptr noundef nonnull %128, ptr noundef %5)
  br label %262

129:                                              ; preds = %33
  %130 = add nsw i64 %15, %13
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %11, i64 noundef %130, ptr noundef %5)
  %.not.not111 = icmp sgt i64 %11, 0
  br i1 %.not.not111, label %.preheader105.lr.ph, label %._crit_edge113

.preheader105.lr.ph:                              ; preds = %129
  %.not.not100106 = icmp sgt i64 %13, 0
  %131 = getelementptr inbounds i8, ptr %0, i64 112
  %132 = getelementptr inbounds i8, ptr %8, i64 72
  %.not.not101108 = icmp sgt i64 %15, 0
  %133 = getelementptr inbounds i8, ptr %0, i64 176
  br i1 %.not.not101108, label %.preheader105.lr.ph.split.us, label %.preheader105.lr.ph.split

.preheader105.lr.ph.split.us:                     ; preds = %.preheader105.lr.ph
  br i1 %.not.not100106, label %.preheader105.us.us.preheader, label %.preheader105.us.preheader

.preheader105.us.preheader:                       ; preds = %.preheader105.lr.ph.split.us
  %xtraiter151 = and i64 %15, 1
  %134 = icmp eq i64 %15, 1
  %unroll_iter153 = and i64 %15, 9223372036854775806
  %lcmp.mod152.not = icmp eq i64 %xtraiter151, 0
  br label %.preheader105.us

.preheader105.us.us.preheader:                    ; preds = %.preheader105.lr.ph.split.us
  %xtraiter156 = and i64 %13, 1
  %135 = icmp eq i64 %13, 1
  %unroll_iter158 = and i64 %13, 9223372036854775806
  %lcmp.mod157.not = icmp eq i64 %xtraiter156, 0
  %xtraiter161 = and i64 %15, 1
  %136 = icmp eq i64 %15, 1
  %unroll_iter163 = and i64 %15, 9223372036854775806
  %lcmp.mod162.not = icmp eq i64 %xtraiter161, 0
  br label %.preheader105.us.us

.preheader105.us.us:                              ; preds = %.preheader105.us.us.preheader, %._crit_edge.us.us
  %.1112.us.us = phi i64 [ %196, %._crit_edge.us.us ], [ 0, %.preheader105.us.us.preheader ]
  br i1 %135, label %..preheader104_crit_edge.us.us.unr-lcssa, label %.preheader105.us.us.new

..preheader104_crit_edge.us.us.new:               ; preds = %..preheader104_crit_edge.us.us, %..preheader104_crit_edge.us.us.new
  %.2109.us.us = phi i64 [ %156, %..preheader104_crit_edge.us.us.new ], [ 0, %..preheader104_crit_edge.us.us ]
  %niter164 = phi i64 [ %niter164.next.1, %..preheader104_crit_edge.us.us.new ], [ 0, %..preheader104_crit_edge.us.us ]
  %137 = load ptr, ptr %133, align 8, !tbaa !32
  %138 = getelementptr double, ptr %137, i64 %186
  %139 = getelementptr double, ptr %138, i64 %.2109.us.us
  %140 = load double, ptr %139, align 8, !tbaa !34
  %141 = load ptr, ptr %132, align 8, !tbaa !32
  %142 = getelementptr inbounds ptr, ptr %141, i64 %.1112.us.us
  %143 = load ptr, ptr %142, align 8, !tbaa !33
  %144 = getelementptr double, ptr %143, i64 %13
  %145 = getelementptr double, ptr %144, i64 %.2109.us.us
  store double %140, ptr %145, align 8, !tbaa !34
  %146 = or disjoint i64 %.2109.us.us, 1
  %147 = load ptr, ptr %133, align 8, !tbaa !32
  %148 = getelementptr double, ptr %147, i64 %186
  %149 = getelementptr double, ptr %148, i64 %146
  %150 = load double, ptr %149, align 8, !tbaa !34
  %151 = load ptr, ptr %132, align 8, !tbaa !32
  %152 = getelementptr inbounds ptr, ptr %151, i64 %.1112.us.us
  %153 = load ptr, ptr %152, align 8, !tbaa !33
  %154 = getelementptr double, ptr %153, i64 %13
  %155 = getelementptr double, ptr %154, i64 %146
  store double %150, ptr %155, align 8, !tbaa !34
  %156 = add nuw nsw i64 %.2109.us.us, 2
  %niter164.next.1 = add i64 %niter164, 2
  %niter164.ncmp.1 = icmp eq i64 %niter164.next.1, %unroll_iter163
  br i1 %niter164.ncmp.1, label %._crit_edge.us.us.unr-lcssa, label %..preheader104_crit_edge.us.us.new, !llvm.loop !40

.preheader105.us.us.new:                          ; preds = %.preheader105.us.us, %.preheader105.us.us.new
  %.199107.us.us = phi i64 [ %176, %.preheader105.us.us.new ], [ 0, %.preheader105.us.us ]
  %niter159 = phi i64 [ %niter159.next.1, %.preheader105.us.us.new ], [ 0, %.preheader105.us.us ]
  %157 = load ptr, ptr %131, align 8, !tbaa !32
  %158 = getelementptr inbounds ptr, ptr %157, i64 %.1112.us.us
  %159 = load ptr, ptr %158, align 8, !tbaa !33
  %160 = getelementptr inbounds double, ptr %159, i64 %.199107.us.us
  %161 = load double, ptr %160, align 8, !tbaa !34
  %162 = load ptr, ptr %132, align 8, !tbaa !32
  %163 = getelementptr inbounds ptr, ptr %162, i64 %.1112.us.us
  %164 = load ptr, ptr %163, align 8, !tbaa !33
  %165 = getelementptr inbounds double, ptr %164, i64 %.199107.us.us
  store double %161, ptr %165, align 8, !tbaa !34
  %166 = or disjoint i64 %.199107.us.us, 1
  %167 = load ptr, ptr %131, align 8, !tbaa !32
  %168 = getelementptr inbounds ptr, ptr %167, i64 %.1112.us.us
  %169 = load ptr, ptr %168, align 8, !tbaa !33
  %170 = getelementptr inbounds double, ptr %169, i64 %166
  %171 = load double, ptr %170, align 8, !tbaa !34
  %172 = load ptr, ptr %132, align 8, !tbaa !32
  %173 = getelementptr inbounds ptr, ptr %172, i64 %.1112.us.us
  %174 = load ptr, ptr %173, align 8, !tbaa !33
  %175 = getelementptr inbounds double, ptr %174, i64 %166
  store double %171, ptr %175, align 8, !tbaa !34
  %176 = add nuw nsw i64 %.199107.us.us, 2
  %niter159.next.1 = add i64 %niter159, 2
  %niter159.ncmp.1 = icmp eq i64 %niter159.next.1, %unroll_iter158
  br i1 %niter159.ncmp.1, label %..preheader104_crit_edge.us.us.unr-lcssa, label %.preheader105.us.us.new, !llvm.loop !41

..preheader104_crit_edge.us.us.unr-lcssa:         ; preds = %.preheader105.us.us.new, %.preheader105.us.us
  %.199107.us.us.unr = phi i64 [ 0, %.preheader105.us.us ], [ %176, %.preheader105.us.us.new ]
  br i1 %lcmp.mod157.not, label %..preheader104_crit_edge.us.us, label %..preheader104_crit_edge.us.us.epilog-lcssa

..preheader104_crit_edge.us.us.epilog-lcssa:      ; preds = %..preheader104_crit_edge.us.us.unr-lcssa
  %177 = load ptr, ptr %131, align 8, !tbaa !32
  %178 = getelementptr inbounds ptr, ptr %177, i64 %.1112.us.us
  %179 = load ptr, ptr %178, align 8, !tbaa !33
  %180 = getelementptr inbounds double, ptr %179, i64 %.199107.us.us.unr
  %181 = load double, ptr %180, align 8, !tbaa !34
  %182 = load ptr, ptr %132, align 8, !tbaa !32
  %183 = getelementptr inbounds ptr, ptr %182, i64 %.1112.us.us
  %184 = load ptr, ptr %183, align 8, !tbaa !33
  %185 = getelementptr inbounds double, ptr %184, i64 %.199107.us.us.unr
  store double %181, ptr %185, align 8, !tbaa !34
  br label %..preheader104_crit_edge.us.us

..preheader104_crit_edge.us.us:                   ; preds = %..preheader104_crit_edge.us.us.unr-lcssa, %..preheader104_crit_edge.us.us.epilog-lcssa
  %186 = mul nuw nsw i64 %.1112.us.us, %15
  br i1 %136, label %._crit_edge.us.us.unr-lcssa, label %..preheader104_crit_edge.us.us.new

._crit_edge.us.us.unr-lcssa:                      ; preds = %..preheader104_crit_edge.us.us.new, %..preheader104_crit_edge.us.us
  %.2109.us.us.unr = phi i64 [ 0, %..preheader104_crit_edge.us.us ], [ %156, %..preheader104_crit_edge.us.us.new ]
  br i1 %lcmp.mod162.not, label %._crit_edge.us.us, label %._crit_edge.us.us.epilog-lcssa

._crit_edge.us.us.epilog-lcssa:                   ; preds = %._crit_edge.us.us.unr-lcssa
  %187 = load ptr, ptr %133, align 8, !tbaa !32
  %188 = getelementptr double, ptr %187, i64 %186
  %189 = getelementptr double, ptr %188, i64 %.2109.us.us.unr
  %190 = load double, ptr %189, align 8, !tbaa !34
  %191 = load ptr, ptr %132, align 8, !tbaa !32
  %192 = getelementptr inbounds ptr, ptr %191, i64 %.1112.us.us
  %193 = load ptr, ptr %192, align 8, !tbaa !33
  %194 = getelementptr double, ptr %193, i64 %13
  %195 = getelementptr double, ptr %194, i64 %.2109.us.us.unr
  store double %190, ptr %195, align 8, !tbaa !34
  br label %._crit_edge.us.us

._crit_edge.us.us:                                ; preds = %._crit_edge.us.us.unr-lcssa, %._crit_edge.us.us.epilog-lcssa
  %196 = add nuw nsw i64 %.1112.us.us, 1
  %exitcond137.not = icmp eq i64 %196, %11
  br i1 %exitcond137.not, label %._crit_edge113, label %.preheader105.us.us, !llvm.loop !42

.preheader105.us:                                 ; preds = %.preheader105.us.preheader, %._crit_edge.us
  %.1112.us = phi i64 [ %227, %._crit_edge.us ], [ 0, %.preheader105.us.preheader ]
  %197 = mul nuw nsw i64 %.1112.us, %15
  br i1 %134, label %._crit_edge.us.unr-lcssa, label %.preheader105.us.new

.preheader105.us.new:                             ; preds = %.preheader105.us, %.preheader105.us.new
  %.2109.us = phi i64 [ %217, %.preheader105.us.new ], [ 0, %.preheader105.us ]
  %niter154 = phi i64 [ %niter154.next.1, %.preheader105.us.new ], [ 0, %.preheader105.us ]
  %198 = load ptr, ptr %133, align 8, !tbaa !32
  %199 = getelementptr double, ptr %198, i64 %197
  %200 = getelementptr double, ptr %199, i64 %.2109.us
  %201 = load double, ptr %200, align 8, !tbaa !34
  %202 = load ptr, ptr %132, align 8, !tbaa !32
  %203 = getelementptr inbounds ptr, ptr %202, i64 %.1112.us
  %204 = load ptr, ptr %203, align 8, !tbaa !33
  %205 = getelementptr double, ptr %204, i64 %13
  %206 = getelementptr double, ptr %205, i64 %.2109.us
  store double %201, ptr %206, align 8, !tbaa !34
  %207 = or disjoint i64 %.2109.us, 1
  %208 = load ptr, ptr %133, align 8, !tbaa !32
  %209 = getelementptr double, ptr %208, i64 %197
  %210 = getelementptr double, ptr %209, i64 %207
  %211 = load double, ptr %210, align 8, !tbaa !34
  %212 = load ptr, ptr %132, align 8, !tbaa !32
  %213 = getelementptr inbounds ptr, ptr %212, i64 %.1112.us
  %214 = load ptr, ptr %213, align 8, !tbaa !33
  %215 = getelementptr double, ptr %214, i64 %13
  %216 = getelementptr double, ptr %215, i64 %207
  store double %211, ptr %216, align 8, !tbaa !34
  %217 = add nuw nsw i64 %.2109.us, 2
  %niter154.next.1 = add i64 %niter154, 2
  %niter154.ncmp.1 = icmp eq i64 %niter154.next.1, %unroll_iter153
  br i1 %niter154.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader105.us.new, !llvm.loop !40

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader105.us.new, %.preheader105.us
  %.2109.us.unr = phi i64 [ 0, %.preheader105.us ], [ %217, %.preheader105.us.new ]
  br i1 %lcmp.mod152.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %218 = load ptr, ptr %133, align 8, !tbaa !32
  %219 = getelementptr double, ptr %218, i64 %197
  %220 = getelementptr double, ptr %219, i64 %.2109.us.unr
  %221 = load double, ptr %220, align 8, !tbaa !34
  %222 = load ptr, ptr %132, align 8, !tbaa !32
  %223 = getelementptr inbounds ptr, ptr %222, i64 %.1112.us
  %224 = load ptr, ptr %223, align 8, !tbaa !33
  %225 = getelementptr double, ptr %224, i64 %13
  %226 = getelementptr double, ptr %225, i64 %.2109.us.unr
  store double %221, ptr %226, align 8, !tbaa !34
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %227 = add nuw nsw i64 %.1112.us, 1
  %exitcond134.not = icmp eq i64 %227, %11
  br i1 %exitcond134.not, label %._crit_edge113, label %.preheader105.us, !llvm.loop !42

.preheader105.lr.ph.split:                        ; preds = %.preheader105.lr.ph
  br i1 %.not.not100106, label %.preheader105.us114.preheader, label %._crit_edge113

.preheader105.us114.preheader:                    ; preds = %.preheader105.lr.ph.split
  %xtraiter = and i64 %13, 1
  %228 = icmp eq i64 %13, 1
  %unroll_iter = and i64 %13, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader105.us114

.preheader105.us114:                              ; preds = %.preheader105.us114.preheader, %..preheader104_crit_edge.us121
  %.1112.us115 = phi i64 [ %258, %..preheader104_crit_edge.us121 ], [ 0, %.preheader105.us114.preheader ]
  br i1 %228, label %..preheader104_crit_edge.us121.unr-lcssa, label %.preheader105.us114.new

.preheader105.us114.new:                          ; preds = %.preheader105.us114, %.preheader105.us114.new
  %.199107.us116 = phi i64 [ %248, %.preheader105.us114.new ], [ 0, %.preheader105.us114 ]
  %niter = phi i64 [ %niter.next.1, %.preheader105.us114.new ], [ 0, %.preheader105.us114 ]
  %229 = load ptr, ptr %131, align 8, !tbaa !32
  %230 = getelementptr inbounds ptr, ptr %229, i64 %.1112.us115
  %231 = load ptr, ptr %230, align 8, !tbaa !33
  %232 = getelementptr inbounds double, ptr %231, i64 %.199107.us116
  %233 = load double, ptr %232, align 8, !tbaa !34
  %234 = load ptr, ptr %132, align 8, !tbaa !32
  %235 = getelementptr inbounds ptr, ptr %234, i64 %.1112.us115
  %236 = load ptr, ptr %235, align 8, !tbaa !33
  %237 = getelementptr inbounds double, ptr %236, i64 %.199107.us116
  store double %233, ptr %237, align 8, !tbaa !34
  %238 = or disjoint i64 %.199107.us116, 1
  %239 = load ptr, ptr %131, align 8, !tbaa !32
  %240 = getelementptr inbounds ptr, ptr %239, i64 %.1112.us115
  %241 = load ptr, ptr %240, align 8, !tbaa !33
  %242 = getelementptr inbounds double, ptr %241, i64 %238
  %243 = load double, ptr %242, align 8, !tbaa !34
  %244 = load ptr, ptr %132, align 8, !tbaa !32
  %245 = getelementptr inbounds ptr, ptr %244, i64 %.1112.us115
  %246 = load ptr, ptr %245, align 8, !tbaa !33
  %247 = getelementptr inbounds double, ptr %246, i64 %238
  store double %243, ptr %247, align 8, !tbaa !34
  %248 = add nuw nsw i64 %.199107.us116, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %..preheader104_crit_edge.us121.unr-lcssa, label %.preheader105.us114.new, !llvm.loop !41

..preheader104_crit_edge.us121.unr-lcssa:         ; preds = %.preheader105.us114.new, %.preheader105.us114
  %.199107.us116.unr = phi i64 [ 0, %.preheader105.us114 ], [ %248, %.preheader105.us114.new ]
  br i1 %lcmp.mod.not, label %..preheader104_crit_edge.us121, label %..preheader104_crit_edge.us121.epilog-lcssa

..preheader104_crit_edge.us121.epilog-lcssa:      ; preds = %..preheader104_crit_edge.us121.unr-lcssa
  %249 = load ptr, ptr %131, align 8, !tbaa !32
  %250 = getelementptr inbounds ptr, ptr %249, i64 %.1112.us115
  %251 = load ptr, ptr %250, align 8, !tbaa !33
  %252 = getelementptr inbounds double, ptr %251, i64 %.199107.us116.unr
  %253 = load double, ptr %252, align 8, !tbaa !34
  %254 = load ptr, ptr %132, align 8, !tbaa !32
  %255 = getelementptr inbounds ptr, ptr %254, i64 %.1112.us115
  %256 = load ptr, ptr %255, align 8, !tbaa !33
  %257 = getelementptr inbounds double, ptr %256, i64 %.199107.us116.unr
  store double %253, ptr %257, align 8, !tbaa !34
  br label %..preheader104_crit_edge.us121

..preheader104_crit_edge.us121:                   ; preds = %..preheader104_crit_edge.us121.unr-lcssa, %..preheader104_crit_edge.us121.epilog-lcssa
  %258 = add nuw nsw i64 %.1112.us115, 1
  %exitcond132.not = icmp eq i64 %258, %11
  br i1 %exitcond132.not, label %._crit_edge113, label %.preheader105.us114, !llvm.loop !42

._crit_edge113:                                   ; preds = %..preheader104_crit_edge.us121, %._crit_edge.us, %._crit_edge.us.us, %.preheader105.lr.ph.split, %129
  %259 = getelementptr inbounds i8, ptr %0, i64 248
  %260 = load i64, ptr %259, align 8, !tbaa !39
  %261 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZN11alglib_impl11kdtreebuildEPNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %11, i64 noundef %13, i64 noundef %15, i64 noundef %260, ptr noundef nonnull %261, ptr noundef %5)
  br label %262

262:                                              ; preds = %._crit_edge113, %._crit_edge126
  %263 = getelementptr inbounds i8, ptr %3, i64 1040
  call void @_ZN11alglib_impl15knncreatebufferEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef nonnull %263, ptr noundef %5)
  call void @_ZN11alglib_impl12knnallerrorsEPNS_8knnmodelEPNS_9ae_matrixElPNS_9knnreportEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef nonnull %8, i64 noundef %11, ptr noundef %4, ptr noundef %5)
  br label %264

264:                                              ; preds = %262, %32
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  ret void
}

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

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

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

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) 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 zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15_knnmodel_clearEPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl16_knnreport_clearEPv(ptr noundef) local_unnamed_addr #3

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

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

declare void @_ZN11alglib_impl11kdtreebuildEPNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr 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 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN11alglib_impl10knnbuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !11, i64 40, !14, i64 120, !14, i64 184, !7, i64 248}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !12, i64 40, !8, i64 72}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 24, !8, i64 56}
!15 = !{!6, !7, i64 16}
!16 = !{!6, !7, i64 32}
!17 = !{!6, !10, i64 24}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTSN11alglib_impl8knnmodelE", !7, i64 0, !7, i64 8, !7, i64 16, !22, i64 24, !10, i64 32, !10, i64 33, !23, i64 40, !25, i64 1040}
!22 = !{!"double", !8, i64 0}
!23 = !{!"_ZTSN11alglib_impl6kdtreeE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !14, i64 112, !14, i64 176, !14, i64 240, !14, i64 304, !14, i64 368, !24, i64 432, !7, i64 992}
!24 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !14, i64 0, !14, i64 64, !14, i64 128, !7, i64 192, !22, i64 200, !10, i64 208, !22, i64 216, !7, i64 224, !14, i64 232, !14, i64 296, !14, i64 360, !14, i64 424, !14, i64 488, !22, i64 552}
!25 = !{!"_ZTSN11alglib_impl9knnbufferE", !24, i64 0, !14, i64 560, !14, i64 624, !14, i64 688, !11, i64 752}
!26 = !{!21, !7, i64 8}
!27 = !{!21, !10, i64 32}
!28 = !{!21, !7, i64 16}
!29 = !{!21, !22, i64 24}
!30 = !{!21, !10, i64 33}
!31 = !{!6, !7, i64 0}
!32 = !{!8, !8, i64 0}
!33 = !{!13, !13, i64 0}
!34 = !{!22, !22, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !36}
!39 = !{!6, !7, i64 248}
!40 = distinct !{!40, !36}
!41 = distinct !{!41, !36}
!42 = distinct !{!42, !36}


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