; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (interpolation)

; 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::mstabbuffer" = 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::kdtreerequestbuffer" }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"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::ae_vector" }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::idwbuilder" = type { i64, %"struct.alglib_impl::ae_vector", i64, i64, double, double, double, double, double, double, i8, i64, double, %"struct.alglib_impl::ae_vector", i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtree", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"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::idwreport" = type { double, double, double, double }
%"struct.alglib_impl::idwmodel" = type { i64, i64, %"struct.alglib_impl::ae_vector", i64, i64, double, double, double, double, double, double, i8, %"struct.alglib_impl::kdtree", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::idwcalcbuffer" }
%"struct.alglib_impl::idwcalcbuffer" = 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_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer" }

@.str.159 = external hidden unnamed_addr constant [31 x i8], align 1
@_ZN11alglib_implL8idw_mepsE = external hidden global double, align 8
@_ZN11alglib_implL16idw_idwbatchsizeE = external hidden global i64, align 8
@.str.160 = external hidden unnamed_addr constant [53 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl6idwfitEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca %"struct.alglib_impl::mstabbuffer", align 8
  %20 = alloca %"struct.alglib_impl::ae_shared_pool", align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, 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 944, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %26, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 944, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 136, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef %27)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl16_idwreport_clearEPv(ptr noundef %28)
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_mstabbuffer_initEPvPNS_8ae_stateEb(ptr noundef %19, ptr noundef %29, i1 noundef zeroext true)
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_shared_pool_initEPvPNS_8ae_stateEb(ptr noundef %20, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %34, i32 0, i32 15
  %36 = load i64, ptr %35, align 8, !tbaa !9
  store i64 %36, ptr %15, align 8, !tbaa !19
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %37, i32 0, i32 16
  %39 = load i64, ptr %38, align 8, !tbaa !20
  store i64 %39, ptr %16, align 8, !tbaa !19
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %40, i32 0, i32 14
  %42 = load i64, ptr %41, align 8, !tbaa !21
  store i64 %42, ptr %14, align 8, !tbaa !19
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %43, i32 0, i32 0
  store double 0.000000e+00, ptr %44, align 8, !tbaa !22
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %45, i32 0, i32 1
  store double 0.000000e+00, ptr %46, align 8, !tbaa !24
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %47, i32 0, i32 2
  store double 0.000000e+00, ptr %48, align 8, !tbaa !25
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %49, i32 0, i32 3
  store double 1.000000e+00, ptr %50, align 8, !tbaa !26
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %51, i32 0, i32 12
  store double 0.000000e+00, ptr %52, align 8, !tbaa !27
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %53, i32 0, i32 14
  %55 = load i64, ptr %54, align 8, !tbaa !21
  %56 = icmp eq i64 %55, 0
  br i1 %56, label %57, label %111

57:                                               ; preds = %4
  %58 = load i64, ptr %15, align 8, !tbaa !19
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %59, i32 0, i32 0
  store i64 %58, ptr %60, align 8, !tbaa !28
  %61 = load i64, ptr %16, align 8, !tbaa !19
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %62, i32 0, i32 1
  store i64 %61, ptr %63, align 8, !tbaa !31
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %64, i32 0, i32 2
  %66 = load i64, ptr %16, align 8, !tbaa !19
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %65, i64 noundef %66, ptr noundef %67)
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %68

68:                                               ; preds = %80, %57
  %69 = load i64, ptr %10, align 8, !tbaa !19
  %70 = load i64, ptr %16, align 8, !tbaa !19
  %71 = sub nsw i64 %70, 1
  %72 = icmp sle i64 %69, %71
  br i1 %72, label %73, label %83

73:                                               ; preds = %68
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !32
  %78 = load i64, ptr %10, align 8, !tbaa !19
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  store double 0.000000e+00, ptr %79, align 8, !tbaa !33
  br label %80

80:                                               ; preds = %73
  %81 = load i64, ptr %10, align 8, !tbaa !19
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %10, align 8, !tbaa !19
  br label %68, !llvm.loop !34

83:                                               ; preds = %68
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %84, i32 0, i32 3
  store i64 0, ptr %85, align 8, !tbaa !36
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %86, i32 0, i32 4
  store i64 0, ptr %87, align 8, !tbaa !37
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %88, i32 0, i32 5
  store double 1.000000e+00, ptr %89, align 8, !tbaa !38
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %90, i32 0, i32 6
  store double 5.000000e-01, ptr %91, align 8, !tbaa !39
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %92, i32 0, i32 7
  store double 0.000000e+00, ptr %93, align 8, !tbaa !40
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %94, i32 0, i32 8
  store double 0.000000e+00, ptr %95, align 8, !tbaa !41
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %96, i32 0, i32 9
  store double 1.000000e+00, ptr %97, align 8, !tbaa !42
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %98, i32 0, i32 10
  store double 2.000000e+00, ptr %99, align 8, !tbaa !43
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %100, i32 0, i32 13
  store i64 0, ptr %101, align 8, !tbaa !44
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %102, i32 0, i32 11
  store i8 0, ptr %103, align 8, !tbaa !45
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %105, i32 0, i32 15
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %104, ptr noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %108, i32 0, i32 12
  store double 1.000000e+00, ptr %109, align 8, !tbaa !27
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %110)
  store i32 1, ptr %25, align 4
  br label %1121

111:                                              ; preds = %4
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %112, i32 0, i32 14
  %114 = load i64, ptr %113, align 8, !tbaa !21
  %115 = icmp sgt i64 %114, 0
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %115, ptr noundef @.str.159, ptr noundef %116)
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %117, i32 0, i32 22
  %119 = load i64, ptr %16, align 8, !tbaa !19
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %118, i64 noundef %119, ptr noundef %120)
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %121

121:                                              ; preds = %133, %111
  %122 = load i64, ptr %11, align 8, !tbaa !19
  %123 = load i64, ptr %16, align 8, !tbaa !19
  %124 = sub nsw i64 %123, 1
  %125 = icmp sle i64 %122, %124
  br i1 %125, label %126, label %136

126:                                              ; preds = %121
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %127, i32 0, i32 22
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !32
  %131 = load i64, ptr %11, align 8, !tbaa !19
  %132 = getelementptr inbounds double, ptr %130, i64 %131
  store double 0.000000e+00, ptr %132, align 8, !tbaa !33
  br label %133

133:                                              ; preds = %126
  %134 = load i64, ptr %11, align 8, !tbaa !19
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %11, align 8, !tbaa !19
  br label %121, !llvm.loop !46

136:                                              ; preds = %121
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %137

137:                                              ; preds = %182, %136
  %138 = load i64, ptr %10, align 8, !tbaa !19
  %139 = load i64, ptr %14, align 8, !tbaa !19
  %140 = sub nsw i64 %139, 1
  %141 = icmp sle i64 %138, %140
  br i1 %141, label %142, label %185

142:                                              ; preds = %137
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %143

143:                                              ; preds = %178, %142
  %144 = load i64, ptr %11, align 8, !tbaa !19
  %145 = load i64, ptr %16, align 8, !tbaa !19
  %146 = sub nsw i64 %145, 1
  %147 = icmp sle i64 %144, %146
  br i1 %147, label %148, label %181

148:                                              ; preds = %143
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %149, i32 0, i32 22
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %150, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !32
  %153 = load i64, ptr %11, align 8, !tbaa !19
  %154 = getelementptr inbounds double, ptr %152, i64 %153
  %155 = load double, ptr %154, align 8, !tbaa !33
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %156, i32 0, i32 13
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !32
  %160 = load i64, ptr %10, align 8, !tbaa !19
  %161 = load i64, ptr %15, align 8, !tbaa !19
  %162 = load i64, ptr %16, align 8, !tbaa !19
  %163 = add nsw i64 %161, %162
  %164 = mul nsw i64 %160, %163
  %165 = load i64, ptr %15, align 8, !tbaa !19
  %166 = add nsw i64 %164, %165
  %167 = load i64, ptr %11, align 8, !tbaa !19
  %168 = add nsw i64 %166, %167
  %169 = getelementptr inbounds double, ptr %159, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !33
  %171 = fadd double %155, %170
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %172, i32 0, i32 22
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !32
  %176 = load i64, ptr %11, align 8, !tbaa !19
  %177 = getelementptr inbounds double, ptr %175, i64 %176
  store double %171, ptr %177, align 8, !tbaa !33
  br label %178

178:                                              ; preds = %148
  %179 = load i64, ptr %11, align 8, !tbaa !19
  %180 = add nsw i64 %179, 1
  store i64 %180, ptr %11, align 8, !tbaa !19
  br label %143, !llvm.loop !47

181:                                              ; preds = %143
  br label %182

182:                                              ; preds = %181
  %183 = load i64, ptr %10, align 8, !tbaa !19
  %184 = add nsw i64 %183, 1
  store i64 %184, ptr %10, align 8, !tbaa !19
  br label %137, !llvm.loop !48

185:                                              ; preds = %137
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %186

186:                                              ; preds = %208, %185
  %187 = load i64, ptr %11, align 8, !tbaa !19
  %188 = load i64, ptr %16, align 8, !tbaa !19
  %189 = sub nsw i64 %188, 1
  %190 = icmp sle i64 %187, %189
  br i1 %190, label %191, label %211

191:                                              ; preds = %186
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %192, i32 0, i32 22
  %194 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %193, i32 0, i32 4
  %195 = load ptr, ptr %194, align 8, !tbaa !32
  %196 = load i64, ptr %11, align 8, !tbaa !19
  %197 = getelementptr inbounds double, ptr %195, i64 %196
  %198 = load double, ptr %197, align 8, !tbaa !33
  %199 = load i64, ptr %14, align 8, !tbaa !19
  %200 = sitofp i64 %199 to double
  %201 = fdiv double %198, %200
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %202, i32 0, i32 22
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %203, i32 0, i32 4
  %205 = load ptr, ptr %204, align 8, !tbaa !32
  %206 = load i64, ptr %11, align 8, !tbaa !19
  %207 = getelementptr inbounds double, ptr %205, i64 %206
  store double %201, ptr %207, align 8, !tbaa !33
  br label %208

208:                                              ; preds = %191
  %209 = load i64, ptr %11, align 8, !tbaa !19
  %210 = add nsw i64 %209, 1
  store i64 %210, ptr %11, align 8, !tbaa !19
  br label %186, !llvm.loop !49

211:                                              ; preds = %186
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %212, i32 0, i32 2
  %214 = load i64, ptr %16, align 8, !tbaa !19
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %213, i64 noundef %214, ptr noundef %215)
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %216

216:                                              ; preds = %235, %211
  %217 = load i64, ptr %11, align 8, !tbaa !19
  %218 = load i64, ptr %16, align 8, !tbaa !19
  %219 = sub nsw i64 %218, 1
  %220 = icmp sle i64 %217, %219
  br i1 %220, label %221, label %238

221:                                              ; preds = %216
  %222 = load ptr, ptr %5, align 8, !tbaa !5
  %223 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %222, i32 0, i32 22
  %224 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !32
  %226 = load i64, ptr %11, align 8, !tbaa !19
  %227 = getelementptr inbounds double, ptr %225, i64 %226
  %228 = load double, ptr %227, align 8, !tbaa !33
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %229, i32 0, i32 2
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %230, i32 0, i32 4
  %232 = load ptr, ptr %231, align 8, !tbaa !32
  %233 = load i64, ptr %11, align 8, !tbaa !19
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  store double %228, ptr %234, align 8, !tbaa !33
  br label %235

235:                                              ; preds = %221
  %236 = load i64, ptr %11, align 8, !tbaa !19
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %11, align 8, !tbaa !19
  br label %216, !llvm.loop !50

238:                                              ; preds = %216
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %239, i32 0, i32 2
  %241 = load i64, ptr %240, align 8, !tbaa !51
  %242 = icmp ne i64 %241, 0
  br i1 %242, label %243, label %295

243:                                              ; preds = %238
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %244, i32 0, i32 0
  %246 = load i64, ptr %245, align 8, !tbaa !52
  %247 = icmp eq i64 %246, 0
  br i1 %247, label %248, label %272

248:                                              ; preds = %243
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %249

249:                                              ; preds = %268, %248
  %250 = load i64, ptr %11, align 8, !tbaa !19
  %251 = load i64, ptr %16, align 8, !tbaa !19
  %252 = sub nsw i64 %251, 1
  %253 = icmp sle i64 %250, %252
  br i1 %253, label %254, label %271

254:                                              ; preds = %249
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %255, i32 0, i32 1
  %257 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %256, i32 0, i32 4
  %258 = load ptr, ptr %257, align 8, !tbaa !32
  %259 = load i64, ptr %11, align 8, !tbaa !19
  %260 = getelementptr inbounds double, ptr %258, i64 %259
  %261 = load double, ptr %260, align 8, !tbaa !33
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %262, i32 0, i32 2
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %263, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !32
  %266 = load i64, ptr %11, align 8, !tbaa !19
  %267 = getelementptr inbounds double, ptr %265, i64 %266
  store double %261, ptr %267, align 8, !tbaa !33
  br label %268

268:                                              ; preds = %254
  %269 = load i64, ptr %11, align 8, !tbaa !19
  %270 = add nsw i64 %269, 1
  store i64 %270, ptr %11, align 8, !tbaa !19
  br label %249, !llvm.loop !53

271:                                              ; preds = %249
  br label %272

272:                                              ; preds = %271, %243
  %273 = load ptr, ptr %5, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %273, i32 0, i32 0
  %275 = load i64, ptr %274, align 8, !tbaa !52
  %276 = icmp eq i64 %275, 3
  br i1 %276, label %277, label %294

277:                                              ; preds = %272
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %278

278:                                              ; preds = %290, %277
  %279 = load i64, ptr %11, align 8, !tbaa !19
  %280 = load i64, ptr %16, align 8, !tbaa !19
  %281 = sub nsw i64 %280, 1
  %282 = icmp sle i64 %279, %281
  br i1 %282, label %283, label %293

283:                                              ; preds = %278
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %284, i32 0, i32 2
  %286 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %285, i32 0, i32 4
  %287 = load ptr, ptr %286, align 8, !tbaa !32
  %288 = load i64, ptr %11, align 8, !tbaa !19
  %289 = getelementptr inbounds double, ptr %287, i64 %288
  store double 0.000000e+00, ptr %289, align 8, !tbaa !33
  br label %290

290:                                              ; preds = %283
  %291 = load i64, ptr %11, align 8, !tbaa !19
  %292 = add nsw i64 %291, 1
  store i64 %292, ptr %11, align 8, !tbaa !19
  br label %278, !llvm.loop !54

293:                                              ; preds = %278
  br label %294

294:                                              ; preds = %293, %272
  br label %295

295:                                              ; preds = %294, %238
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %296, i32 0, i32 2
  %298 = load i64, ptr %297, align 8, !tbaa !51
  %299 = icmp eq i64 %298, 0
  br i1 %299, label %300, label %442

300:                                              ; preds = %295
  %301 = load ptr, ptr %6, align 8, !tbaa !5
  %302 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %301, i32 0, i32 3
  store i64 0, ptr %302, align 8, !tbaa !36
  %303 = load i64, ptr %15, align 8, !tbaa !19
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %304, i32 0, i32 0
  store i64 %303, ptr %305, align 8, !tbaa !28
  %306 = load i64, ptr %16, align 8, !tbaa !19
  %307 = load ptr, ptr %6, align 8, !tbaa !5
  %308 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %307, i32 0, i32 1
  store i64 %306, ptr %308, align 8, !tbaa !31
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %309, i32 0, i32 4
  store i64 1, ptr %310, align 8, !tbaa !37
  %311 = load ptr, ptr %6, align 8, !tbaa !5
  %312 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %311, i32 0, i32 5
  store double 1.000000e+00, ptr %312, align 8, !tbaa !38
  %313 = load ptr, ptr %6, align 8, !tbaa !5
  %314 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %313, i32 0, i32 6
  store double 5.000000e-01, ptr %314, align 8, !tbaa !39
  %315 = load ptr, ptr %6, align 8, !tbaa !5
  %316 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %315, i32 0, i32 7
  store double 0.000000e+00, ptr %316, align 8, !tbaa !40
  %317 = load ptr, ptr %6, align 8, !tbaa !5
  %318 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %317, i32 0, i32 8
  store double 0.000000e+00, ptr %318, align 8, !tbaa !41
  %319 = load ptr, ptr %6, align 8, !tbaa !5
  %320 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %319, i32 0, i32 9
  store double 1.000000e+00, ptr %320, align 8, !tbaa !42
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %321, i32 0, i32 9
  %323 = load double, ptr %322, align 8, !tbaa !55
  %324 = load ptr, ptr %6, align 8, !tbaa !5
  %325 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %324, i32 0, i32 10
  store double %323, ptr %325, align 8, !tbaa !43
  %326 = load ptr, ptr %6, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %326, i32 0, i32 11
  store i8 0, ptr %327, align 8, !tbaa !45
  %328 = load ptr, ptr %6, align 8, !tbaa !5
  %329 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %328, i32 0, i32 14
  %330 = load i64, ptr %14, align 8, !tbaa !19
  %331 = load i64, ptr %15, align 8, !tbaa !19
  %332 = load i64, ptr %16, align 8, !tbaa !19
  %333 = add nsw i64 %331, %332
  %334 = mul nsw i64 %330, %333
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %329, i64 noundef %334, ptr noundef %335)
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %336

336:                                              ; preds = %424, %300
  %337 = load i64, ptr %10, align 8, !tbaa !19
  %338 = load i64, ptr %14, align 8, !tbaa !19
  %339 = sub nsw i64 %338, 1
  %340 = icmp sle i64 %337, %339
  br i1 %340, label %341, label %427

341:                                              ; preds = %336
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %342

342:                                              ; preds = %373, %341
  %343 = load i64, ptr %11, align 8, !tbaa !19
  %344 = load i64, ptr %15, align 8, !tbaa !19
  %345 = sub nsw i64 %344, 1
  %346 = icmp sle i64 %343, %345
  br i1 %346, label %347, label %376

347:                                              ; preds = %342
  %348 = load ptr, ptr %5, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %348, i32 0, i32 13
  %350 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %349, i32 0, i32 4
  %351 = load ptr, ptr %350, align 8, !tbaa !32
  %352 = load i64, ptr %10, align 8, !tbaa !19
  %353 = load i64, ptr %15, align 8, !tbaa !19
  %354 = load i64, ptr %16, align 8, !tbaa !19
  %355 = add nsw i64 %353, %354
  %356 = mul nsw i64 %352, %355
  %357 = load i64, ptr %11, align 8, !tbaa !19
  %358 = add nsw i64 %356, %357
  %359 = getelementptr inbounds double, ptr %351, i64 %358
  %360 = load double, ptr %359, align 8, !tbaa !33
  %361 = load ptr, ptr %6, align 8, !tbaa !5
  %362 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %361, i32 0, i32 14
  %363 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %362, i32 0, i32 4
  %364 = load ptr, ptr %363, align 8, !tbaa !32
  %365 = load i64, ptr %10, align 8, !tbaa !19
  %366 = load i64, ptr %15, align 8, !tbaa !19
  %367 = load i64, ptr %16, align 8, !tbaa !19
  %368 = add nsw i64 %366, %367
  %369 = mul nsw i64 %365, %368
  %370 = load i64, ptr %11, align 8, !tbaa !19
  %371 = add nsw i64 %369, %370
  %372 = getelementptr inbounds double, ptr %364, i64 %371
  store double %360, ptr %372, align 8, !tbaa !33
  br label %373

373:                                              ; preds = %347
  %374 = load i64, ptr %11, align 8, !tbaa !19
  %375 = add nsw i64 %374, 1
  store i64 %375, ptr %11, align 8, !tbaa !19
  br label %342, !llvm.loop !56

376:                                              ; preds = %342
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %377

377:                                              ; preds = %420, %376
  %378 = load i64, ptr %11, align 8, !tbaa !19
  %379 = load i64, ptr %16, align 8, !tbaa !19
  %380 = sub nsw i64 %379, 1
  %381 = icmp sle i64 %378, %380
  br i1 %381, label %382, label %423

