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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::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.343 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [71 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_impl19spline1dbuildlinearEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, double noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_frame", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i64 %3, ptr %11, align 8, !tbaa !9
  store double %4, ptr %12, align 8, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, 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 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %21 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %21, ptr noundef %15)
  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)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %16, ptr noundef %22, ptr noundef %23, i1 noundef zeroext true)
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %17, ptr noundef %24, ptr noundef %25, i1 noundef zeroext true)
  %26 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %26)
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 3, ptr noundef %27, i1 noundef zeroext true)
  %28 = load i64, ptr %10, align 8, !tbaa !9
  %29 = icmp sge i64 %28, 2
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.343, ptr noundef %30)
  %31 = load i64, ptr %11, align 8, !tbaa !9
  %32 = icmp eq i64 %31, -1
  br i1 %32, label %36, label %33

33:                                               ; preds = %7
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = icmp eq i64 %34, 0
  br label %36

36:                                               ; preds = %33, %7
  %37 = phi i1 [ true, %7 ], [ %35, %33 ]
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.344, ptr noundef %38)
  %39 = load double, ptr %12, align 8, !tbaa !11
  %40 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %39, double noundef 0.000000e+00)
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.345, ptr noundef %41)
  %42 = load double, ptr %12, align 8, !tbaa !11
  %43 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %42, double noundef 1.000000e+00)
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.346, ptr noundef %44)
  %45 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 0
  %46 = load i64, ptr %45, align 8, !tbaa !13
  %47 = load i64, ptr %10, align 8, !tbaa !9
  %48 = icmp sge i64 %46, %47
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.347, ptr noundef %49)
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 0
  %51 = load i64, ptr %50, align 8, !tbaa !13
  %52 = load i64, ptr %10, align 8, !tbaa !9
  %53 = icmp sge i64 %51, %52
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %53, ptr noundef @.str.348, ptr noundef %54)
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %55, ptr noundef %56)
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.349, ptr noundef %58)
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %59, ptr noundef %60)
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %61, ptr noundef @.str.350, ptr noundef %62)
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL23spline1d_heapsortpointsEPNS_9ae_vectorES1_lPNS_8ae_stateE(ptr noundef %16, ptr noundef %17, i64 noundef %63, ptr noundef %64)
  %65 = load i64, ptr %10, align 8, !tbaa !9
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %65, ptr noundef %66)
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %67, ptr noundef @.str.351, ptr noundef %68)
  %69 = load i64, ptr %10, align 8, !tbaa !9
  %70 = icmp eq i64 %69, 2
  br i1 %70, label %71, label %79

71:                                               ; preds = %36
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %71
  %75 = load i64, ptr %10, align 8, !tbaa !9
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl19spline1dbuildlinearEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %17, i64 noundef %75, ptr noundef %76, ptr noundef %77)
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %78)
  store i32 1, ptr %20, align 4
  br label %322

79:                                               ; preds = %71, %36
  %80 = load i64, ptr %10, align 8, !tbaa !9
  %81 = icmp eq i64 %80, 2
  br i1 %81, label %82, label %90

82:                                               ; preds = %79
  %83 = load i64, ptr %11, align 8, !tbaa !9
  %84 = icmp eq i64 %83, -1
  br i1 %84, label %85, label %90

85:                                               ; preds = %82
  %86 = load i64, ptr %10, align 8, !tbaa !9
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %17, i64 noundef %86, i64 noundef -1, double noundef 0.000000e+00, i64 noundef -1, double noundef 0.000000e+00, ptr noundef %87, ptr noundef %88)
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %89)
  store i32 1, ptr %20, align 4
  br label %322

90:                                               ; preds = %82, %79
  %91 = load i64, ptr %11, align 8, !tbaa !9
  %92 = icmp eq i64 %91, -1
  br i1 %92, label %93, label %202

