; 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.245 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.248 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.253 = 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_impl19spline1dbuildlinearEPNS_9ae_vectorES1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl18spline1dbuildcubicEPNS_9ae_vectorES1_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_impl23spline1dbuildcatmullromEPNS_9ae_vectorES1_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_vectorES1_PNS_8ae_stateEb(ptr noundef %16, ptr noundef %22, ptr noundef %23, i1 noundef zeroext true)
  store ptr %16, ptr %8, align 8, !tbaa !5
  %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_vectorES1_PNS_8ae_stateEb(ptr noundef %17, ptr noundef %24, ptr noundef %25, i1 noundef zeroext true)
  store ptr %17, ptr %9, align 8, !tbaa !5
  %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.245, 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.246, 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.247, 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.248, ptr noundef %44)
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %45, i32 0, i32 0
  %47 = load i64, ptr %46, align 8, !tbaa !13
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = icmp sge i64 %47, %48
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.249, ptr noundef %50)
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !13
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = icmp sge i64 %53, %54
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %55, ptr noundef @.str.250, ptr noundef %56)
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i64, ptr %10, align 8, !tbaa !9
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %57, i64 noundef %58, ptr noundef %59)
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %60, ptr noundef @.str.251, ptr noundef %61)
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %62, i64 noundef %63, ptr noundef %64)
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.252, ptr noundef %66)
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i64, ptr %10, align 8, !tbaa !9
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL23spline1d_heapsortpointsEPNS_9ae_vectorES1_lPNS_8ae_stateE(ptr noundef %67, ptr noundef %68, i64 noundef %69, ptr noundef %70)
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %71, i64 noundef %72, ptr noundef %73)
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %74, ptr noundef @.str.253, ptr noundef %75)
  %76 = load i64, ptr %10, align 8, !tbaa !9
  %77 = icmp eq i64 %76, 2
  br i1 %77, label %78, label %88

78:                                               ; preds = %36
  %79 = load i64, ptr %11, align 8, !tbaa !9
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %78
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load i64, ptr %10, align 8, !tbaa !9
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl19spline1dbuildlinearEPNS_9ae_vectorES1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %82, ptr noundef %83, i64 noundef %84, ptr noundef %85, ptr noundef %86)
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %87)
  store i32 1, ptr %20, align 4
  br label %361

88:                                               ; preds = %78, %36
  %89 = load i64, ptr %10, align 8, !tbaa !9
  %90 = icmp eq i64 %89, 2
  br i1 %90, label %91, label %101

91:                                               ; preds = %88
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = icmp eq i64 %92, -1
  br i1 %93, label %94, label %101

94:                                               ; preds = %91
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = load i64, ptr %10, align 8, !tbaa !9
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildcubicEPNS_9ae_vectorES1_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %95, ptr noundef %96, i64 noundef %97, i64 noundef -1, double noundef 0.000000e+00, i64 noundef -1, double noundef 0.000000e+00, ptr noundef %98, ptr noundef %99)
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %100)
  store i32 1, ptr %20, align 4
  br label %361

101:                                              ; preds = %91, %88
  %102 = load i64, ptr %11, align 8, !tbaa !9
  %103 = icmp eq i64 %102, -1
  br i1 %103, label %104, label %227

104:                                              ; preds = %101
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = getelementptr inbounds double, ptr %107, i64 0
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  %113 = load i64, ptr %10, align 8, !tbaa !9
  %114 = sub nsw i64 %113, 1
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  store double %109, ptr %115, align 8, !tbaa !11
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %116, ptr noundef %117)
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !17
  %121 = getelementptr inbounds double, ptr %120, i64 1
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = load i64, ptr %10, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 2
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = fsub double %122, %129
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = getelementptr inbounds double, ptr %133, i64 1
  %135 = load double, ptr %134, align 8, !tbaa !11
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %136, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !17
  %139 = getelementptr inbounds double, ptr %138, i64 0
  %140 = load double, ptr %139, align 8, !tbaa !11
  %141 = fsub double %135, %140
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !17
  %145 = load i64, ptr %10, align 8, !tbaa !9
  %146 = sub nsw i64 %145, 1
  %147 = getelementptr inbounds double, ptr %144, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = fadd double %141, %148
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %150, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !17
  %153 = load i64, ptr %10, align 8, !tbaa !9
  %154 = sub nsw i64 %153, 2
  %155 = getelementptr inbounds double, ptr %152, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !11
  %157 = fsub double %149, %156
  %158 = fmul double 2.000000e+00, %157
  %159 = fdiv double %130, %158
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !17
  %162 = getelementptr inbounds double, ptr %161, i64 0
  store double %159, ptr %162, align 8, !tbaa !11
  store i64 1, ptr %19, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %207, %104
  %164 = load i64, ptr %19, align 8, !tbaa !9
  %165 = load i64, ptr %10, align 8, !tbaa !9
  %166 = sub nsw i64 %165, 2
  %167 = icmp sle i64 %164, %166
  br i1 %167, label %168, label %210

