; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::rbfv1model" = type { i64, i64, i64, i64, %"struct.alglib_impl::kdtree", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::kdtree" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer", i64 }
%"struct.alglib_impl::kdtreerequestbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, i8, double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::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::rbfv1calcbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer" }

@_ZN11alglib_implL10rbfv1_mxnxE = external hidden global i64, align 8
@_ZN11alglib_implL18rbfv1_rbffarradiusE = external hidden global double, align 8
@.str.708 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.709 = external hidden unnamed_addr constant [46 x i8], align 1

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

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

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

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

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

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl16kdtreetsqueryrnnEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPKNS_9ae_vectorEdbPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef) #1

declare void @_ZN11alglib_impl21kdtreetsqueryresultsxEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl24kdtreetsqueryresultstagsEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14rbfv1tsdiffbufEPKNS_10rbfv1modelEPNS_15rbfv1calcbufferEPKNS_9ae_vectorEPS5_S8_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %29, i32 0, i32 1
  %31 = load i64, ptr %30, align 8, !tbaa !14
  %32 = icmp sge i64 %28, %31
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.708, ptr noundef %33)
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !14
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %34, i64 noundef %37, ptr noundef %38)
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.709, ptr noundef %40)
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %44, i32 0, i32 0
  %46 = load i64, ptr %45, align 8, !tbaa !20
  %47 = icmp slt i64 %43, %46
  br i1 %47, label %48, label %54

48:                                               ; preds = %6
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %50, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !20
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %49, i64 noundef %52, ptr noundef %53)
  br label %54

54:                                               ; preds = %48, %6
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %55, i32 0, i32 0
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 8, !tbaa !20
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %61, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !14
  %64 = mul nsw i64 %60, %63
  %65 = icmp slt i64 %57, %64
  br i1 %65, label %66, label %76

66:                                               ; preds = %54
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !20
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %71, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !14
  %74 = mul nsw i64 %70, %73
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %67, i64 noundef %74, ptr noundef %75)
  br label %76

76:                                               ; preds = %66, %54
  store i64 0, ptr %13, align 8, !tbaa !21
  br label %77

77:                                               ; preds = %161, %76
  %78 = load i64, ptr %13, align 8, !tbaa !21
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %79, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !20
  %82 = sub nsw i64 %81, 1
  %83 = icmp sle i64 %78, %82
  br i1 %83, label %84, label %164

84:                                               ; preds = %77
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %85, i32 0, i32 8
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %86, i32 0, i32 6
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  %89 = load i64, ptr %13, align 8, !tbaa !21
  %90 = getelementptr inbounds ptr, ptr %88, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !21
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !23
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !22
  %98 = load i64, ptr %13, align 8, !tbaa !21
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  store double %94, ptr %99, align 8, !tbaa !23
  store i64 0, ptr %14, align 8, !tbaa !21
  br label %100

100:                                              ; preds = %157, %84
  %101 = load i64, ptr %14, align 8, !tbaa !21
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !14
  %105 = sub nsw i64 %104, 1
  %106 = icmp sle i64 %101, %105
  br i1 %106, label %107, label %160

107:                                              ; preds = %100
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !22
  %111 = load i64, ptr %13, align 8, !tbaa !21
  %112 = getelementptr inbounds double, ptr %110, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !23
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %114, i32 0, i32 8
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %115, i32 0, i32 6
  %117 = load ptr, ptr %116, align 8, !tbaa !22
  %118 = load i64, ptr %13, align 8, !tbaa !21
  %119 = getelementptr inbounds ptr, ptr %117, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = load i64, ptr %14, align 8, !tbaa !21
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !23
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %124, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !22
  %127 = load i64, ptr %14, align 8, !tbaa !21
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !23
  %130 = call double @llvm.fmuladd.f64(double %123, double %129, double %113)
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !22
  %134 = load i64, ptr %13, align 8, !tbaa !21
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  store double %130, ptr %135, align 8, !tbaa !23
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %136, i32 0, i32 8
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %137, i32 0, i32 6
  %139 = load ptr, ptr %138, align 8, !tbaa !22
  %140 = load i64, ptr %13, align 8, !tbaa !21
  %141 = getelementptr inbounds ptr, ptr %139, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = load i64, ptr %14, align 8, !tbaa !21
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !23
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !22
  %149 = load i64, ptr %13, align 8, !tbaa !21
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %150, i32 0, i32 1
  %152 = load i64, ptr %151, align 8, !tbaa !14
  %153 = mul nsw i64 %149, %152
  %154 = load i64, ptr %14, align 8, !tbaa !21
  %155 = add nsw i64 %153, %154
  %156 = getelementptr inbounds double, ptr %148, i64 %155
  store double %145, ptr %156, align 8, !tbaa !23
  br label %157

157:                                              ; preds = %107
  %158 = load i64, ptr %14, align 8, !tbaa !21
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %14, align 8, !tbaa !21
  br label %100, !llvm.loop !24

160:                                              ; preds = %100
  br label %161

161:                                              ; preds = %160
  %162 = load i64, ptr %13, align 8, !tbaa !21
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %13, align 8, !tbaa !21
  br label %77, !llvm.loop !26

164:                                              ; preds = %77
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %165, i32 0, i32 2
  %167 = load i64, ptr %166, align 8, !tbaa !27
  %168 = icmp eq i64 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %164
  store i32 1, ptr %25, align 4
  br label %460

170:                                              ; preds = %164
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %171, i32 0, i32 0
  %173 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !21
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %172, i64 noundef %173, ptr noundef %174)
  store i64 0, ptr %13, align 8, !tbaa !21
  br label %175

175:                                              ; preds = %187, %170
  %176 = load i64, ptr %13, align 8, !tbaa !21
  %177 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !21
  %178 = sub nsw i64 %177, 1
  %179 = icmp sle i64 %176, %178
  br i1 %179, label %180, label %190

180:                                              ; preds = %175
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %181, i32 0, i32 0
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !22
  %185 = load i64, ptr %13, align 8, !tbaa !21
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  store double 0.000000e+00, ptr %186, align 8, !tbaa !23
  br label %187

187:                                              ; preds = %180
  %188 = load i64, ptr %13, align 8, !tbaa !21
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %13, align 8, !tbaa !21
  br label %175, !llvm.loop !28

190:                                              ; preds = %175
  store i64 0, ptr %13, align 8, !tbaa !21
  br label %191

191:                                              ; preds = %211, %190
  %192 = load i64, ptr %13, align 8, !tbaa !21
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %193, i32 0, i32 1
  %195 = load i64, ptr %194, align 8, !tbaa !14
  %196 = sub nsw i64 %195, 1
  %197 = icmp sle i64 %192, %196
  br i1 %197, label %198, label %214

198:                                              ; preds = %191
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %199, i32 0, i32 4
  %201 = load ptr, ptr %200, align 8, !tbaa !22
  %202 = load i64, ptr %13, align 8, !tbaa !21
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !23
  %205 = load ptr, ptr %8, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %206, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !22
  %209 = load i64, ptr %13, align 8, !tbaa !21
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  store double %204, ptr %210, align 8, !tbaa !23
  br label %211

211:                                              ; preds = %198
  %212 = load i64, ptr %13, align 8, !tbaa !21
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %13, align 8, !tbaa !21
  br label %191, !llvm.loop !29