93:                                               ; preds = %90
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = getelementptr inbounds double, ptr %95, i64 0
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !17
  %100 = load i64, ptr %10, align 8, !tbaa !9
  %101 = sub nsw i64 %100, 1
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  store double %97, ptr %102, align 8, !tbaa !11
  %103 = load i64, ptr %10, align 8, !tbaa !9
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %103, ptr noundef %104)
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !17
  %107 = getelementptr inbounds double, ptr %106, i64 1
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !17
  %111 = load i64, ptr %10, align 8, !tbaa !9
  %112 = sub nsw i64 %111, 2
  %113 = getelementptr inbounds double, ptr %110, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = fsub double %108, %114
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = getelementptr inbounds double, ptr %117, i64 1
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !17
  %122 = getelementptr inbounds double, ptr %121, i64 0
  %123 = load double, ptr %122, align 8, !tbaa !11
  %124 = fsub double %119, %123
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !17
  %127 = load i64, ptr %10, align 8, !tbaa !9
  %128 = sub nsw i64 %127, 1
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !11
  %131 = fadd double %124, %130
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = load i64, ptr %10, align 8, !tbaa !9
  %135 = sub nsw i64 %134, 2
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !11
  %138 = fsub double %131, %137
  %139 = fmul double 2.000000e+00, %138
  %140 = fdiv double %115, %139
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !17
  %143 = getelementptr inbounds double, ptr %142, i64 0
  store double %140, ptr %143, align 8, !tbaa !11
  store i64 1, ptr %19, align 8, !tbaa !9
  br label %144

144:                                              ; preds = %184, %93
  %145 = load i64, ptr %19, align 8, !tbaa !9
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = sub nsw i64 %146, 2
  %148 = icmp sle i64 %145, %147
  br i1 %148, label %149, label %187

149:                                              ; preds = %144
  %150 = load double, ptr %12, align 8, !tbaa !11
  %151 = fsub double 1.000000e+00, %150
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = load i64, ptr %19, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  %156 = getelementptr inbounds double, ptr %153, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = load i64, ptr %19, align 8, !tbaa !9
  %161 = sub nsw i64 %160, 1
  %162 = getelementptr inbounds double, ptr %159, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !11
  %164 = fsub double %157, %163
  %165 = fmul double %151, %164
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !17
  %168 = load i64, ptr %19, align 8, !tbaa !9
  %169 = add nsw i64 %168, 1
  %170 = getelementptr inbounds double, ptr %167, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !11
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = load i64, ptr %19, align 8, !tbaa !9
  %175 = sub nsw i64 %174, 1
  %176 = getelementptr inbounds double, ptr %173, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = fsub double %171, %177
  %179 = fdiv double %165, %178
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !17
  %182 = load i64, ptr %19, align 8, !tbaa !9
  %183 = getelementptr inbounds double, ptr %181, i64 %182
  store double %179, ptr %183, align 8, !tbaa !11
  br label %184

184:                                              ; preds = %149
  %185 = load i64, ptr %19, align 8, !tbaa !9
  %186 = add nsw i64 %185, 1
  store i64 %186, ptr %19, align 8, !tbaa !9
  br label %144, !llvm.loop !18

187:                                              ; preds = %144
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !17
  %190 = getelementptr inbounds double, ptr %189, i64 0
  %191 = load double, ptr %190, align 8, !tbaa !11
  %192 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !17
  %194 = load i64, ptr %10, align 8, !tbaa !9
  %195 = sub nsw i64 %194, 1
  %196 = getelementptr inbounds double, ptr %193, i64 %195
  store double %191, ptr %196, align 8, !tbaa !11
  %197 = load i64, ptr %10, align 8, !tbaa !9
  %198 = load ptr, ptr %13, align 8, !tbaa !5
  %199 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %197, ptr noundef %198, ptr noundef %199)
  %200 = load ptr, ptr %13, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.alglib_impl::spline1dinterpolant", ptr %200, i32 0, i32 0
  store i8 1, ptr %201, align 8, !tbaa !20
  br label %320