382:                                              ; preds = %377
  %383 = load ptr, ptr %5, align 8, !tbaa !5
  %384 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %383, i32 0, i32 13
  %385 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %384, i32 0, i32 4
  %386 = load ptr, ptr %385, align 8, !tbaa !32
  %387 = load i64, ptr %10, align 8, !tbaa !19
  %388 = load i64, ptr %15, align 8, !tbaa !19
  %389 = load i64, ptr %16, align 8, !tbaa !19
  %390 = add nsw i64 %388, %389
  %391 = mul nsw i64 %387, %390
  %392 = load i64, ptr %15, align 8, !tbaa !19
  %393 = add nsw i64 %391, %392
  %394 = load i64, ptr %11, align 8, !tbaa !19
  %395 = add nsw i64 %393, %394
  %396 = getelementptr inbounds double, ptr %386, i64 %395
  %397 = load double, ptr %396, align 8, !tbaa !33
  %398 = load ptr, ptr %6, align 8, !tbaa !5
  %399 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %398, i32 0, i32 2
  %400 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %399, i32 0, i32 4
  %401 = load ptr, ptr %400, align 8, !tbaa !32
  %402 = load i64, ptr %11, align 8, !tbaa !19
  %403 = getelementptr inbounds double, ptr %401, i64 %402
  %404 = load double, ptr %403, align 8, !tbaa !33
  %405 = fsub double %397, %404
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %406, i32 0, i32 14
  %408 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %407, i32 0, i32 4
  %409 = load ptr, ptr %408, align 8, !tbaa !32
  %410 = load i64, ptr %10, align 8, !tbaa !19
  %411 = load i64, ptr %15, align 8, !tbaa !19
  %412 = load i64, ptr %16, align 8, !tbaa !19
  %413 = add nsw i64 %411, %412
  %414 = mul nsw i64 %410, %413
  %415 = load i64, ptr %15, align 8, !tbaa !19
  %416 = add nsw i64 %414, %415
  %417 = load i64, ptr %11, align 8, !tbaa !19
  %418 = add nsw i64 %416, %417
  %419 = getelementptr inbounds double, ptr %409, i64 %418
  store double %405, ptr %419, align 8, !tbaa !33
  br label %420

420:                                              ; preds = %382
  %421 = load i64, ptr %11, align 8, !tbaa !19
  %422 = add nsw i64 %421, 1
  store i64 %422, ptr %11, align 8, !tbaa !19
  br label %377, !llvm.loop !57

423:                                              ; preds = %377
  br label %424

424:                                              ; preds = %423
  %425 = load i64, ptr %10, align 8, !tbaa !19
  %426 = add nsw i64 %425, 1
  store i64 %426, ptr %10, align 8, !tbaa !19
  br label %336, !llvm.loop !58

427:                                              ; preds = %336
  %428 = load i64, ptr %14, align 8, !tbaa !19
  %429 = load ptr, ptr %6, align 8, !tbaa !5
  %430 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %429, i32 0, i32 13
  store i64 %428, ptr %430, align 8, !tbaa !44
  %431 = load ptr, ptr %6, align 8, !tbaa !5
  %432 = load ptr, ptr %6, align 8, !tbaa !5
  %433 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %432, i32 0, i32 15
  %434 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %431, ptr noundef %433, ptr noundef %434)
  %435 = load ptr, ptr %5, align 8, !tbaa !5
  %436 = load ptr, ptr %6, align 8, !tbaa !5
  %437 = load ptr, ptr %7, align 8, !tbaa !5
  %438 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL23idw_errormetricsviacalcEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %435, ptr noundef %436, ptr noundef %437, ptr noundef %438)
  %439 = load ptr, ptr %5, align 8, !tbaa !5
  %440 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %439, i32 0, i32 12
  store double 1.000000e+00, ptr %440, align 8, !tbaa !27
  %441 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %441)
  store i32 1, ptr %25, align 4
  br label %1121

442:                                              ; preds = %295
  %443 = load ptr, ptr %5, align 8, !tbaa !5
  %444 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %443, i32 0, i32 2
  %445 = load i64, ptr %444, align 8, !tbaa !51
  %446 = icmp eq i64 %445, 1
  br i1 %446, label %447, label %587

447:                                              ; preds = %442
  %448 = load ptr, ptr %6, align 8, !tbaa !5
  %449 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %448, i32 0, i32 3
  store i64 1, ptr %449, align 8, !tbaa !36
  %450 = load i64, ptr %15, align 8, !tbaa !19
  %451 = load ptr, ptr %6, align 8, !tbaa !5
  %452 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %451, i32 0, i32 0
  store i64 %450, ptr %452, align 8, !tbaa !28
  %453 = load i64, ptr %16, align 8, !tbaa !19
  %454 = load ptr, ptr %6, align 8, !tbaa !5
  %455 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %454, i32 0, i32 1
  store i64 %453, ptr %455, align 8, !tbaa !31
  %456 = load ptr, ptr %6, align 8, !tbaa !5
  %457 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %456, i32 0, i32 4
  store i64 1, ptr %457, align 8, !tbaa !37
  %458 = load ptr, ptr %5, align 8, !tbaa !5
  %459 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %458, i32 0, i32 4
  %460 = load double, ptr %459, align 8, !tbaa !59
  %461 = load ptr, ptr %6, align 8, !tbaa !5
  %462 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %461, i32 0, i32 5
  store double %460, ptr %462, align 8, !tbaa !38
  %463 = load ptr, ptr %6, align 8, !tbaa !5
  %464 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %463, i32 0, i32 6
  store double 1.000000e+00, ptr %464, align 8, !tbaa !39
  %465 = load ptr, ptr %6, align 8, !tbaa !5
  %466 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %465, i32 0, i32 7
  store double 0.000000e+00, ptr %466, align 8, !tbaa !40
  %467 = load ptr, ptr %6, align 8, !tbaa !5
  %468 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %467, i32 0, i32 8
  store double 0.000000e+00, ptr %468, align 8, !tbaa !41
  %469 = load ptr, ptr %6, align 8, !tbaa !5
  %470 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %469, i32 0, i32 9
  store double 1.000000e+00, ptr %470, align 8, !tbaa !42
  %471 = load ptr, ptr %6, align 8, !tbaa !5
  %472 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %471, i32 0, i32 10
  store double 0.000000e+00, ptr %472, align 8, !tbaa !43
  %473 = load ptr, ptr %6, align 8, !tbaa !5
  %474 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %473, i32 0, i32 11
  store i8 0, ptr %474, align 8, !tbaa !45
  %475 = load ptr, ptr %5, align 8, !tbaa !5
  %476 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %475, i32 0, i32 17
  %477 = load i64, ptr %14, align 8, !tbaa !19
  %478 = load i64, ptr %15, align 8, !tbaa !19
  %479 = load i64, ptr %16, align 8, !tbaa !19
  %480 = add nsw i64 %478, %479
  %481 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %476, i64 noundef %477, i64 noundef %480, ptr noundef %481)
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %482

482:                                              ; preds = %564, %447
  %483 = load i64, ptr %10, align 8, !tbaa !19
  %484 = load i64, ptr %14, align 8, !tbaa !19
  %485 = sub nsw i64 %484, 1
  %486 = icmp sle i64 %483, %485
  br i1 %486, label %487, label %567

487:                                              ; preds = %482
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %488

488:                                              ; preds = %516, %487
  %489 = load i64, ptr %11, align 8, !tbaa !19
  %490 = load i64, ptr %15, align 8, !tbaa !19
  %491 = sub nsw i64 %490, 1
  %492 = icmp sle i64 %489, %491
  br i1 %492, label %493, label %519

493:                                              ; preds = %488
  %494 = load ptr, ptr %5, align 8, !tbaa !5
  %495 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %494, i32 0, i32 13
  %496 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %495, i32 0, i32 4
  %497 = load ptr, ptr %496, align 8, !tbaa !32
  %498 = load i64, ptr %10, align 8, !tbaa !19
  %499 = load i64, ptr %15, align 8, !tbaa !19
  %500 = load i64, ptr %16, align 8, !tbaa !19
  %501 = add nsw i64 %499, %500
  %502 = mul nsw i64 %498, %501
  %503 = load i64, ptr %11, align 8, !tbaa !19
  %504 = add nsw i64 %502, %503
  %505 = getelementptr inbounds double, ptr %497, i64 %504
  %506 = load double, ptr %505, align 8, !tbaa !33
  %507 = load ptr, ptr %5, align 8, !tbaa !5
  %508 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %507, i32 0, i32 17
  %509 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %508, i32 0, i32 6
  %510 = load ptr, ptr %509, align 8, !tbaa !32
  %511 = load i64, ptr %10, align 8, !tbaa !19
  %512 = getelementptr inbounds ptr, ptr %510, i64 %511
  %513 = load ptr, ptr %512, align 8, !tbaa !5
  %514 = load i64, ptr %11, align 8, !tbaa !19
  %515 = getelementptr inbounds double, ptr %513, i64 %514
  store double %506, ptr %515, align 8, !tbaa !33
  br label %516

516:                                              ; preds = %493
  %517 = load i64, ptr %11, align 8, !tbaa !19
  %518 = add nsw i64 %517, 1
  store i64 %518, ptr %11, align 8, !tbaa !19
  br label %488, !llvm.loop !60

519:                                              ; preds = %488
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %520

520:                                              ; preds = %560, %519
  %521 = load i64, ptr %11, align 8, !tbaa !19
  %522 = load i64, ptr %16, align 8, !tbaa !19
  %523 = sub nsw i64 %522, 1
  %524 = icmp sle i64 %521, %523
  br i1 %524, label %525, label %563

525:                                              ; preds = %520
  %526 = load ptr, ptr %5, align 8, !tbaa !5
  %527 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %526, i32 0, i32 13
  %528 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %527, i32 0, i32 4
  %529 = load ptr, ptr %528, align 8, !tbaa !32
  %530 = load i64, ptr %10, align 8, !tbaa !19
  %531 = load i64, ptr %15, align 8, !tbaa !19
  %532 = load i64, ptr %16, align 8, !tbaa !19
  %533 = add nsw i64 %531, %532
  %534 = mul nsw i64 %530, %533
  %535 = load i64, ptr %15, align 8, !tbaa !19
  %536 = add nsw i64 %534, %535
  %537 = load i64, ptr %11, align 8, !tbaa !19
  %538 = add nsw i64 %536, %537
  %539 = getelementptr inbounds double, ptr %529, i64 %538
  %540 = load double, ptr %539, align 8, !tbaa !33
  %541 = load ptr, ptr %6, align 8, !tbaa !5
  %542 = getelementptr inbounds %"struct.alglib_impl::idwmodel", 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 !32
  %545 = load i64, ptr %11, align 8, !tbaa !19
  %546 = getelementptr inbounds double, ptr %544, i64 %545
  %547 = load double, ptr %546, align 8, !tbaa !33
  %548 = fsub double %540, %547
  %549 = load ptr, ptr %5, align 8, !tbaa !5
  %550 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %549, i32 0, i32 17
  %551 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %550, i32 0, i32 6
  %552 = load ptr, ptr %551, align 8, !tbaa !32
  %553 = load i64, ptr %10, align 8, !tbaa !19
  %554 = getelementptr inbounds ptr, ptr %552, i64 %553
  %555 = load ptr, ptr %554, align 8, !tbaa !5
  %556 = load i64, ptr %15, align 8, !tbaa !19
  %557 = load i64, ptr %11, align 8, !tbaa !19
  %558 = add nsw i64 %556, %557
  %559 = getelementptr inbounds double, ptr %555, i64 %558
  store double %548, ptr %559, align 8, !tbaa !33
  br label %560

560:                                              ; preds = %525
  %561 = load i64, ptr %11, align 8, !tbaa !19
  %562 = add nsw i64 %561, 1
  store i64 %562, ptr %11, align 8, !tbaa !19
  br label %520, !llvm.loop !61

563:                                              ; preds = %520
  br label %564

564:                                              ; preds = %563
  %565 = load i64, ptr %10, align 8, !tbaa !19
  %566 = add nsw i64 %565, 1
  store i64 %566, ptr %10, align 8, !tbaa !19
  br label %482, !llvm.loop !62

567:                                              ; preds = %482
  %568 = load ptr, ptr %5, align 8, !tbaa !5
  %569 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %568, i32 0, i32 17
  %570 = load i64, ptr %14, align 8, !tbaa !19
  %571 = load i64, ptr %15, align 8, !tbaa !19
  %572 = load i64, ptr %16, align 8, !tbaa !19
  %573 = load ptr, ptr %6, align 8, !tbaa !5
  %574 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %573, i32 0, i32 12
  %575 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl11kdtreebuildEPKNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %569, i64 noundef %570, i64 noundef %571, i64 noundef %572, i64 noundef 2, ptr noundef %574, ptr noundef %575)
  %576 = load ptr, ptr %6, align 8, !tbaa !5
  %577 = load ptr, ptr %6, align 8, !tbaa !5
  %578 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %577, i32 0, i32 15
  %579 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %576, ptr noundef %578, ptr noundef %579)
  %580 = load ptr, ptr %5, align 8, !tbaa !5
  %581 = load ptr, ptr %6, align 8, !tbaa !5
  %582 = load ptr, ptr %7, align 8, !tbaa !5
  %583 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL23idw_errormetricsviacalcEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %580, ptr noundef %581, ptr noundef %582, ptr noundef %583)
  %584 = load ptr, ptr %5, align 8, !tbaa !5
  %585 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %584, i32 0, i32 12
  store double 1.000000e+00, ptr %585, align 8, !tbaa !27
  %586 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %586)
  store i32 1, ptr %25, align 4
  br label %1121

587:                                              ; preds = %442
  %588 = load ptr, ptr %5, align 8, !tbaa !5
  %589 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %588, i32 0, i32 2
  %590 = load i64, ptr %589, align 8, !tbaa !51
  %591 = icmp eq i64 %590, 2
  br i1 %591, label %592, label %1118

592:                                              ; preds = %587
  %593 = load ptr, ptr %5, align 8, !tbaa !5
  %594 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %593, i32 0, i32 3
  %595 = load i64, ptr %594, align 8, !tbaa !63
  %596 = icmp sge i64 %595, 1
  %597 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %596, ptr noundef @.str.159, ptr noundef %597)
  %598 = load ptr, ptr %6, align 8, !tbaa !5
  %599 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %598, i32 0, i32 3
  store i64 2, ptr %599, align 8, !tbaa !36
  %600 = load i64, ptr %15, align 8, !tbaa !19
  %601 = load ptr, ptr %6, align 8, !tbaa !5
  %602 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %601, i32 0, i32 0
  store i64 %600, ptr %602, align 8, !tbaa !28
  %603 = load i64, ptr %16, align 8, !tbaa !19
  %604 = load ptr, ptr %6, align 8, !tbaa !5
  %605 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %604, i32 0, i32 1
  store i64 %603, ptr %605, align 8, !tbaa !31
  %606 = load ptr, ptr %5, align 8, !tbaa !5
  %607 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %606, i32 0, i32 3
  %608 = load i64, ptr %607, align 8, !tbaa !63
  %609 = load ptr, ptr %6, align 8, !tbaa !5
  %610 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %609, i32 0, i32 4
  store i64 %608, ptr %610, align 8, !tbaa !37
  %611 = load ptr, ptr %5, align 8, !tbaa !5
  %612 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %611, i32 0, i32 4
  %613 = load double, ptr %612, align 8, !tbaa !59
  %614 = load ptr, ptr %6, align 8, !tbaa !5
  %615 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %614, i32 0, i32 5
  store double %613, ptr %615, align 8, !tbaa !38
  %616 = load ptr, ptr %6, align 8, !tbaa !5
  %617 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %616, i32 0, i32 6
  store double 5.000000e-01, ptr %617, align 8, !tbaa !39
  %618 = load ptr, ptr %5, align 8, !tbaa !5
  %619 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %618, i32 0, i32 6
  %620 = load double, ptr %619, align 8, !tbaa !64
  %621 = load ptr, ptr %6, align 8, !tbaa !5
  %622 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %621, i32 0, i32 7
  store double %620, ptr %622, align 8, !tbaa !40
  %623 = load ptr, ptr %6, align 8, !tbaa !5
  %624 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %623, i32 0, i32 9
  store double 1.000000e+00, ptr %624, align 8, !tbaa !42
  %625 = load double, ptr @_ZN11alglib_implL8idw_mepsE, align 8, !tbaa !33
  %626 = load ptr, ptr %6, align 8, !tbaa !5
  %627 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %626, i32 0, i32 8
  store double %625, ptr %627, align 8, !tbaa !41
  %628 = load ptr, ptr %6, align 8, !tbaa !5
  %629 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %628, i32 0, i32 10
  store double 0.000000e+00, ptr %629, align 8, !tbaa !43
  %630 = load ptr, ptr %6, align 8, !tbaa !5
  %631 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %630, i32 0, i32 11
  store i8 0, ptr %631, align 8, !tbaa !45
  %632 = load ptr, ptr %5, align 8, !tbaa !5
  %633 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %632, i32 0, i32 17
  %634 = load i64, ptr %14, align 8, !tbaa !19
  %635 = load i64, ptr %15, align 8, !tbaa !19
  %636 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %633, i64 noundef %634, i64 noundef %635, ptr noundef %636)
  %637 = load ptr, ptr %5, align 8, !tbaa !5
  %638 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %637, i32 0, i32 18
  %639 = load i64, ptr %14, align 8, !tbaa !19
  %640 = load i64, ptr %15, align 8, !tbaa !19
  %641 = load i64, ptr %16, align 8, !tbaa !19
  %642 = load ptr, ptr %5, align 8, !tbaa !5
  %643 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %642, i32 0, i32 3
  %644 = load i64, ptr %643, align 8, !tbaa !63
  %645 = add nsw i64 %644, 1
  %646 = mul nsw i64 %641, %645
  %647 = add nsw i64 %640, %646
  %648 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %638, i64 noundef %639, i64 noundef %647, ptr noundef %648)
  %649 = load ptr, ptr %5, align 8, !tbaa !5
  %650 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %649, i32 0, i32 19
  %651 = load i64, ptr %14, align 8, !tbaa !19
  %652 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %650, i64 noundef %651, ptr noundef %652)
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %653

653:                                              ; preds = %753, %592
  %654 = load i64, ptr %10, align 8, !tbaa !19
  %655 = load i64, ptr %14, align 8, !tbaa !19
  %656 = sub nsw i64 %655, 1
  %657 = icmp sle i64 %654, %656
  br i1 %657, label %658, label %756

658:                                              ; preds = %653
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %659

659:                                              ; preds = %698, %658
  %660 = load i64, ptr %11, align 8, !tbaa !19
  %661 = load i64, ptr %15, align 8, !tbaa !19
  %662 = sub nsw i64 %661, 1
  %663 = icmp sle i64 %660, %662
  br i1 %663, label %664, label %701

664:                                              ; preds = %659
  %665 = load ptr, ptr %5, align 8, !tbaa !5
  %666 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %665, i32 0, i32 13
  %667 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %666, i32 0, i32 4
  %668 = load ptr, ptr %667, align 8, !tbaa !32
  %669 = load i64, ptr %10, align 8, !tbaa !19
  %670 = load i64, ptr %15, align 8, !tbaa !19
  %671 = load i64, ptr %16, align 8, !tbaa !19
  %672 = add nsw i64 %670, %671
  %673 = mul nsw i64 %669, %672
  %674 = load i64, ptr %11, align 8, !tbaa !19
  %675 = add nsw i64 %673, %674
  %676 = getelementptr inbounds double, ptr %668, i64 %675
  %677 = load double, ptr %676, align 8, !tbaa !33
  store double %677, ptr %13, align 8, !tbaa !33
  %678 = load double, ptr %13, align 8, !tbaa !33
  %679 = load ptr, ptr %5, align 8, !tbaa !5
  %680 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %679, i32 0, i32 17
  %681 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %680, i32 0, i32 6
  %682 = load ptr, ptr %681, align 8, !tbaa !32
  %683 = load i64, ptr %10, align 8, !tbaa !19
  %684 = getelementptr inbounds ptr, ptr %682, i64 %683
  %685 = load ptr, ptr %684, align 8, !tbaa !5
  %686 = load i64, ptr %11, align 8, !tbaa !19
  %687 = getelementptr inbounds double, ptr %685, i64 %686
  store double %678, ptr %687, align 8, !tbaa !33
  %688 = load double, ptr %13, align 8, !tbaa !33
  %689 = load ptr, ptr %5, align 8, !tbaa !5
  %690 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %689, i32 0, i32 18
  %691 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %690, i32 0, i32 6
  %692 = load ptr, ptr %691, align 8, !tbaa !32
  %693 = load i64, ptr %10, align 8, !tbaa !19
  %694 = getelementptr inbounds ptr, ptr %692, i64 %693
  %695 = load ptr, ptr %694, align 8, !tbaa !5
  %696 = load i64, ptr %11, align 8, !tbaa !19
  %697 = getelementptr inbounds double, ptr %695, i64 %696
  store double %688, ptr %697, align 8, !tbaa !33
  br label %698