214:                                              ; preds = %191
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %215, i32 0, i32 4
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %217, i32 0, i32 3
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %221, i32 0, i32 7
  %223 = load double, ptr %222, align 8, !tbaa !30
  %224 = load double, ptr @_ZN11alglib_implL18rbfv1_rbffarradiusE, align 8, !tbaa !23
  %225 = fmul double %223, %224
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = call noundef i64 @_ZN11alglib_impl16kdtreetsqueryrnnEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPKNS_9ae_vectorEdbPNS_8ae_stateE(ptr noundef %216, ptr noundef %218, ptr noundef %220, double noundef %225, i1 noundef zeroext true, ptr noundef %226)
  store i64 %227, ptr %17, align 8, !tbaa !21
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %228, i32 0, i32 4
  %230 = load ptr, ptr %8, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %230, i32 0, i32 3
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %232, i32 0, i32 1
  %234 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl21kdtreetsqueryresultsxEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %229, ptr noundef %231, ptr noundef %233, ptr noundef %234)
  %235 = load ptr, ptr %7, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %235, i32 0, i32 4
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %237, i32 0, i32 3
  %239 = load ptr, ptr %8, align 8, !tbaa !5
  %240 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %239, i32 0, i32 2
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl24kdtreetsqueryresultstagsEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %236, ptr noundef %238, ptr noundef %240, ptr noundef %241)
  store i64 0, ptr %13, align 8, !tbaa !21
  br label %242

242:                                              ; preds = %456, %214
  %243 = load i64, ptr %13, align 8, !tbaa !21
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %244, i32 0, i32 0
  %246 = load i64, ptr %245, align 8, !tbaa !20
  %247 = sub nsw i64 %246, 1
  %248 = icmp sle i64 %243, %247
  br i1 %248, label %249, label %459

249:                                              ; preds = %242
  store i64 0, ptr %14, align 8, !tbaa !21
  br label %250

250:                                              ; preds = %452, %249
  %251 = load i64, ptr %14, align 8, !tbaa !21
  %252 = load i64, ptr %17, align 8, !tbaa !21
  %253 = sub nsw i64 %252, 1
  %254 = icmp sle i64 %251, %253
  br i1 %254, label %255, label %455

255:                                              ; preds = %250
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %256, i32 0, i32 2
  %258 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %257, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !22
  %260 = load i64, ptr %14, align 8, !tbaa !21
  %261 = getelementptr inbounds i64, ptr %259, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !21
  store i64 %262, ptr %18, align 8, !tbaa !21
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %263, i32 0, i32 6
  %265 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %264, i32 0, i32 6
  %266 = load ptr, ptr %265, align 8, !tbaa !22
  %267 = load i64, ptr %18, align 8, !tbaa !21
  %268 = getelementptr inbounds ptr, ptr %266, i64 %267
  %269 = load ptr, ptr %268, align 8, !tbaa !5
  %270 = getelementptr inbounds double, ptr %269, i64 0
  %271 = load double, ptr %270, align 8, !tbaa !23
  store double %271, ptr %20, align 8, !tbaa !23
  %272 = load double, ptr %20, align 8, !tbaa !23
  %273 = load double, ptr %20, align 8, !tbaa !23
  %274 = fmul double %272, %273
  %275 = fdiv double 1.000000e+00, %274
  store double %275, ptr %21, align 8, !tbaa !23
  %276 = load ptr, ptr %8, align 8, !tbaa !5
  %277 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %276, i32 0, i32 0
  %278 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %277, i32 0, i32 4
  %279 = load ptr, ptr %278, align 8, !tbaa !22
  %280 = getelementptr inbounds double, ptr %279, i64 0
  %281 = load double, ptr %280, align 8, !tbaa !23
  %282 = load ptr, ptr %8, align 8, !tbaa !5
  %283 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %282, i32 0, i32 1
  %284 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %283, i32 0, i32 6
  %285 = load ptr, ptr %284, align 8, !tbaa !22
  %286 = load i64, ptr %14, align 8, !tbaa !21
  %287 = getelementptr inbounds ptr, ptr %285, i64 %286
  %288 = load ptr, ptr %287, align 8, !tbaa !5
  %289 = getelementptr inbounds double, ptr %288, i64 0
  %290 = load double, ptr %289, align 8, !tbaa !23
  %291 = fsub double %281, %290
  %292 = load ptr, ptr %12, align 8, !tbaa !5
  %293 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %291, ptr noundef %292)
  %294 = load ptr, ptr %8, align 8, !tbaa !5
  %295 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %294, i32 0, i32 0
  %296 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %295, i32 0, i32 4
  %297 = load ptr, ptr %296, align 8, !tbaa !22
  %298 = getelementptr inbounds double, ptr %297, i64 1
  %299 = load double, ptr %298, align 8, !tbaa !23
  %300 = load ptr, ptr %8, align 8, !tbaa !5
  %301 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %300, i32 0, i32 1
  %302 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %301, i32 0, i32 6
  %303 = load ptr, ptr %302, align 8, !tbaa !22
  %304 = load i64, ptr %14, align 8, !tbaa !21
  %305 = getelementptr inbounds ptr, ptr %303, i64 %304
  %306 = load ptr, ptr %305, align 8, !tbaa !5
  %307 = getelementptr inbounds double, ptr %306, i64 1
  %308 = load double, ptr %307, align 8, !tbaa !23
  %309 = fsub double %299, %308
  %310 = load ptr, ptr %12, align 8, !tbaa !5
  %311 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %309, ptr noundef %310)
  %312 = fadd double %293, %311
  %313 = load ptr, ptr %8, align 8, !tbaa !5
  %314 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %313, i32 0, i32 0
  %315 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %314, i32 0, i32 4
  %316 = load ptr, ptr %315, align 8, !tbaa !22
  %317 = getelementptr inbounds double, ptr %316, i64 2
  %318 = load double, ptr %317, align 8, !tbaa !23
  %319 = load ptr, ptr %8, align 8, !tbaa !5
  %320 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %319, i32 0, i32 1
  %321 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %320, i32 0, i32 6
  %322 = load ptr, ptr %321, align 8, !tbaa !22
  %323 = load i64, ptr %14, align 8, !tbaa !21
  %324 = getelementptr inbounds ptr, ptr %322, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = getelementptr inbounds double, ptr %325, i64 2
  %327 = load double, ptr %326, align 8, !tbaa !23
  %328 = fsub double %318, %327
  %329 = load ptr, ptr %12, align 8, !tbaa !5
  %330 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %328, ptr noundef %329)
  %331 = fadd double %312, %330
  %332 = fneg double %331
  %333 = load double, ptr %21, align 8, !tbaa !23
  %334 = fmul double %332, %333
  %335 = load ptr, ptr %12, align 8, !tbaa !5
  %336 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %334, ptr noundef %335)
  store double %336, ptr %22, align 8, !tbaa !23
  %337 = load double, ptr %22, align 8, !tbaa !23
  %338 = fneg double %337
  store double %338, ptr %23, align 8, !tbaa !23
  store i64 0, ptr %15, align 8, !tbaa !21
  br label %339

339:                                              ; preds = %448, %255
  %340 = load i64, ptr %15, align 8, !tbaa !21
  %341 = load ptr, ptr %7, align 8, !tbaa !5
  %342 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %341, i32 0, i32 3
  %343 = load i64, ptr %342, align 8, !tbaa !31
  %344 = sub nsw i64 %343, 1
  %345 = icmp sle i64 %340, %344
  br i1 %345, label %346, label %451