202:                                              ; preds = %90
  %203 = load i64, ptr %10, align 8, !tbaa !9
  %204 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %203, ptr noundef %204)
  store i64 1, ptr %19, align 8, !tbaa !9
  br label %205

205:                                              ; preds = %245, %202
  %206 = load i64, ptr %19, align 8, !tbaa !9
  %207 = load i64, ptr %10, align 8, !tbaa !9
  %208 = sub nsw i64 %207, 2
  %209 = icmp sle i64 %206, %208
  br i1 %209, label %210, label %248

210:                                              ; preds = %205
  %211 = load double, ptr %12, align 8, !tbaa !11
  %212 = fsub double 1.000000e+00, %211
  %213 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %214 = load ptr, ptr %213, align 8, !tbaa !17
  %215 = load i64, ptr %19, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !11
  %219 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %220 = load ptr, ptr %219, align 8, !tbaa !17
  %221 = load i64, ptr %19, align 8, !tbaa !9
  %222 = sub nsw i64 %221, 1
  %223 = getelementptr inbounds double, ptr %220, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !11
  %225 = fsub double %218, %224
  %226 = fmul double %212, %225
  %227 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %228 = load ptr, ptr %227, align 8, !tbaa !17
  %229 = load i64, ptr %19, align 8, !tbaa !9
  %230 = add nsw i64 %229, 1
  %231 = getelementptr inbounds double, ptr %228, i64 %230
  %232 = load double, ptr %231, align 8, !tbaa !11
  %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 %19, align 8, !tbaa !9
  %236 = sub nsw i64 %235, 1
  %237 = getelementptr inbounds double, ptr %234, i64 %236
  %238 = load double, ptr %237, align 8, !tbaa !11
  %239 = fsub double %232, %238
  %240 = fdiv double %226, %239
  %241 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %242 = load ptr, ptr %241, align 8, !tbaa !17
  %243 = load i64, ptr %19, align 8, !tbaa !9
  %244 = getelementptr inbounds double, ptr %242, i64 %243
  store double %240, ptr %244, align 8, !tbaa !11
  br label %245

245:                                              ; preds = %210
  %246 = load i64, ptr %19, align 8, !tbaa !9
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %19, align 8, !tbaa !9
  br label %205, !llvm.loop !22

248:                                              ; preds = %205
  %249 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %250 = load ptr, ptr %249, align 8, !tbaa !17
  %251 = getelementptr inbounds double, ptr %250, i64 1
  %252 = load double, ptr %251, align 8, !tbaa !11
  %253 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !17
  %255 = getelementptr inbounds double, ptr %254, i64 0
  %256 = load double, ptr %255, align 8, !tbaa !11
  %257 = fsub double %252, %256
  %258 = fmul double 2.000000e+00, %257
  %259 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %260 = load ptr, ptr %259, align 8, !tbaa !17
  %261 = getelementptr inbounds double, ptr %260, i64 1
  %262 = load double, ptr %261, align 8, !tbaa !11
  %263 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !17
  %265 = getelementptr inbounds double, ptr %264, i64 0
  %266 = load double, ptr %265, align 8, !tbaa !11
  %267 = fsub double %262, %266
  %268 = fdiv double %258, %267
  %269 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !17
  %271 = getelementptr inbounds double, ptr %270, i64 1
  %272 = load double, ptr %271, align 8, !tbaa !11
  %273 = fsub double %268, %272
  %274 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %275 = load ptr, ptr %274, align 8, !tbaa !17
  %276 = getelementptr inbounds double, ptr %275, i64 0
  store double %273, ptr %276, align 8, !tbaa !11
  %277 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %278 = load ptr, ptr %277, align 8, !tbaa !17
  %279 = load i64, ptr %10, align 8, !tbaa !9
  %280 = sub nsw i64 %279, 1
  %281 = getelementptr inbounds double, ptr %278, i64 %280
  %282 = load double, ptr %281, align 8, !tbaa !11
  %283 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %284 = load ptr, ptr %283, align 8, !tbaa !17
  %285 = load i64, ptr %10, align 8, !tbaa !9
  %286 = sub nsw i64 %285, 2
  %287 = getelementptr inbounds double, ptr %284, i64 %286
  %288 = load double, ptr %287, align 8, !tbaa !11
  %289 = fsub double %282, %288
  %290 = fmul double 2.000000e+00, %289
  %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 %10, 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 !11
  %297 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %298 = load ptr, ptr %297, align 8, !tbaa !17
  %299 = load i64, ptr %10, align 8, !tbaa !9
  %300 = sub nsw i64 %299, 2
  %301 = getelementptr inbounds double, ptr %298, i64 %300
  %302 = load double, ptr %301, align 8, !tbaa !11
  %303 = fsub double %296, %302
  %304 = fdiv double %290, %303
  %305 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %306 = load ptr, ptr %305, align 8, !tbaa !17
  %307 = load i64, ptr %10, align 8, !tbaa !9
  %308 = sub nsw i64 %307, 2
  %309 = getelementptr inbounds double, ptr %306, i64 %308
  %310 = load double, ptr %309, align 8, !tbaa !11
  %311 = fsub double %304, %310
  %312 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %313 = load ptr, ptr %312, align 8, !tbaa !17
  %314 = load i64, ptr %10, align 8, !tbaa !9
  %315 = sub nsw i64 %314, 1
  %316 = getelementptr inbounds double, ptr %313, i64 %315
  store double %311, ptr %316, align 8, !tbaa !11
  %317 = load i64, ptr %10, align 8, !tbaa !9
  %318 = load ptr, ptr %13, align 8, !tbaa !5
  %319 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %317, ptr noundef %318, ptr noundef %319)
  br label %320