168:                                              ; preds = %163
  %169 = load double, ptr %12, align 8, !tbaa !11
  %170 = fsub double 1.000000e+00, %169
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %171, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !17
  %174 = load i64, ptr %19, align 8, !tbaa !9
  %175 = add nsw i64 %174, 1
  %176 = getelementptr inbounds double, ptr %173, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !17
  %181 = load i64, ptr %19, align 8, !tbaa !9
  %182 = sub nsw i64 %181, 1
  %183 = getelementptr inbounds double, ptr %180, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = fsub double %177, %184
  %186 = fmul double %170, %185
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %187, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !17
  %190 = load i64, ptr %19, align 8, !tbaa !9
  %191 = add nsw i64 %190, 1
  %192 = getelementptr inbounds double, ptr %189, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %194, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !17
  %197 = load i64, ptr %19, align 8, !tbaa !9
  %198 = sub nsw i64 %197, 1
  %199 = getelementptr inbounds double, ptr %196, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !11
  %201 = fsub double %193, %200
  %202 = fdiv double %186, %201
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %204 = load ptr, ptr %203, align 8, !tbaa !17
  %205 = load i64, ptr %19, align 8, !tbaa !9
  %206 = getelementptr inbounds double, ptr %204, i64 %205
  store double %202, ptr %206, align 8, !tbaa !11
  br label %207

207:                                              ; preds = %168
  %208 = load i64, ptr %19, align 8, !tbaa !9
  %209 = add nsw i64 %208, 1
  store i64 %209, ptr %19, align 8, !tbaa !9
  br label %163, !llvm.loop !18

210:                                              ; preds = %163
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !17
  %213 = getelementptr inbounds double, ptr %212, i64 0
  %214 = load double, ptr %213, align 8, !tbaa !11
  %215 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %216 = load ptr, ptr %215, align 8, !tbaa !17
  %217 = load i64, ptr %10, align 8, !tbaa !9
  %218 = sub nsw i64 %217, 1
  %219 = getelementptr inbounds double, ptr %216, i64 %218
  store double %214, ptr %219, align 8, !tbaa !11
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = load i64, ptr %10, align 8, !tbaa !9
  %223 = load ptr, ptr %13, align 8, !tbaa !5
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %220, ptr noundef %221, ptr noundef %18, i64 noundef %222, ptr noundef %223, ptr noundef %224)
  %225 = load ptr, ptr %13, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.alglib_impl::spline1dinterpolant", ptr %225, i32 0, i32 0
  store i8 1, ptr %226, align 8, !tbaa !20
  br label %359

227:                                              ; preds = %101
  %228 = load i64, ptr %10, align 8, !tbaa !9
  %229 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %228, ptr noundef %229)
  store i64 1, ptr %19, align 8, !tbaa !9
  br label %230

230:                                              ; preds = %274, %227
  %231 = load i64, ptr %19, align 8, !tbaa !9
  %232 = load i64, ptr %10, align 8, !tbaa !9
  %233 = sub nsw i64 %232, 2
  %234 = icmp sle i64 %231, %233
  br i1 %234, label %235, label %277