346:                                              ; preds = %339
  %347 = load ptr, ptr %7, align 8, !tbaa !5
  %348 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %347, i32 0, i32 6
  %349 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %348, i32 0, i32 6
  %350 = load ptr, ptr %349, align 8, !tbaa !22
  %351 = load i64, ptr %18, align 8, !tbaa !21
  %352 = getelementptr inbounds ptr, ptr %350, i64 %351
  %353 = load ptr, ptr %352, align 8, !tbaa !5
  %354 = load i64, ptr %15, align 8, !tbaa !21
  %355 = load ptr, ptr %7, align 8, !tbaa !5
  %356 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %355, i32 0, i32 0
  %357 = load i64, ptr %356, align 8, !tbaa !20
  %358 = mul nsw i64 %354, %357
  %359 = add nsw i64 1, %358
  %360 = load i64, ptr %13, align 8, !tbaa !21
  %361 = add nsw i64 %359, %360
  %362 = getelementptr inbounds double, ptr %353, i64 %361
  %363 = load double, ptr %362, align 8, !tbaa !23
  store double %363, ptr %24, align 8, !tbaa !23
  %364 = load ptr, ptr %10, align 8, !tbaa !5
  %365 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %364, i32 0, i32 4
  %366 = load ptr, ptr %365, align 8, !tbaa !22
  %367 = load i64, ptr %13, align 8, !tbaa !21
  %368 = getelementptr inbounds double, ptr %366, i64 %367
  %369 = load double, ptr %368, align 8, !tbaa !23
  %370 = load double, ptr %22, align 8, !tbaa !23
  %371 = load double, ptr %24, align 8, !tbaa !23
  %372 = call double @llvm.fmuladd.f64(double %370, double %371, double %369)
  %373 = load ptr, ptr %10, align 8, !tbaa !5
  %374 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %373, i32 0, i32 4
  %375 = load ptr, ptr %374, align 8, !tbaa !22
  %376 = load i64, ptr %13, align 8, !tbaa !21
  %377 = getelementptr inbounds double, ptr %375, i64 %376
  store double %372, ptr %377, align 8, !tbaa !23
  store i64 0, ptr %16, align 8, !tbaa !21
  br label %378

378:                                              ; preds = %434, %346
  %379 = load i64, ptr %16, align 8, !tbaa !21
  %380 = load ptr, ptr %7, align 8, !tbaa !5
  %381 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %380, i32 0, i32 1
  %382 = load i64, ptr %381, align 8, !tbaa !14
  %383 = sub nsw i64 %382, 1
  %384 = icmp sle i64 %379, %383
  br i1 %384, label %385, label %437

385:                                              ; preds = %378
  %386 = load ptr, ptr %11, align 8, !tbaa !5
  %387 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %386, i32 0, i32 4
  %388 = load ptr, ptr %387, align 8, !tbaa !22
  %389 = load i64, ptr %13, align 8, !tbaa !21
  %390 = load ptr, ptr %7, align 8, !tbaa !5
  %391 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %390, i32 0, i32 1
  %392 = load i64, ptr %391, align 8, !tbaa !14
  %393 = mul nsw i64 %389, %392
  %394 = load i64, ptr %16, align 8, !tbaa !21
  %395 = add nsw i64 %393, %394
  %396 = getelementptr inbounds double, ptr %388, i64 %395
  %397 = load double, ptr %396, align 8, !tbaa !23
  %398 = load double, ptr %24, align 8, !tbaa !23
  %399 = load double, ptr %23, align 8, !tbaa !23
  %400 = fmul double %398, %399
  %401 = load double, ptr %21, align 8, !tbaa !23
  %402 = fmul double %400, %401
  %403 = fmul double %402, 2.000000e+00
  %404 = load ptr, ptr %8, align 8, !tbaa !5
  %405 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %404, i32 0, i32 0
  %406 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %405, i32 0, i32 4
  %407 = load ptr, ptr %406, align 8, !tbaa !22
  %408 = load i64, ptr %16, align 8, !tbaa !21
  %409 = getelementptr inbounds double, ptr %407, i64 %408
  %410 = load double, ptr %409, align 8, !tbaa !23
  %411 = load ptr, ptr %8, align 8, !tbaa !5
  %412 = getelementptr inbounds %"struct.alglib_impl::rbfv1calcbuffer", ptr %411, i32 0, i32 1
  %413 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %412, i32 0, i32 6
  %414 = load ptr, ptr %413, align 8, !tbaa !22
  %415 = load i64, ptr %14, align 8, !tbaa !21
  %416 = getelementptr inbounds ptr, ptr %414, i64 %415
  %417 = load ptr, ptr %416, align 8, !tbaa !5
  %418 = load i64, ptr %16, align 8, !tbaa !21
  %419 = getelementptr inbounds double, ptr %417, i64 %418
  %420 = load double, ptr %419, align 8, !tbaa !23
  %421 = fsub double %410, %420
  %422 = call double @llvm.fmuladd.f64(double %403, double %421, double %397)
  %423 = load ptr, ptr %11, align 8, !tbaa !5
  %424 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %423, i32 0, i32 4
  %425 = load ptr, ptr %424, align 8, !tbaa !22
  %426 = load i64, ptr %13, align 8, !tbaa !21
  %427 = load ptr, ptr %7, align 8, !tbaa !5
  %428 = getelementptr inbounds %"struct.alglib_impl::rbfv1model", ptr %427, i32 0, i32 1
  %429 = load i64, ptr %428, align 8, !tbaa !14
  %430 = mul nsw i64 %426, %429
  %431 = load i64, ptr %16, align 8, !tbaa !21
  %432 = add nsw i64 %430, %431
  %433 = getelementptr inbounds double, ptr %425, i64 %432
  store double %422, ptr %433, align 8, !tbaa !23
  br label %434

434:                                              ; preds = %385
  %435 = load i64, ptr %16, align 8, !tbaa !21
  %436 = add nsw i64 %435, 1
  store i64 %436, ptr %16, align 8, !tbaa !21
  br label %378, !llvm.loop !32

437:                                              ; preds = %378
  %438 = load double, ptr %22, align 8, !tbaa !23
  %439 = load double, ptr %22, align 8, !tbaa !23
  %440 = fmul double %438, %439
  store double %440, ptr %19, align 8, !tbaa !23
  %441 = load double, ptr %19, align 8, !tbaa !23
  %442 = load double, ptr %19, align 8, !tbaa !23
  %443 = fmul double %441, %442
  store double %443, ptr %22, align 8, !tbaa !23
  %444 = load double, ptr %22, align 8, !tbaa !23
  %445 = fneg double %444
  store double %445, ptr %23, align 8, !tbaa !23
  %446 = load double, ptr %21, align 8, !tbaa !23
  %447 = fmul double 4.000000e+00, %446
  store double %447, ptr %21, align 8, !tbaa !23
  br label %448

448:                                              ; preds = %437
  %449 = load i64, ptr %15, align 8, !tbaa !21
  %450 = add nsw i64 %449, 1
  store i64 %450, ptr %15, align 8, !tbaa !21
  br label %339, !llvm.loop !33

451:                                              ; preds = %339
  br label %452

452:                                              ; preds = %451
  %453 = load i64, ptr %14, align 8, !tbaa !21
  %454 = add nsw i64 %453, 1
  store i64 %454, ptr %14, align 8, !tbaa !21
  br label %250, !llvm.loop !34

455:                                              ; preds = %250
  br label %456

456:                                              ; preds = %455
  %457 = load i64, ptr %13, align 8, !tbaa !21
  %458 = add nsw i64 %457, 1
  store i64 %458, ptr %13, align 8, !tbaa !21
  br label %242, !llvm.loop !35

