; LLVM IR from venumb/ZSPACE :: cpp/depends/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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::spline1dinterpolant" = type { i8, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.291 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.293 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.294 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.295 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [38 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_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl21spline1dbuildmonotoneEPNS_9ae_vectorES1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 64, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %12, ptr noundef %29, ptr noundef %30, i1 noundef zeroext true)
  store ptr %12, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %13, ptr noundef %31, ptr noundef %32, i1 noundef zeroext true)
  store ptr %13, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %33)
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %35, i1 noundef zeroext true)
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 3, ptr noundef %36, i1 noundef zeroext true)
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 2, ptr noundef %37, i1 noundef zeroext true)
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = icmp sge i64 %38, 2
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.291, ptr noundef %40)
  %41 = load ptr, ptr %6, 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 !11
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.292, ptr noundef %46)
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 0
  %49 = load i64, ptr %48, align 8, !tbaa !11
  %50 = load i64, ptr %8, align 8, !tbaa !9
  %51 = icmp sge i64 %49, %50
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.293, ptr noundef %52)
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load i64, ptr %8, align 8, !tbaa !9
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %53, i64 noundef %54, ptr noundef %55)
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.294, ptr noundef %57)
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %58, i64 noundef %59, ptr noundef %60)
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %61, ptr noundef @.str.295, ptr noundef %62)
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %8, align 8, !tbaa !9
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %63, ptr noundef %64, ptr noundef %17, i64 noundef %65, ptr noundef %66)
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load i64, ptr %8, align 8, !tbaa !9
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, ptr noundef %69)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %70, ptr noundef @.str.296, ptr noundef %71)
  store double 5.000000e-16, ptr %25, align 8, !tbaa !15
  %72 = load i64, ptr %8, align 8, !tbaa !9
  %73 = add nsw i64 %72, 2
  store i64 %73, ptr %8, align 8, !tbaa !9
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %74, ptr noundef %75)
  %76 = load i64, ptr %8, align 8, !tbaa !9
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %76, ptr noundef %77)
  %78 = load i64, ptr %8, align 8, !tbaa !9
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %78, ptr noundef %79)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds double, ptr %82, i64 0
  %84 = load double, ptr %83, align 8, !tbaa !15
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %85, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  %88 = getelementptr inbounds double, ptr %87, i64 1
  %89 = load double, ptr %88, align 8, !tbaa !15
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = getelementptr inbounds double, ptr %92, i64 0
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = fsub double %89, %94
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %95, ptr noundef %96)
  %98 = fsub double %84, %97
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !17
  %101 = getelementptr inbounds double, ptr %100, i64 0
  store double %98, ptr %101, align 8, !tbaa !15
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !17
  %105 = load i64, ptr %8, align 8, !tbaa !9
  %106 = sub nsw i64 %105, 3
  %107 = getelementptr inbounds double, ptr %104, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !15
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  %112 = load i64, ptr %8, align 8, !tbaa !9
  %113 = sub nsw i64 %112, 3
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !15
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %116, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !17
  %119 = load i64, ptr %8, align 8, !tbaa !9
  %120 = sub nsw i64 %119, 4
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !15
  %123 = fsub double %115, %122
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %123, ptr noundef %124)
  %126 = fadd double %108, %125
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %128 = load ptr, ptr %127, align 8, !tbaa !17
  %129 = load i64, ptr %8, align 8, !tbaa !9
  %130 = sub nsw i64 %129, 1
  %131 = getelementptr inbounds double, ptr %128, i64 %130
  store double %126, ptr %131, align 8, !tbaa !15
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !17
  %135 = getelementptr inbounds double, ptr %134, i64 0
  %136 = load double, ptr %135, align 8, !tbaa !15
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !17
  %139 = getelementptr inbounds double, ptr %138, i64 0
  store double %136, ptr %139, align 8, !tbaa !15
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !17
  %143 = load i64, ptr %8, align 8, !tbaa !9
  %144 = sub nsw i64 %143, 3
  %145 = getelementptr inbounds double, ptr %142, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !15
  %147 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !17
  %149 = load i64, ptr %8, align 8, !tbaa !9
  %150 = sub nsw i64 %149, 1
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  store double %146, ptr %151, align 8, !tbaa !15
  store i64 1, ptr %26, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %180, %5
  %153 = load i64, ptr %26, align 8, !tbaa !9
  %154 = load i64, ptr %8, align 8, !tbaa !9
  %155 = sub nsw i64 %154, 2
  %156 = icmp sle i64 %153, %155
  br i1 %156, label %157, label %183

157:                                              ; preds = %152
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !17
  %161 = load i64, ptr %26, align 8, !tbaa !9
  %162 = sub nsw i64 %161, 1
  %163 = getelementptr inbounds double, ptr %160, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !15
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !17
  %167 = load i64, ptr %26, align 8, !tbaa !9
  %168 = getelementptr inbounds double, ptr %166, i64 %167
  store double %164, ptr %168, align 8, !tbaa !15
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = load i64, ptr %26, align 8, !tbaa !9
  %173 = sub nsw i64 %172, 1
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !15
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !17
  %178 = load i64, ptr %26, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %177, i64 %178
  store double %175, ptr %179, align 8, !tbaa !15
  br label %180