698:                                              ; preds = %664
  %699 = load i64, ptr %11, align 8, !tbaa !19
  %700 = add nsw i64 %699, 1
  store i64 %700, ptr %11, align 8, !tbaa !19
  br label %659, !llvm.loop !65

701:                                              ; preds = %659
  %702 = load i64, ptr %10, align 8, !tbaa !19
  %703 = load ptr, ptr %5, align 8, !tbaa !5
  %704 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %703, i32 0, i32 19
  %705 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %704, i32 0, i32 4
  %706 = load ptr, ptr %705, align 8, !tbaa !32
  %707 = load i64, ptr %10, align 8, !tbaa !19
  %708 = getelementptr inbounds i64, ptr %706, i64 %707
  store i64 %702, ptr %708, align 8, !tbaa !19
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %709

709:                                              ; preds = %749, %701
  %710 = load i64, ptr %11, align 8, !tbaa !19
  %711 = load i64, ptr %16, align 8, !tbaa !19
  %712 = sub nsw i64 %711, 1
  %713 = icmp sle i64 %710, %712
  br i1 %713, label %714, label %752

714:                                              ; preds = %709
  %715 = load ptr, ptr %5, align 8, !tbaa !5
  %716 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %715, i32 0, i32 13
  %717 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %716, i32 0, i32 4
  %718 = load ptr, ptr %717, align 8, !tbaa !32
  %719 = load i64, ptr %10, align 8, !tbaa !19
  %720 = load i64, ptr %15, align 8, !tbaa !19
  %721 = load i64, ptr %16, align 8, !tbaa !19
  %722 = add nsw i64 %720, %721
  %723 = mul nsw i64 %719, %722
  %724 = load i64, ptr %15, align 8, !tbaa !19
  %725 = add nsw i64 %723, %724
  %726 = load i64, ptr %11, align 8, !tbaa !19
  %727 = add nsw i64 %725, %726
  %728 = getelementptr inbounds double, ptr %718, i64 %727
  %729 = load double, ptr %728, align 8, !tbaa !33
  %730 = load ptr, ptr %6, align 8, !tbaa !5
  %731 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %730, i32 0, i32 2
  %732 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %731, i32 0, i32 4
  %733 = load ptr, ptr %732, align 8, !tbaa !32
  %734 = load i64, ptr %11, align 8, !tbaa !19
  %735 = getelementptr inbounds double, ptr %733, i64 %734
  %736 = load double, ptr %735, align 8, !tbaa !33
  %737 = fsub double %729, %736
  %738 = load ptr, ptr %5, align 8, !tbaa !5
  %739 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %738, i32 0, i32 18
  %740 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %739, i32 0, i32 6
  %741 = load ptr, ptr %740, align 8, !tbaa !32
  %742 = load i64, ptr %10, align 8, !tbaa !19
  %743 = getelementptr inbounds ptr, ptr %741, i64 %742
  %744 = load ptr, ptr %743, align 8, !tbaa !5
  %745 = load i64, ptr %15, align 8, !tbaa !19
  %746 = load i64, ptr %11, align 8, !tbaa !19
  %747 = add nsw i64 %745, %746
  %748 = getelementptr inbounds double, ptr %744, i64 %747
  store double %737, ptr %748, align 8, !tbaa !33
  br label %749

749:                                              ; preds = %714
  %750 = load i64, ptr %11, align 8, !tbaa !19
  %751 = add nsw i64 %750, 1
  store i64 %751, ptr %11, align 8, !tbaa !19
  br label %709, !llvm.loop !66

752:                                              ; preds = %709
  br label %753

753:                                              ; preds = %752
  %754 = load i64, ptr %10, align 8, !tbaa !19
  %755 = add nsw i64 %754, 1
  store i64 %755, ptr %10, align 8, !tbaa !19
  br label %653, !llvm.loop !67

756:                                              ; preds = %653
  %757 = load ptr, ptr %5, align 8, !tbaa !5
  %758 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %757, i32 0, i32 17
  %759 = load ptr, ptr %5, align 8, !tbaa !5
  %760 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %759, i32 0, i32 19
  %761 = load i64, ptr %14, align 8, !tbaa !19
  %762 = load i64, ptr %15, align 8, !tbaa !19
  %763 = load ptr, ptr %5, align 8, !tbaa !5
  %764 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %763, i32 0, i32 21
  %765 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl17kdtreebuildtaggedEPKNS_9ae_matrixEPKNS_9ae_vectorEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %758, ptr noundef %760, i64 noundef %761, i64 noundef %762, i64 noundef 0, i64 noundef 2, ptr noundef %764, ptr noundef %765)
  %766 = load ptr, ptr %5, align 8, !tbaa !5
  %767 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %766, i32 0, i32 3
  %768 = load i64, ptr %767, align 8, !tbaa !63
  %769 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %768, ptr noundef %21, ptr noundef %769)
  %770 = load ptr, ptr %5, align 8, !tbaa !5
  %771 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %770, i32 0, i32 3
  %772 = load i64, ptr %771, align 8, !tbaa !63
  %773 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %772, ptr noundef %22, ptr noundef %773)
  %774 = load ptr, ptr %5, align 8, !tbaa !5
  %775 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %774, i32 0, i32 3
  %776 = load i64, ptr %775, align 8, !tbaa !63
  %777 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %776, ptr noundef %23, ptr noundef %777)
  store double 0.000000e+00, ptr %24, align 8, !tbaa !33
  store i64 0, ptr %12, align 8, !tbaa !19
  br label %778

778:                                              ; preds = %853, %756
  %779 = load i64, ptr %12, align 8, !tbaa !19
  %780 = load ptr, ptr %5, align 8, !tbaa !5
  %781 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %780, i32 0, i32 3
  %782 = load i64, ptr %781, align 8, !tbaa !63
  %783 = sub nsw i64 %782, 1
  %784 = icmp sle i64 %779, %783
  br i1 %784, label %785, label %856

785:                                              ; preds = %778
  %786 = load ptr, ptr %6, align 8, !tbaa !5
  %787 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %786, i32 0, i32 5
  %788 = load double, ptr %787, align 8, !tbaa !38
  %789 = load ptr, ptr %6, align 8, !tbaa !5
  %790 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %789, i32 0, i32 6
  %791 = load double, ptr %790, align 8, !tbaa !39
  %792 = load i64, ptr %12, align 8, !tbaa !19
  %793 = sitofp i64 %792 to double
  %794 = load ptr, ptr %8, align 8, !tbaa !5
  %795 = call noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef %791, double noundef %793, ptr noundef %794)
  %796 = fmul double %788, %795
  %797 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %798 = load ptr, ptr %797, align 8, !tbaa !32
  %799 = load i64, ptr %12, align 8, !tbaa !19
  %800 = getelementptr inbounds double, ptr %798, i64 %799
  store double %796, ptr %800, align 8, !tbaa !33
  %801 = load ptr, ptr %6, align 8, !tbaa !5
  %802 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %801, i32 0, i32 7
  %803 = load double, ptr %802, align 8, !tbaa !40
  %804 = load ptr, ptr %6, align 8, !tbaa !5
  %805 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %804, i32 0, i32 9
  %806 = load double, ptr %805, align 8, !tbaa !42
  %807 = load i64, ptr %12, align 8, !tbaa !19
  %808 = sitofp i64 %807 to double
  %809 = load ptr, ptr %8, align 8, !tbaa !5
  %810 = call noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef %806, double noundef %808, ptr noundef %809)
  %811 = fmul double %803, %810
  %812 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %813 = load ptr, ptr %812, align 8, !tbaa !32
  %814 = load i64, ptr %12, align 8, !tbaa !19
  %815 = getelementptr inbounds double, ptr %813, i64 %814
  store double %811, ptr %815, align 8, !tbaa !33
  %816 = load i64, ptr %12, align 8, !tbaa !19
  %817 = load ptr, ptr %5, align 8, !tbaa !5
  %818 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %817, i32 0, i32 3
  %819 = load i64, ptr %818, align 8, !tbaa !63
  %820 = sub nsw i64 %819, 1
  %821 = icmp eq i64 %816, %820
  br i1 %821, label %822, label %830

822:                                              ; preds = %785
  %823 = load ptr, ptr %6, align 8, !tbaa !5
  %824 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %823, i32 0, i32 8
  %825 = load double, ptr %824, align 8, !tbaa !41
  %826 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %827 = load ptr, ptr %826, align 8, !tbaa !32
  %828 = load i64, ptr %12, align 8, !tbaa !19
  %829 = getelementptr inbounds double, ptr %827, i64 %828
  store double %825, ptr %829, align 8, !tbaa !33
  br label %830

830:                                              ; preds = %822, %785
  %831 = load ptr, ptr %5, align 8, !tbaa !5
  %832 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %831, i32 0, i32 21
  %833 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %834 = load ptr, ptr %833, align 8, !tbaa !32
  %835 = load i64, ptr %12, align 8, !tbaa !19
  %836 = getelementptr inbounds double, ptr %834, i64 %835
  %837 = load double, ptr %836, align 8, !tbaa !33
  %838 = load ptr, ptr %8, align 8, !tbaa !5
  %839 = call noundef double @_ZN11alglib_impl24kdtreeapproxrnnquerycostEPNS_6kdtreeEdPNS_8ae_stateE(ptr noundef %832, double noundef %837, ptr noundef %838)
  %840 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %841 = load ptr, ptr %840, align 8, !tbaa !32
  %842 = load i64, ptr %12, align 8, !tbaa !19
  %843 = getelementptr inbounds double, ptr %841, i64 %842
  store double %839, ptr %843, align 8, !tbaa !33
  %844 = load double, ptr %24, align 8, !tbaa !33
  %845 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %846 = load ptr, ptr %845, align 8, !tbaa !32
  %847 = load i64, ptr %12, align 8, !tbaa !19
  %848 = getelementptr inbounds double, ptr %846, i64 %847
  %849 = load double, ptr %848, align 8, !tbaa !33
  %850 = load i64, ptr %14, align 8, !tbaa !19
  %851 = sitofp i64 %850 to double
  %852 = call double @llvm.fmuladd.f64(double %849, double %851, double %844)
  store double %852, ptr %24, align 8, !tbaa !33
  br label %853

853:                                              ; preds = %830
  %854 = load i64, ptr %12, align 8, !tbaa !19
  %855 = add nsw i64 %854, 1
  store i64 %855, ptr %12, align 8, !tbaa !19
  br label %778, !llvm.loop !68

856:                                              ; preds = %778
  %857 = load ptr, ptr %5, align 8, !tbaa !5
  %858 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %857, i32 0, i32 10
  %859 = load i8, ptr %858, align 8, !tbaa !69, !range !70, !noundef !71
  %860 = trunc i8 %859 to i1
  br i1 %860, label %861, label %867

861:                                              ; preds = %856
  %862 = load ptr, ptr %8, align 8, !tbaa !5
  %863 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 3, ptr noundef %862)
  %864 = add nsw i64 1, %863
  %865 = load ptr, ptr %5, align 8, !tbaa !5
  %866 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %865, i32 0, i32 11
  store i64 %864, ptr %866, align 8, !tbaa !72
  br label %871

867:                                              ; preds = %856
  %868 = load i64, ptr @_ZN11alglib_implL16idw_idwbatchsizeE, align 8, !tbaa !19
  %869 = load ptr, ptr %5, align 8, !tbaa !5
  %870 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %869, i32 0, i32 11
  store i64 %868, ptr %870, align 8, !tbaa !72
  br label %871

871:                                              ; preds = %867, %861
  %872 = load i64, ptr %15, align 8, !tbaa !19
  %873 = getelementptr inbounds %"struct.alglib_impl::mstabbuffer", ptr %19, i32 0, i32 1
  %874 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %872, ptr noundef %873, ptr noundef %874)
  %875 = load i64, ptr %16, align 8, !tbaa !19
  %876 = getelementptr inbounds %"struct.alglib_impl::mstabbuffer", ptr %19, i32 0, i32 2
  %877 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %875, ptr noundef %876, ptr noundef %877)
  %878 = load i64, ptr %16, align 8, !tbaa !19
  %879 = getelementptr inbounds %"struct.alglib_impl::mstabbuffer", ptr %19, i32 0, i32 3
  %880 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %878, ptr noundef %879, ptr noundef %880)
  %881 = load ptr, ptr %5, align 8, !tbaa !5
  %882 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %881, i32 0, i32 21
  %883 = getelementptr inbounds %"struct.alglib_impl::mstabbuffer", ptr %19, i32 0, i32 5
  %884 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl25kdtreecreaterequestbufferEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPNS_8ae_stateE(ptr noundef %882, ptr noundef %883, ptr noundef %884)
  store i64 0, ptr %12, align 8, !tbaa !19
  br label %885

885:                                              ; preds = %963, %871
  %886 = load i64, ptr %12, align 8, !tbaa !19
  %887 = load ptr, ptr %5, align 8, !tbaa !5
  %888 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %887, i32 0, i32 3
  %889 = load i64, ptr %888, align 8, !tbaa !63
  %890 = sub nsw i64 %889, 1
  %891 = icmp sle i64 %886, %890
  br i1 %891, label %892, label %966

892:                                              ; preds = %885
  %893 = load i64, ptr %14, align 8, !tbaa !19
  %894 = load ptr, ptr %5, align 8, !tbaa !5
  %895 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %894, i32 0, i32 11
  %896 = load i64, ptr %895, align 8, !tbaa !72
  %897 = icmp sgt i64 %893, %896
  br i1 %897, label %898, label %939

898:                                              ; preds = %892
  %899 = load i64, ptr %14, align 8, !tbaa !19
  %900 = sitofp i64 %899 to double
  %901 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %902 = load ptr, ptr %901, align 8, !tbaa !32
  %903 = load i64, ptr %12, align 8, !tbaa !19
  %904 = getelementptr inbounds double, ptr %902, i64 %903
  %905 = load double, ptr %904, align 8, !tbaa !33
  %906 = fmul double %900, %905
  %907 = load ptr, ptr %8, align 8, !tbaa !5
  %908 = call noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef %907)
  %909 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %906, double noundef %908)
  br i1 %909, label %915, label %910

910:                                              ; preds = %898
  %911 = load ptr, ptr %5, align 8, !tbaa !5
  %912 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %911, i32 0, i32 10
  %913 = load i8, ptr %912, align 8, !tbaa !69, !range !70, !noundef !71
  %914 = trunc i8 %913 to i1
  br i1 %914, label %915, label %939

915:                                              ; preds = %910, %898
  %916 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ae_shared_pool_set_seedEPNS_14ae_shared_poolEPKvlPFvPvS3_PNS_8ae_stateEbEPFvS4_ES6_(ptr noundef %20, ptr noundef %19, i64 noundef 944, ptr noundef @_ZN11alglib_impl22_mstabbuffer_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef @_ZN11alglib_impl20_mstabbuffer_destroyEPv, ptr noundef %916)
  %917 = load ptr, ptr %5, align 8, !tbaa !5
  %918 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %919 = load ptr, ptr %918, align 8, !tbaa !32
  %920 = load i64, ptr %12, align 8, !tbaa !19
  %921 = getelementptr inbounds double, ptr %919, i64 %920
  %922 = load double, ptr %921, align 8, !tbaa !33
  %923 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %924 = load ptr, ptr %923, align 8, !tbaa !32
  %925 = load i64, ptr %12, align 8, !tbaa !19
  %926 = getelementptr inbounds double, ptr %924, i64 %925
  %927 = load double, ptr %926, align 8, !tbaa !33
  %928 = load i64, ptr %12, align 8, !tbaa !19
  %929 = load i64, ptr %14, align 8, !tbaa !19
  %930 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %931 = load ptr, ptr %930, align 8, !tbaa !32
  %932 = load i64, ptr %12, align 8, !tbaa !19
  %933 = getelementptr inbounds double, ptr %931, i64 %932
  %934 = load double, ptr %933, align 8, !tbaa !33
  %935 = load double, ptr %24, align 8, !tbaa !33
  %936 = load ptr, ptr %5, align 8, !tbaa !5
  %937 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %936, i32 0, i32 18
  %938 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL12idw_mstabrecEPNS_10idwbuilderEddlPNS_14ae_shared_poolEllbddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %917, double noundef %922, double noundef %927, i64 noundef %928, ptr noundef %20, i64 noundef 0, i64 noundef %929, i1 noundef zeroext true, double noundef %934, double noundef %935, ptr noundef %937, ptr noundef %938)
  br label %962

939:                                              ; preds = %910, %892
  %940 = load ptr, ptr %5, align 8, !tbaa !5
  %941 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %942 = load ptr, ptr %941, align 8, !tbaa !32
  %943 = load i64, ptr %12, align 8, !tbaa !19
  %944 = getelementptr inbounds double, ptr %942, i64 %943
  %945 = load double, ptr %944, align 8, !tbaa !33
  %946 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %947 = load ptr, ptr %946, align 8, !tbaa !32
  %948 = load i64, ptr %12, align 8, !tbaa !19
  %949 = getelementptr inbounds double, ptr %947, i64 %948
  %950 = load double, ptr %949, align 8, !tbaa !33
  %951 = load i64, ptr %12, align 8, !tbaa !19
  %952 = load i64, ptr %14, align 8, !tbaa !19
  %953 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %23, i32 0, i32 4
  %954 = load ptr, ptr %953, align 8, !tbaa !32
  %955 = load i64, ptr %12, align 8, !tbaa !19
  %956 = getelementptr inbounds double, ptr %954, i64 %955
  %957 = load double, ptr %956, align 8, !tbaa !33
  %958 = load double, ptr %24, align 8, !tbaa !33
  %959 = load ptr, ptr %5, align 8, !tbaa !5
  %960 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %959, i32 0, i32 18
  %961 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL17idw_mstabbasecaseEPNS_10idwbuilderEddlPNS_11mstabbufferEllddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %940, double noundef %945, double noundef %950, i64 noundef %951, ptr noundef %19, i64 noundef 0, i64 noundef %952, double noundef %957, double noundef %958, ptr noundef %960, ptr noundef %961)
  br label %962

962:                                              ; preds = %939, %915
  br label %963

963:                                              ; preds = %962
  %964 = load i64, ptr %12, align 8, !tbaa !19
  %965 = add nsw i64 %964, 1
  store i64 %965, ptr %12, align 8, !tbaa !19
  br label %885, !llvm.loop !73

966:                                              ; preds = %885
  %967 = load ptr, ptr %5, align 8, !tbaa !5
  %968 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %967, i32 0, i32 18
  %969 = load i64, ptr %14, align 8, !tbaa !19
  %970 = load i64, ptr %15, align 8, !tbaa !19
  %971 = load i64, ptr %16, align 8, !tbaa !19
  %972 = load ptr, ptr %5, align 8, !tbaa !5
  %973 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %972, i32 0, i32 3
  %974 = load i64, ptr %973, align 8, !tbaa !63
  %975 = mul nsw i64 %971, %974
  %976 = load ptr, ptr %6, align 8, !tbaa !5
  %977 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %976, i32 0, i32 12
  %978 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl11kdtreebuildEPKNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef %968, i64 noundef %969, i64 noundef %970, i64 noundef %975, i64 noundef 2, ptr noundef %977, ptr noundef %978)
  %979 = load ptr, ptr %7, align 8, !tbaa !5
  %980 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %979, i32 0, i32 0
  store double 0.000000e+00, ptr %980, align 8, !tbaa !22
  %981 = load ptr, ptr %7, align 8, !tbaa !5
  %982 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %981, i32 0, i32 1
  store double 0.000000e+00, ptr %982, align 8, !tbaa !24
  %983 = load ptr, ptr %7, align 8, !tbaa !5
  %984 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %983, i32 0, i32 2
  store double 0.000000e+00, ptr %984, align 8, !tbaa !25
  store double 0.000000e+00, ptr %17, align 8, !tbaa !33
  store double 0.000000e+00, ptr %18, align 8, !tbaa !33
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %985

985:                                              ; preds = %1077, %966
  %986 = load i64, ptr %10, align 8, !tbaa !19
  %987 = load i64, ptr %14, align 8, !tbaa !19
  %988 = sub nsw i64 %987, 1
  %989 = icmp sle i64 %986, %988
  br i1 %989, label %990, label %1080