459:                                              ; preds = %242
  store i32 0, ptr %25, align 4
  br label %460

460:                                              ; preds = %459, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %461 = load i32, ptr %25, align 4
  switch i32 %461, label %463 [
    i32 0, label %462
    i32 1, label %462
  ]

462:                                              ; preds = %460, %460
  ret void

463:                                              ; preds = %460
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 0}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!15, !11, i64 8}
!15 = !{!"_ZTSN11alglib_impl10rbfv1modelE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !16, i64 32, !17, i64 1096, !17, i64 1176, !19, i64 1256, !17, i64 1264, !10, i64 1344, !17, i64 1408, !10, i64 1488}
!16 = !{!"_ZTSN11alglib_impl6kdtreeE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !17, i64 32, !10, i64 112, !10, i64 176, !10, i64 240, !10, i64 304, !10, i64 368, !18, i64 432, !11, i64 1056}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !10, i64 0, !10, i64 64, !10, i64 128, !11, i64 192, !19, i64 200, !12, i64 208, !19, i64 216, !11, i64 224, !10, i64 232, !10, i64 296, !10, i64 360, !10, i64 424, !10, i64 488, !19, i64 552, !10, i64 560}
!19 = !{!"double", !7, i64 0}
!20 = !{!15, !11, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!19, !19, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!15, !11, i64 16}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = !{!15, !19, i64 1256}
!31 = !{!15, !11, i64 24}
!32 = distinct !{!32, !25}
!33 = distinct !{!33, !25}
!34 = distinct !{!34, !25}
!35 = distinct !{!35, !25}


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

@_ZN11alglib_implL10rbfv1_mxnxE = external hidden local_unnamed_addr global i64, align 8
@_ZN11alglib_implL18rbfv1_rbffarradiusE = external hidden local_unnamed_addr global double, align 8
@.str.708 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.709 = external hidden unnamed_addr constant [46 x i8], align 1

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

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

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

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

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl16kdtreetsqueryrnnEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPKNS_9ae_vectorEdbPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl21kdtreetsqueryresultsxEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl24kdtreetsqueryresultstagsEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl14rbfv1tsdiffbufEPKNS_10rbfv1modelEPNS_15rbfv1calcbufferEPKNS_9ae_vectorEPS5_S8_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = load i64, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !13
  %10 = icmp sge i64 %7, %9
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.708, ptr noundef %5)
  %11 = load i64, ptr %8, align 8, !tbaa !13
  %12 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %11, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.709, ptr noundef %5)
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = load i64, ptr %0, align 8, !tbaa !19
  %15 = icmp slt i64 %13, %14
  br i1 %15, label %16, label %17

16:                                               ; preds = %6
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %14, ptr noundef %5)
  %.pre = load i64, ptr %0, align 8, !tbaa !19
  br label %17

17:                                               ; preds = %16, %6
  %18 = phi i64 [ %.pre, %16 ], [ %14, %6 ]
  %19 = load i64, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %8, align 8, !tbaa !13
  %21 = mul nsw i64 %20, %18
  %22 = icmp slt i64 %19, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %17
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %21, ptr noundef %5)
  %.pre203 = load i64, ptr %0, align 8, !tbaa !19
  br label %24

24:                                               ; preds = %23, %17
  %25 = phi i64 [ %.pre203, %23 ], [ %18, %17 ]
  %.not.not156 = icmp sgt i64 %25, 0
  br i1 %.not.not156, label %.lr.ph159, label %._crit_edge160

.lr.ph159:                                        ; preds = %24
  %26 = getelementptr inbounds i8, ptr %0, i64 1336
  %27 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %3, i64 56
  %29 = load i64, ptr %8, align 8, !tbaa !13
  %.not.not152154 = icmp sgt i64 %29, 0
  %30 = getelementptr inbounds i8, ptr %2, i64 56
  %31 = getelementptr inbounds i8, ptr %4, i64 56
  br i1 %.not.not152154, label %.lr.ph.us, label %.lr.ph159.split.preheader

.lr.ph159.split.preheader:                        ; preds = %.lr.ph159
  %xtraiter = and i64 %25, 1
  %32 = icmp eq i64 %25, 1
  br i1 %32, label %._crit_edge160.loopexit209.unr-lcssa, label %.lr.ph159.split.preheader.new

.lr.ph159.split.preheader.new:                    ; preds = %.lr.ph159.split.preheader
  %unroll_iter = and i64 %25, 9223372036854775806
  br label %.lr.ph159.split

.lr.ph.us:                                        ; preds = %.lr.ph159, %._crit_edge.us
  %.0157.us = phi i64 [ %63, %._crit_edge.us ], [ 0, %.lr.ph159 ]
  %33 = load ptr, ptr %26, align 8, !tbaa !21
  %34 = getelementptr inbounds ptr, ptr %33, i64 %.0157.us
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = getelementptr inbounds double, ptr %35, i64 %27
  %37 = load double, ptr %36, align 8, !tbaa !23
  %38 = load ptr, ptr %28, align 8, !tbaa !21
  %39 = getelementptr inbounds double, ptr %38, i64 %.0157.us
  store double %37, ptr %39, align 8, !tbaa !23
  %40 = mul nuw nsw i64 %29, %.0157.us
  br label %41

41:                                               ; preds = %.lr.ph.us, %41
  %.0140155.us = phi i64 [ 0, %.lr.ph.us ], [ %62, %41 ]
  %42 = load ptr, ptr %28, align 8, !tbaa !21
  %43 = getelementptr inbounds double, ptr %42, i64 %.0157.us
  %44 = load double, ptr %43, align 8, !tbaa !23
  %45 = load ptr, ptr %26, align 8, !tbaa !21
  %46 = getelementptr inbounds ptr, ptr %45, i64 %.0157.us
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  %48 = getelementptr inbounds double, ptr %47, i64 %.0140155.us
  %49 = load double, ptr %48, align 8, !tbaa !23
  %50 = load ptr, ptr %30, align 8, !tbaa !21
  %51 = getelementptr inbounds double, ptr %50, i64 %.0140155.us
  %52 = load double, ptr %51, align 8, !tbaa !23
  %53 = tail call double @llvm.fmuladd.f64(double %49, double %52, double %44)
  store double %53, ptr %43, align 8, !tbaa !23
  %54 = load ptr, ptr %26, align 8, !tbaa !21
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.0157.us
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = getelementptr inbounds double, ptr %56, i64 %.0140155.us
  %58 = load double, ptr %57, align 8, !tbaa !23
  %59 = load ptr, ptr %31, align 8, !tbaa !21
  %60 = getelementptr double, ptr %59, i64 %40
  %61 = getelementptr double, ptr %60, i64 %.0140155.us
  store double %58, ptr %61, align 8, !tbaa !23
  %62 = add nuw nsw i64 %.0140155.us, 1
  %exitcond195.not = icmp eq i64 %62, %29
  br i1 %exitcond195.not, label %._crit_edge.us, label %41, !llvm.loop !24

._crit_edge.us:                                   ; preds = %41
  %63 = add nuw nsw i64 %.0157.us, 1
  %exitcond196.not = icmp eq i64 %63, %25
  br i1 %exitcond196.not, label %._crit_edge160, label %.lr.ph.us, !llvm.loop !26