180:                                              ; preds = %157
  %181 = load i64, ptr %26, align 8, !tbaa !9
  %182 = add nsw i64 %181, 1
  store i64 %182, ptr %26, align 8, !tbaa !9
  br label %152, !llvm.loop !18

183:                                              ; preds = %152
  store i64 0, ptr %26, align 8, !tbaa !9
  store double 0.000000e+00, ptr %23, align 8, !tbaa !15
  br label %184

184:                                              ; preds = %207, %183
  %185 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %186 = load ptr, ptr %185, align 8, !tbaa !17
  %187 = load i64, ptr %26, align 8, !tbaa !9
  %188 = add nsw i64 %187, 1
  %189 = getelementptr inbounds double, ptr %186, i64 %188
  %190 = load double, ptr %189, align 8, !tbaa !15
  %191 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %192 = load ptr, ptr %191, align 8, !tbaa !17
  %193 = load i64, ptr %26, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %192, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !15
  %196 = fsub double %190, %195
  store double %196, ptr %23, align 8, !tbaa !15
  %197 = load i64, ptr %26, align 8, !tbaa !9
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %26, align 8, !tbaa !9
  br label %199

199:                                              ; preds = %184
  %200 = load double, ptr %23, align 8, !tbaa !15
  %201 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %200, double noundef 0.000000e+00)
  br i1 %201, label %207, label %202

202:                                              ; preds = %199
  %203 = load i64, ptr %26, align 8, !tbaa !9
  %204 = load i64, ptr %8, align 8, !tbaa !9
  %205 = sub nsw i64 %204, 2
  %206 = icmp sgt i64 %203, %205
  br label %207

207:                                              ; preds = %202, %199
  %208 = phi i1 [ true, %199 ], [ %206, %202 ]
  %209 = xor i1 %208, true
  br i1 %209, label %184, label %210, !llvm.loop !20

210:                                              ; preds = %207
  %211 = load double, ptr %23, align 8, !tbaa !15
  %212 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %211, double noundef 0.000000e+00)
  br i1 %212, label %213, label %219

213:                                              ; preds = %210
  %214 = load double, ptr %23, align 8, !tbaa !15
  %215 = load double, ptr %23, align 8, !tbaa !15
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %215, ptr noundef %216)
  %218 = fdiv double %214, %217
  store double %218, ptr %23, align 8, !tbaa !15
  br label %219

219:                                              ; preds = %213, %210
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %220

220:                                              ; preds = %459, %219
  %221 = load i64, ptr %26, align 8, !tbaa !9
  %222 = load i64, ptr %8, align 8, !tbaa !9
  %223 = sub nsw i64 %222, 1
  %224 = icmp slt i64 %221, %223
  br i1 %224, label %225, label %462

225:                                              ; preds = %220
  store i64 1, ptr %21, align 8, !tbaa !9
  %226 = load i64, ptr %26, align 8, !tbaa !9
  store i64 %226, ptr %27, align 8, !tbaa !9
  br label %227

227:                                              ; preds = %259, %225
  %228 = load i64, ptr %27, align 8, !tbaa !9
  %229 = load i64, ptr %8, align 8, !tbaa !9
  %230 = sub nsw i64 %229, 2
  %231 = icmp sle i64 %228, %230
  br i1 %231, label %232, label %262

232:                                              ; preds = %227
  %233 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %234 = load ptr, ptr %233, align 8, !tbaa !17
  %235 = load i64, ptr %27, align 8, !tbaa !9
  %236 = add nsw i64 %235, 1
  %237 = getelementptr inbounds double, ptr %234, i64 %236
  %238 = load double, ptr %237, align 8, !tbaa !15
  %239 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %240 = load ptr, ptr %239, align 8, !tbaa !17
  %241 = load i64, ptr %27, align 8, !tbaa !9
  %242 = getelementptr inbounds double, ptr %240, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !15
  %244 = fsub double %238, %243
  store double %244, ptr %24, align 8, !tbaa !15
  %245 = load double, ptr %23, align 8, !tbaa !15
  %246 = load double, ptr %24, align 8, !tbaa !15
  %247 = fmul double %245, %246
  %248 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %247, double noundef 0.000000e+00)
  br i1 %248, label %249, label %252

249:                                              ; preds = %232
  %250 = load i64, ptr %21, align 8, !tbaa !9
  %251 = add nsw i64 %250, 1
  store i64 %251, ptr %21, align 8, !tbaa !9
  br label %258

252:                                              ; preds = %232
  %253 = load double, ptr %24, align 8, !tbaa !15
  %254 = load double, ptr %24, align 8, !tbaa !15
  %255 = load ptr, ptr %10, align 8, !tbaa !5
  %256 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %254, ptr noundef %255)
  %257 = fdiv double %253, %256
  store double %257, ptr %23, align 8, !tbaa !15
  br label %262