235:                                              ; preds = %230
  %236 = load double, ptr %12, align 8, !tbaa !11
  %237 = fsub double 1.000000e+00, %236
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  %239 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %238, i32 0, i32 4
  %240 = load ptr, ptr %239, align 8, !tbaa !17
  %241 = load i64, ptr %19, align 8, !tbaa !9
  %242 = add nsw i64 %241, 1
  %243 = getelementptr inbounds double, ptr %240, i64 %242
  %244 = load double, ptr %243, align 8, !tbaa !11
  %245 = load ptr, ptr %9, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %245, i32 0, i32 4
  %247 = load ptr, ptr %246, align 8, !tbaa !17
  %248 = load i64, ptr %19, align 8, !tbaa !9
  %249 = sub nsw i64 %248, 1
  %250 = getelementptr inbounds double, ptr %247, i64 %249
  %251 = load double, ptr %250, align 8, !tbaa !11
  %252 = fsub double %244, %251
  %253 = fmul double %237, %252
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %254, i32 0, i32 4
  %256 = load ptr, ptr %255, align 8, !tbaa !17
  %257 = load i64, ptr %19, align 8, !tbaa !9
  %258 = add nsw i64 %257, 1
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  %260 = load double, ptr %259, align 8, !tbaa !11
  %261 = load ptr, ptr %8, align 8, !tbaa !5
  %262 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %261, i32 0, i32 4
  %263 = load ptr, ptr %262, align 8, !tbaa !17
  %264 = load i64, ptr %19, align 8, !tbaa !9
  %265 = sub nsw i64 %264, 1
  %266 = getelementptr inbounds double, ptr %263, i64 %265
  %267 = load double, ptr %266, align 8, !tbaa !11
  %268 = fsub double %260, %267
  %269 = fdiv double %253, %268
  %270 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %271 = load ptr, ptr %270, align 8, !tbaa !17
  %272 = load i64, ptr %19, align 8, !tbaa !9
  %273 = getelementptr inbounds double, ptr %271, i64 %272
  store double %269, ptr %273, align 8, !tbaa !11
  br label %274

274:                                              ; preds = %235
  %275 = load i64, ptr %19, align 8, !tbaa !9
  %276 = add nsw i64 %275, 1
  store i64 %276, ptr %19, align 8, !tbaa !9
  br label %230, !llvm.loop !22

277:                                              ; preds = %230
  %278 = load ptr, ptr %9, align 8, !tbaa !5
  %279 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %278, i32 0, i32 4
  %280 = load ptr, ptr %279, align 8, !tbaa !17
  %281 = getelementptr inbounds double, ptr %280, i64 1
  %282 = load double, ptr %281, align 8, !tbaa !11
  %283 = load ptr, ptr %9, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %283, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !17
  %286 = getelementptr inbounds double, ptr %285, i64 0
  %287 = load double, ptr %286, align 8, !tbaa !11
  %288 = fsub double %282, %287
  %289 = fmul double 2.000000e+00, %288
  %290 = load ptr, ptr %8, align 8, !tbaa !5
  %291 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %290, i32 0, i32 4
  %292 = load ptr, ptr %291, align 8, !tbaa !17
  %293 = getelementptr inbounds double, ptr %292, i64 1
  %294 = load double, ptr %293, align 8, !tbaa !11
  %295 = load ptr, ptr %8, align 8, !tbaa !5
  %296 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %295, i32 0, i32 4
  %297 = load ptr, ptr %296, align 8, !tbaa !17
  %298 = getelementptr inbounds double, ptr %297, i64 0
  %299 = load double, ptr %298, align 8, !tbaa !11
  %300 = fsub double %294, %299
  %301 = fdiv double %289, %300
  %302 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %303 = load ptr, ptr %302, align 8, !tbaa !17
  %304 = getelementptr inbounds double, ptr %303, i64 1
  %305 = load double, ptr %304, align 8, !tbaa !11
  %306 = fsub double %301, %305
  %307 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %308 = load ptr, ptr %307, align 8, !tbaa !17
  %309 = getelementptr inbounds double, ptr %308, i64 0
  store double %306, ptr %309, align 8, !tbaa !11
  %310 = load ptr, ptr %9, align 8, !tbaa !5
  %311 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %310, i32 0, i32 4
  %312 = load ptr, ptr %311, align 8, !tbaa !17
  %313 = load i64, ptr %10, align 8, !tbaa !9
  %314 = sub nsw i64 %313, 1
  %315 = getelementptr inbounds double, ptr %312, i64 %314
  %316 = load double, ptr %315, align 8, !tbaa !11
  %317 = load ptr, ptr %9, align 8, !tbaa !5
  %318 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %317, i32 0, i32 4
  %319 = load ptr, ptr %318, align 8, !tbaa !17
  %320 = load i64, ptr %10, align 8, !tbaa !9
  %321 = sub nsw i64 %320, 2
  %322 = getelementptr inbounds double, ptr %319, i64 %321
  %323 = load double, ptr %322, align 8, !tbaa !11
  %324 = fsub double %316, %323
  %325 = fmul double 2.000000e+00, %324
  %326 = load ptr, ptr %8, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %326, i32 0, i32 4
  %328 = load ptr, ptr %327, align 8, !tbaa !17
  %329 = load i64, ptr %10, align 8, !tbaa !9
  %330 = sub nsw i64 %329, 1
  %331 = getelementptr inbounds double, ptr %328, i64 %330
  %332 = load double, ptr %331, align 8, !tbaa !11
  %333 = load ptr, ptr %8, align 8, !tbaa !5
  %334 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %333, i32 0, i32 4
  %335 = load ptr, ptr %334, align 8, !tbaa !17
  %336 = load i64, ptr %10, align 8, !tbaa !9
  %337 = sub nsw i64 %336, 2
  %338 = getelementptr inbounds double, ptr %335, i64 %337
  %339 = load double, ptr %338, align 8, !tbaa !11
  %340 = fsub double %332, %339
  %341 = fdiv double %325, %340
  %342 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %343 = load ptr, ptr %342, align 8, !tbaa !17
  %344 = load i64, ptr %10, align 8, !tbaa !9
  %345 = sub nsw i64 %344, 2
  %346 = getelementptr inbounds double, ptr %343, i64 %345
  %347 = load double, ptr %346, align 8, !tbaa !11
  %348 = fsub double %341, %347
  %349 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %350 = load ptr, ptr %349, align 8, !tbaa !17
  %351 = load i64, ptr %10, align 8, !tbaa !9
  %352 = sub nsw i64 %351, 1
  %353 = getelementptr inbounds double, ptr %350, i64 %352
  store double %348, ptr %353, align 8, !tbaa !11
  %354 = load ptr, ptr %8, align 8, !tbaa !5
  %355 = load ptr, ptr %9, align 8, !tbaa !5
  %356 = load i64, ptr %10, align 8, !tbaa !9
  %357 = load ptr, ptr %13, align 8, !tbaa !5
  %358 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %354, ptr noundef %355, ptr noundef %18, i64 noundef %356, ptr noundef %357, ptr noundef %358)
  br label %359