.lr.ph159.split:                                  ; preds = %.lr.ph159.split, %.lr.ph159.split.preheader.new
  %.0157 = phi i64 [ 0, %.lr.ph159.split.preheader.new ], [ %79, %.lr.ph159.split ]
  %niter = phi i64 [ 0, %.lr.ph159.split.preheader.new ], [ %niter.next.1, %.lr.ph159.split ]
  %64 = load ptr, ptr %26, align 8, !tbaa !21
  %65 = getelementptr inbounds ptr, ptr %64, i64 %.0157
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  %67 = getelementptr inbounds double, ptr %66, i64 %27
  %68 = load double, ptr %67, align 8, !tbaa !23
  %69 = load ptr, ptr %28, align 8, !tbaa !21
  %70 = getelementptr inbounds double, ptr %69, i64 %.0157
  store double %68, ptr %70, align 8, !tbaa !23
  %71 = or disjoint i64 %.0157, 1
  %72 = load ptr, ptr %26, align 8, !tbaa !21
  %73 = getelementptr inbounds ptr, ptr %72, i64 %71
  %74 = load ptr, ptr %73, align 8, !tbaa !22
  %75 = getelementptr inbounds double, ptr %74, i64 %27
  %76 = load double, ptr %75, align 8, !tbaa !23
  %77 = load ptr, ptr %28, align 8, !tbaa !21
  %78 = getelementptr inbounds double, ptr %77, i64 %71
  store double %76, ptr %78, align 8, !tbaa !23
  %79 = add nuw nsw i64 %.0157, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge160.loopexit209.unr-lcssa, label %.lr.ph159.split, !llvm.loop !26

._crit_edge160.loopexit209.unr-lcssa:             ; preds = %.lr.ph159.split, %.lr.ph159.split.preheader
  %.0157.unr = phi i64 [ 0, %.lr.ph159.split.preheader ], [ %79, %.lr.ph159.split ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge160, label %.lr.ph159.split.epil

.lr.ph159.split.epil:                             ; preds = %._crit_edge160.loopexit209.unr-lcssa
  %80 = load ptr, ptr %26, align 8, !tbaa !21
  %81 = getelementptr inbounds ptr, ptr %80, i64 %.0157.unr
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = getelementptr inbounds double, ptr %82, i64 %27
  %84 = load double, ptr %83, align 8, !tbaa !23
  %85 = load ptr, ptr %28, align 8, !tbaa !21
  %86 = getelementptr inbounds double, ptr %85, i64 %.0157.unr
  store double %84, ptr %86, align 8, !tbaa !23
  br label %._crit_edge160

._crit_edge160:                                   ; preds = %.lr.ph159.split.epil, %._crit_edge160.loopexit209.unr-lcssa, %._crit_edge.us, %24
  %87 = getelementptr inbounds i8, ptr %0, i64 16
  %88 = load i64, ptr %87, align 8, !tbaa !27
  %89 = icmp eq i64 %88, 0
  br i1 %89, label %.loopexit, label %90

90:                                               ; preds = %._crit_edge160
  %91 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !20
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %1, i64 noundef %91, ptr noundef %5)
  %92 = load i64, ptr @_ZN11alglib_implL10rbfv1_mxnxE, align 8, !tbaa !20
  %.not.not146161 = icmp sgt i64 %92, 0
  br i1 %.not.not146161, label %.lr.ph, label %.preheader153

.lr.ph:                                           ; preds = %90
  %93 = getelementptr inbounds i8, ptr %1, i64 56
  %xtraiter210 = and i64 %92, 3
  %94 = icmp ult i64 %92, 4
  br i1 %94, label %.preheader153.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter212 = and i64 %92, 9223372036854775804
  br label %102

.preheader153.loopexit.unr-lcssa:                 ; preds = %102, %.lr.ph
  %.1162.unr = phi i64 [ 0, %.lr.ph ], [ %114, %102 ]
  %lcmp.mod211.not = icmp eq i64 %xtraiter210, 0
  br i1 %lcmp.mod211.not, label %.preheader153, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader153.loopexit.unr-lcssa, %.epil.preheader
  %.1162.epil = phi i64 [ %97, %.epil.preheader ], [ %.1162.unr, %.preheader153.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader153.loopexit.unr-lcssa ]
  %95 = load ptr, ptr %93, align 8, !tbaa !21
  %96 = getelementptr inbounds double, ptr %95, i64 %.1162.epil
  store double 0.000000e+00, ptr %96, align 8, !tbaa !23
  %97 = add nuw nsw i64 %.1162.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter210
  br i1 %epil.iter.cmp.not, label %.preheader153, label %.epil.preheader, !llvm.loop !28

.preheader153:                                    ; preds = %.preheader153.loopexit.unr-lcssa, %.epil.preheader, %90
  %98 = load i64, ptr %8, align 8, !tbaa !13
  %.not.not147163 = icmp sgt i64 %98, 0
  br i1 %.not.not147163, label %.lr.ph165, label %._crit_edge

.lr.ph165:                                        ; preds = %.preheader153
  %99 = getelementptr inbounds i8, ptr %2, i64 56
  %100 = getelementptr inbounds i8, ptr %1, i64 56
  %xtraiter215 = and i64 %98, 3
  %101 = icmp ult i64 %98, 4
  br i1 %101, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph165.new

.lr.ph165.new:                                    ; preds = %.lr.ph165
  %unroll_iter218 = and i64 %98, 9223372036854775804
  br label %115

102:                                              ; preds = %102, %.lr.ph.new
  %.1162 = phi i64 [ 0, %.lr.ph.new ], [ %114, %102 ]
  %niter213 = phi i64 [ 0, %.lr.ph.new ], [ %niter213.next.3, %102 ]
  %103 = load ptr, ptr %93, align 8, !tbaa !21
  %104 = getelementptr inbounds double, ptr %103, i64 %.1162
  store double 0.000000e+00, ptr %104, align 8, !tbaa !23
  %105 = or disjoint i64 %.1162, 1
  %106 = load ptr, ptr %93, align 8, !tbaa !21
  %107 = getelementptr inbounds double, ptr %106, i64 %105
  store double 0.000000e+00, ptr %107, align 8, !tbaa !23
  %108 = or disjoint i64 %.1162, 2
  %109 = load ptr, ptr %93, align 8, !tbaa !21
  %110 = getelementptr inbounds double, ptr %109, i64 %108
  store double 0.000000e+00, ptr %110, align 8, !tbaa !23
  %111 = or disjoint i64 %.1162, 3
  %112 = load ptr, ptr %93, align 8, !tbaa !21
  %113 = getelementptr inbounds double, ptr %112, i64 %111
  store double 0.000000e+00, ptr %113, align 8, !tbaa !23
  %114 = add nuw nsw i64 %.1162, 4
  %niter213.next.3 = add i64 %niter213, 4
  %niter213.ncmp.3 = icmp eq i64 %niter213.next.3, %unroll_iter212
  br i1 %niter213.ncmp.3, label %.preheader153.loopexit.unr-lcssa, label %102, !llvm.loop !30