258:                                              ; preds = %249
  br label %259

259:                                              ; preds = %258
  %260 = load i64, ptr %27, align 8, !tbaa !9
  %261 = add nsw i64 %260, 1
  store i64 %261, ptr %27, align 8, !tbaa !9
  br label %227, !llvm.loop !21

262:                                              ; preds = %252, %227
  %263 = load i64, ptr %26, align 8, !tbaa !9
  %264 = load i64, ptr %21, align 8, !tbaa !9
  %265 = add nsw i64 %263, %264
  store i64 %265, ptr %22, align 8, !tbaa !9
  %266 = load i64, ptr %21, align 8, !tbaa !9
  %267 = icmp sge i64 %266, 2
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %267, ptr noundef @.str.297, ptr noundef %268)
  %269 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !17
  %271 = load i64, ptr %26, align 8, !tbaa !9
  %272 = getelementptr inbounds double, ptr %270, i64 %271
  store double 0.000000e+00, ptr %272, align 8, !tbaa !15
  %273 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %274 = load ptr, ptr %273, align 8, !tbaa !17
  %275 = load i64, ptr %22, align 8, !tbaa !9
  %276 = sub nsw i64 %275, 1
  %277 = getelementptr inbounds double, ptr %274, i64 %276
  store double 0.000000e+00, ptr %277, align 8, !tbaa !15
  %278 = load i64, ptr %26, align 8, !tbaa !9
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %27, align 8, !tbaa !9
  br label %280

280:                                              ; preds = %342, %262
  %281 = load i64, ptr %27, align 8, !tbaa !9
  %282 = load i64, ptr %22, align 8, !tbaa !9
  %283 = sub nsw i64 %282, 2
  %284 = icmp sle i64 %281, %283
  br i1 %284, label %285, label %345

285:                                              ; preds = %280
  %286 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %287 = load ptr, ptr %286, align 8, !tbaa !17
  %288 = load i64, ptr %27, align 8, !tbaa !9
  %289 = getelementptr inbounds double, ptr %287, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !15
  %291 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %292 = load ptr, ptr %291, align 8, !tbaa !17
  %293 = load i64, ptr %27, align 8, !tbaa !9
  %294 = sub nsw i64 %293, 1
  %295 = getelementptr inbounds double, ptr %292, i64 %294
  %296 = load double, ptr %295, align 8, !tbaa !15
  %297 = fsub double %290, %296
  %298 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %299 = load ptr, ptr %298, align 8, !tbaa !17
  %300 = load i64, ptr %27, align 8, !tbaa !9
  %301 = getelementptr inbounds double, ptr %299, i64 %300
  %302 = load double, ptr %301, align 8, !tbaa !15
  %303 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %304 = load ptr, ptr %303, align 8, !tbaa !17
  %305 = load i64, ptr %27, align 8, !tbaa !9
  %306 = sub nsw i64 %305, 1
  %307 = getelementptr inbounds double, ptr %304, i64 %306
  %308 = load double, ptr %307, align 8, !tbaa !15
  %309 = fsub double %302, %308
  %310 = fdiv double %297, %309
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !17
  %313 = load i64, ptr %27, align 8, !tbaa !9
  %314 = add nsw i64 %313, 1
  %315 = getelementptr inbounds double, ptr %312, i64 %314
  %316 = load double, ptr %315, align 8, !tbaa !15
  %317 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %318 = load ptr, ptr %317, align 8, !tbaa !17
  %319 = load i64, ptr %27, align 8, !tbaa !9
  %320 = getelementptr inbounds double, ptr %318, i64 %319
  %321 = load double, ptr %320, align 8, !tbaa !15
  %322 = fsub double %316, %321
  %323 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %324 = load ptr, ptr %323, align 8, !tbaa !17
  %325 = load i64, ptr %27, align 8, !tbaa !9
  %326 = add nsw i64 %325, 1
  %327 = getelementptr inbounds double, ptr %324, i64 %326
  %328 = load double, ptr %327, align 8, !tbaa !15
  %329 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %330 = load ptr, ptr %329, align 8, !tbaa !17
  %331 = load i64, ptr %27, align 8, !tbaa !9
  %332 = getelementptr inbounds double, ptr %330, i64 %331
  %333 = load double, ptr %332, align 8, !tbaa !15
  %334 = fsub double %328, %333
  %335 = fdiv double %322, %334
  %336 = fadd double %310, %335
  %337 = fdiv double %336, 2.000000e+00
  %338 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %339 = load ptr, ptr %338, align 8, !tbaa !17
  %340 = load i64, ptr %27, align 8, !tbaa !9
  %341 = getelementptr inbounds double, ptr %339, i64 %340
  store double %337, ptr %341, align 8, !tbaa !15
  br label %342