320:                                              ; preds = %248, %187
  %321 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %321)
  store i32 0, ptr %20, align 4
  br label %322

322:                                              ; preds = %320, %85, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, 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 32, ptr %15) #4
  %323 = load i32, ptr %20, align 4
  switch i32 %323, label %325 [
    i32 0, label %324
    i32 1, label %324
  ]

324:                                              ; preds = %322, %322
  ret void

325:                                              ; preds = %322
  unreachable
}

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


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

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

@.str.343 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.351 = external hidden unnamed_addr constant [71 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_impl19spline1dbuildlinearEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, double noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %"struct.alglib_impl::ae_frame", 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
  call void @llvm.lifetime.start.p0(i64 32, 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 @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %6, ptr noundef nonnull %8)
  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 @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %9, ptr noundef %0, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %1, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %5)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  %12 = icmp sgt i64 %2, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.343, ptr noundef %6)
  %13 = icmp eq i64 %3, -1
  %14 = icmp eq i64 %3, 0
  %15 = add i64 %3, 1
  %16 = icmp ult i64 %15, 2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.344, ptr noundef %6)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %4, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.345, ptr noundef %6)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %4, double noundef 1.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.346, ptr noundef %6)
  %19 = load i64, ptr %9, align 8, !tbaa !5
  %20 = icmp sge i64 %19, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.347, ptr noundef %6)
  %21 = load i64, ptr %10, align 8, !tbaa !5
  %22 = icmp sge i64 %21, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.348, ptr noundef %6)
  %23 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.349, ptr noundef %6)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.350, ptr noundef %6)
  call void @_ZN11alglib_implL23spline1d_heapsortpointsEPNS_9ae_vectorES1_lPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %10, i64 noundef %2, ptr noundef %6)
  %25 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.351, ptr noundef %6)
  %26 = icmp eq i64 %2, 2
  %or.cond = and i1 %26, %14
  br i1 %or.cond, label %27, label %28

27:                                               ; preds = %7
  call void @_ZN11alglib_impl19spline1dbuildlinearEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %10, i64 noundef 2, ptr noundef %5, ptr noundef %6)
  br label %147

28:                                               ; preds = %7
  %or.cond3 = and i1 %26, %13
  br i1 %or.cond3, label %29, label %30