115:                                              ; preds = %115, %.lr.ph165.new
  %.2164 = phi i64 [ 0, %.lr.ph165.new ], [ %139, %115 ]
  %niter219 = phi i64 [ 0, %.lr.ph165.new ], [ %niter219.next.3, %115 ]
  %116 = load ptr, ptr %99, align 8, !tbaa !21
  %117 = getelementptr inbounds double, ptr %116, i64 %.2164
  %118 = load double, ptr %117, align 8, !tbaa !23
  %119 = load ptr, ptr %100, align 8, !tbaa !21
  %120 = getelementptr inbounds double, ptr %119, i64 %.2164
  store double %118, ptr %120, align 8, !tbaa !23
  %121 = or disjoint i64 %.2164, 1
  %122 = load ptr, ptr %99, align 8, !tbaa !21
  %123 = getelementptr inbounds double, ptr %122, i64 %121
  %124 = load double, ptr %123, align 8, !tbaa !23
  %125 = load ptr, ptr %100, align 8, !tbaa !21
  %126 = getelementptr inbounds double, ptr %125, i64 %121
  store double %124, ptr %126, align 8, !tbaa !23
  %127 = or disjoint i64 %.2164, 2
  %128 = load ptr, ptr %99, align 8, !tbaa !21
  %129 = getelementptr inbounds double, ptr %128, i64 %127
  %130 = load double, ptr %129, align 8, !tbaa !23
  %131 = load ptr, ptr %100, align 8, !tbaa !21
  %132 = getelementptr inbounds double, ptr %131, i64 %127
  store double %130, ptr %132, align 8, !tbaa !23
  %133 = or disjoint i64 %.2164, 3
  %134 = load ptr, ptr %99, align 8, !tbaa !21
  %135 = getelementptr inbounds double, ptr %134, i64 %133
  %136 = load double, ptr %135, align 8, !tbaa !23
  %137 = load ptr, ptr %100, align 8, !tbaa !21
  %138 = getelementptr inbounds double, ptr %137, i64 %133
  store double %136, ptr %138, align 8, !tbaa !23
  %139 = add nuw nsw i64 %.2164, 4
  %niter219.next.3 = add i64 %niter219, 4
  %niter219.ncmp.3 = icmp eq i64 %niter219.next.3, %unroll_iter218
  br i1 %niter219.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %115, !llvm.loop !31

._crit_edge.loopexit.unr-lcssa:                   ; preds = %115, %.lr.ph165
  %.2164.unr = phi i64 [ 0, %.lr.ph165 ], [ %139, %115 ]
  %lcmp.mod217.not = icmp eq i64 %xtraiter215, 0
  br i1 %lcmp.mod217.not, label %._crit_edge, label %.epil.preheader214

.epil.preheader214:                               ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader214
  %.2164.epil = phi i64 [ %145, %.epil.preheader214 ], [ %.2164.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter216 = phi i64 [ %epil.iter216.next, %.epil.preheader214 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %140 = load ptr, ptr %99, align 8, !tbaa !21
  %141 = getelementptr inbounds double, ptr %140, i64 %.2164.epil
  %142 = load double, ptr %141, align 8, !tbaa !23
  %143 = load ptr, ptr %100, align 8, !tbaa !21
  %144 = getelementptr inbounds double, ptr %143, i64 %.2164.epil
  store double %142, ptr %144, align 8, !tbaa !23
  %145 = add nuw nsw i64 %.2164.epil, 1
  %epil.iter216.next = add i64 %epil.iter216, 1
  %epil.iter216.cmp.not = icmp eq i64 %epil.iter216.next, %xtraiter215
  br i1 %epil.iter216.cmp.not, label %._crit_edge, label %.epil.preheader214, !llvm.loop !32

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader214, %.preheader153
  %146 = getelementptr inbounds i8, ptr %0, i64 32
  %147 = getelementptr inbounds i8, ptr %1, i64 208
  %148 = getelementptr inbounds i8, ptr %0, i64 1256
  %149 = load double, ptr %148, align 8, !tbaa !33
  %150 = load double, ptr @_ZN11alglib_implL18rbfv1_rbffarradiusE, align 8, !tbaa !23
  %151 = fmul double %149, %150
  %152 = tail call noundef i64 @_ZN11alglib_impl16kdtreetsqueryrnnEPKNS_6kdtreeEPNS_19kdtreerequestbufferEPKNS_9ae_vectorEdbPNS_8ae_stateE(ptr noundef nonnull %146, ptr noundef nonnull %147, ptr noundef %1, double noundef %151, i1 noundef zeroext true, ptr noundef %5)
  %153 = getelementptr inbounds i8, ptr %1, i64 64
  tail call void @_ZN11alglib_impl21kdtreetsqueryresultsxEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef nonnull %146, ptr noundef nonnull %147, ptr noundef nonnull %153, ptr noundef %5)
  %154 = getelementptr inbounds i8, ptr %1, i64 144
  tail call void @_ZN11alglib_impl24kdtreetsqueryresultstagsEPKNS_6kdtreeEPKNS_19kdtreerequestbufferEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %146, ptr noundef nonnull %147, ptr noundef nonnull %154, ptr noundef %5)
  %155 = load i64, ptr %0, align 8, !tbaa !19
  %.not.not148184 = icmp sgt i64 %155, 0
  br i1 %.not.not148184, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %.not.not149179 = icmp sgt i64 %152, 0
  %156 = getelementptr inbounds i8, ptr %1, i64 200
  %157 = getelementptr inbounds i8, ptr %0, i64 1248
  %158 = getelementptr inbounds i8, ptr %1, i64 56
  %159 = getelementptr inbounds i8, ptr %1, i64 136
  %160 = getelementptr inbounds i8, ptr %0, i64 24
  %161 = getelementptr inbounds i8, ptr %3, i64 56
  %162 = getelementptr inbounds i8, ptr %4, i64 56
  br i1 %.not.not149179, label %.preheader.us, label %.loopexit

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge183.us
  %.3185.us = phi i64 [ %320, %._crit_edge183.us ], [ 0, %.preheader.lr.ph ]
  br label %163

163:                                              ; preds = %.preheader.us, %._crit_edge178.us
  %.1141180.us = phi i64 [ 0, %.preheader.us ], [ %219, %._crit_edge178.us ]
  %164 = load ptr, ptr %156, align 8, !tbaa !21
  %165 = getelementptr inbounds i64, ptr %164, i64 %.1141180.us
  %166 = load i64, ptr %165, align 8, !tbaa !20
  %167 = load ptr, ptr %157, align 8, !tbaa !21
  %168 = getelementptr inbounds ptr, ptr %167, i64 %166
  %169 = load ptr, ptr %168, align 8, !tbaa !22
  %170 = load double, ptr %169, align 8, !tbaa !23
  %171 = fmul double %170, %170
  %172 = fdiv double 1.000000e+00, %171
  %173 = load ptr, ptr %158, align 8, !tbaa !21
  %174 = load double, ptr %173, align 8, !tbaa !23
  %175 = load ptr, ptr %159, align 8, !tbaa !21
  %176 = getelementptr inbounds ptr, ptr %175, i64 %.1141180.us
  %177 = load ptr, ptr %176, align 8, !tbaa !22
  %178 = load double, ptr %177, align 8, !tbaa !23
  %179 = fsub double %174, %178
  %180 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %179, ptr noundef %5)
  %181 = load ptr, ptr %158, align 8, !tbaa !21
  %182 = getelementptr inbounds i8, ptr %181, i64 8
  %183 = load double, ptr %182, align 8, !tbaa !23
  %184 = load ptr, ptr %159, align 8, !tbaa !21
  %185 = getelementptr inbounds ptr, ptr %184, i64 %.1141180.us
  %186 = load ptr, ptr %185, align 8, !tbaa !22
  %187 = getelementptr inbounds i8, ptr %186, i64 8
  %188 = load double, ptr %187, align 8, !tbaa !23
  %189 = fsub double %183, %188
  %190 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %189, ptr noundef %5)
  %191 = fadd double %180, %190
  %192 = load ptr, ptr %158, align 8, !tbaa !21
  %193 = getelementptr inbounds i8, ptr %192, i64 16
  %194 = load double, ptr %193, align 8, !tbaa !23
  %195 = load ptr, ptr %159, align 8, !tbaa !21
  %196 = getelementptr inbounds ptr, ptr %195, i64 %.1141180.us
  %197 = load ptr, ptr %196, align 8, !tbaa !22
  %198 = getelementptr inbounds i8, ptr %197, i64 16
  %199 = load double, ptr %198, align 8, !tbaa !23
  %200 = fsub double %194, %199
  %201 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %200, ptr noundef %5)
  %202 = fadd double %191, %201
  %203 = fneg double %202
  %204 = fmul double %172, %203
  %205 = tail call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %204, ptr noundef %5)
  %206 = load i64, ptr %160, align 8, !tbaa !34
  %.not.not150171.us = icmp sgt i64 %206, 0
  br i1 %.not.not150171.us, label %.lr.ph177.us, label %._crit_edge178.us