342:                                              ; preds = %285
  %343 = load i64, ptr %27, align 8, !tbaa !9
  %344 = add nsw i64 %343, 1
  store i64 %344, ptr %27, align 8, !tbaa !9
  br label %280, !llvm.loop !22

345:                                              ; preds = %280
  %346 = load i64, ptr %26, align 8, !tbaa !9
  store i64 %346, ptr %27, align 8, !tbaa !9
  br label %347

347:                                              ; preds = %456, %345
  %348 = load i64, ptr %27, align 8, !tbaa !9
  %349 = load i64, ptr %22, align 8, !tbaa !9
  %350 = sub nsw i64 %349, 2
  %351 = icmp sle i64 %348, %350
  br i1 %351, label %352, label %459

352:                                              ; preds = %347
  %353 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %354 = load ptr, ptr %353, align 8, !tbaa !17
  %355 = load i64, ptr %27, align 8, !tbaa !9
  %356 = add nsw i64 %355, 1
  %357 = getelementptr inbounds double, ptr %354, i64 %356
  %358 = load double, ptr %357, align 8, !tbaa !15
  %359 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %360 = load ptr, ptr %359, align 8, !tbaa !17
  %361 = load i64, ptr %27, align 8, !tbaa !9
  %362 = getelementptr inbounds double, ptr %360, i64 %361
  %363 = load double, ptr %362, align 8, !tbaa !15
  %364 = fsub double %358, %363
  %365 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %366 = load ptr, ptr %365, align 8, !tbaa !17
  %367 = load i64, ptr %27, align 8, !tbaa !9
  %368 = add nsw i64 %367, 1
  %369 = getelementptr inbounds double, ptr %366, i64 %368
  %370 = load double, ptr %369, align 8, !tbaa !15
  %371 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %372 = load ptr, ptr %371, align 8, !tbaa !17
  %373 = load i64, ptr %27, align 8, !tbaa !9
  %374 = getelementptr inbounds double, ptr %372, i64 %373
  %375 = load double, ptr %374, align 8, !tbaa !15
  %376 = fsub double %370, %375
  %377 = fdiv double %364, %376
  store double %377, ptr %18, align 8, !tbaa !15
  %378 = load double, ptr %18, align 8, !tbaa !15
  %379 = load ptr, ptr %10, align 8, !tbaa !5
  %380 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %378, ptr noundef %379)
  %381 = load double, ptr %25, align 8, !tbaa !15
  %382 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %380, double noundef %381)
  br i1 %382, label %383, label %393

383:                                              ; preds = %352
  %384 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %385 = load ptr, ptr %384, align 8, !tbaa !17
  %386 = load i64, ptr %27, align 8, !tbaa !9
  %387 = getelementptr inbounds double, ptr %385, i64 %386
  store double 0.000000e+00, ptr %387, align 8, !tbaa !15
  %388 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %389 = load ptr, ptr %388, align 8, !tbaa !17
  %390 = load i64, ptr %27, align 8, !tbaa !9
  %391 = add nsw i64 %390, 1
  %392 = getelementptr inbounds double, ptr %389, i64 %391
  store double 0.000000e+00, ptr %392, align 8, !tbaa !15
  br label %455

393:                                              ; preds = %352
  %394 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %395 = load ptr, ptr %394, align 8, !tbaa !17
  %396 = load i64, ptr %27, align 8, !tbaa !9
  %397 = getelementptr inbounds double, ptr %395, i64 %396
  %398 = load double, ptr %397, align 8, !tbaa !15
  %399 = load double, ptr %18, align 8, !tbaa !15
  %400 = fdiv double %398, %399
  store double %400, ptr %19, align 8, !tbaa !15
  %401 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %402 = load ptr, ptr %401, align 8, !tbaa !17
  %403 = load i64, ptr %27, align 8, !tbaa !9
  %404 = add nsw i64 %403, 1
  %405 = getelementptr inbounds double, ptr %402, i64 %404
  %406 = load double, ptr %405, align 8, !tbaa !15
  %407 = load double, ptr %18, align 8, !tbaa !15
  %408 = fdiv double %406, %407
  store double %408, ptr %20, align 8, !tbaa !15
  %409 = load double, ptr %19, align 8, !tbaa !15
  %410 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %409, double noundef 0.000000e+00)
  br i1 %410, label %411, label %422

411:                                              ; preds = %393
  %412 = load double, ptr %19, align 8, !tbaa !15
  %413 = load double, ptr %20, align 8, !tbaa !15
  %414 = load double, ptr %19, align 8, !tbaa !15
  %415 = fdiv double %413, %414
  %416 = load ptr, ptr %10, align 8, !tbaa !5
  %417 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %415, ptr noundef %416)
  %418 = fadd double 1.000000e+00, %417
  %419 = load ptr, ptr %10, align 8, !tbaa !5
  %420 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %418, ptr noundef %419)
  %421 = fmul double %412, %420
  store double %421, ptr %24, align 8, !tbaa !15
  br label %429