990:                                              ; preds = %985
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %991

991:                                              ; preds = %1073, %990
  %992 = load i64, ptr %11, align 8, !tbaa !19
  %993 = load i64, ptr %16, align 8, !tbaa !19
  %994 = sub nsw i64 %993, 1
  %995 = icmp sle i64 %992, %994
  br i1 %995, label %996, label %1076

996:                                              ; preds = %991
  %997 = load ptr, ptr %5, align 8, !tbaa !5
  %998 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %997, i32 0, i32 18
  %999 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %998, i32 0, i32 6
  %1000 = load ptr, ptr %999, align 8, !tbaa !32
  %1001 = load i64, ptr %10, align 8, !tbaa !19
  %1002 = getelementptr inbounds ptr, ptr %1000, i64 %1001
  %1003 = load ptr, ptr %1002, align 8, !tbaa !5
  %1004 = load i64, ptr %15, align 8, !tbaa !19
  %1005 = load ptr, ptr %5, align 8, !tbaa !5
  %1006 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %1005, i32 0, i32 3
  %1007 = load i64, ptr %1006, align 8, !tbaa !63
  %1008 = load i64, ptr %16, align 8, !tbaa !19
  %1009 = mul nsw i64 %1007, %1008
  %1010 = add nsw i64 %1004, %1009
  %1011 = load i64, ptr %11, align 8, !tbaa !19
  %1012 = add nsw i64 %1010, %1011
  %1013 = getelementptr inbounds double, ptr %1003, i64 %1012
  %1014 = load double, ptr %1013, align 8, !tbaa !33
  %1015 = load ptr, ptr %8, align 8, !tbaa !5
  %1016 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %1014, ptr noundef %1015)
  store double %1016, ptr %13, align 8, !tbaa !33
  %1017 = load ptr, ptr %7, align 8, !tbaa !5
  %1018 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1017, i32 0, i32 0
  %1019 = load double, ptr %1018, align 8, !tbaa !22
  %1020 = load double, ptr %13, align 8, !tbaa !33
  %1021 = load double, ptr %13, align 8, !tbaa !33
  %1022 = call double @llvm.fmuladd.f64(double %1020, double %1021, double %1019)
  %1023 = load ptr, ptr %7, align 8, !tbaa !5
  %1024 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1023, i32 0, i32 0
  store double %1022, ptr %1024, align 8, !tbaa !22
  %1025 = load ptr, ptr %7, align 8, !tbaa !5
  %1026 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1025, i32 0, i32 1
  %1027 = load double, ptr %1026, align 8, !tbaa !24
  %1028 = load double, ptr %13, align 8, !tbaa !33
  %1029 = fadd double %1027, %1028
  %1030 = load ptr, ptr %7, align 8, !tbaa !5
  %1031 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1030, i32 0, i32 1
  store double %1029, ptr %1031, align 8, !tbaa !24
  %1032 = load ptr, ptr %7, align 8, !tbaa !5
  %1033 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1032, i32 0, i32 2
  %1034 = load double, ptr %1033, align 8, !tbaa !25
  %1035 = load double, ptr %13, align 8, !tbaa !33
  %1036 = load ptr, ptr %8, align 8, !tbaa !5
  %1037 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %1035, ptr noundef %1036)
  %1038 = load ptr, ptr %8, align 8, !tbaa !5
  %1039 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %1034, double noundef %1037, ptr noundef %1038)
  %1040 = load ptr, ptr %7, align 8, !tbaa !5
  %1041 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1040, i32 0, i32 2
  store double %1039, ptr %1041, align 8, !tbaa !25
  %1042 = load double, ptr %17, align 8, !tbaa !33
  %1043 = load double, ptr %13, align 8, !tbaa !33
  %1044 = load double, ptr %13, align 8, !tbaa !33
  %1045 = call double @llvm.fmuladd.f64(double %1043, double %1044, double %1042)
  store double %1045, ptr %17, align 8, !tbaa !33
  %1046 = load double, ptr %18, align 8, !tbaa !33
  %1047 = load ptr, ptr %5, align 8, !tbaa !5
  %1048 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %1047, i32 0, i32 13
  %1049 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %1048, i32 0, i32 4
  %1050 = load ptr, ptr %1049, align 8, !tbaa !32
  %1051 = load i64, ptr %10, align 8, !tbaa !19
  %1052 = load i64, ptr %15, align 8, !tbaa !19
  %1053 = load i64, ptr %16, align 8, !tbaa !19
  %1054 = add nsw i64 %1052, %1053
  %1055 = mul nsw i64 %1051, %1054
  %1056 = load i64, ptr %15, align 8, !tbaa !19
  %1057 = add nsw i64 %1055, %1056
  %1058 = load i64, ptr %11, align 8, !tbaa !19
  %1059 = add nsw i64 %1057, %1058
  %1060 = getelementptr inbounds double, ptr %1050, i64 %1059
  %1061 = load double, ptr %1060, align 8, !tbaa !33
  %1062 = load ptr, ptr %5, align 8, !tbaa !5
  %1063 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %1062, i32 0, i32 22
  %1064 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %1063, i32 0, i32 4
  %1065 = load ptr, ptr %1064, align 8, !tbaa !32
  %1066 = load i64, ptr %11, align 8, !tbaa !19
  %1067 = getelementptr inbounds double, ptr %1065, i64 %1066
  %1068 = load double, ptr %1067, align 8, !tbaa !33
  %1069 = fsub double %1061, %1068
  %1070 = load ptr, ptr %8, align 8, !tbaa !5
  %1071 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %1069, ptr noundef %1070)
  %1072 = fadd double %1046, %1071
  store double %1072, ptr %18, align 8, !tbaa !33
  br label %1073

1073:                                             ; preds = %996
  %1074 = load i64, ptr %11, align 8, !tbaa !19
  %1075 = add nsw i64 %1074, 1
  store i64 %1075, ptr %11, align 8, !tbaa !19
  br label %991, !llvm.loop !74

1076:                                             ; preds = %991
  br label %1077

1077:                                             ; preds = %1076
  %1078 = load i64, ptr %10, align 8, !tbaa !19
  %1079 = add nsw i64 %1078, 1
  store i64 %1079, ptr %10, align 8, !tbaa !19
  br label %985, !llvm.loop !75

1080:                                             ; preds = %985
  %1081 = load ptr, ptr %7, align 8, !tbaa !5
  %1082 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1081, i32 0, i32 0
  %1083 = load double, ptr %1082, align 8, !tbaa !22
  %1084 = load i64, ptr %14, align 8, !tbaa !19
  %1085 = load i64, ptr %16, align 8, !tbaa !19
  %1086 = mul nsw i64 %1084, %1085
  %1087 = sitofp i64 %1086 to double
  %1088 = fdiv double %1083, %1087
  %1089 = load ptr, ptr %8, align 8, !tbaa !5
  %1090 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %1088, ptr noundef %1089)
  %1091 = load ptr, ptr %7, align 8, !tbaa !5
  %1092 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1091, i32 0, i32 0
  store double %1090, ptr %1092, align 8, !tbaa !22
  %1093 = load ptr, ptr %7, align 8, !tbaa !5
  %1094 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1093, i32 0, i32 1
  %1095 = load double, ptr %1094, align 8, !tbaa !24
  %1096 = load i64, ptr %14, align 8, !tbaa !19
  %1097 = load i64, ptr %16, align 8, !tbaa !19
  %1098 = mul nsw i64 %1096, %1097
  %1099 = sitofp i64 %1098 to double
  %1100 = fdiv double %1095, %1099
  %1101 = load ptr, ptr %7, align 8, !tbaa !5
  %1102 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1101, i32 0, i32 1
  store double %1100, ptr %1102, align 8, !tbaa !24
  %1103 = load double, ptr %17, align 8, !tbaa !33
  %1104 = load double, ptr %18, align 8, !tbaa !33
  %1105 = load ptr, ptr %8, align 8, !tbaa !5
  %1106 = call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %1104, double noundef 1.000000e+00, ptr noundef %1105)
  %1107 = fdiv double %1103, %1106
  %1108 = fsub double 1.000000e+00, %1107
  %1109 = load ptr, ptr %7, align 8, !tbaa !5
  %1110 = getelementptr inbounds %"struct.alglib_impl::idwreport", ptr %1109, i32 0, i32 3
  store double %1108, ptr %1110, align 8, !tbaa !26
  %1111 = load ptr, ptr %5, align 8, !tbaa !5
  %1112 = getelementptr inbounds %"struct.alglib_impl::idwbuilder", ptr %1111, i32 0, i32 12
  store double 1.000000e+00, ptr %1112, align 8, !tbaa !27
  %1113 = load ptr, ptr %6, align 8, !tbaa !5
  %1114 = load ptr, ptr %6, align 8, !tbaa !5
  %1115 = getelementptr inbounds %"struct.alglib_impl::idwmodel", ptr %1114, i32 0, i32 15
  %1116 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %1113, ptr noundef %1115, ptr noundef %1116)
  %1117 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1117)
  store i32 1, ptr %25, align 4
  br label %1121

1118:                                             ; preds = %587
  %1119 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.160, ptr noundef %1119)
  %1120 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1120)
  store i32 0, ptr %25, align 4
  br label %1121

1121:                                             ; preds = %1118, %1080, %567, %427, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 136, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 944, 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 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %1122 = load i32, ptr %25, align 4
  switch i32 %1122, label %1124 [
    i32 0, label %1123
    i32 1, label %1123
  ]

1123:                                             ; preds = %1121, %1121
  ret void

1124:                                             ; preds = %1121
  unreachable
}

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

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

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #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_impl25kdtreecreaterequestbufferEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #2

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

declare noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

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

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

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

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

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

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

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

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

declare void @_ZN11alglib_impl17kdtreebuildtaggedEPKNS_9ae_matrixEPKNS_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_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl24kdtreeapproxrnnquerycostEPNS_6kdtreeEdPNS_8ae_stateE(ptr noundef, double noundef, ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL12idw_mstabrecEPNS_10idwbuilderEddlPNS_14ae_shared_poolEllbddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, double noundef, double noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, double noundef, double noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17idw_mstabbasecaseEPNS_10idwbuilderEddlPNS_11mstabbufferEllddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, double noundef, double noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef, double noundef, ptr noundef, ptr noundef) #3

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef, double 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 232}
!10 = !{!"_ZTSN11alglib_impl10idwbuilderE", !11, i64 0, !12, i64 8, !11, i64 72, !11, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !13, i64 136, !11, i64 144, !15, i64 152, !12, i64 160, !11, i64 224, !11, i64 232, !11, i64 240, !16, i64 248, !16, i64 328, !12, i64 408, !12, i64 472, !17, i64 536, !12, i64 1600}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!17 = !{!"_ZTSN11alglib_impl6kdtreeE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !16, i64 32, !12, i64 112, !12, i64 176, !12, i64 240, !12, i64 304, !12, i64 368, !18, i64 432, !11, i64 1056}
!18 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !12, i64 0, !12, i64 64, !12, i64 128, !11, i64 192, !15, i64 200, !13, i64 208, !15, i64 216, !11, i64 224, !12, i64 232, !12, i64 296, !12, i64 360, !12, i64 424, !12, i64 488, !15, i64 552, !12, i64 560}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !11, i64 240}
!21 = !{!10, !11, i64 224}
!22 = !{!23, !15, i64 0}
!23 = !{!"_ZTSN11alglib_impl9idwreportE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!24 = !{!23, !15, i64 8}
!25 = !{!23, !15, i64 16}
!26 = !{!23, !15, i64 24}
!27 = !{!10, !15, i64 152}
!28 = !{!29, !11, i64 0}
!29 = !{!"_ZTSN11alglib_impl8idwmodelE", !11, i64 0, !11, i64 8, !12, i64 16, !11, i64 80, !11, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !13, i64 144, !17, i64 152, !11, i64 1216, !12, i64 1224, !30, i64 1288}
!30 = !{!"_ZTSN11alglib_impl13idwcalcbufferE", !12, i64 0, !12, i64 64, !12, i64 128, !12, i64 192, !16, i64 256, !12, i64 336, !18, i64 400}
!31 = !{!29, !11, i64 8}
!32 = !{!7, !7, i64 0}
!33 = !{!15, !15, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!29, !11, i64 80}
!37 = !{!29, !11, i64 88}
!38 = !{!29, !15, i64 96}
!39 = !{!29, !15, i64 104}
!40 = !{!29, !15, i64 112}
!41 = !{!29, !15, i64 120}
!42 = !{!29, !15, i64 128}
!43 = !{!29, !15, i64 136}
!44 = !{!29, !11, i64 1216}
!45 = !{!29, !13, i64 144}
!46 = distinct !{!46, !35}
!47 = distinct !{!47, !35}
!48 = distinct !{!48, !35}
!49 = distinct !{!49, !35}
!50 = distinct !{!50, !35}
!51 = !{!10, !11, i64 72}
!52 = !{!10, !11, i64 0}
!53 = distinct !{!53, !35}
!54 = distinct !{!54, !35}
!55 = !{!10, !15, i64 128}
!56 = distinct !{!56, !35}
!57 = distinct !{!57, !35}
!58 = distinct !{!58, !35}
!59 = !{!10, !15, i64 88}
!60 = distinct !{!60, !35}
!61 = distinct !{!61, !35}
!62 = distinct !{!62, !35}
!63 = !{!10, !11, i64 80}
!64 = !{!10, !15, i64 104}
!65 = distinct !{!65, !35}
!66 = distinct !{!66, !35}
!67 = distinct !{!67, !35}
!68 = distinct !{!68, !35}
!69 = !{!10, !13, i64 136}
!70 = !{i8 0, i8 2}
!71 = !{}
!72 = !{!10, !11, i64 144}
!73 = distinct !{!73, !35}
!74 = distinct !{!74, !35}
!75 = distinct !{!75, !35}


; 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::mstabbuffer" = 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::kdtreerequestbuffer" }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"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::ae_vector" }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }

@.str.159 = external hidden unnamed_addr constant [31 x i8], align 1
@_ZN11alglib_implL8idw_mepsE = external hidden local_unnamed_addr global double, align 8
@_ZN11alglib_implL16idw_idwbatchsizeE = external hidden local_unnamed_addr global i64, align 8
@.str.160 = external hidden unnamed_addr constant [53 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl6idwfitEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::mstabbuffer", align 8
  %7 = alloca %"struct.alglib_impl::ae_shared_pool", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 944, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(944) %6, i8 0, i64 944, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(136) %7, i8 0, i64 136, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15_idwmodel_clearEPv(ptr noundef %1)
  call void @_ZN11alglib_impl16_idwreport_clearEPv(ptr noundef %2)
  call void @_ZN11alglib_impl17_mstabbuffer_initEPvPNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_shared_pool_initEPvPNS_8ae_stateEb(ptr noundef nonnull %7, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %11 = getelementptr inbounds i8, ptr %0, i64 232
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 240
  %14 = load i64, ptr %13, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %0, i64 224
  %16 = load i64, ptr %15, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  %18 = getelementptr inbounds i8, ptr %2, i64 16
  %19 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  store double 1.000000e+00, ptr %19, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %0, i64 152
  store double 0.000000e+00, ptr %20, align 8, !tbaa !22
  %21 = icmp eq i64 %16, 0
  br i1 %21, label %22, label %51

22:                                               ; preds = %4
  store i64 %12, ptr %1, align 8, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %14, ptr %23, align 8, !tbaa !26
  %24 = getelementptr inbounds i8, ptr %1, i64 16
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %24, i64 noundef %14, ptr noundef %3)
  %.not480.not574 = icmp sgt i64 %14, 0
  br i1 %.not480.not574, label %.lr.ph577, label %._crit_edge578

.lr.ph577:                                        ; preds = %22
  %25 = getelementptr inbounds i8, ptr %1, i64 72
  %26 = add nsw i64 %14, -1
  %xtraiter686 = and i64 %14, 3
  %27 = icmp ult i64 %26, 3
  br i1 %27, label %._crit_edge578.loopexit.unr-lcssa, label %.lr.ph577.new

.lr.ph577.new:                                    ; preds = %.lr.ph577
  %unroll_iter689 = and i64 %14, 9223372036854775804
  br label %28

28:                                               ; preds = %28, %.lr.ph577.new
  %.0446575 = phi i64 [ 0, %.lr.ph577.new ], [ %40, %28 ]
  %niter690 = phi i64 [ 0, %.lr.ph577.new ], [ %niter690.next.3, %28 ]
  %29 = load ptr, ptr %25, align 8, !tbaa !27
  %30 = getelementptr inbounds double, ptr %29, i64 %.0446575
  store double 0.000000e+00, ptr %30, align 8, !tbaa !28
  %31 = or disjoint i64 %.0446575, 1
  %32 = load ptr, ptr %25, align 8, !tbaa !27
  %33 = getelementptr inbounds double, ptr %32, i64 %31
  store double 0.000000e+00, ptr %33, align 8, !tbaa !28
  %34 = or disjoint i64 %.0446575, 2
  %35 = load ptr, ptr %25, align 8, !tbaa !27
  %36 = getelementptr inbounds double, ptr %35, i64 %34
  store double 0.000000e+00, ptr %36, align 8, !tbaa !28
  %37 = or disjoint i64 %.0446575, 3
  %38 = load ptr, ptr %25, align 8, !tbaa !27
  %39 = getelementptr inbounds double, ptr %38, i64 %37
  store double 0.000000e+00, ptr %39, align 8, !tbaa !28
  %40 = add nuw nsw i64 %.0446575, 4
  %niter690.next.3 = add i64 %niter690, 4
  %niter690.ncmp.3 = icmp eq i64 %niter690.next.3, %unroll_iter689
  br i1 %niter690.ncmp.3, label %._crit_edge578.loopexit.unr-lcssa, label %28, !llvm.loop !29

._crit_edge578.loopexit.unr-lcssa:                ; preds = %28, %.lr.ph577
  %.0446575.unr = phi i64 [ 0, %.lr.ph577 ], [ %40, %28 ]
  %lcmp.mod688.not = icmp eq i64 %xtraiter686, 0
  br i1 %lcmp.mod688.not, label %._crit_edge578, label %.epil.preheader685

.epil.preheader685:                               ; preds = %._crit_edge578.loopexit.unr-lcssa, %.epil.preheader685
  %.0446575.epil = phi i64 [ %43, %.epil.preheader685 ], [ %.0446575.unr, %._crit_edge578.loopexit.unr-lcssa ]
  %epil.iter687 = phi i64 [ %epil.iter687.next, %.epil.preheader685 ], [ 0, %._crit_edge578.loopexit.unr-lcssa ]
  %41 = load ptr, ptr %25, align 8, !tbaa !27
  %42 = getelementptr inbounds double, ptr %41, i64 %.0446575.epil
  store double 0.000000e+00, ptr %42, align 8, !tbaa !28
  %43 = add nuw nsw i64 %.0446575.epil, 1
  %epil.iter687.next = add i64 %epil.iter687, 1
  %epil.iter687.cmp.not = icmp eq i64 %epil.iter687.next, %xtraiter686
  br i1 %epil.iter687.cmp.not, label %._crit_edge578, label %.epil.preheader685, !llvm.loop !31

._crit_edge578:                                   ; preds = %._crit_edge578.loopexit.unr-lcssa, %.epil.preheader685, %22
  %44 = getelementptr inbounds i8, ptr %1, i64 80
  %45 = getelementptr inbounds i8, ptr %1, i64 96
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %44, i8 0, i64 16, i1 false)
  store <2 x double> <double 1.000000e+00, double 5.000000e-01>, ptr %45, align 8, !tbaa !28
  %46 = getelementptr inbounds i8, ptr %1, i64 112
  %47 = getelementptr inbounds i8, ptr %1, i64 128
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %46, i8 0, i64 16, i1 false)
  store <2 x double> <double 1.000000e+00, double 2.000000e+00>, ptr %47, align 8, !tbaa !28
  %48 = getelementptr inbounds i8, ptr %1, i64 1216
  store i64 0, ptr %48, align 8, !tbaa !33
  %49 = getelementptr inbounds i8, ptr %1, i64 144
  store i8 0, ptr %49, align 8, !tbaa !34
  %50 = getelementptr inbounds i8, ptr %1, i64 1288
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef nonnull %1, ptr noundef nonnull %50, ptr noundef %3)
  store double 1.000000e+00, ptr %20, align 8, !tbaa !22
  br label %670