._crit_edge178.us.loopexit208.unr-lcssa:          ; preds = %.lr.ph177.split.us191, %.lr.ph177.split.us191.preheader
  %.0138174.us186.unr = phi double [ %205, %.lr.ph177.split.us191.preheader ], [ %248, %.lr.ph177.split.us191 ]
  %.0142172.us188.unr = phi i64 [ 0, %.lr.ph177.split.us191.preheader ], [ %249, %.lr.ph177.split.us191 ]
  %lcmp.mod222.not = icmp eq i64 %xtraiter220, 0
  br i1 %lcmp.mod222.not, label %._crit_edge178.us, label %.lr.ph177.split.us191.epil

.lr.ph177.split.us191.epil:                       ; preds = %._crit_edge178.us.loopexit208.unr-lcssa
  %207 = load ptr, ptr %157, align 8, !tbaa !21
  %208 = getelementptr inbounds ptr, ptr %207, i64 %166
  %209 = load ptr, ptr %208, align 8, !tbaa !22
  %210 = mul nsw i64 %250, %.0142172.us188.unr
  %211 = getelementptr double, ptr %209, i64 %210
  %212 = getelementptr i8, ptr %211, i64 8
  %213 = getelementptr double, ptr %212, i64 %.3185.us
  %214 = load double, ptr %213, align 8, !tbaa !23
  %215 = load ptr, ptr %161, align 8, !tbaa !21
  %216 = getelementptr inbounds double, ptr %215, i64 %.3185.us
  %217 = load double, ptr %216, align 8, !tbaa !23
  %218 = tail call double @llvm.fmuladd.f64(double %.0138174.us186.unr, double %214, double %217)
  store double %218, ptr %216, align 8, !tbaa !23
  br label %._crit_edge178.us

._crit_edge178.us:                                ; preds = %.lr.ph177.split.us191.epil, %._crit_edge178.us.loopexit208.unr-lcssa, %._crit_edge170.us.us, %163
  %219 = add nuw nsw i64 %.1141180.us, 1
  %exitcond202.not = icmp eq i64 %219, %152
  br i1 %exitcond202.not, label %._crit_edge183.us, label %163, !llvm.loop !35

.lr.ph177.split.us191:                            ; preds = %.lr.ph177.split.us191, %.lr.ph177.split.us191.preheader.new
  %.0138174.us186 = phi double [ %205, %.lr.ph177.split.us191.preheader.new ], [ %248, %.lr.ph177.split.us191 ]
  %.0142172.us188 = phi i64 [ 0, %.lr.ph177.split.us191.preheader.new ], [ %249, %.lr.ph177.split.us191 ]
  %niter224 = phi i64 [ 0, %.lr.ph177.split.us191.preheader.new ], [ %niter224.next.1, %.lr.ph177.split.us191 ]
  %220 = load ptr, ptr %157, align 8, !tbaa !21
  %221 = getelementptr inbounds ptr, ptr %220, i64 %166
  %222 = load ptr, ptr %221, align 8, !tbaa !22
  %223 = mul nsw i64 %250, %.0142172.us188
  %224 = getelementptr double, ptr %222, i64 %223
  %225 = getelementptr i8, ptr %224, i64 8
  %226 = getelementptr double, ptr %225, i64 %.3185.us
  %227 = load double, ptr %226, align 8, !tbaa !23
  %228 = load ptr, ptr %161, align 8, !tbaa !21
  %229 = getelementptr inbounds double, ptr %228, i64 %.3185.us
  %230 = load double, ptr %229, align 8, !tbaa !23
  %231 = tail call double @llvm.fmuladd.f64(double %.0138174.us186, double %227, double %230)
  store double %231, ptr %229, align 8, !tbaa !23
  %232 = fmul double %.0138174.us186, %.0138174.us186
  %233 = fmul double %232, %232
  %234 = or disjoint i64 %.0142172.us188, 1
  %235 = load ptr, ptr %157, align 8, !tbaa !21
  %236 = getelementptr inbounds ptr, ptr %235, i64 %166
  %237 = load ptr, ptr %236, align 8, !tbaa !22
  %238 = mul nsw i64 %250, %234
  %239 = getelementptr double, ptr %237, i64 %238
  %240 = getelementptr i8, ptr %239, i64 8
  %241 = getelementptr double, ptr %240, i64 %.3185.us
  %242 = load double, ptr %241, align 8, !tbaa !23
  %243 = load ptr, ptr %161, align 8, !tbaa !21
  %244 = getelementptr inbounds double, ptr %243, i64 %.3185.us
  %245 = load double, ptr %244, align 8, !tbaa !23
  %246 = tail call double @llvm.fmuladd.f64(double %233, double %242, double %245)
  store double %246, ptr %244, align 8, !tbaa !23
  %247 = fmul double %233, %233
  %248 = fmul double %247, %247
  %249 = add nuw nsw i64 %.0142172.us188, 2
  %niter224.next.1 = add i64 %niter224, 2
  %niter224.ncmp.1 = icmp eq i64 %niter224.next.1, %unroll_iter223
  br i1 %niter224.ncmp.1, label %._crit_edge178.us.loopexit208.unr-lcssa, label %.lr.ph177.split.us191, !llvm.loop !36

.lr.ph177.us:                                     ; preds = %163
  %250 = load i64, ptr %0, align 8, !tbaa !19
  %251 = load i64, ptr %8, align 8, !tbaa !13
  %.not.not151166.us = icmp sgt i64 %251, 0
  %252 = mul nsw i64 %251, %.3185.us
  br i1 %.not.not151166.us, label %.lr.ph169.us.us.preheader, label %.lr.ph177.split.us191.preheader

.lr.ph177.split.us191.preheader:                  ; preds = %.lr.ph177.us
  %xtraiter220 = and i64 %206, 1
  %253 = icmp eq i64 %206, 1
  br i1 %253, label %._crit_edge178.us.loopexit208.unr-lcssa, label %.lr.ph177.split.us191.preheader.new

.lr.ph177.split.us191.preheader.new:              ; preds = %.lr.ph177.split.us191.preheader
  %unroll_iter223 = and i64 %206, 9223372036854775806
  br label %.lr.ph177.split.us191

.lr.ph169.us.us.preheader:                        ; preds = %.lr.ph177.us
  %254 = fneg double %205
  %xtraiter226 = and i64 %251, 1
  %255 = icmp eq i64 %251, 1
  %unroll_iter229 = and i64 %251, 9223372036854775806
  %lcmp.mod228.not = icmp eq i64 %xtraiter226, 0
  br label %.lr.ph169.us.us