422:                                              ; preds = %393
  %423 = load double, ptr %20, align 8, !tbaa !15
  %424 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %423, double noundef 0.000000e+00)
  br i1 %424, label %425, label %427

425:                                              ; preds = %422
  %426 = load double, ptr %20, align 8, !tbaa !15
  store double %426, ptr %24, align 8, !tbaa !15
  br label %428

427:                                              ; preds = %422
  br label %456

428:                                              ; preds = %425
  br label %429

429:                                              ; preds = %428, %411
  %430 = load double, ptr %24, align 8, !tbaa !15
  %431 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %430, double noundef 3.000000e+00)
  br i1 %431, label %432, label %454

432:                                              ; preds = %429
  %433 = load double, ptr %19, align 8, !tbaa !15
  %434 = fmul double 3.000000e+00, %433
  %435 = load double, ptr %18, align 8, !tbaa !15
  %436 = fmul double %434, %435
  %437 = load double, ptr %24, align 8, !tbaa !15
  %438 = fdiv double %436, %437
  %439 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %440 = load ptr, ptr %439, align 8, !tbaa !17
  %441 = load i64, ptr %27, align 8, !tbaa !9
  %442 = getelementptr inbounds double, ptr %440, i64 %441
  store double %438, ptr %442, align 8, !tbaa !15
  %443 = load double, ptr %20, align 8, !tbaa !15
  %444 = fmul double 3.000000e+00, %443
  %445 = load double, ptr %18, align 8, !tbaa !15
  %446 = fmul double %444, %445
  %447 = load double, ptr %24, align 8, !tbaa !15
  %448 = fdiv double %446, %447
  %449 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %450 = load ptr, ptr %449, align 8, !tbaa !17
  %451 = load i64, ptr %27, align 8, !tbaa !9
  %452 = add nsw i64 %451, 1
  %453 = getelementptr inbounds double, ptr %450, i64 %452
  store double %448, ptr %453, align 8, !tbaa !15
  br label %454

454:                                              ; preds = %432, %429
  br label %455

455:                                              ; preds = %454, %383
  br label %456

456:                                              ; preds = %455, %427
  %457 = load i64, ptr %27, align 8, !tbaa !9
  %458 = add nsw i64 %457, 1
  store i64 %458, ptr %27, align 8, !tbaa !9
  br label %347, !llvm.loop !23

459:                                              ; preds = %347
  %460 = load i64, ptr %22, align 8, !tbaa !9
  %461 = sub nsw i64 %460, 1
  store i64 %461, ptr %26, align 8, !tbaa !9
  br label %220, !llvm.loop !24