51:                                               ; preds = %4
  %52 = icmp sgt i64 %16, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef nonnull @.str.159, ptr noundef %3)
  %53 = getelementptr inbounds i8, ptr %0, i64 1600
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %53, i64 noundef %14, ptr noundef %3)
  %.not.not491 = icmp sgt i64 %14, 0
  br i1 %.not.not491, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %51
  %54 = getelementptr inbounds i8, ptr %0, i64 1656
  %55 = add nsw i64 %14, -1
  %xtraiter = and i64 %14, 3
  %56 = icmp ult i64 %55, 3
  br i1 %56, label %.preheader490.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 9223372036854775804
  br label %95

.preheader490.unr-lcssa:                          ; preds = %95, %.lr.ph
  %.0448492.unr = phi i64 [ 0, %.lr.ph ], [ %107, %95 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader490, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader490.unr-lcssa, %.epil.preheader
  %.0448492.epil = phi i64 [ %59, %.epil.preheader ], [ %.0448492.unr, %.preheader490.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader490.unr-lcssa ]
  %57 = load ptr, ptr %54, align 8, !tbaa !27
  %58 = getelementptr inbounds double, ptr %57, i64 %.0448492.epil
  store double 0.000000e+00, ptr %58, align 8, !tbaa !28
  %59 = add nuw nsw i64 %.0448492.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 %.preheader490, label %.epil.preheader, !llvm.loop !35

.preheader490:                                    ; preds = %.epil.preheader, %.preheader490.unr-lcssa
  br i1 %52, label %.preheader489.lr.ph, label %.preheader488

.preheader489.lr.ph:                              ; preds = %.preheader490
  %60 = getelementptr inbounds i8, ptr %0, i64 1656
  %61 = getelementptr inbounds i8, ptr %0, i64 216
  %62 = add nsw i64 %14, %12
  br i1 %.not.not491, label %.preheader489.us.preheader, label %._crit_edge.thread

.preheader489.us.preheader:                       ; preds = %.preheader489.lr.ph
  %xtraiter620 = and i64 %14, 1
  %63 = icmp eq i64 %55, 0
  %unroll_iter623 = and i64 %14, 9223372036854775806
  %lcmp.mod622.not = icmp eq i64 %xtraiter620, 0
  br label %.preheader489.us

.preheader489.us:                                 ; preds = %.preheader489.us.preheader, %._crit_edge.us
  %.1447497.us = phi i64 [ %94, %._crit_edge.us ], [ 0, %.preheader489.us.preheader ]
  %64 = mul nsw i64 %.1447497.us, %62
  br i1 %63, label %._crit_edge.us.unr-lcssa, label %.preheader489.us.new

.preheader489.us.new:                             ; preds = %.preheader489.us, %.preheader489.us.new
  %.1449494.us = phi i64 [ %84, %.preheader489.us.new ], [ 0, %.preheader489.us ]
  %niter624 = phi i64 [ %niter624.next.1, %.preheader489.us.new ], [ 0, %.preheader489.us ]
  %65 = load ptr, ptr %60, align 8, !tbaa !27
  %66 = getelementptr inbounds double, ptr %65, i64 %.1449494.us
  %67 = load double, ptr %66, align 8, !tbaa !28
  %68 = load ptr, ptr %61, align 8, !tbaa !27
  %69 = getelementptr double, ptr %68, i64 %64
  %70 = getelementptr double, ptr %69, i64 %12
  %71 = getelementptr double, ptr %70, i64 %.1449494.us
  %72 = load double, ptr %71, align 8, !tbaa !28
  %73 = fadd double %67, %72
  store double %73, ptr %66, align 8, !tbaa !28
  %74 = or disjoint i64 %.1449494.us, 1
  %75 = load ptr, ptr %60, align 8, !tbaa !27
  %76 = getelementptr inbounds double, ptr %75, i64 %74
  %77 = load double, ptr %76, align 8, !tbaa !28
  %78 = load ptr, ptr %61, align 8, !tbaa !27
  %79 = getelementptr double, ptr %78, i64 %64
  %80 = getelementptr double, ptr %79, i64 %12
  %81 = getelementptr double, ptr %80, i64 %74
  %82 = load double, ptr %81, align 8, !tbaa !28
  %83 = fadd double %77, %82
  store double %83, ptr %76, align 8, !tbaa !28
  %84 = add nuw nsw i64 %.1449494.us, 2
  %niter624.next.1 = add i64 %niter624, 2
  %niter624.ncmp.1 = icmp eq i64 %niter624.next.1, %unroll_iter623
  br i1 %niter624.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader489.us.new, !llvm.loop !36

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader489.us.new, %.preheader489.us
  %.1449494.us.unr = phi i64 [ 0, %.preheader489.us ], [ %84, %.preheader489.us.new ]
  br i1 %lcmp.mod622.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %85 = load ptr, ptr %60, align 8, !tbaa !27
  %86 = getelementptr inbounds double, ptr %85, i64 %.1449494.us.unr
  %87 = load double, ptr %86, align 8, !tbaa !28
  %88 = load ptr, ptr %61, align 8, !tbaa !27
  %89 = getelementptr double, ptr %88, i64 %64
  %90 = getelementptr double, ptr %89, i64 %12
  %91 = getelementptr double, ptr %90, i64 %.1449494.us.unr
  %92 = load double, ptr %91, align 8, !tbaa !28
  %93 = fadd double %87, %92
  store double %93, ptr %86, align 8, !tbaa !28
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %94 = add nuw nsw i64 %.1447497.us, 1
  %exitcond587.not = icmp eq i64 %94, %16
  br i1 %exitcond587.not, label %.preheader488, label %.preheader489.us, !llvm.loop !37

95:                                               ; preds = %95, %.lr.ph.new
  %.0448492 = phi i64 [ 0, %.lr.ph.new ], [ %107, %95 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %95 ]
  %96 = load ptr, ptr %54, align 8, !tbaa !27
  %97 = getelementptr inbounds double, ptr %96, i64 %.0448492
  store double 0.000000e+00, ptr %97, align 8, !tbaa !28
  %98 = or disjoint i64 %.0448492, 1
  %99 = load ptr, ptr %54, align 8, !tbaa !27
  %100 = getelementptr inbounds double, ptr %99, i64 %98
  store double 0.000000e+00, ptr %100, align 8, !tbaa !28
  %101 = or disjoint i64 %.0448492, 2
  %102 = load ptr, ptr %54, align 8, !tbaa !27
  %103 = getelementptr inbounds double, ptr %102, i64 %101
  store double 0.000000e+00, ptr %103, align 8, !tbaa !28
  %104 = or disjoint i64 %.0448492, 3
  %105 = load ptr, ptr %54, align 8, !tbaa !27
  %106 = getelementptr inbounds double, ptr %105, i64 %104
  store double 0.000000e+00, ptr %106, align 8, !tbaa !28
  %107 = add nuw nsw i64 %.0448492, 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 %.preheader490.unr-lcssa, label %95, !llvm.loop !38

.preheader488:                                    ; preds = %._crit_edge.us, %.preheader490
  br i1 %.not.not491, label %.lr.ph500, label %._crit_edge.thread

.lr.ph500:                                        ; preds = %.preheader488
  %108 = getelementptr inbounds i8, ptr %0, i64 1656
  %109 = sitofp i64 %16 to double
  %xtraiter626 = and i64 %14, 3
  %110 = icmp ult i64 %55, 3
  br i1 %110, label %._crit_edge.unr-lcssa, label %.lr.ph500.new

.lr.ph500.new:                                    ; preds = %.lr.ph500
  %unroll_iter629 = and i64 %14, 9223372036854775804
  br label %111

111:                                              ; preds = %111, %.lr.ph500.new
  %.2450499 = phi i64 [ 0, %.lr.ph500.new ], [ %131, %111 ]
  %niter630 = phi i64 [ 0, %.lr.ph500.new ], [ %niter630.next.3, %111 ]
  %112 = load ptr, ptr %108, align 8, !tbaa !27
  %113 = getelementptr inbounds double, ptr %112, i64 %.2450499
  %114 = load double, ptr %113, align 8, !tbaa !28
  %115 = fdiv double %114, %109
  store double %115, ptr %113, align 8, !tbaa !28
  %116 = or disjoint i64 %.2450499, 1
  %117 = load ptr, ptr %108, align 8, !tbaa !27
  %118 = getelementptr inbounds double, ptr %117, i64 %116
  %119 = load double, ptr %118, align 8, !tbaa !28
  %120 = fdiv double %119, %109
  store double %120, ptr %118, align 8, !tbaa !28
  %121 = or disjoint i64 %.2450499, 2
  %122 = load ptr, ptr %108, align 8, !tbaa !27
  %123 = getelementptr inbounds double, ptr %122, i64 %121
  %124 = load double, ptr %123, align 8, !tbaa !28
  %125 = fdiv double %124, %109
  store double %125, ptr %123, align 8, !tbaa !28
  %126 = or disjoint i64 %.2450499, 3
  %127 = load ptr, ptr %108, align 8, !tbaa !27
  %128 = getelementptr inbounds double, ptr %127, i64 %126
  %129 = load double, ptr %128, align 8, !tbaa !28
  %130 = fdiv double %129, %109
  store double %130, ptr %128, align 8, !tbaa !28
  %131 = add nuw nsw i64 %.2450499, 4
  %niter630.next.3 = add i64 %niter630, 4
  %niter630.ncmp.3 = icmp eq i64 %niter630.next.3, %unroll_iter629
  br i1 %niter630.ncmp.3, label %._crit_edge.unr-lcssa, label %111, !llvm.loop !39

._crit_edge.thread:                               ; preds = %51, %.preheader488, %.preheader489.lr.ph
  %132 = getelementptr inbounds i8, ptr %1, i64 16
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %132, i64 noundef %14, ptr noundef %3)
  br label %._crit_edge505

._crit_edge.unr-lcssa:                            ; preds = %111, %.lr.ph500
  %.2450499.unr = phi i64 [ 0, %.lr.ph500 ], [ %131, %111 ]
  %lcmp.mod628.not = icmp eq i64 %xtraiter626, 0
  br i1 %lcmp.mod628.not, label %._crit_edge, label %.epil.preheader625

.epil.preheader625:                               ; preds = %._crit_edge.unr-lcssa, %.epil.preheader625
  %.2450499.epil = phi i64 [ %137, %.epil.preheader625 ], [ %.2450499.unr, %._crit_edge.unr-lcssa ]
  %epil.iter627 = phi i64 [ %epil.iter627.next, %.epil.preheader625 ], [ 0, %._crit_edge.unr-lcssa ]
  %133 = load ptr, ptr %108, align 8, !tbaa !27
  %134 = getelementptr inbounds double, ptr %133, i64 %.2450499.epil
  %135 = load double, ptr %134, align 8, !tbaa !28
  %136 = fdiv double %135, %109
  store double %136, ptr %134, align 8, !tbaa !28
  %137 = add nuw nsw i64 %.2450499.epil, 1
  %epil.iter627.next = add i64 %epil.iter627, 1
  %epil.iter627.cmp.not = icmp eq i64 %epil.iter627.next, %xtraiter626
  br i1 %epil.iter627.cmp.not, label %._crit_edge, label %.epil.preheader625, !llvm.loop !40

._crit_edge:                                      ; preds = %.epil.preheader625, %._crit_edge.unr-lcssa
  %138 = getelementptr inbounds i8, ptr %1, i64 16
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %138, i64 noundef %14, ptr noundef %3)
  br i1 %.not.not491, label %.lr.ph504, label %._crit_edge505

.lr.ph504:                                        ; preds = %._crit_edge
  %139 = getelementptr inbounds i8, ptr %0, i64 1656
  %140 = getelementptr inbounds i8, ptr %1, i64 72
  %xtraiter632 = and i64 %14, 3
  %141 = icmp ult i64 %55, 3
  br i1 %141, label %._crit_edge505.loopexit.unr-lcssa, label %.lr.ph504.new

.lr.ph504.new:                                    ; preds = %.lr.ph504
  %unroll_iter635 = and i64 %14, 9223372036854775804
  br label %142

142:                                              ; preds = %142, %.lr.ph504.new
  %.3451502 = phi i64 [ 0, %.lr.ph504.new ], [ %166, %142 ]
  %niter636 = phi i64 [ 0, %.lr.ph504.new ], [ %niter636.next.3, %142 ]
  %143 = load ptr, ptr %139, align 8, !tbaa !27
  %144 = getelementptr inbounds double, ptr %143, i64 %.3451502
  %145 = load double, ptr %144, align 8, !tbaa !28
  %146 = load ptr, ptr %140, align 8, !tbaa !27
  %147 = getelementptr inbounds double, ptr %146, i64 %.3451502
  store double %145, ptr %147, align 8, !tbaa !28
  %148 = or disjoint i64 %.3451502, 1
  %149 = load ptr, ptr %139, align 8, !tbaa !27
  %150 = getelementptr inbounds double, ptr %149, i64 %148
  %151 = load double, ptr %150, align 8, !tbaa !28
  %152 = load ptr, ptr %140, align 8, !tbaa !27
  %153 = getelementptr inbounds double, ptr %152, i64 %148
  store double %151, ptr %153, align 8, !tbaa !28
  %154 = or disjoint i64 %.3451502, 2
  %155 = load ptr, ptr %139, align 8, !tbaa !27
  %156 = getelementptr inbounds double, ptr %155, i64 %154
  %157 = load double, ptr %156, align 8, !tbaa !28
  %158 = load ptr, ptr %140, align 8, !tbaa !27
  %159 = getelementptr inbounds double, ptr %158, i64 %154
  store double %157, ptr %159, align 8, !tbaa !28
  %160 = or disjoint i64 %.3451502, 3
  %161 = load ptr, ptr %139, align 8, !tbaa !27
  %162 = getelementptr inbounds double, ptr %161, i64 %160
  %163 = load double, ptr %162, align 8, !tbaa !28
  %164 = load ptr, ptr %140, align 8, !tbaa !27
  %165 = getelementptr inbounds double, ptr %164, i64 %160
  store double %163, ptr %165, align 8, !tbaa !28
  %166 = add nuw nsw i64 %.3451502, 4
  %niter636.next.3 = add i64 %niter636, 4
  %niter636.ncmp.3 = icmp eq i64 %niter636.next.3, %unroll_iter635
  br i1 %niter636.ncmp.3, label %._crit_edge505.loopexit.unr-lcssa, label %142, !llvm.loop !41

._crit_edge505.loopexit.unr-lcssa:                ; preds = %142, %.lr.ph504
  %.3451502.unr = phi i64 [ 0, %.lr.ph504 ], [ %166, %142 ]
  %lcmp.mod634.not = icmp eq i64 %xtraiter632, 0
  br i1 %lcmp.mod634.not, label %._crit_edge505, label %.epil.preheader631

.epil.preheader631:                               ; preds = %._crit_edge505.loopexit.unr-lcssa, %.epil.preheader631
  %.3451502.epil = phi i64 [ %172, %.epil.preheader631 ], [ %.3451502.unr, %._crit_edge505.loopexit.unr-lcssa ]
  %epil.iter633 = phi i64 [ %epil.iter633.next, %.epil.preheader631 ], [ 0, %._crit_edge505.loopexit.unr-lcssa ]
  %167 = load ptr, ptr %139, align 8, !tbaa !27
  %168 = getelementptr inbounds double, ptr %167, i64 %.3451502.epil
  %169 = load double, ptr %168, align 8, !tbaa !28
  %170 = load ptr, ptr %140, align 8, !tbaa !27
  %171 = getelementptr inbounds double, ptr %170, i64 %.3451502.epil
  store double %169, ptr %171, align 8, !tbaa !28
  %172 = add nuw nsw i64 %.3451502.epil, 1
  %epil.iter633.next = add i64 %epil.iter633, 1
  %epil.iter633.cmp.not = icmp eq i64 %epil.iter633.next, %xtraiter632
  br i1 %epil.iter633.cmp.not, label %._crit_edge505, label %.epil.preheader631, !llvm.loop !42

._crit_edge505:                                   ; preds = %._crit_edge505.loopexit.unr-lcssa, %.epil.preheader631, %._crit_edge.thread, %._crit_edge
  %173 = getelementptr inbounds i8, ptr %0, i64 72
  %174 = load i64, ptr %173, align 8, !tbaa !43
  %.not = icmp eq i64 %174, 0
  br i1 %.not, label %.thread, label %175

175:                                              ; preds = %._crit_edge505
  %176 = load i64, ptr %0, align 8, !tbaa !44
  switch i64 %176, label %._crit_edge509 [
    i64 0, label %.preheader487
    i64 3, label %.preheader486
  ]

.preheader487:                                    ; preds = %175
  br i1 %.not.not491, label %.lr.ph508, label %._crit_edge509

.lr.ph508:                                        ; preds = %.preheader487
  %177 = getelementptr inbounds i8, ptr %0, i64 64
  %178 = getelementptr inbounds i8, ptr %1, i64 72
  %179 = add nsw i64 %14, -1
  %xtraiter644 = and i64 %14, 3
  %180 = icmp ult i64 %179, 3
  br i1 %180, label %._crit_edge509.loopexit.unr-lcssa, label %.lr.ph508.new

.lr.ph508.new:                                    ; preds = %.lr.ph508
  %unroll_iter647 = and i64 %14, 9223372036854775804
  br label %181

181:                                              ; preds = %181, %.lr.ph508.new
  %.4452507 = phi i64 [ 0, %.lr.ph508.new ], [ %205, %181 ]
  %niter648 = phi i64 [ 0, %.lr.ph508.new ], [ %niter648.next.3, %181 ]
  %182 = load ptr, ptr %177, align 8, !tbaa !27
  %183 = getelementptr inbounds double, ptr %182, i64 %.4452507
  %184 = load double, ptr %183, align 8, !tbaa !28
  %185 = load ptr, ptr %178, align 8, !tbaa !27
  %186 = getelementptr inbounds double, ptr %185, i64 %.4452507
  store double %184, ptr %186, align 8, !tbaa !28
  %187 = or disjoint i64 %.4452507, 1
  %188 = load ptr, ptr %177, align 8, !tbaa !27
  %189 = getelementptr inbounds double, ptr %188, i64 %187
  %190 = load double, ptr %189, align 8, !tbaa !28
  %191 = load ptr, ptr %178, align 8, !tbaa !27
  %192 = getelementptr inbounds double, ptr %191, i64 %187
  store double %190, ptr %192, align 8, !tbaa !28
  %193 = or disjoint i64 %.4452507, 2
  %194 = load ptr, ptr %177, align 8, !tbaa !27
  %195 = getelementptr inbounds double, ptr %194, i64 %193
  %196 = load double, ptr %195, align 8, !tbaa !28
  %197 = load ptr, ptr %178, align 8, !tbaa !27
  %198 = getelementptr inbounds double, ptr %197, i64 %193
  store double %196, ptr %198, align 8, !tbaa !28
  %199 = or disjoint i64 %.4452507, 3
  %200 = load ptr, ptr %177, align 8, !tbaa !27
  %201 = getelementptr inbounds double, ptr %200, i64 %199
  %202 = load double, ptr %201, align 8, !tbaa !28
  %203 = load ptr, ptr %178, align 8, !tbaa !27
  %204 = getelementptr inbounds double, ptr %203, i64 %199
  store double %202, ptr %204, align 8, !tbaa !28
  %205 = add nuw nsw i64 %.4452507, 4
  %niter648.next.3 = add i64 %niter648, 4
  %niter648.ncmp.3 = icmp eq i64 %niter648.next.3, %unroll_iter647
  br i1 %niter648.ncmp.3, label %._crit_edge509.loopexit.unr-lcssa, label %181, !llvm.loop !45

.preheader486:                                    ; preds = %175
  br i1 %.not.not491, label %.lr.ph512, label %._crit_edge509

.lr.ph512:                                        ; preds = %.preheader486
  %206 = getelementptr inbounds i8, ptr %1, i64 72
  %207 = add nsw i64 %14, -1
  %xtraiter638 = and i64 %14, 3
  %208 = icmp ult i64 %207, 3
  br i1 %208, label %._crit_edge509.loopexit618.unr-lcssa, label %.lr.ph512.new

.lr.ph512.new:                                    ; preds = %.lr.ph512
  %unroll_iter641 = and i64 %14, 9223372036854775804
  br label %209