.lr.ph169.us.us:                                  ; preds = %.lr.ph169.us.us.preheader, %._crit_edge170.us.us
  %.0137175.us.us = phi double [ %317, %._crit_edge170.us.us ], [ %254, %.lr.ph169.us.us.preheader ]
  %.0138174.us.us = phi double [ %316, %._crit_edge170.us.us ], [ %205, %.lr.ph169.us.us.preheader ]
  %.0139173.us.us = phi double [ %318, %._crit_edge170.us.us ], [ %172, %.lr.ph169.us.us.preheader ]
  %.0142172.us.us = phi i64 [ %319, %._crit_edge170.us.us ], [ 0, %.lr.ph169.us.us.preheader ]
  %256 = load ptr, ptr %157, align 8, !tbaa !21
  %257 = getelementptr inbounds ptr, ptr %256, i64 %166
  %258 = load ptr, ptr %257, align 8, !tbaa !22
  %259 = mul nsw i64 %250, %.0142172.us.us
  %260 = getelementptr double, ptr %258, i64 %259
  %261 = getelementptr i8, ptr %260, i64 8
  %262 = getelementptr double, ptr %261, i64 %.3185.us
  %263 = load double, ptr %262, align 8, !tbaa !23
  %264 = load ptr, ptr %161, align 8, !tbaa !21
  %265 = getelementptr inbounds double, ptr %264, i64 %.3185.us
  %266 = load double, ptr %265, align 8, !tbaa !23
  %267 = tail call double @llvm.fmuladd.f64(double %.0138174.us.us, double %263, double %266)
  store double %267, ptr %265, align 8, !tbaa !23
  %268 = fmul double %.0137175.us.us, %263
  %269 = fmul double %.0139173.us.us, %268
  %270 = fmul double %269, 2.000000e+00
  br i1 %255, label %._crit_edge170.us.us.unr-lcssa, label %.lr.ph169.us.us.new

.lr.ph169.us.us.new:                              ; preds = %.lr.ph169.us.us, %.lr.ph169.us.us.new
  %.0143167.us.us = phi i64 [ %300, %.lr.ph169.us.us.new ], [ 0, %.lr.ph169.us.us ]
  %niter230 = phi i64 [ %niter230.next.1, %.lr.ph169.us.us.new ], [ 0, %.lr.ph169.us.us ]
  %271 = load ptr, ptr %162, align 8, !tbaa !21
  %272 = getelementptr double, ptr %271, i64 %252
  %273 = getelementptr double, ptr %272, i64 %.0143167.us.us
  %274 = load double, ptr %273, align 8, !tbaa !23
  %275 = load ptr, ptr %158, align 8, !tbaa !21
  %276 = getelementptr inbounds double, ptr %275, i64 %.0143167.us.us
  %277 = load double, ptr %276, align 8, !tbaa !23
  %278 = load ptr, ptr %159, align 8, !tbaa !21
  %279 = getelementptr inbounds ptr, ptr %278, i64 %.1141180.us
  %280 = load ptr, ptr %279, align 8, !tbaa !22
  %281 = getelementptr inbounds double, ptr %280, i64 %.0143167.us.us
  %282 = load double, ptr %281, align 8, !tbaa !23
  %283 = fsub double %277, %282
  %284 = tail call double @llvm.fmuladd.f64(double %270, double %283, double %274)
  store double %284, ptr %273, align 8, !tbaa !23
  %285 = or disjoint i64 %.0143167.us.us, 1
  %286 = load ptr, ptr %162, align 8, !tbaa !21
  %287 = getelementptr double, ptr %286, i64 %252
  %288 = getelementptr double, ptr %287, i64 %285
  %289 = load double, ptr %288, align 8, !tbaa !23
  %290 = load ptr, ptr %158, align 8, !tbaa !21
  %291 = getelementptr inbounds double, ptr %290, i64 %285
  %292 = load double, ptr %291, align 8, !tbaa !23
  %293 = load ptr, ptr %159, align 8, !tbaa !21
  %294 = getelementptr inbounds ptr, ptr %293, i64 %.1141180.us
  %295 = load ptr, ptr %294, align 8, !tbaa !22
  %296 = getelementptr inbounds double, ptr %295, i64 %285
  %297 = load double, ptr %296, align 8, !tbaa !23
  %298 = fsub double %292, %297
  %299 = tail call double @llvm.fmuladd.f64(double %270, double %298, double %289)
  store double %299, ptr %288, align 8, !tbaa !23
  %300 = add nuw nsw i64 %.0143167.us.us, 2
  %niter230.next.1 = add i64 %niter230, 2
  %niter230.ncmp.1 = icmp eq i64 %niter230.next.1, %unroll_iter229
  br i1 %niter230.ncmp.1, label %._crit_edge170.us.us.unr-lcssa, label %.lr.ph169.us.us.new, !llvm.loop !37

._crit_edge170.us.us.unr-lcssa:                   ; preds = %.lr.ph169.us.us.new, %.lr.ph169.us.us
  %.0143167.us.us.unr = phi i64 [ 0, %.lr.ph169.us.us ], [ %300, %.lr.ph169.us.us.new ]
  br i1 %lcmp.mod228.not, label %._crit_edge170.us.us, label %._crit_edge170.us.us.epilog-lcssa

._crit_edge170.us.us.epilog-lcssa:                ; preds = %._crit_edge170.us.us.unr-lcssa
  %301 = load ptr, ptr %162, align 8, !tbaa !21
  %302 = getelementptr double, ptr %301, i64 %252
  %303 = getelementptr double, ptr %302, i64 %.0143167.us.us.unr
  %304 = load double, ptr %303, align 8, !tbaa !23
  %305 = load ptr, ptr %158, align 8, !tbaa !21
  %306 = getelementptr inbounds double, ptr %305, i64 %.0143167.us.us.unr
  %307 = load double, ptr %306, align 8, !tbaa !23
  %308 = load ptr, ptr %159, align 8, !tbaa !21
  %309 = getelementptr inbounds ptr, ptr %308, i64 %.1141180.us
  %310 = load ptr, ptr %309, align 8, !tbaa !22
  %311 = getelementptr inbounds double, ptr %310, i64 %.0143167.us.us.unr
  %312 = load double, ptr %311, align 8, !tbaa !23
  %313 = fsub double %307, %312
  %314 = tail call double @llvm.fmuladd.f64(double %270, double %313, double %304)
  store double %314, ptr %303, align 8, !tbaa !23
  br label %._crit_edge170.us.us

._crit_edge170.us.us:                             ; preds = %._crit_edge170.us.us.unr-lcssa, %._crit_edge170.us.us.epilog-lcssa
  %315 = fmul double %.0138174.us.us, %.0138174.us.us
  %316 = fmul double %315, %315
  %317 = fneg double %316
  %318 = fmul double %.0139173.us.us, 4.000000e+00
  %319 = add nuw nsw i64 %.0142172.us.us, 1
  %exitcond201.not = icmp eq i64 %319, %206
  br i1 %exitcond201.not, label %._crit_edge178.us, label %.lr.ph169.us.us, !llvm.loop !36

._crit_edge183.us:                                ; preds = %._crit_edge178.us
  %320 = add nuw nsw i64 %.3185.us, 1
  %321 = load i64, ptr %0, align 8, !tbaa !19
  %.not.not148.us = icmp slt i64 %320, %321
  br i1 %.not.not148.us, label %.preheader.us, label %.loopexit, !llvm.loop !38

.loopexit:                                        ; preds = %._crit_edge183.us, %.preheader.lr.ph, %._crit_edge, %._crit_edge160
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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" }

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

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


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