462:                                              ; preds = %220
  %463 = load i64, ptr %8, align 8, !tbaa !9
  %464 = load ptr, ptr %9, align 8, !tbaa !5
  %465 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %15, ptr noundef %16, ptr noundef %14, i64 noundef %463, ptr noundef %464, ptr noundef %465)
  %466 = load ptr, ptr %9, align 8, !tbaa !5
  %467 = getelementptr inbounds %"struct.alglib_impl::spline1dinterpolant", ptr %466, i32 0, i32 3
  store i64 2, ptr %467, align 8, !tbaa !25
  %468 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %468)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  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 64, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  ret void
}

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

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

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

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

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double 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_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

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

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, 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 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = !{!26, !10, i64 24}
!26 = !{!"_ZTSN11alglib_impl19spline1dinterpolantE", !13, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !12, i64 96}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.291 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.293 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.294 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.295 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [38 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_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl21spline1dbuildmonotoneEPNS_9ae_vectorES1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", 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
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, 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 @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %7, ptr noundef %0, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %1, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %4, 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 %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 2, ptr noundef %4, i1 noundef zeroext true)
  %13 = icmp sgt i64 %2, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.291, ptr noundef %4)
  %14 = load i64, ptr %7, align 8, !tbaa !5
  %15 = icmp sge i64 %14, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.292, ptr noundef %4)
  %16 = load i64, ptr %8, align 8, !tbaa !5
  %17 = icmp sge i64 %16, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.293, ptr noundef %4)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.294, ptr noundef %4)
  %19 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.295, ptr noundef %4)
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %12, i64 noundef %2, ptr noundef %4)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.296, ptr noundef %4)
  %21 = add nsw i64 %2, 2
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %21, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %21, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %21, ptr noundef %4)
  %22 = getelementptr inbounds i8, ptr %7, i64 56
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = load double, ptr %23, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load double, ptr %25, align 8, !tbaa !14
  %27 = fsub double %26, %24
  %28 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %27, ptr noundef %4)
  %29 = fsub double %24, %28
  %30 = getelementptr inbounds i8, ptr %10, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  store double %29, ptr %31, align 8, !tbaa !14
  %32 = load ptr, ptr %22, align 8, !tbaa !13
  %33 = add nsw i64 %2, -1
  %34 = getelementptr inbounds double, ptr %32, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !14
  %36 = getelementptr double, ptr %32, i64 %2
  %37 = getelementptr i8, ptr %36, i64 -16
  %38 = load double, ptr %37, align 8, !tbaa !14
  %39 = fsub double %35, %38
  %40 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %39, ptr noundef %4)
  %41 = fadd double %35, %40
  %42 = load ptr, ptr %30, align 8, !tbaa !13
  %43 = add i64 %2, 1
  %44 = getelementptr inbounds double, ptr %42, i64 %43
  store double %41, ptr %44, align 8, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %8, i64 56
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load double, ptr %46, align 8, !tbaa !14
  %48 = getelementptr inbounds i8, ptr %11, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  store double %47, ptr %49, align 8, !tbaa !14
  %50 = load ptr, ptr %45, align 8, !tbaa !13
  %51 = getelementptr inbounds double, ptr %50, i64 %33
  %52 = load double, ptr %51, align 8, !tbaa !14
  %53 = load ptr, ptr %48, align 8, !tbaa !13
  %54 = getelementptr inbounds double, ptr %53, i64 %43
  store double %52, ptr %54, align 8, !tbaa !14
  %.not169 = icmp slt i64 %2, 1
  br i1 %.not169, label %.preheader164.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %5
  %xtraiter = and i64 %2, 1
  %55 = icmp eq i64 %2, 1
  br i1 %55, label %.preheader164.preheader.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %2, 9223372036854775806
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.0148170 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %78, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %56 = load ptr, ptr %22, align 8, !tbaa !13
  %57 = add nsw i64 %.0148170, -1
  %58 = getelementptr inbounds double, ptr %56, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !14
  %60 = load ptr, ptr %30, align 8, !tbaa !13
  %61 = getelementptr inbounds double, ptr %60, i64 %.0148170
  store double %59, ptr %61, align 8, !tbaa !14
  %62 = load ptr, ptr %45, align 8, !tbaa !13
  %63 = getelementptr inbounds double, ptr %62, i64 %57
  %64 = load double, ptr %63, align 8, !tbaa !14
  %65 = load ptr, ptr %48, align 8, !tbaa !13
  %66 = getelementptr inbounds double, ptr %65, i64 %.0148170
  store double %64, ptr %66, align 8, !tbaa !14
  %67 = add nuw i64 %.0148170, 1
  %68 = load ptr, ptr %22, align 8, !tbaa !13
  %69 = getelementptr inbounds double, ptr %68, i64 %.0148170
  %70 = load double, ptr %69, align 8, !tbaa !14
  %71 = load ptr, ptr %30, align 8, !tbaa !13
  %72 = getelementptr inbounds double, ptr %71, i64 %67
  store double %70, ptr %72, align 8, !tbaa !14
  %73 = load ptr, ptr %45, align 8, !tbaa !13
  %74 = getelementptr inbounds double, ptr %73, i64 %.0148170
  %75 = load double, ptr %74, align 8, !tbaa !14
  %76 = load ptr, ptr %48, align 8, !tbaa !13
  %77 = getelementptr inbounds double, ptr %76, i64 %67
  store double %75, ptr %77, align 8, !tbaa !14
  %78 = add nuw i64 %.0148170, 2
  %niter.next.1 = add nuw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader164.preheader.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !16

.preheader164.preheader.loopexit.unr-lcssa:       ; preds = %.lr.ph, %.lr.ph.preheader
  %.0148170.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %78, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader164.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader164.preheader.loopexit.unr-lcssa
  %79 = load ptr, ptr %22, align 8, !tbaa !13
  %80 = add nsw i64 %.0148170.unr, -1
  %81 = getelementptr inbounds double, ptr %79, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !14
  %83 = load ptr, ptr %30, align 8, !tbaa !13
  %84 = getelementptr inbounds double, ptr %83, i64 %.0148170.unr
  store double %82, ptr %84, align 8, !tbaa !14
  %85 = load ptr, ptr %45, align 8, !tbaa !13
  %86 = getelementptr inbounds double, ptr %85, i64 %80
  %87 = load double, ptr %86, align 8, !tbaa !14
  %88 = load ptr, ptr %48, align 8, !tbaa !13
  %89 = getelementptr inbounds double, ptr %88, i64 %.0148170.unr
  store double %87, ptr %89, align 8, !tbaa !14
  br label %.preheader164.preheader

.preheader164.preheader:                          ; preds = %.lr.ph.epil, %.preheader164.preheader.loopexit.unr-lcssa, %5
  br label %.preheader164

.preheader164:                                    ; preds = %.preheader164.preheader, %.preheader164
  %.1149 = phi i64 [ %91, %.preheader164 ], [ 0, %.preheader164.preheader ]
  %90 = load ptr, ptr %48, align 8, !tbaa !13
  %91 = add nuw nsw i64 %.1149, 1
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !14
  %94 = getelementptr inbounds double, ptr %90, i64 %.1149
  %95 = load double, ptr %94, align 8, !tbaa !14
  %96 = fsub double %93, %95
  %97 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %96, double noundef 0.000000e+00)
  %98 = icmp sge i64 %.1149, %2
  %99 = or i1 %98, %97
  br i1 %99, label %100, label %.preheader164, !llvm.loop !18