29:                                               ; preds = %28
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %10, i64 noundef 2, i64 noundef -1, double noundef 0.000000e+00, i64 noundef -1, double noundef 0.000000e+00, ptr noundef %5, ptr noundef %6)
  br label %147

30:                                               ; preds = %28
  br i1 %13, label %31, label %83

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %10, i64 56
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = load double, ptr %33, align 8, !tbaa !14
  %35 = add i64 %2, -1
  %36 = getelementptr inbounds double, ptr %33, i64 %35
  store double %34, ptr %36, align 8, !tbaa !14
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %2, ptr noundef %6)
  %37 = load ptr, ptr %32, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load double, ptr %38, align 8, !tbaa !14
  %40 = add nsw i64 %2, -2
  %41 = getelementptr inbounds double, ptr %37, i64 %40
  %42 = load double, ptr %41, align 8, !tbaa !14
  %43 = fsub double %39, %42
  %44 = getelementptr inbounds i8, ptr %9, i64 56
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !14
  %48 = load double, ptr %45, align 8, !tbaa !14
  %49 = fsub double %47, %48
  %50 = getelementptr inbounds double, ptr %45, i64 %35
  %51 = load double, ptr %50, align 8, !tbaa !14
  %52 = fadd double %49, %51
  %53 = getelementptr inbounds double, ptr %45, i64 %40
  %54 = load double, ptr %53, align 8, !tbaa !14
  %55 = fsub double %52, %54
  %56 = fmul double %55, 2.000000e+00
  %57 = fdiv double %43, %56
  %58 = getelementptr inbounds i8, ptr %11, i64 56
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  store double %57, ptr %59, align 8, !tbaa !14
  %.not9093 = icmp slt i64 %2, 3
  br i1 %.not9093, label %._crit_edge97, label %.lr.ph96

.lr.ph96:                                         ; preds = %31
  %60 = fsub double 1.000000e+00, %4
  br label %61

61:                                               ; preds = %.lr.ph96, %61
  %.094 = phi i64 [ 1, %.lr.ph96 ], [ %63, %61 ]
  %62 = load ptr, ptr %32, align 8, !tbaa !13
  %63 = add nuw nsw i64 %.094, 1
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !14
  %66 = add nsw i64 %.094, -1
  %67 = getelementptr inbounds double, ptr %62, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !14
  %69 = fsub double %65, %68
  %70 = fmul double %60, %69
  %71 = load ptr, ptr %44, align 8, !tbaa !13
  %72 = getelementptr inbounds double, ptr %71, i64 %63
  %73 = load double, ptr %72, align 8, !tbaa !14
  %74 = getelementptr inbounds double, ptr %71, i64 %66
  %75 = load double, ptr %74, align 8, !tbaa !14
  %76 = fsub double %73, %75
  %77 = fdiv double %70, %76
  %78 = load ptr, ptr %58, align 8, !tbaa !13
  %79 = getelementptr inbounds double, ptr %78, i64 %.094
  store double %77, ptr %79, align 8, !tbaa !14
  %exitcond98.not = icmp eq i64 %63, %35
  br i1 %exitcond98.not, label %._crit_edge97, label %61, !llvm.loop !16

._crit_edge97:                                    ; preds = %61, %31
  %80 = load ptr, ptr %58, align 8, !tbaa !13
  %81 = load double, ptr %80, align 8, !tbaa !14
  %82 = getelementptr inbounds double, ptr %80, i64 %35
  store double %81, ptr %82, align 8, !tbaa !14
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %2, ptr noundef %5, ptr noundef %6)
  store i8 1, ptr %5, align 8, !tbaa !18
  br label %147

83:                                               ; preds = %30
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %2, ptr noundef %6)
  %84 = add nsw i64 %2, -2
  %.not91 = icmp slt i64 %2, 3
  br i1 %.not91, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %83
  %.pre = add nsw i64 %2, -1
  br label %._crit_edge