209:                                              ; preds = %209, %.lr.ph512.new
  %.5453511 = phi i64 [ 0, %.lr.ph512.new ], [ %221, %209 ]
  %niter642 = phi i64 [ 0, %.lr.ph512.new ], [ %niter642.next.3, %209 ]
  %210 = load ptr, ptr %206, align 8, !tbaa !27
  %211 = getelementptr inbounds double, ptr %210, i64 %.5453511
  store double 0.000000e+00, ptr %211, align 8, !tbaa !28
  %212 = or disjoint i64 %.5453511, 1
  %213 = load ptr, ptr %206, align 8, !tbaa !27
  %214 = getelementptr inbounds double, ptr %213, i64 %212
  store double 0.000000e+00, ptr %214, align 8, !tbaa !28
  %215 = or disjoint i64 %.5453511, 2
  %216 = load ptr, ptr %206, align 8, !tbaa !27
  %217 = getelementptr inbounds double, ptr %216, i64 %215
  store double 0.000000e+00, ptr %217, align 8, !tbaa !28
  %218 = or disjoint i64 %.5453511, 3
  %219 = load ptr, ptr %206, align 8, !tbaa !27
  %220 = getelementptr inbounds double, ptr %219, i64 %218
  store double 0.000000e+00, ptr %220, align 8, !tbaa !28
  %221 = add nuw nsw i64 %.5453511, 4
  %niter642.next.3 = add i64 %niter642, 4
  %niter642.ncmp.3 = icmp eq i64 %niter642.next.3, %unroll_iter641
  br i1 %niter642.ncmp.3, label %._crit_edge509.loopexit618.unr-lcssa, label %209, !llvm.loop !46

._crit_edge509.loopexit.unr-lcssa:                ; preds = %181, %.lr.ph508
  %.4452507.unr = phi i64 [ 0, %.lr.ph508 ], [ %205, %181 ]
  %lcmp.mod646.not = icmp eq i64 %xtraiter644, 0
  br i1 %lcmp.mod646.not, label %._crit_edge509, label %.epil.preheader643

.epil.preheader643:                               ; preds = %._crit_edge509.loopexit.unr-lcssa, %.epil.preheader643
  %.4452507.epil = phi i64 [ %227, %.epil.preheader643 ], [ %.4452507.unr, %._crit_edge509.loopexit.unr-lcssa ]
  %epil.iter645 = phi i64 [ %epil.iter645.next, %.epil.preheader643 ], [ 0, %._crit_edge509.loopexit.unr-lcssa ]
  %222 = load ptr, ptr %177, align 8, !tbaa !27
  %223 = getelementptr inbounds double, ptr %222, i64 %.4452507.epil
  %224 = load double, ptr %223, align 8, !tbaa !28
  %225 = load ptr, ptr %178, align 8, !tbaa !27
  %226 = getelementptr inbounds double, ptr %225, i64 %.4452507.epil
  store double %224, ptr %226, align 8, !tbaa !28
  %227 = add nuw nsw i64 %.4452507.epil, 1
  %epil.iter645.next = add i64 %epil.iter645, 1
  %epil.iter645.cmp.not = icmp eq i64 %epil.iter645.next, %xtraiter644
  br i1 %epil.iter645.cmp.not, label %._crit_edge509, label %.epil.preheader643, !llvm.loop !47

._crit_edge509.loopexit618.unr-lcssa:             ; preds = %209, %.lr.ph512
  %.5453511.unr = phi i64 [ 0, %.lr.ph512 ], [ %221, %209 ]
  %lcmp.mod640.not = icmp eq i64 %xtraiter638, 0
  br i1 %lcmp.mod640.not, label %._crit_edge509, label %.epil.preheader637

.epil.preheader637:                               ; preds = %._crit_edge509.loopexit618.unr-lcssa, %.epil.preheader637
  %.5453511.epil = phi i64 [ %230, %.epil.preheader637 ], [ %.5453511.unr, %._crit_edge509.loopexit618.unr-lcssa ]
  %epil.iter639 = phi i64 [ %epil.iter639.next, %.epil.preheader637 ], [ 0, %._crit_edge509.loopexit618.unr-lcssa ]
  %228 = load ptr, ptr %206, align 8, !tbaa !27
  %229 = getelementptr inbounds double, ptr %228, i64 %.5453511.epil
  store double 0.000000e+00, ptr %229, align 8, !tbaa !28
  %230 = add nuw nsw i64 %.5453511.epil, 1
  %epil.iter639.next = add i64 %epil.iter639, 1
  %epil.iter639.cmp.not = icmp eq i64 %epil.iter639.next, %xtraiter638
  br i1 %epil.iter639.cmp.not, label %._crit_edge509, label %.epil.preheader637, !llvm.loop !48

._crit_edge509:                                   ; preds = %._crit_edge509.loopexit618.unr-lcssa, %.epil.preheader637, %._crit_edge509.loopexit.unr-lcssa, %.epil.preheader643, %.preheader486, %.preheader487, %175
  switch i64 %174, label %669 [
    i64 0, label %.thread
    i64 1, label %307
    i64 2, label %400
  ]

.thread:                                          ; preds = %._crit_edge505, %._crit_edge509
  %231 = getelementptr inbounds i8, ptr %1, i64 80
  store i64 0, ptr %231, align 8, !tbaa !49
  store i64 %12, ptr %1, align 8, !tbaa !23
  %232 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %14, ptr %232, align 8, !tbaa !26
  %233 = getelementptr inbounds i8, ptr %1, i64 88
  store i64 1, ptr %233, align 8, !tbaa !50
  %234 = getelementptr inbounds i8, ptr %1, i64 96
  store <2 x double> <double 1.000000e+00, double 5.000000e-01>, ptr %234, align 8, !tbaa !28
  %235 = getelementptr inbounds i8, ptr %1, i64 112
  %236 = getelementptr inbounds i8, ptr %1, i64 128
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %235, i8 0, i64 16, i1 false)
  store double 1.000000e+00, ptr %236, align 8, !tbaa !51
  %237 = getelementptr inbounds i8, ptr %0, i64 128
  %238 = load double, ptr %237, align 8, !tbaa !52
  %239 = getelementptr inbounds i8, ptr %1, i64 136
  store double %238, ptr %239, align 8, !tbaa !53
  %240 = getelementptr inbounds i8, ptr %1, i64 144
  store i8 0, ptr %240, align 8, !tbaa !34
  %241 = getelementptr inbounds i8, ptr %1, i64 1224
  %242 = add nsw i64 %14, %12
  %243 = mul nsw i64 %16, %242
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %241, i64 noundef %243, ptr noundef %3)
  br i1 %52, label %.preheader481.lr.ph, label %._crit_edge573

.preheader481.lr.ph:                              ; preds = %.thread
  %.not477.not564 = icmp sgt i64 %12, 0
  %244 = getelementptr inbounds i8, ptr %0, i64 216
  %245 = getelementptr inbounds i8, ptr %1, i64 1280
  %246 = getelementptr inbounds i8, ptr %1, i64 72
  %xtraiter674 = and i64 %12, 1
  %247 = icmp eq i64 %12, 1
  %unroll_iter677 = and i64 %12, 9223372036854775806
  %lcmp.mod676.not = icmp eq i64 %xtraiter674, 0
  %xtraiter680 = and i64 %14, 1
  %248 = icmp eq i64 %14, 1
  %unroll_iter683 = and i64 %14, 9223372036854775806
  %lcmp.mod682.not = icmp eq i64 %xtraiter680, 0
  br label %.preheader481

.preheader481:                                    ; preds = %.preheader481.lr.ph, %._crit_edge570
  %.2572 = phi i64 [ 0, %.preheader481.lr.ph ], [ %304, %._crit_edge570 ]
  br i1 %.not477.not564, label %.lr.ph566, label %.preheader

.lr.ph566:                                        ; preds = %.preheader481
  %249 = mul nsw i64 %.2572, %242
  br i1 %247, label %.preheader.loopexit.unr-lcssa, label %.lr.ph566.new

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph566.new, %.lr.ph566
  %.6565.unr = phi i64 [ 0, %.lr.ph566 ], [ %271, %.lr.ph566.new ]
  br i1 %lcmp.mod676.not, label %.preheader, label %.preheader.loopexit.epilog-lcssa

.preheader.loopexit.epilog-lcssa:                 ; preds = %.preheader.loopexit.unr-lcssa
  %250 = load ptr, ptr %244, align 8, !tbaa !27
  %251 = add nsw i64 %.6565.unr, %249
  %252 = getelementptr inbounds double, ptr %250, i64 %251
  %253 = load double, ptr %252, align 8, !tbaa !28
  %254 = load ptr, ptr %245, align 8, !tbaa !27
  %255 = getelementptr inbounds double, ptr %254, i64 %251
  store double %253, ptr %255, align 8, !tbaa !28
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.epilog-lcssa, %.preheader.loopexit.unr-lcssa, %.preheader481
  br i1 %.not.not491, label %.lr.ph569, label %._crit_edge570

.lr.ph569:                                        ; preds = %.preheader
  %256 = mul nsw i64 %.2572, %242
  %257 = add nsw i64 %256, %12
  br i1 %248, label %._crit_edge570.loopexit.unr-lcssa, label %.lr.ph569.new

.lr.ph566.new:                                    ; preds = %.lr.ph566, %.lr.ph566.new
  %.6565 = phi i64 [ %271, %.lr.ph566.new ], [ 0, %.lr.ph566 ]
  %niter678 = phi i64 [ %niter678.next.1, %.lr.ph566.new ], [ 0, %.lr.ph566 ]
  %258 = load ptr, ptr %244, align 8, !tbaa !27
  %259 = add nsw i64 %.6565, %249
  %260 = getelementptr inbounds double, ptr %258, i64 %259
  %261 = load double, ptr %260, align 8, !tbaa !28
  %262 = load ptr, ptr %245, align 8, !tbaa !27
  %263 = getelementptr inbounds double, ptr %262, i64 %259
  store double %261, ptr %263, align 8, !tbaa !28
  %264 = or disjoint i64 %.6565, 1
  %265 = load ptr, ptr %244, align 8, !tbaa !27
  %266 = add nsw i64 %264, %249
  %267 = getelementptr inbounds double, ptr %265, i64 %266
  %268 = load double, ptr %267, align 8, !tbaa !28
  %269 = load ptr, ptr %245, align 8, !tbaa !27
  %270 = getelementptr inbounds double, ptr %269, i64 %266
  store double %268, ptr %270, align 8, !tbaa !28
  %271 = add nuw nsw i64 %.6565, 2
  %niter678.next.1 = add i64 %niter678, 2
  %niter678.ncmp.1 = icmp eq i64 %niter678.next.1, %unroll_iter677
  br i1 %niter678.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %.lr.ph566.new, !llvm.loop !54

.lr.ph569.new:                                    ; preds = %.lr.ph569, %.lr.ph569.new
  %.7568 = phi i64 [ %293, %.lr.ph569.new ], [ 0, %.lr.ph569 ]
  %niter684 = phi i64 [ %niter684.next.1, %.lr.ph569.new ], [ 0, %.lr.ph569 ]
  %272 = load ptr, ptr %244, align 8, !tbaa !27
  %273 = add nsw i64 %257, %.7568
  %274 = getelementptr inbounds double, ptr %272, i64 %273
  %275 = load double, ptr %274, align 8, !tbaa !28
  %276 = load ptr, ptr %246, align 8, !tbaa !27
  %277 = getelementptr inbounds double, ptr %276, i64 %.7568
  %278 = load double, ptr %277, align 8, !tbaa !28
  %279 = fsub double %275, %278
  %280 = load ptr, ptr %245, align 8, !tbaa !27
  %281 = getelementptr inbounds double, ptr %280, i64 %273
  store double %279, ptr %281, align 8, !tbaa !28
  %282 = or disjoint i64 %.7568, 1
  %283 = load ptr, ptr %244, align 8, !tbaa !27
  %284 = add nsw i64 %257, %282
  %285 = getelementptr inbounds double, ptr %283, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !28
  %287 = load ptr, ptr %246, align 8, !tbaa !27
  %288 = getelementptr inbounds double, ptr %287, i64 %282
  %289 = load double, ptr %288, align 8, !tbaa !28
  %290 = fsub double %286, %289
  %291 = load ptr, ptr %245, align 8, !tbaa !27
  %292 = getelementptr inbounds double, ptr %291, i64 %284
  store double %290, ptr %292, align 8, !tbaa !28
  %293 = add nuw nsw i64 %.7568, 2
  %niter684.next.1 = add i64 %niter684, 2
  %niter684.ncmp.1 = icmp eq i64 %niter684.next.1, %unroll_iter683
  br i1 %niter684.ncmp.1, label %._crit_edge570.loopexit.unr-lcssa, label %.lr.ph569.new, !llvm.loop !55

._crit_edge570.loopexit.unr-lcssa:                ; preds = %.lr.ph569.new, %.lr.ph569
  %.7568.unr = phi i64 [ 0, %.lr.ph569 ], [ %293, %.lr.ph569.new ]
  br i1 %lcmp.mod682.not, label %._crit_edge570, label %._crit_edge570.loopexit.epilog-lcssa

._crit_edge570.loopexit.epilog-lcssa:             ; preds = %._crit_edge570.loopexit.unr-lcssa
  %294 = load ptr, ptr %244, align 8, !tbaa !27
  %295 = add nsw i64 %257, %.7568.unr
  %296 = getelementptr inbounds double, ptr %294, i64 %295
  %297 = load double, ptr %296, align 8, !tbaa !28
  %298 = load ptr, ptr %246, align 8, !tbaa !27
  %299 = getelementptr inbounds double, ptr %298, i64 %.7568.unr
  %300 = load double, ptr %299, align 8, !tbaa !28
  %301 = fsub double %297, %300
  %302 = load ptr, ptr %245, align 8, !tbaa !27
  %303 = getelementptr inbounds double, ptr %302, i64 %295
  store double %301, ptr %303, align 8, !tbaa !28
  br label %._crit_edge570

._crit_edge570:                                   ; preds = %._crit_edge570.loopexit.epilog-lcssa, %._crit_edge570.loopexit.unr-lcssa, %.preheader
  %304 = add nuw nsw i64 %.2572, 1
  %exitcond602.not = icmp eq i64 %304, %16
  br i1 %exitcond602.not, label %._crit_edge573, label %.preheader481, !llvm.loop !56

._crit_edge573:                                   ; preds = %._crit_edge570, %.thread
  %305 = getelementptr inbounds i8, ptr %1, i64 1216
  store i64 %16, ptr %305, align 8, !tbaa !33
  %306 = getelementptr inbounds i8, ptr %1, i64 1288
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %1, ptr noundef nonnull %306, ptr noundef %3)
  call void @_ZN11alglib_implL23idw_errormetricsviacalcEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3)
  store double 1.000000e+00, ptr %20, align 8, !tbaa !22
  br label %670

307:                                              ; preds = %._crit_edge509
  %308 = getelementptr inbounds i8, ptr %1, i64 80
  store i64 1, ptr %308, align 8, !tbaa !49
  store i64 %12, ptr %1, align 8, !tbaa !23
  %309 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %14, ptr %309, align 8, !tbaa !26
  %310 = getelementptr inbounds i8, ptr %1, i64 88
  store i64 1, ptr %310, align 8, !tbaa !50
  %311 = getelementptr inbounds i8, ptr %0, i64 88
  %312 = load double, ptr %311, align 8, !tbaa !57
  %313 = getelementptr inbounds i8, ptr %1, i64 96
  store double %312, ptr %313, align 8, !tbaa !58
  %314 = getelementptr inbounds i8, ptr %1, i64 104
  store double 1.000000e+00, ptr %314, align 8, !tbaa !59
  %315 = getelementptr inbounds i8, ptr %1, i64 112
  %316 = getelementptr inbounds i8, ptr %1, i64 128
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %315, i8 0, i64 16, i1 false)
  store <2 x double> <double 1.000000e+00, double 0.000000e+00>, ptr %316, align 8, !tbaa !28
  %317 = getelementptr inbounds i8, ptr %1, i64 144
  store i8 0, ptr %317, align 8, !tbaa !34
  %318 = getelementptr inbounds i8, ptr %0, i64 248
  %319 = add nsw i64 %14, %12
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %318, i64 noundef %16, i64 noundef %319, ptr noundef %3)
  br i1 %52, label %.preheader483.lr.ph, label %._crit_edge563

.preheader483.lr.ph:                              ; preds = %307
  %.not474.not554 = icmp sgt i64 %12, 0
  %320 = getelementptr inbounds i8, ptr %0, i64 216
  %321 = getelementptr inbounds i8, ptr %0, i64 320
  %322 = getelementptr inbounds i8, ptr %1, i64 72
  %xtraiter662 = and i64 %12, 1
  %323 = icmp eq i64 %12, 1
  %unroll_iter665 = and i64 %12, 9223372036854775806
  %lcmp.mod664.not = icmp eq i64 %xtraiter662, 0
  %xtraiter668 = and i64 %14, 1
  %324 = icmp eq i64 %14, 1
  %unroll_iter671 = and i64 %14, 9223372036854775806
  %lcmp.mod670.not = icmp eq i64 %xtraiter668, 0
  br label %.preheader483

.preheader483:                                    ; preds = %.preheader483.lr.ph, %._crit_edge560
  %.3562 = phi i64 [ 0, %.preheader483.lr.ph ], [ %397, %._crit_edge560 ]
  br i1 %.not474.not554, label %.lr.ph556, label %.preheader482

.lr.ph556:                                        ; preds = %.preheader483
  %325 = mul nsw i64 %.3562, %319
  br i1 %323, label %.preheader482.loopexit.unr-lcssa, label %.lr.ph556.new

.preheader482.loopexit.unr-lcssa:                 ; preds = %.lr.ph556.new, %.lr.ph556
  %.8555.unr = phi i64 [ 0, %.lr.ph556 ], [ %352, %.lr.ph556.new ]
  br i1 %lcmp.mod664.not, label %.preheader482, label %.preheader482.loopexit.epilog-lcssa

.preheader482.loopexit.epilog-lcssa:              ; preds = %.preheader482.loopexit.unr-lcssa
  %326 = load ptr, ptr %320, align 8, !tbaa !27
  %327 = getelementptr double, ptr %326, i64 %325
  %328 = getelementptr double, ptr %327, i64 %.8555.unr
  %329 = load double, ptr %328, align 8, !tbaa !28
  %330 = load ptr, ptr %321, align 8, !tbaa !27
  %331 = getelementptr inbounds ptr, ptr %330, i64 %.3562
  %332 = load ptr, ptr %331, align 8, !tbaa !60
  %333 = getelementptr inbounds double, ptr %332, i64 %.8555.unr
  store double %329, ptr %333, align 8, !tbaa !28
  br label %.preheader482

.preheader482:                                    ; preds = %.preheader482.loopexit.epilog-lcssa, %.preheader482.loopexit.unr-lcssa, %.preheader483
  br i1 %.not.not491, label %.lr.ph559, label %._crit_edge560

.lr.ph559:                                        ; preds = %.preheader482
  %334 = mul nsw i64 %.3562, %319
  br i1 %324, label %._crit_edge560.loopexit.unr-lcssa, label %.lr.ph559.new

.lr.ph556.new:                                    ; preds = %.lr.ph556, %.lr.ph556.new
  %.8555 = phi i64 [ %352, %.lr.ph556.new ], [ 0, %.lr.ph556 ]
  %niter666 = phi i64 [ %niter666.next.1, %.lr.ph556.new ], [ 0, %.lr.ph556 ]
  %335 = load ptr, ptr %320, align 8, !tbaa !27
  %336 = getelementptr double, ptr %335, i64 %325
  %337 = getelementptr double, ptr %336, i64 %.8555
  %338 = load double, ptr %337, align 8, !tbaa !28
  %339 = load ptr, ptr %321, align 8, !tbaa !27
  %340 = getelementptr inbounds ptr, ptr %339, i64 %.3562
  %341 = load ptr, ptr %340, align 8, !tbaa !60
  %342 = getelementptr inbounds double, ptr %341, i64 %.8555
  store double %338, ptr %342, align 8, !tbaa !28
  %343 = or disjoint i64 %.8555, 1
  %344 = load ptr, ptr %320, align 8, !tbaa !27
  %345 = getelementptr double, ptr %344, i64 %325
  %346 = getelementptr double, ptr %345, i64 %343
  %347 = load double, ptr %346, align 8, !tbaa !28
  %348 = load ptr, ptr %321, align 8, !tbaa !27
  %349 = getelementptr inbounds ptr, ptr %348, i64 %.3562
  %350 = load ptr, ptr %349, align 8, !tbaa !60
  %351 = getelementptr inbounds double, ptr %350, i64 %343
  store double %347, ptr %351, align 8, !tbaa !28
  %352 = add nuw nsw i64 %.8555, 2
  %niter666.next.1 = add i64 %niter666, 2
  %niter666.ncmp.1 = icmp eq i64 %niter666.next.1, %unroll_iter665
  br i1 %niter666.ncmp.1, label %.preheader482.loopexit.unr-lcssa, label %.lr.ph556.new, !llvm.loop !61