100:                                              ; preds = %.preheader164
  %101 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %96, double noundef 0.000000e+00)
  br i1 %101, label %102, label %105

102:                                              ; preds = %100
  %103 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %96, ptr noundef %4)
  %104 = fdiv double %96, %103
  br label %105

105:                                              ; preds = %102, %100
  %.0152 = phi double [ %104, %102 ], [ %96, %100 ]
  %.not158179 = icmp slt i64 %2, 0
  br i1 %.not158179, label %._crit_edge, label %.preheader162.lr.ph

.preheader162.lr.ph:                              ; preds = %105
  %106 = getelementptr inbounds i8, ptr %9, i64 56
  br label %.preheader162

.loopexit:                                        ; preds = %202, %.preheader
  %.not158 = icmp sgt i64 %127, %2
  br i1 %.not158, label %._crit_edge, label %.preheader162, !llvm.loop !19

.preheader162:                                    ; preds = %.preheader162.lr.ph, %.loopexit
  %.2150181 = phi i64 [ 0, %.preheader162.lr.ph ], [ %127, %.loopexit ]
  %.1153180 = phi double [ %.0152, %.preheader162.lr.ph ], [ %.2154, %.loopexit ]
  br label %107

107:                                              ; preds = %.preheader162, %117
  %.0172 = phi i64 [ %.2150181, %.preheader162 ], [ %109, %117 ]
  %.0155171 = phi i64 [ 1, %.preheader162 ], [ %118, %117 ]
  %108 = load ptr, ptr %48, align 8, !tbaa !13
  %109 = add nsw i64 %.0172, 1
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !14
  %112 = getelementptr inbounds double, ptr %108, i64 %.0172
  %113 = load double, ptr %112, align 8, !tbaa !14
  %114 = fsub double %111, %113
  %115 = fmul double %.1153180, %114
  %116 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %115, double noundef 0.000000e+00)
  br i1 %116, label %117, label %119

117:                                              ; preds = %107
  %118 = add nuw nsw i64 %.0155171, 1
  %.not159.not = icmp slt i64 %.0172, %2
  br i1 %.not159.not, label %107, label %.loopexit163, !llvm.loop !20

119:                                              ; preds = %107
  %120 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %114, ptr noundef %4)
  %121 = fdiv double %114, %120
  br label %.loopexit163

.loopexit163:                                     ; preds = %117, %119
  %.0155166 = phi i64 [ %.0155171, %119 ], [ %118, %117 ]
  %.2154 = phi double [ %121, %119 ], [ %.1153180, %117 ]
  %122 = add nsw i64 %.0155166, %.2150181
  %123 = icmp ugt i64 %.0155166, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %123, ptr noundef nonnull @.str.297, ptr noundef %4)
  %124 = load ptr, ptr %106, align 8, !tbaa !13
  %125 = getelementptr inbounds double, ptr %124, i64 %.2150181
  store double 0.000000e+00, ptr %125, align 8, !tbaa !14
  %126 = load ptr, ptr %106, align 8, !tbaa !13
  %127 = add nsw i64 %122, -1
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  store double 0.000000e+00, ptr %128, align 8, !tbaa !14
  %129 = add nsw i64 %122, -2
  %.not160173.not = icmp slt i64 %.2150181, %129
  br i1 %.not160173.not, label %.lr.ph175.preheader, label %.preheader

.lr.ph175.preheader:                              ; preds = %.loopexit163
  %130 = add nsw i64 %.2150181, 1
  br label %.lr.ph175

.preheader:                                       ; preds = %.lr.ph175, %.loopexit163
  %.not161176 = icmp sgt i64 %.2150181, %129
  br i1 %.not161176, label %.loopexit, label %.lr.ph178

.lr.ph175:                                        ; preds = %.lr.ph175.preheader, %.lr.ph175
  %.1174 = phi i64 [ %140, %.lr.ph175 ], [ %130, %.lr.ph175.preheader ]
  %131 = load ptr, ptr %48, align 8, !tbaa !13
  %132 = getelementptr inbounds double, ptr %131, i64 %.1174
  %133 = add nsw i64 %.1174, -1
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !14
  %136 = load ptr, ptr %30, align 8, !tbaa !13
  %137 = getelementptr inbounds double, ptr %136, i64 %.1174
  %138 = getelementptr inbounds double, ptr %136, i64 %133
  %139 = load double, ptr %138, align 8, !tbaa !14
  %140 = add nsw i64 %.1174, 1
  %141 = load <2 x double>, ptr %132, align 8, !tbaa !14
  %142 = insertelement <2 x double> poison, double %135, i64 0
  %143 = shufflevector <2 x double> %142, <2 x double> %141, <2 x i32> <i32 0, i32 2>
  %144 = fsub <2 x double> %141, %143
  %145 = load <2 x double>, ptr %137, align 8, !tbaa !14
  %146 = insertelement <2 x double> poison, double %139, i64 0
  %147 = shufflevector <2 x double> %146, <2 x double> %145, <2 x i32> <i32 0, i32 2>
  %148 = fsub <2 x double> %145, %147
  %149 = fdiv <2 x double> %144, %148
  %shift = shufflevector <2 x double> %149, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %150 = fadd <2 x double> %149, %shift
  %151 = extractelement <2 x double> %150, i64 0
  %152 = fmul double %151, 5.000000e-01
  %153 = load ptr, ptr %106, align 8, !tbaa !13
  %154 = getelementptr inbounds double, ptr %153, i64 %.1174
  store double %152, ptr %154, align 8, !tbaa !14
  %exitcond186.not = icmp eq i64 %140, %127
  br i1 %exitcond186.not, label %.preheader, label %.lr.ph175, !llvm.loop !21