359:                                              ; preds = %277, %210
  %360 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %360)
  store i32 0, ptr %20, align 4
  br label %361

361:                                              ; preds = %359, %94, %81
  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
  %362 = load i32, ptr %20, align 4
  switch i32 %362, label %364 [
    i32 0, label %363
    i32 1, label %363
  ]

363:                                              ; preds = %361, %361
  ret void

364:                                              ; preds = %361
  unreachable
}

; 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

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

; 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_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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.245 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.248 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.253 = 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_impl19spline1dbuildlinearEPNS_9ae_vectorES1_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_impl18spline1dbuildcubicEPNS_9ae_vectorES1_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_impl23spline1dbuildcatmullromEPNS_9ae_vectorES1_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_vectorES1_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_vectorES1_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.245, 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.246, 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.247, 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.248, 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.249, 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.250, ptr noundef %6)
  %23 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.251, ptr noundef %6)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.252, 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_impl11aredistinctEPNS_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.253, 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_impl19spline1dbuildlinearEPNS_9ae_vectorES1_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_impl18spline1dbuildcubicEPNS_9ae_vectorES1_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
  %.not129132 = icmp slt i64 %2, 3
  br i1 %.not129132, label %._crit_edge136, label %.lr.ph135

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

61:                                               ; preds = %.lr.ph135, %61
  %.0133 = phi i64 [ 1, %.lr.ph135 ], [ %63, %61 ]
  %62 = load ptr, ptr %32, align 8, !tbaa !13
  %63 = add nuw nsw i64 %.0133, 1
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !14
  %66 = add nsw i64 %.0133, -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 %.0133
  store double %77, ptr %79, align 8, !tbaa !14
  %exitcond137.not = icmp eq i64 %63, %35
  br i1 %exitcond137.not, label %._crit_edge136, label %61, !llvm.loop !16

._crit_edge136:                                   ; 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_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_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
  %.not130 = icmp slt i64 %2, 3
  br i1 %.not130, 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
  %.1131 = phi i64 [ 1, %.lr.ph ], [ %92, %90 ]
  %91 = load ptr, ptr %86, align 8, !tbaa !13
  %92 = add nuw nsw i64 %.1131, 1
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !14
  %95 = add nsw i64 %.1131, -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 %.1131
  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_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_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_edge136, %._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_impl20spline1dbuildhermiteEPNS_9ae_vectorES1_S1_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; 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_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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