.lr.ph559.new:                                    ; preds = %.lr.ph559, %.lr.ph559.new
  %.9558 = phi i64 [ %382, %.lr.ph559.new ], [ 0, %.lr.ph559 ]
  %niter672 = phi i64 [ %niter672.next.1, %.lr.ph559.new ], [ 0, %.lr.ph559 ]
  %353 = load ptr, ptr %320, align 8, !tbaa !27
  %354 = getelementptr double, ptr %353, i64 %334
  %355 = getelementptr double, ptr %354, i64 %12
  %356 = getelementptr double, ptr %355, i64 %.9558
  %357 = load double, ptr %356, align 8, !tbaa !28
  %358 = load ptr, ptr %322, align 8, !tbaa !27
  %359 = getelementptr inbounds double, ptr %358, i64 %.9558
  %360 = load double, ptr %359, align 8, !tbaa !28
  %361 = fsub double %357, %360
  %362 = load ptr, ptr %321, align 8, !tbaa !27
  %363 = getelementptr inbounds ptr, ptr %362, i64 %.3562
  %364 = load ptr, ptr %363, align 8, !tbaa !60
  %365 = getelementptr double, ptr %364, i64 %12
  %366 = getelementptr double, ptr %365, i64 %.9558
  store double %361, ptr %366, align 8, !tbaa !28
  %367 = or disjoint i64 %.9558, 1
  %368 = load ptr, ptr %320, align 8, !tbaa !27
  %369 = getelementptr double, ptr %368, i64 %334
  %370 = getelementptr double, ptr %369, i64 %12
  %371 = getelementptr double, ptr %370, i64 %367
  %372 = load double, ptr %371, align 8, !tbaa !28
  %373 = load ptr, ptr %322, align 8, !tbaa !27
  %374 = getelementptr inbounds double, ptr %373, i64 %367
  %375 = load double, ptr %374, align 8, !tbaa !28
  %376 = fsub double %372, %375
  %377 = load ptr, ptr %321, align 8, !tbaa !27
  %378 = getelementptr inbounds ptr, ptr %377, i64 %.3562
  %379 = load ptr, ptr %378, align 8, !tbaa !60
  %380 = getelementptr double, ptr %379, i64 %12
  %381 = getelementptr double, ptr %380, i64 %367
  store double %376, ptr %381, align 8, !tbaa !28
  %382 = add nuw nsw i64 %.9558, 2
  %niter672.next.1 = add i64 %niter672, 2
  %niter672.ncmp.1 = icmp eq i64 %niter672.next.1, %unroll_iter671
  br i1 %niter672.ncmp.1, label %._crit_edge560.loopexit.unr-lcssa, label %.lr.ph559.new, !llvm.loop !62

._crit_edge560.loopexit.unr-lcssa:                ; preds = %.lr.ph559.new, %.lr.ph559
  %.9558.unr = phi i64 [ 0, %.lr.ph559 ], [ %382, %.lr.ph559.new ]
  br i1 %lcmp.mod670.not, label %._crit_edge560, label %._crit_edge560.loopexit.epilog-lcssa

._crit_edge560.loopexit.epilog-lcssa:             ; preds = %._crit_edge560.loopexit.unr-lcssa
  %383 = load ptr, ptr %320, align 8, !tbaa !27
  %384 = getelementptr double, ptr %383, i64 %334
  %385 = getelementptr double, ptr %384, i64 %12
  %386 = getelementptr double, ptr %385, i64 %.9558.unr
  %387 = load double, ptr %386, align 8, !tbaa !28
  %388 = load ptr, ptr %322, align 8, !tbaa !27
  %389 = getelementptr inbounds double, ptr %388, i64 %.9558.unr
  %390 = load double, ptr %389, align 8, !tbaa !28
  %391 = fsub double %387, %390
  %392 = load ptr, ptr %321, align 8, !tbaa !27
  %393 = getelementptr inbounds ptr, ptr %392, i64 %.3562
  %394 = load ptr, ptr %393, align 8, !tbaa !60
  %395 = getelementptr double, ptr %394, i64 %12
  %396 = getelementptr double, ptr %395, i64 %.9558.unr
  store double %391, ptr %396, align 8, !tbaa !28
  br label %._crit_edge560

._crit_edge560:                                   ; preds = %._crit_edge560.loopexit.epilog-lcssa, %._crit_edge560.loopexit.unr-lcssa, %.preheader482
  %397 = add nuw nsw i64 %.3562, 1
  %exitcond599.not = icmp eq i64 %397, %16
  br i1 %exitcond599.not, label %._crit_edge563, label %.preheader483, !llvm.loop !63

._crit_edge563:                                   ; preds = %._crit_edge560, %307
  %398 = getelementptr inbounds i8, ptr %1, i64 152
  call void @_ZN11alglib_impl11kdtreebuildEPKNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef nonnull %318, i64 noundef %16, i64 noundef %12, i64 noundef %14, i64 noundef 2, ptr noundef nonnull %398, ptr noundef %3)
  %399 = getelementptr inbounds i8, ptr %1, i64 1288
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef %1, ptr noundef nonnull %399, ptr noundef %3)
  call void @_ZN11alglib_implL23idw_errormetricsviacalcEPNS_10idwbuilderEPNS_8idwmodelEPNS_9idwreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3)
  store double 1.000000e+00, ptr %20, align 8, !tbaa !22
  br label %670

400:                                              ; preds = %._crit_edge509
  %401 = getelementptr inbounds i8, ptr %0, i64 80
  %402 = load i64, ptr %401, align 8, !tbaa !64
  %403 = icmp sgt i64 %402, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %403, ptr noundef nonnull @.str.159, ptr noundef %3)
  %404 = getelementptr inbounds i8, ptr %1, i64 80
  store i64 2, ptr %404, align 8, !tbaa !49
  store i64 %12, ptr %1, align 8, !tbaa !23
  %405 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %14, ptr %405, align 8, !tbaa !26
  %406 = load i64, ptr %401, align 8, !tbaa !64
  %407 = getelementptr inbounds i8, ptr %1, i64 88
  store i64 %406, ptr %407, align 8, !tbaa !50
  %408 = getelementptr inbounds i8, ptr %0, i64 88
  %409 = load double, ptr %408, align 8, !tbaa !57
  %410 = getelementptr inbounds i8, ptr %1, i64 96
  store double %409, ptr %410, align 8, !tbaa !58
  %411 = getelementptr inbounds i8, ptr %1, i64 104
  store double 5.000000e-01, ptr %411, align 8, !tbaa !59
  %412 = getelementptr inbounds i8, ptr %0, i64 104
  %413 = load double, ptr %412, align 8, !tbaa !65
  %414 = getelementptr inbounds i8, ptr %1, i64 112
  store double %413, ptr %414, align 8, !tbaa !66
  %415 = getelementptr inbounds i8, ptr %1, i64 128
  %416 = load double, ptr @_ZN11alglib_implL8idw_mepsE, align 8, !tbaa !28
  %417 = getelementptr inbounds i8, ptr %1, i64 120
  store double %416, ptr %417, align 8, !tbaa !67
  store <2 x double> <double 1.000000e+00, double 0.000000e+00>, ptr %415, align 8, !tbaa !28
  %418 = getelementptr inbounds i8, ptr %1, i64 144
  store i8 0, ptr %418, align 8, !tbaa !34
  %419 = getelementptr inbounds i8, ptr %0, i64 248
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %419, i64 noundef %16, i64 noundef %12, ptr noundef %3)
  %420 = getelementptr inbounds i8, ptr %0, i64 328
  %421 = load i64, ptr %401, align 8, !tbaa !64
  %422 = add nsw i64 %421, 1
  %423 = mul nsw i64 %422, %14
  %424 = add nsw i64 %423, %12
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %420, i64 noundef %16, i64 noundef %424, ptr noundef %3)
  %425 = getelementptr inbounds i8, ptr %0, i64 408
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %425, i64 noundef %16, ptr noundef %3)
  br i1 %52, label %.preheader485.lr.ph, label %._crit_edge524

.preheader485.lr.ph:                              ; preds = %400
  %.not471.not513 = icmp sgt i64 %12, 0
  %426 = getelementptr inbounds i8, ptr %0, i64 216
  %427 = add nsw i64 %14, %12
  %428 = getelementptr inbounds i8, ptr %0, i64 320
  %429 = getelementptr inbounds i8, ptr %0, i64 400
  %430 = getelementptr inbounds i8, ptr %0, i64 464
  %431 = getelementptr inbounds i8, ptr %1, i64 72
  %xtraiter650 = and i64 %12, 1
  %432 = icmp eq i64 %12, 1
  %unroll_iter653 = and i64 %12, 9223372036854775806
  %lcmp.mod652.not = icmp eq i64 %xtraiter650, 0
  %xtraiter656 = and i64 %14, 1
  %433 = icmp eq i64 %14, 1
  %unroll_iter659 = and i64 %14, 9223372036854775806
  %lcmp.mod658.not = icmp eq i64 %xtraiter656, 0
  br label %.preheader485

.preheader485:                                    ; preds = %.preheader485.lr.ph, %._crit_edge521
  %.4523 = phi i64 [ 0, %.preheader485.lr.ph ], [ %520, %._crit_edge521 ]
  br i1 %.not471.not513, label %.lr.ph515, label %._crit_edge516

.lr.ph515:                                        ; preds = %.preheader485
  %434 = mul nsw i64 %.4523, %427
  br i1 %432, label %._crit_edge516.loopexit.unr-lcssa, label %.lr.ph515.new

.lr.ph515.new:                                    ; preds = %.lr.ph515, %.lr.ph515.new
  %.10514 = phi i64 [ %460, %.lr.ph515.new ], [ 0, %.lr.ph515 ]
  %niter654 = phi i64 [ %niter654.next.1, %.lr.ph515.new ], [ 0, %.lr.ph515 ]
  %435 = load ptr, ptr %426, align 8, !tbaa !27
  %436 = getelementptr double, ptr %435, i64 %434
  %437 = getelementptr double, ptr %436, i64 %.10514
  %438 = load double, ptr %437, align 8, !tbaa !28
  %439 = load ptr, ptr %428, align 8, !tbaa !27
  %440 = getelementptr inbounds ptr, ptr %439, i64 %.4523
  %441 = load ptr, ptr %440, align 8, !tbaa !60
  %442 = getelementptr inbounds double, ptr %441, i64 %.10514
  store double %438, ptr %442, align 8, !tbaa !28
  %443 = load ptr, ptr %429, align 8, !tbaa !27
  %444 = getelementptr inbounds ptr, ptr %443, i64 %.4523
  %445 = load ptr, ptr %444, align 8, !tbaa !60
  %446 = getelementptr inbounds double, ptr %445, i64 %.10514
  store double %438, ptr %446, align 8, !tbaa !28
  %447 = or disjoint i64 %.10514, 1
  %448 = load ptr, ptr %426, align 8, !tbaa !27
  %449 = getelementptr double, ptr %448, i64 %434
  %450 = getelementptr double, ptr %449, i64 %447
  %451 = load double, ptr %450, align 8, !tbaa !28
  %452 = load ptr, ptr %428, align 8, !tbaa !27
  %453 = getelementptr inbounds ptr, ptr %452, i64 %.4523
  %454 = load ptr, ptr %453, align 8, !tbaa !60
  %455 = getelementptr inbounds double, ptr %454, i64 %447
  store double %451, ptr %455, align 8, !tbaa !28
  %456 = load ptr, ptr %429, align 8, !tbaa !27
  %457 = getelementptr inbounds ptr, ptr %456, i64 %.4523
  %458 = load ptr, ptr %457, align 8, !tbaa !60
  %459 = getelementptr inbounds double, ptr %458, i64 %447
  store double %451, ptr %459, align 8, !tbaa !28
  %460 = add nuw nsw i64 %.10514, 2
  %niter654.next.1 = add i64 %niter654, 2
  %niter654.ncmp.1 = icmp eq i64 %niter654.next.1, %unroll_iter653
  br i1 %niter654.ncmp.1, label %._crit_edge516.loopexit.unr-lcssa, label %.lr.ph515.new, !llvm.loop !68

._crit_edge516.loopexit.unr-lcssa:                ; preds = %.lr.ph515.new, %.lr.ph515
  %.10514.unr = phi i64 [ 0, %.lr.ph515 ], [ %460, %.lr.ph515.new ]
  br i1 %lcmp.mod652.not, label %._crit_edge516, label %._crit_edge516.loopexit.epilog-lcssa

._crit_edge516.loopexit.epilog-lcssa:             ; preds = %._crit_edge516.loopexit.unr-lcssa
  %461 = load ptr, ptr %426, align 8, !tbaa !27
  %462 = getelementptr double, ptr %461, i64 %434
  %463 = getelementptr double, ptr %462, i64 %.10514.unr
  %464 = load double, ptr %463, align 8, !tbaa !28
  %465 = load ptr, ptr %428, align 8, !tbaa !27
  %466 = getelementptr inbounds ptr, ptr %465, i64 %.4523
  %467 = load ptr, ptr %466, align 8, !tbaa !60
  %468 = getelementptr inbounds double, ptr %467, i64 %.10514.unr
  store double %464, ptr %468, align 8, !tbaa !28
  %469 = load ptr, ptr %429, align 8, !tbaa !27
  %470 = getelementptr inbounds ptr, ptr %469, i64 %.4523
  %471 = load ptr, ptr %470, align 8, !tbaa !60
  %472 = getelementptr inbounds double, ptr %471, i64 %.10514.unr
  store double %464, ptr %472, align 8, !tbaa !28
  br label %._crit_edge516

._crit_edge516:                                   ; preds = %._crit_edge516.loopexit.epilog-lcssa, %._crit_edge516.loopexit.unr-lcssa, %.preheader485
  %473 = load ptr, ptr %430, align 8, !tbaa !27
  %474 = getelementptr inbounds i64, ptr %473, i64 %.4523
  store i64 %.4523, ptr %474, align 8, !tbaa !69
  br i1 %.not.not491, label %.lr.ph520, label %._crit_edge521

.lr.ph520:                                        ; preds = %._crit_edge516
  %475 = mul nsw i64 %.4523, %427
  br i1 %433, label %._crit_edge521.loopexit.unr-lcssa, label %.lr.ph520.new

.lr.ph520.new:                                    ; preds = %.lr.ph520, %.lr.ph520.new
  %.11518 = phi i64 [ %505, %.lr.ph520.new ], [ 0, %.lr.ph520 ]
  %niter660 = phi i64 [ %niter660.next.1, %.lr.ph520.new ], [ 0, %.lr.ph520 ]
  %476 = load ptr, ptr %426, align 8, !tbaa !27
  %477 = getelementptr double, ptr %476, i64 %475
  %478 = getelementptr double, ptr %477, i64 %12
  %479 = getelementptr double, ptr %478, i64 %.11518
  %480 = load double, ptr %479, align 8, !tbaa !28
  %481 = load ptr, ptr %431, align 8, !tbaa !27
  %482 = getelementptr inbounds double, ptr %481, i64 %.11518
  %483 = load double, ptr %482, align 8, !tbaa !28
  %484 = fsub double %480, %483
  %485 = load ptr, ptr %429, align 8, !tbaa !27
  %486 = getelementptr inbounds ptr, ptr %485, i64 %.4523
  %487 = load ptr, ptr %486, align 8, !tbaa !60
  %488 = getelementptr double, ptr %487, i64 %12
  %489 = getelementptr double, ptr %488, i64 %.11518
  store double %484, ptr %489, align 8, !tbaa !28
  %490 = or disjoint i64 %.11518, 1
  %491 = load ptr, ptr %426, align 8, !tbaa !27
  %492 = getelementptr double, ptr %491, i64 %475
  %493 = getelementptr double, ptr %492, i64 %12
  %494 = getelementptr double, ptr %493, i64 %490
  %495 = load double, ptr %494, align 8, !tbaa !28
  %496 = load ptr, ptr %431, align 8, !tbaa !27
  %497 = getelementptr inbounds double, ptr %496, i64 %490
  %498 = load double, ptr %497, align 8, !tbaa !28
  %499 = fsub double %495, %498
  %500 = load ptr, ptr %429, align 8, !tbaa !27
  %501 = getelementptr inbounds ptr, ptr %500, i64 %.4523
  %502 = load ptr, ptr %501, align 8, !tbaa !60
  %503 = getelementptr double, ptr %502, i64 %12
  %504 = getelementptr double, ptr %503, i64 %490
  store double %499, ptr %504, align 8, !tbaa !28
  %505 = add nuw nsw i64 %.11518, 2
  %niter660.next.1 = add i64 %niter660, 2
  %niter660.ncmp.1 = icmp eq i64 %niter660.next.1, %unroll_iter659
  br i1 %niter660.ncmp.1, label %._crit_edge521.loopexit.unr-lcssa, label %.lr.ph520.new, !llvm.loop !70

._crit_edge521.loopexit.unr-lcssa:                ; preds = %.lr.ph520.new, %.lr.ph520
  %.11518.unr = phi i64 [ 0, %.lr.ph520 ], [ %505, %.lr.ph520.new ]
  br i1 %lcmp.mod658.not, label %._crit_edge521, label %._crit_edge521.loopexit.epilog-lcssa

._crit_edge521.loopexit.epilog-lcssa:             ; preds = %._crit_edge521.loopexit.unr-lcssa
  %506 = load ptr, ptr %426, align 8, !tbaa !27
  %507 = getelementptr double, ptr %506, i64 %475
  %508 = getelementptr double, ptr %507, i64 %12
  %509 = getelementptr double, ptr %508, i64 %.11518.unr
  %510 = load double, ptr %509, align 8, !tbaa !28
  %511 = load ptr, ptr %431, align 8, !tbaa !27
  %512 = getelementptr inbounds double, ptr %511, i64 %.11518.unr
  %513 = load double, ptr %512, align 8, !tbaa !28
  %514 = fsub double %510, %513
  %515 = load ptr, ptr %429, align 8, !tbaa !27
  %516 = getelementptr inbounds ptr, ptr %515, i64 %.4523
  %517 = load ptr, ptr %516, align 8, !tbaa !60
  %518 = getelementptr double, ptr %517, i64 %12
  %519 = getelementptr double, ptr %518, i64 %.11518.unr
  store double %514, ptr %519, align 8, !tbaa !28
  br label %._crit_edge521

._crit_edge521:                                   ; preds = %._crit_edge521.loopexit.epilog-lcssa, %._crit_edge521.loopexit.unr-lcssa, %._crit_edge516
  %520 = add nuw nsw i64 %.4523, 1
  %exitcond594.not = icmp eq i64 %520, %16
  br i1 %exitcond594.not, label %._crit_edge524, label %.preheader485, !llvm.loop !71

._crit_edge524:                                   ; preds = %._crit_edge521, %400
  %521 = getelementptr inbounds i8, ptr %0, i64 536
  call void @_ZN11alglib_impl17kdtreebuildtaggedEPKNS_9ae_matrixEPKNS_9ae_vectorEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef nonnull %419, ptr noundef nonnull %425, i64 noundef %16, i64 noundef %12, i64 noundef 0, i64 noundef 2, ptr noundef nonnull %521, ptr noundef %3)
  %522 = load i64, ptr %401, align 8, !tbaa !64
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %522, ptr noundef nonnull %8, ptr noundef %3)
  %523 = load i64, ptr %401, align 8, !tbaa !64
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %523, ptr noundef nonnull %9, ptr noundef %3)
  %524 = load i64, ptr %401, align 8, !tbaa !64
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %524, ptr noundef nonnull %10, ptr noundef %3)
  %525 = load i64, ptr %401, align 8, !tbaa !64
  %.not467.not525 = icmp sgt i64 %525, 0
  br i1 %.not467.not525, label %.lr.ph529, label %._crit_edge530

.lr.ph529:                                        ; preds = %._crit_edge524
  %526 = getelementptr inbounds i8, ptr %8, i64 56
  %527 = getelementptr inbounds i8, ptr %9, i64 56
  %528 = getelementptr inbounds i8, ptr %10, i64 56
  %529 = sitofp i64 %16 to double
  br label %530