.lr.ph178:                                        ; preds = %.preheader, %202
  %.2177 = phi i64 [ %156, %202 ], [ %.2150181, %.preheader ]
  %155 = load ptr, ptr %48, align 8, !tbaa !13
  %156 = add nsw i64 %.2177, 1
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !14
  %159 = getelementptr inbounds double, ptr %155, i64 %.2177
  %160 = load double, ptr %159, align 8, !tbaa !14
  %161 = fsub double %158, %160
  %162 = load ptr, ptr %30, align 8, !tbaa !13
  %163 = getelementptr inbounds double, ptr %162, i64 %156
  %164 = load double, ptr %163, align 8, !tbaa !14
  %165 = getelementptr inbounds double, ptr %162, i64 %.2177
  %166 = load double, ptr %165, align 8, !tbaa !14
  %167 = fsub double %164, %166
  %168 = fdiv double %161, %167
  %169 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %168, ptr noundef %4)
  %170 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %169, double noundef 5.000000e-16)
  %171 = load ptr, ptr %106, align 8, !tbaa !13
  %172 = getelementptr inbounds double, ptr %171, i64 %.2177
  br i1 %170, label %173, label %174

173:                                              ; preds = %.lr.ph178
  store double 0.000000e+00, ptr %172, align 8, !tbaa !14
  br label %.sink.split

174:                                              ; preds = %.lr.ph178
  %175 = load double, ptr %172, align 8, !tbaa !14
  %176 = fdiv double %175, %168
  %177 = getelementptr inbounds double, ptr %171, i64 %156
  %178 = load double, ptr %177, align 8, !tbaa !14
  %179 = fdiv double %178, %168
  %180 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %176, double noundef 0.000000e+00)
  br i1 %180, label %181, label %187

181:                                              ; preds = %174
  %182 = fdiv double %179, %176
  %183 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %182, ptr noundef %4)
  %184 = fadd double %183, 1.000000e+00
  %185 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %184, ptr noundef %4)
  %186 = fmul double %176, %185
  br label %189

187:                                              ; preds = %174
  %188 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %179, double noundef 0.000000e+00)
  br i1 %188, label %189, label %202

189:                                              ; preds = %187, %181
  %.0151 = phi double [ %186, %181 ], [ %179, %187 ]
  %190 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %.0151, double noundef 3.000000e+00)
  br i1 %190, label %191, label %202

191:                                              ; preds = %189
  %192 = fmul double %176, 3.000000e+00
  %193 = fmul double %168, %192
  %194 = fdiv double %193, %.0151
  %195 = load ptr, ptr %106, align 8, !tbaa !13
  %196 = getelementptr inbounds double, ptr %195, i64 %.2177
  store double %194, ptr %196, align 8, !tbaa !14
  %197 = fmul double %179, 3.000000e+00
  %198 = fmul double %168, %197
  %199 = fdiv double %198, %.0151
  br label %.sink.split

.sink.split:                                      ; preds = %191, %173
  %.sink = phi double [ 0.000000e+00, %173 ], [ %199, %191 ]
  %200 = load ptr, ptr %106, align 8, !tbaa !13
  %201 = getelementptr inbounds double, ptr %200, i64 %156
  store double %.sink, ptr %201, align 8, !tbaa !14
  br label %202

202:                                              ; preds = %.sink.split, %189, %187
  %exitcond187.not = icmp eq i64 %156, %127
  br i1 %exitcond187.not, label %.loopexit, label %.lr.ph178, !llvm.loop !22

._crit_edge:                                      ; preds = %.loopexit, %105
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %9, i64 noundef %21, ptr noundef %3, ptr noundef %4)
  %203 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 2, ptr %203, align 8, !tbaa !23
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

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

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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 noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(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 noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double 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_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double 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_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_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 = !{!8, !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = !{!24, !7, i64 24}
!24 = !{!"_ZTSN11alglib_impl19spline1dinterpolantE", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !6, i64 32, !6, i64 96}


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