.lr.ph:                                           ; preds = %83
  %85 = fsub double 1.000000e+00, %4
  %86 = getelementptr inbounds i8, ptr %10, i64 56
  %87 = getelementptr inbounds i8, ptr %9, i64 56
  %88 = getelementptr inbounds i8, ptr %11, i64 56
  %89 = add nsw i64 %2, -1
  br label %90

90:                                               ; preds = %.lr.ph, %90
  %.192 = phi i64 [ 1, %.lr.ph ], [ %92, %90 ]
  %91 = load ptr, ptr %86, align 8, !tbaa !13
  %92 = add nuw nsw i64 %.192, 1
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !14
  %95 = add nsw i64 %.192, -1
  %96 = getelementptr inbounds double, ptr %91, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !14
  %98 = fsub double %94, %97
  %99 = fmul double %85, %98
  %100 = load ptr, ptr %87, align 8, !tbaa !13
  %101 = getelementptr inbounds double, ptr %100, i64 %92
  %102 = load double, ptr %101, align 8, !tbaa !14
  %103 = getelementptr inbounds double, ptr %100, i64 %95
  %104 = load double, ptr %103, align 8, !tbaa !14
  %105 = fsub double %102, %104
  %106 = fdiv double %99, %105
  %107 = load ptr, ptr %88, align 8, !tbaa !13
  %108 = getelementptr inbounds double, ptr %107, i64 %.192
  store double %106, ptr %108, align 8, !tbaa !14
  %exitcond.not = icmp eq i64 %92, %89
  br i1 %exitcond.not, label %._crit_edge, label %90, !llvm.loop !20

._crit_edge:                                      ; preds = %90, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %89, %90 ]
  %109 = getelementptr inbounds i8, ptr %10, i64 56
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load double, ptr %111, align 8, !tbaa !14
  %113 = load double, ptr %110, align 8, !tbaa !14
  %114 = fsub double %112, %113
  %115 = fmul double %114, 2.000000e+00
  %116 = getelementptr inbounds i8, ptr %9, i64 56
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load double, ptr %118, align 8, !tbaa !14
  %120 = load double, ptr %117, align 8, !tbaa !14
  %121 = fsub double %119, %120
  %122 = fdiv double %115, %121
  %123 = getelementptr inbounds i8, ptr %11, i64 56
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = load double, ptr %125, align 8, !tbaa !14
  %127 = fsub double %122, %126
  store double %127, ptr %124, align 8, !tbaa !14
  %128 = load ptr, ptr %109, align 8, !tbaa !13
  %129 = getelementptr inbounds double, ptr %128, i64 %.pre-phi
  %130 = load double, ptr %129, align 8, !tbaa !14
  %131 = getelementptr inbounds double, ptr %128, i64 %84
  %132 = load double, ptr %131, align 8, !tbaa !14
  %133 = fsub double %130, %132
  %134 = fmul double %133, 2.000000e+00
  %135 = load ptr, ptr %116, align 8, !tbaa !13
  %136 = getelementptr inbounds double, ptr %135, i64 %.pre-phi
  %137 = load double, ptr %136, align 8, !tbaa !14
  %138 = getelementptr inbounds double, ptr %135, i64 %84
  %139 = load double, ptr %138, align 8, !tbaa !14
  %140 = fsub double %137, %139
  %141 = fdiv double %134, %140
  %142 = load ptr, ptr %123, align 8, !tbaa !13
  %143 = getelementptr inbounds double, ptr %142, i64 %84
  %144 = load double, ptr %143, align 8, !tbaa !14
  %145 = fsub double %141, %144
  %146 = getelementptr inbounds double, ptr %142, i64 %.pre-phi
  store double %145, ptr %146, align 8, !tbaa !14
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %2, ptr noundef %5, ptr noundef %6)
  br label %147

147:                                              ; preds = %._crit_edge97, %._crit_edge, %29, %27
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %6)
  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 32, ptr nonnull %8) #4
  ret void
}

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN11alglib_impl19spline1dinterpolantE", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !6, i64 32, !6, i64 96}
!20 = distinct !{!20, !17}


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