530:                                              ; preds = %.lr.ph529, %551
  %.0527 = phi double [ 0.000000e+00, %.lr.ph529 ], [ %561, %551 ]
  %.0454526 = phi i64 [ 0, %.lr.ph529 ], [ %562, %551 ]
  %531 = load double, ptr %410, align 8, !tbaa !58
  %532 = load double, ptr %411, align 8, !tbaa !59
  %533 = uitofp nneg i64 %.0454526 to double
  %534 = call noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef %532, double noundef %533, ptr noundef %3)
  %535 = fmul double %531, %534
  %536 = load ptr, ptr %526, align 8, !tbaa !27
  %537 = getelementptr inbounds double, ptr %536, i64 %.0454526
  store double %535, ptr %537, align 8, !tbaa !28
  %538 = load double, ptr %414, align 8, !tbaa !66
  %539 = load double, ptr %415, align 8, !tbaa !51
  %540 = call noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef %539, double noundef %533, ptr noundef %3)
  %541 = fmul double %538, %540
  %542 = load ptr, ptr %527, align 8, !tbaa !27
  %543 = getelementptr inbounds double, ptr %542, i64 %.0454526
  store double %541, ptr %543, align 8, !tbaa !28
  %544 = load i64, ptr %401, align 8, !tbaa !64
  %545 = add nsw i64 %544, -1
  %546 = icmp eq i64 %.0454526, %545
  br i1 %546, label %547, label %551

547:                                              ; preds = %530
  %548 = load double, ptr %417, align 8, !tbaa !67
  %549 = load ptr, ptr %527, align 8, !tbaa !27
  %550 = getelementptr inbounds double, ptr %549, i64 %.0454526
  store double %548, ptr %550, align 8, !tbaa !28
  br label %551

551:                                              ; preds = %547, %530
  %552 = load ptr, ptr %526, align 8, !tbaa !27
  %553 = getelementptr inbounds double, ptr %552, i64 %.0454526
  %554 = load double, ptr %553, align 8, !tbaa !28
  %555 = call noundef double @_ZN11alglib_impl24kdtreeapproxrnnquerycostEPNS_6kdtreeEdPNS_8ae_stateE(ptr noundef nonnull %521, double noundef %554, ptr noundef %3)
  %556 = load ptr, ptr %528, align 8, !tbaa !27
  %557 = getelementptr inbounds double, ptr %556, i64 %.0454526
  store double %555, ptr %557, align 8, !tbaa !28
  %558 = load ptr, ptr %528, align 8, !tbaa !27
  %559 = getelementptr inbounds double, ptr %558, i64 %.0454526
  %560 = load double, ptr %559, align 8, !tbaa !28
  %561 = call double @llvm.fmuladd.f64(double %560, double %529, double %.0527)
  %562 = add nuw nsw i64 %.0454526, 1
  %563 = load i64, ptr %401, align 8, !tbaa !64
  %.not467.not = icmp slt i64 %562, %563
  br i1 %.not467.not, label %530, label %._crit_edge530, !llvm.loop !72

._crit_edge530:                                   ; preds = %551, %._crit_edge524
  %.0.lcssa = phi double [ 0.000000e+00, %._crit_edge524 ], [ %561, %551 ]
  %564 = getelementptr inbounds i8, ptr %0, i64 136
  %565 = load i8, ptr %564, align 8, !tbaa !73, !range !74, !noundef !75
  %566 = trunc nuw i8 %565 to i1
  br i1 %566, label %567, label %570

567:                                              ; preds = %._crit_edge530
  %568 = call noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef 3, ptr noundef %3)
  %569 = add nsw i64 %568, 1
  br label %572

570:                                              ; preds = %._crit_edge530
  %571 = load i64, ptr @_ZN11alglib_implL16idw_idwbatchsizeE, align 8, !tbaa !69
  br label %572

572:                                              ; preds = %570, %567
  %.sink = phi i64 [ %569, %567 ], [ %571, %570 ]
  %573 = getelementptr inbounds i8, ptr %0, i64 144
  store i64 %.sink, ptr %573, align 8
  %574 = getelementptr inbounds i8, ptr %6, i64 64
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %12, ptr noundef nonnull %574, ptr noundef %3)
  %575 = getelementptr inbounds i8, ptr %6, i64 128
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %14, ptr noundef nonnull %575, ptr noundef %3)
  %576 = getelementptr inbounds i8, ptr %6, i64 192
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %14, ptr noundef nonnull %576, ptr noundef %3)
  %577 = getelementptr inbounds i8, ptr %6, i64 320
  call void @_ZN11alglib_impl25kdtreecreaterequestbufferEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPNS_8ae_stateE(ptr noundef nonnull %521, ptr noundef nonnull %577, ptr noundef %3)
  %578 = load i64, ptr %401, align 8, !tbaa !64
  %.not468.not531 = icmp sgt i64 %578, 0
  br i1 %.not468.not531, label %.lr.ph535, label %._crit_edge536

.lr.ph535:                                        ; preds = %572
  %579 = sitofp i64 %16 to double
  %580 = getelementptr inbounds i8, ptr %10, i64 56
  %581 = getelementptr inbounds i8, ptr %8, i64 56
  %582 = getelementptr inbounds i8, ptr %9, i64 56
  br label %583

583:                                              ; preds = %.lr.ph535, %616
  %.1455532 = phi i64 [ 0, %.lr.ph535 ], [ %617, %616 ]
  %584 = load i64, ptr %573, align 8, !tbaa !76
  %585 = icmp sgt i64 %16, %584
  br i1 %585, label %586, label %606

586:                                              ; preds = %583
  %587 = load ptr, ptr %580, align 8, !tbaa !27
  %588 = getelementptr inbounds double, ptr %587, i64 %.1455532
  %589 = load double, ptr %588, align 8, !tbaa !28
  %590 = fmul double %589, %579
  %591 = call noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef %3)
  %592 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %590, double noundef %591)
  br i1 %592, label %596, label %593

593:                                              ; preds = %586
  %594 = load i8, ptr %564, align 8, !tbaa !73, !range !74, !noundef !75
  %595 = trunc nuw i8 %594 to i1
  br i1 %595, label %596, label %606

596:                                              ; preds = %593, %586
  call void @_ZN11alglib_impl23ae_shared_pool_set_seedEPNS_14ae_shared_poolEPKvlPFvPvS3_PNS_8ae_stateEbEPFvS4_ES6_(ptr noundef nonnull %7, ptr noundef nonnull %6, i64 noundef 944, ptr noundef nonnull @_ZN11alglib_impl22_mstabbuffer_init_copyEPvPKvPNS_8ae_stateEb, ptr noundef nonnull @_ZN11alglib_impl20_mstabbuffer_destroyEPv, ptr noundef %3)
  %597 = load ptr, ptr %581, align 8, !tbaa !27
  %598 = getelementptr inbounds double, ptr %597, i64 %.1455532
  %599 = load double, ptr %598, align 8, !tbaa !28
  %600 = load ptr, ptr %582, align 8, !tbaa !27
  %601 = getelementptr inbounds double, ptr %600, i64 %.1455532
  %602 = load double, ptr %601, align 8, !tbaa !28
  %603 = load ptr, ptr %580, align 8, !tbaa !27
  %604 = getelementptr inbounds double, ptr %603, i64 %.1455532
  %605 = load double, ptr %604, align 8, !tbaa !28
  call void @_ZN11alglib_implL12idw_mstabrecEPNS_10idwbuilderEddlPNS_14ae_shared_poolEllbddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef nonnull %0, double noundef %599, double noundef %602, i64 noundef %.1455532, ptr noundef nonnull %7, i64 noundef 0, i64 noundef %16, i1 noundef zeroext true, double noundef %605, double noundef %.0.lcssa, ptr noundef nonnull %420, ptr noundef %3)
  br label %616

606:                                              ; preds = %593, %583
  %607 = load ptr, ptr %581, align 8, !tbaa !27
  %608 = getelementptr inbounds double, ptr %607, i64 %.1455532
  %609 = load double, ptr %608, align 8, !tbaa !28
  %610 = load ptr, ptr %582, align 8, !tbaa !27
  %611 = getelementptr inbounds double, ptr %610, i64 %.1455532
  %612 = load double, ptr %611, align 8, !tbaa !28
  %613 = load ptr, ptr %580, align 8, !tbaa !27
  %614 = getelementptr inbounds double, ptr %613, i64 %.1455532
  %615 = load double, ptr %614, align 8, !tbaa !28
  call void @_ZN11alglib_implL17idw_mstabbasecaseEPNS_10idwbuilderEddlPNS_11mstabbufferEllddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef nonnull %0, double noundef %609, double noundef %612, i64 noundef %.1455532, ptr noundef nonnull %6, i64 noundef 0, i64 noundef %16, double noundef %615, double noundef %.0.lcssa, ptr noundef nonnull %420, ptr noundef %3)
  br label %616

616:                                              ; preds = %596, %606
  %617 = add nuw nsw i64 %.1455532, 1
  %618 = load i64, ptr %401, align 8, !tbaa !64
  %.not468.not = icmp slt i64 %617, %618
  br i1 %.not468.not, label %583, label %._crit_edge536, !llvm.loop !77

._crit_edge536:                                   ; preds = %616, %572
  %.lcssa = phi i64 [ %578, %572 ], [ %618, %616 ]
  %619 = mul nsw i64 %.lcssa, %14
  %620 = getelementptr inbounds i8, ptr %1, i64 152
  call void @_ZN11alglib_impl11kdtreebuildEPKNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef nonnull %420, i64 noundef %16, i64 noundef %12, i64 noundef %619, i64 noundef 2, ptr noundef nonnull %620, ptr noundef %3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  br i1 %52, label %.preheader484.lr.ph, label %._crit_edge550

.preheader484.lr.ph:                              ; preds = %._crit_edge536
  %621 = getelementptr inbounds i8, ptr %0, i64 400
  %622 = getelementptr inbounds i8, ptr %0, i64 216
  %623 = add nsw i64 %14, %12
  %624 = getelementptr inbounds i8, ptr %0, i64 1656
  br i1 %.not.not491, label %.preheader484.us, label %._crit_edge550

.preheader484.us:                                 ; preds = %.preheader484.lr.ph, %._crit_edge543.us
  %.0443549.us = phi double [ %655, %._crit_edge543.us ], [ 0.000000e+00, %.preheader484.lr.ph ]
  %.0444548.us = phi double [ %644, %._crit_edge543.us ], [ 0.000000e+00, %.preheader484.lr.ph ]
  %.5547.us = phi i64 [ %657, %._crit_edge543.us ], [ 0, %.preheader484.lr.ph ]
  %625 = mul nsw i64 %.5547.us, %623
  br label %626

626:                                              ; preds = %.preheader484.us, %626
  %.1541.us = phi double [ %.0443549.us, %.preheader484.us ], [ %655, %626 ]
  %.1445540.us = phi double [ %.0444548.us, %.preheader484.us ], [ %644, %626 ]
  %.12539.us = phi i64 [ 0, %.preheader484.us ], [ %656, %626 ]
  %627 = load ptr, ptr %621, align 8, !tbaa !27
  %628 = getelementptr inbounds ptr, ptr %627, i64 %.5547.us
  %629 = load ptr, ptr %628, align 8, !tbaa !60
  %630 = load i64, ptr %401, align 8, !tbaa !64
  %631 = mul nsw i64 %630, %14
  %632 = getelementptr double, ptr %629, i64 %12
  %633 = getelementptr double, ptr %632, i64 %631
  %634 = getelementptr double, ptr %633, i64 %.12539.us
  %635 = load double, ptr %634, align 8, !tbaa !28
  %636 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %635, ptr noundef %3)
  %637 = load double, ptr %2, align 8, !tbaa !78
  %638 = call double @llvm.fmuladd.f64(double %636, double %636, double %637)
  store double %638, ptr %2, align 8, !tbaa !78
  %639 = load double, ptr %17, align 8, !tbaa !79
  %640 = fadd double %636, %639
  store double %640, ptr %17, align 8, !tbaa !79
  %641 = load double, ptr %18, align 8, !tbaa !80
  %642 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %636, ptr noundef %3)
  %643 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %641, double noundef %642, ptr noundef %3)
  store double %643, ptr %18, align 8, !tbaa !80
  %644 = call double @llvm.fmuladd.f64(double %636, double %636, double %.1445540.us)
  %645 = load ptr, ptr %622, align 8, !tbaa !27
  %646 = getelementptr double, ptr %645, i64 %625
  %647 = getelementptr double, ptr %646, i64 %12
  %648 = getelementptr double, ptr %647, i64 %.12539.us
  %649 = load double, ptr %648, align 8, !tbaa !28
  %650 = load ptr, ptr %624, align 8, !tbaa !27
  %651 = getelementptr inbounds double, ptr %650, i64 %.12539.us
  %652 = load double, ptr %651, align 8, !tbaa !28
  %653 = fsub double %649, %652
  %654 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %653, ptr noundef %3)
  %655 = fadd double %.1541.us, %654
  %656 = add nuw nsw i64 %.12539.us, 1
  %exitcond595.not = icmp eq i64 %656, %14
  br i1 %exitcond595.not, label %._crit_edge543.us, label %626, !llvm.loop !81

._crit_edge543.us:                                ; preds = %626
  %657 = add nuw nsw i64 %.5547.us, 1
  %exitcond596.not = icmp eq i64 %657, %16
  br i1 %exitcond596.not, label %._crit_edge550.loopexit, label %.preheader484.us, !llvm.loop !82

._crit_edge550.loopexit:                          ; preds = %._crit_edge543.us
  %.pre = load double, ptr %2, align 8, !tbaa !78
  br label %._crit_edge550

._crit_edge550:                                   ; preds = %.preheader484.lr.ph, %._crit_edge550.loopexit, %._crit_edge536
  %658 = phi double [ 0.000000e+00, %._crit_edge536 ], [ %.pre, %._crit_edge550.loopexit ], [ 0.000000e+00, %.preheader484.lr.ph ]
  %.0444.lcssa = phi double [ 0.000000e+00, %._crit_edge536 ], [ %644, %._crit_edge550.loopexit ], [ 0.000000e+00, %.preheader484.lr.ph ]
  %.0443.lcssa = phi double [ 0.000000e+00, %._crit_edge536 ], [ %655, %._crit_edge550.loopexit ], [ 0.000000e+00, %.preheader484.lr.ph ]
  %659 = mul nsw i64 %16, %14
  %660 = sitofp i64 %659 to double
  %661 = fdiv double %658, %660
  %662 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %661, ptr noundef %3)
  store double %662, ptr %2, align 8, !tbaa !78
  %663 = load double, ptr %17, align 8, !tbaa !79
  %664 = fdiv double %663, %660
  store double %664, ptr %17, align 8, !tbaa !79
  %665 = call noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef %.0443.lcssa, double noundef 1.000000e+00, ptr noundef %3)
  %666 = fdiv double %.0444.lcssa, %665
  %667 = fsub double 1.000000e+00, %666
  store double %667, ptr %19, align 8, !tbaa !20
  store double 1.000000e+00, ptr %20, align 8, !tbaa !22
  %668 = getelementptr inbounds i8, ptr %1, i64 1288
  call void @_ZN11alglib_impl19idwcreatecalcbufferEPKNS_8idwmodelEPNS_13idwcalcbufferEPNS_8ae_stateE(ptr noundef nonnull %1, ptr noundef nonnull %668, ptr noundef %3)
  br label %670

669:                                              ; preds = %._crit_edge509
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.160, ptr noundef %3)
  br label %670

670:                                              ; preds = %669, %._crit_edge550, %._crit_edge563, %._crit_edge573, %._crit_edge578
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 944, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void
}

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double 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) #4

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

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, 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_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) 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_impl25kdtreecreaterequestbufferEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare noundef double @_ZN11alglib_impl6ae_powEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

declare void @_ZN11alglib_impl11kdtreebuildEPKNS_9ae_matrixEllllPNS_6kdtreeEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr 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

declare void @_ZN11alglib_impl17kdtreebuildtaggedEPKNS_9ae_matrixEPKNS_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_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl24kdtreeapproxrnnquerycostEPNS_6kdtreeEdPNS_8ae_stateE(ptr noundef, double noundef, ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl16ae_randomintegerElPNS_8ae_stateE(i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl18smpactivationlevelEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL12idw_mstabrecEPNS_10idwbuilderEddlPNS_14ae_shared_poolEllbddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, double noundef, double noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17idw_mstabbasecaseEPNS_10idwbuilderEddlPNS_11mstabbufferEllddPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, double noundef, double noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl8coalesceEddPNS_8ae_stateE(double noundef, double 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 232}
!6 = !{!"_ZTSN11alglib_impl10idwbuilderE", !7, i64 0, !10, i64 8, !7, i64 72, !7, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !11, i64 136, !7, i64 144, !14, i64 152, !10, i64 160, !7, i64 224, !7, i64 232, !7, i64 240, !15, i64 248, !15, i64 328, !10, i64 408, !10, i64 472, !16, i64 536, !10, i64 1600}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!16 = !{!"_ZTSN11alglib_impl6kdtreeE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !15, i64 32, !10, i64 112, !10, i64 176, !10, i64 240, !10, i64 304, !10, i64 368, !17, i64 432, !7, i64 1056}
!17 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !10, i64 0, !10, i64 64, !10, i64 128, !7, i64 192, !14, i64 200, !11, i64 208, !14, i64 216, !7, i64 224, !10, i64 232, !10, i64 296, !10, i64 360, !10, i64 424, !10, i64 488, !14, i64 552, !10, i64 560}
!18 = !{!6, !7, i64 240}
!19 = !{!6, !7, i64 224}
!20 = !{!21, !14, i64 24}
!21 = !{!"_ZTSN11alglib_impl9idwreportE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!22 = !{!6, !14, i64 152}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTSN11alglib_impl8idwmodelE", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 80, !7, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !11, i64 144, !16, i64 152, !7, i64 1216, !10, i64 1224, !25, i64 1288}
!25 = !{!"_ZTSN11alglib_impl13idwcalcbufferE", !10, i64 0, !10, i64 64, !10, i64 128, !10, i64 192, !15, i64 256, !10, i64 336, !17, i64 400}
!26 = !{!24, !7, i64 8}
!27 = !{!8, !8, i64 0}
!28 = !{!14, !14, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.unroll.disable"}
!33 = !{!24, !7, i64 1216}
!34 = !{!24, !11, i64 144}
!35 = distinct !{!35, !32}
!36 = distinct !{!36, !30}
!37 = distinct !{!37, !30}
!38 = distinct !{!38, !30}
!39 = distinct !{!39, !30}
!40 = distinct !{!40, !32}
!41 = distinct !{!41, !30}
!42 = distinct !{!42, !32}
!43 = !{!6, !7, i64 72}
!44 = !{!6, !7, i64 0}
!45 = distinct !{!45, !30}
!46 = distinct !{!46, !30}
!47 = distinct !{!47, !32}
!48 = distinct !{!48, !32}
!49 = !{!24, !7, i64 80}
!50 = !{!24, !7, i64 88}
!51 = !{!24, !14, i64 128}
!52 = !{!6, !14, i64 128}
!53 = !{!24, !14, i64 136}
!54 = distinct !{!54, !30}
!55 = distinct !{!55, !30}
!56 = distinct !{!56, !30}
!57 = !{!6, !14, i64 88}
!58 = !{!24, !14, i64 96}
!59 = !{!24, !14, i64 104}
!60 = !{!13, !13, i64 0}
!61 = distinct !{!61, !30}
!62 = distinct !{!62, !30}
!63 = distinct !{!63, !30}
!64 = !{!6, !7, i64 80}
!65 = !{!6, !14, i64 104}
!66 = !{!24, !14, i64 112}
!67 = !{!24, !14, i64 120}
!68 = distinct !{!68, !30}
!69 = !{!7, !7, i64 0}
!70 = distinct !{!70, !30}
!71 = distinct !{!71, !30}
!72 = distinct !{!72, !30}
!73 = !{!6, !11, i64 136}
!74 = !{i8 0, i8 2}
!75 = !{}
!76 = !{!6, !7, i64 144}
!77 = distinct !{!77, !30}
!78 = !{!21, !14, i64 0}
!79 = !{!21, !14, i64 8}
!80 = !{!21, !14, i64 16}
!81 = distinct !{!81, !30}
!82 = distinct !{!82, !30}


; Effective O3 passes: ADCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass