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

@.str.298 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.299 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [35 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
define dso_local void @_ZN11alglib_impl17spline1dconvcubicEPKNS_9ae_vectorES2_lldldS2_lPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, double noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10) #3 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"struct.alglib_impl::ae_frame", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca %"struct.alglib_impl::ae_vector", align 8
  %26 = alloca %"struct.alglib_impl::ae_vector", align 8
  %27 = alloca %"struct.alglib_impl::ae_vector", align 8
  %28 = alloca %"struct.alglib_impl::ae_vector", align 8
  %29 = alloca %"struct.alglib_impl::ae_vector", align 8
  %30 = alloca %"struct.alglib_impl::ae_vector", align 8
  %31 = alloca %"struct.alglib_impl::ae_vector", align 8
  %32 = alloca %"struct.alglib_impl::ae_vector", align 8
  %33 = alloca %"struct.alglib_impl::ae_vector", align 8
  %34 = alloca %"struct.alglib_impl::ae_vector", align 8
  %35 = alloca %"struct.alglib_impl::ae_vector", align 8
  %36 = alloca %"struct.alglib_impl::ae_vector", align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i64 %2, ptr %14, align 8, !tbaa !9
  store i64 %3, ptr %15, align 8, !tbaa !9
  store double %4, ptr %16, align 8, !tbaa !11
  store i64 %5, ptr %17, align 8, !tbaa !9
  store double %6, ptr %18, align 8, !tbaa !11
  store ptr %7, ptr %19, align 8, !tbaa !5
  store i64 %8, ptr %20, align 8, !tbaa !9
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #4
  %41 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %41, ptr noundef %23)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %31, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %35, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 64, i1 false)
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %24, ptr noundef %42, ptr noundef %43, i1 noundef zeroext true)
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %25, ptr noundef %44, ptr noundef %45, i1 noundef zeroext true)
  %46 = load ptr, ptr %19, align 8, !tbaa !5
  %47 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %26, ptr noundef %46, ptr noundef %47, i1 noundef zeroext true)
  %48 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %48)
  %49 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %27, i64 noundef 0, i64 noundef 3, ptr noundef %49, i1 noundef zeroext true)
  %50 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %28, i64 noundef 0, i64 noundef 3, ptr noundef %50, i1 noundef zeroext true)
  %51 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %29, i64 noundef 0, i64 noundef 3, ptr noundef %51, i1 noundef zeroext true)
  %52 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %30, i64 noundef 0, i64 noundef 3, ptr noundef %52, i1 noundef zeroext true)
  %53 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %31, i64 noundef 0, i64 noundef 3, ptr noundef %53, i1 noundef zeroext true)
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %32, i64 noundef 0, i64 noundef 3, ptr noundef %54, i1 noundef zeroext true)
  %55 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %33, i64 noundef 0, i64 noundef 3, ptr noundef %55, i1 noundef zeroext true)
  %56 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %34, i64 noundef 0, i64 noundef 3, ptr noundef %56, i1 noundef zeroext true)
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %35, i64 noundef 0, i64 noundef 2, ptr noundef %57, i1 noundef zeroext true)
  %58 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %36, i64 noundef 0, i64 noundef 2, ptr noundef %58, i1 noundef zeroext true)
  %59 = load i64, ptr %15, align 8, !tbaa !9
  %60 = icmp eq i64 %59, -1
  br i1 %60, label %70, label %61

61:                                               ; preds = %11
  %62 = load i64, ptr %15, align 8, !tbaa !9
  %63 = icmp eq i64 %62, 0
  br i1 %63, label %70, label %64

64:                                               ; preds = %61
  %65 = load i64, ptr %15, align 8, !tbaa !9
  %66 = icmp eq i64 %65, 1
  br i1 %66, label %70, label %67

67:                                               ; preds = %64
  %68 = load i64, ptr %15, align 8, !tbaa !9
  %69 = icmp eq i64 %68, 2
  br label %70

70:                                               ; preds = %67, %64, %61, %11
  %71 = phi i1 [ true, %64 ], [ true, %61 ], [ true, %11 ], [ %69, %67 ]
  %72 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %71, ptr noundef @.str.298, ptr noundef %72)
  %73 = load i64, ptr %17, align 8, !tbaa !9
  %74 = icmp eq i64 %73, -1
  br i1 %74, label %84, label %75

75:                                               ; preds = %70
  %76 = load i64, ptr %17, align 8, !tbaa !9
  %77 = icmp eq i64 %76, 0
  br i1 %77, label %84, label %78

78:                                               ; preds = %75
  %79 = load i64, ptr %17, align 8, !tbaa !9
  %80 = icmp eq i64 %79, 1
  br i1 %80, label %84, label %81

81:                                               ; preds = %78
  %82 = load i64, ptr %17, align 8, !tbaa !9
  %83 = icmp eq i64 %82, 2
  br label %84

84:                                               ; preds = %81, %78, %75, %70
  %85 = phi i1 [ true, %78 ], [ true, %75 ], [ true, %70 ], [ %83, %81 ]
  %86 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %85, ptr noundef @.str.299, ptr noundef %86)
  %87 = load i64, ptr %17, align 8, !tbaa !9
  %88 = icmp eq i64 %87, -1
  br i1 %88, label %89, label %92

89:                                               ; preds = %84
  %90 = load i64, ptr %15, align 8, !tbaa !9
  %91 = icmp eq i64 %90, -1
  br i1 %91, label %100, label %92

92:                                               ; preds = %89, %84
  %93 = load i64, ptr %17, align 8, !tbaa !9
  %94 = icmp ne i64 %93, -1
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = load i64, ptr %15, align 8, !tbaa !9
  %97 = icmp ne i64 %96, -1
  br label %98

98:                                               ; preds = %95, %92
  %99 = phi i1 [ false, %92 ], [ %97, %95 ]
  br label %100

100:                                              ; preds = %98, %89
  %101 = phi i1 [ true, %89 ], [ %99, %98 ]
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %101, ptr noundef @.str.300, ptr noundef %102)
  %103 = load i64, ptr %15, align 8, !tbaa !9
  %104 = icmp eq i64 %103, 1
  br i1 %104, label %108, label %105

105:                                              ; preds = %100
  %106 = load i64, ptr %15, align 8, !tbaa !9
  %107 = icmp eq i64 %106, 2
  br i1 %107, label %108, label %113

108:                                              ; preds = %105, %100
  %109 = load double, ptr %16, align 8, !tbaa !11
  %110 = load ptr, ptr %22, align 8, !tbaa !5
  %111 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %109, ptr noundef %110)
  %112 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %111, ptr noundef @.str.301, ptr noundef %112)
  br label %113

113:                                              ; preds = %108, %105
  %114 = load i64, ptr %17, align 8, !tbaa !9
  %115 = icmp eq i64 %114, 1
  br i1 %115, label %119, label %116

116:                                              ; preds = %113
  %117 = load i64, ptr %17, align 8, !tbaa !9
  %118 = icmp eq i64 %117, 2
  br i1 %118, label %119, label %124

119:                                              ; preds = %116, %113
  %120 = load double, ptr %18, align 8, !tbaa !11
  %121 = load ptr, ptr %22, align 8, !tbaa !5
  %122 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %120, ptr noundef %121)
  %123 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %122, ptr noundef @.str.302, ptr noundef %123)
  br label %124

124:                                              ; preds = %119, %116
  %125 = load i64, ptr %14, align 8, !tbaa !9
  %126 = icmp sge i64 %125, 2
  %127 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %126, ptr noundef @.str.303, ptr noundef %127)
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 0
  %129 = load i64, ptr %128, align 8, !tbaa !13
  %130 = load i64, ptr %14, align 8, !tbaa !9
  %131 = icmp sge i64 %129, %130
  %132 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %131, ptr noundef @.str.304, ptr noundef %132)
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %25, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !13
  %135 = load i64, ptr %14, align 8, !tbaa !9
  %136 = icmp sge i64 %134, %135
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %136, ptr noundef @.str.305, ptr noundef %137)
  %138 = load i64, ptr %20, align 8, !tbaa !9
  %139 = icmp sge i64 %138, 2
  %140 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %139, ptr noundef @.str.306, ptr noundef %140)
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 0
  %142 = load i64, ptr %141, align 8, !tbaa !13
  %143 = load i64, ptr %20, align 8, !tbaa !9
  %144 = icmp sge i64 %142, %143
  %145 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %144, ptr noundef @.str.307, ptr noundef %145)
  %146 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %146, ptr %38, align 8, !tbaa !9
  %147 = load i64, ptr %15, align 8, !tbaa !9
  %148 = icmp eq i64 %147, -1
  br i1 %148, label %149, label %152

149:                                              ; preds = %124
  %150 = load i64, ptr %14, align 8, !tbaa !9
  %151 = sub nsw i64 %150, 1
  store i64 %151, ptr %38, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %149, %124
  %153 = load i64, ptr %14, align 8, !tbaa !9
  %154 = load ptr, ptr %22, align 8, !tbaa !5
  %155 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef %153, ptr noundef %154)
  %156 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %155, ptr noundef @.str.308, ptr noundef %156)
  %157 = load i64, ptr %38, align 8, !tbaa !9
  %158 = load ptr, ptr %22, align 8, !tbaa !5
  %159 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %157, ptr noundef %158)
  %160 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %159, ptr noundef @.str.309, ptr noundef %160)
  %161 = load i64, ptr %20, align 8, !tbaa !9
  %162 = load ptr, ptr %22, align 8, !tbaa !5
  %163 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %26, i64 noundef %161, ptr noundef %162)
  %164 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %163, ptr noundef @.str.310, ptr noundef %164)
  %165 = load i64, ptr %14, align 8, !tbaa !9
  %166 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %24, ptr noundef %25, ptr noundef %35, i64 noundef %165, ptr noundef %166)
  %167 = load i64, ptr %14, align 8, !tbaa !9
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  %169 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef %167, ptr noundef %168)
  %170 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %169, ptr noundef @.str.311, ptr noundef %170)
  %171 = load i64, ptr %14, align 8, !tbaa !9
  %172 = load i64, ptr %20, align 8, !tbaa !9
  %173 = load ptr, ptr %22, align 8, !tbaa !5
  %174 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %171, i64 noundef %172, ptr noundef %173)
  %175 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %32, i64 noundef %174, ptr noundef %175)
  %176 = load i64, ptr %17, align 8, !tbaa !9
  %177 = icmp eq i64 %176, -1
  br i1 %177, label %178, label %213

178:                                              ; preds = %152
  %179 = load i64, ptr %15, align 8, !tbaa !9
  %180 = icmp eq i64 %179, -1
  br i1 %180, label %181, label %213

181:                                              ; preds = %178
  store i64 0, ptr %37, align 8, !tbaa !9
  br label %182

182:                                              ; preds = %209, %181
  %183 = load i64, ptr %37, align 8, !tbaa !9
  %184 = load i64, ptr %20, align 8, !tbaa !9
  %185 = sub nsw i64 %184, 1
  %186 = icmp sle i64 %183, %185
  br i1 %186, label %187, label %212

187:                                              ; preds = %182
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %189 = load ptr, ptr %188, align 8, !tbaa !17
  %190 = load i64, ptr %37, align 8, !tbaa !9
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  %192 = load double, ptr %191, align 8, !tbaa !11
  store double %192, ptr %39, align 8, !tbaa !11
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !17
  %195 = getelementptr inbounds double, ptr %194, i64 0
  %196 = load double, ptr %195, align 8, !tbaa !11
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !17
  %199 = load i64, ptr %14, align 8, !tbaa !9
  %200 = sub nsw i64 %199, 1
  %201 = getelementptr inbounds double, ptr %198, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !11
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl13apperiodicmapEPdddS0_PNS_8ae_stateE(ptr noundef %39, double noundef %196, double noundef %202, ptr noundef %40, ptr noundef %203)
  %204 = load double, ptr %39, align 8, !tbaa !11
  %205 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %206 = load ptr, ptr %205, align 8, !tbaa !17
  %207 = load i64, ptr %37, align 8, !tbaa !9
  %208 = getelementptr inbounds double, ptr %206, i64 %207
  store double %204, ptr %208, align 8, !tbaa !11
  br label %209

209:                                              ; preds = %187
  %210 = load i64, ptr %37, align 8, !tbaa !9
  %211 = add nsw i64 %210, 1
  store i64 %211, ptr %37, align 8, !tbaa !9
  br label %182, !llvm.loop !18

212:                                              ; preds = %182
  br label %213

213:                                              ; preds = %212, %178, %152
  %214 = load i64, ptr %20, align 8, !tbaa !9
  %215 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %26, ptr noundef %32, ptr noundef %36, i64 noundef %214, ptr noundef %215)
  %216 = load i64, ptr %14, align 8, !tbaa !9
  %217 = load i64, ptr %15, align 8, !tbaa !9
  %218 = load double, ptr %16, align 8, !tbaa !11
  %219 = load i64, ptr %17, align 8, !tbaa !9
  %220 = load double, ptr %18, align 8, !tbaa !11
  %221 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl29spline1dgriddiffcubicinternalEPKNS_9ae_vectorEPS0_lldldS3_S3_S3_S3_S3_S3_PNS_8ae_stateE(ptr noundef %24, ptr noundef %25, i64 noundef %216, i64 noundef %217, double noundef %218, i64 noundef %219, double noundef %220, ptr noundef %31, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %32, ptr noundef %221)
  %222 = load i64, ptr %14, align 8, !tbaa !9
  %223 = load i64, ptr %20, align 8, !tbaa !9
  %224 = load ptr, ptr %21, align 8, !tbaa !5
  %225 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl24spline1dconvdiffinternalEPKNS_9ae_vectorES2_S2_lS2_lPS0_bS3_bS3_bPNS_8ae_stateE(ptr noundef %24, ptr noundef %25, ptr noundef %31, i64 noundef %222, ptr noundef %26, i64 noundef %223, ptr noundef %224, i1 noundef zeroext true, ptr noundef %33, i1 noundef zeroext false, ptr noundef %34, i1 noundef zeroext false, ptr noundef %225)
  %226 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 0
  %227 = load i64, ptr %226, align 8, !tbaa !13
  %228 = load i64, ptr %20, align 8, !tbaa !9
  %229 = icmp sge i64 %227, %228
  %230 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %229, ptr noundef @.str.312, ptr noundef %230)
  store i64 0, ptr %37, align 8, !tbaa !9
  br label %231

231:                                              ; preds = %251, %213
  %232 = load i64, ptr %37, align 8, !tbaa !9
  %233 = load i64, ptr %20, align 8, !tbaa !9
  %234 = sub nsw i64 %233, 1
  %235 = icmp sle i64 %232, %234
  br i1 %235, label %236, label %254

236:                                              ; preds = %231
  %237 = load ptr, ptr %21, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %237, i32 0, i32 4
  %239 = load ptr, ptr %238, align 8, !tbaa !17
  %240 = load i64, ptr %37, align 8, !tbaa !9
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  %242 = load double, ptr %241, align 8, !tbaa !11
  %243 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %244 = load ptr, ptr %243, align 8, !tbaa !17
  %245 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %36, i32 0, i32 4
  %246 = load ptr, ptr %245, align 8, !tbaa !17
  %247 = load i64, ptr %37, align 8, !tbaa !9
  %248 = getelementptr inbounds i64, ptr %246, i64 %247
  %249 = load i64, ptr %248, align 8, !tbaa !9
  %250 = getelementptr inbounds double, ptr %244, i64 %249
  store double %242, ptr %250, align 8, !tbaa !11
  br label %251

251:                                              ; preds = %236
  %252 = load i64, ptr %37, align 8, !tbaa !9
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %37, align 8, !tbaa !9
  br label %231, !llvm.loop !20

254:                                              ; preds = %231
  %255 = load ptr, ptr %21, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %255, i32 0, i32 4
  %257 = load ptr, ptr %256, align 8, !tbaa !17
  %258 = getelementptr inbounds double, ptr %257, i64 0
  %259 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %260 = load ptr, ptr %259, align 8, !tbaa !17
  %261 = getelementptr inbounds double, ptr %260, i64 0
  %262 = load i64, ptr %20, align 8, !tbaa !9
  %263 = sub nsw i64 %262, 1
  %264 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %263)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %258, i64 noundef 1, ptr noundef %261, i64 noundef 1, i64 noundef %264)
  %265 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %265)
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #4
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

declare void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, 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_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

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

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

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

declare void @_ZN11alglib_impl13apperiodicmapEPdddS0_PNS_8ae_stateE(ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !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 = distinct !{!20, !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.298 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.299 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.300 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.301 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.302 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.303 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.304 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.305 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.306 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.307 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.308 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.309 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [35 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
define dso_local void @_ZN11alglib_impl17spline1dconvcubicEPKNS_9ae_vectorES2_lldldS2_lPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, double noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #3 {
  %12 = alloca %"struct.alglib_impl::ae_frame", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca %"struct.alglib_impl::ae_vector", align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %18) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %19) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %23) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %24) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %10, ptr noundef nonnull %12)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %18, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %23, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %24, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %25, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %13, ptr noundef %0, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %14, ptr noundef %1, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %15, ptr noundef %7, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %9)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %17, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %18, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %19, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %20, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %21, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %22, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %23, i64 noundef 0, i64 noundef 3, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %24, i64 noundef 0, i64 noundef 2, ptr noundef %10, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %25, i64 noundef 0, i64 noundef 2, ptr noundef %10, i1 noundef zeroext true)
  %28 = icmp eq i64 %3, -1
  %29 = add i64 %3, 1
  %spec.select = icmp ult i64 %29, 4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.298, ptr noundef %10)
  %30 = add i64 %5, 1
  %31 = icmp ult i64 %30, 4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef nonnull @.str.299, ptr noundef %10)
  %32 = and i64 %5, %3
  %or.cond9 = icmp eq i64 %32, -1
  br i1 %or.cond9, label %37, label %33

33:                                               ; preds = %11
  %34 = icmp ne i64 %5, -1
  %35 = icmp ne i64 %3, -1
  %36 = and i1 %35, %34
  br label %37

37:                                               ; preds = %11, %33
  %38 = phi i1 [ %36, %33 ], [ true, %11 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef nonnull @.str.300, ptr noundef %10)
  %39 = add i64 %3, -1
  %or.cond11 = icmp ult i64 %39, 2
  br i1 %or.cond11, label %40, label %42

40:                                               ; preds = %37
  %41 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %4, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef nonnull @.str.301, ptr noundef %10)
  br label %42

42:                                               ; preds = %37, %40
  %43 = add i64 %5, -1
  %or.cond13 = icmp ult i64 %43, 2
  br i1 %or.cond13, label %44, label %46

44:                                               ; preds = %42
  %45 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %6, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef nonnull @.str.302, ptr noundef %10)
  br label %46

46:                                               ; preds = %42, %44
  %47 = icmp sgt i64 %2, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef nonnull @.str.303, ptr noundef %10)
  %48 = load i64, ptr %13, align 8, !tbaa !5
  %49 = icmp sge i64 %48, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef nonnull @.str.304, ptr noundef %10)
  %50 = load i64, ptr %14, align 8, !tbaa !5
  %51 = icmp sge i64 %50, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef nonnull @.str.305, ptr noundef %10)
  %52 = icmp sgt i64 %8, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef nonnull @.str.306, ptr noundef %10)
  %53 = load i64, ptr %15, align 8, !tbaa !5
  %54 = icmp sge i64 %53, %8
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %54, ptr noundef nonnull @.str.307, ptr noundef %10)
  %55 = sext i1 %28 to i64
  %spec.select125 = add nsw i64 %55, %2
  %56 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %2, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef nonnull @.str.308, ptr noundef %10)
  %57 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %spec.select125, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef nonnull @.str.309, ptr noundef %10)
  %58 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %8, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef nonnull @.str.310, ptr noundef %10)
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %24, i64 noundef %2, ptr noundef %10)
  %59 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %2, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef nonnull @.str.311, ptr noundef %10)
  %60 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %2, i64 noundef %8, ptr noundef %10)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %21, i64 noundef %60, ptr noundef %10)
  %.not.not126 = icmp sgt i64 %8, 0
  %or.cond = and i1 %or.cond9, %.not.not126
  br i1 %or.cond, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %46
  %61 = getelementptr inbounds i8, ptr %15, i64 56
  %62 = getelementptr inbounds i8, ptr %13, i64 56
  br label %63

63:                                               ; preds = %.lr.ph, %63
  %.0120127 = phi i64 [ 0, %.lr.ph ], [ %75, %63 ]
  %64 = load ptr, ptr %61, align 8, !tbaa !13
  %65 = getelementptr inbounds double, ptr %64, i64 %.0120127
  %66 = load double, ptr %65, align 8, !tbaa !14
  store double %66, ptr %26, align 8, !tbaa !14
  %67 = load ptr, ptr %62, align 8, !tbaa !13
  %68 = load double, ptr %67, align 8, !tbaa !14
  %69 = getelementptr double, ptr %67, i64 %2
  %70 = getelementptr i8, ptr %69, i64 -8
  %71 = load double, ptr %70, align 8, !tbaa !14
  call void @_ZN11alglib_impl13apperiodicmapEPdddS0_PNS_8ae_stateE(ptr noundef nonnull %26, double noundef %68, double noundef %71, ptr noundef nonnull %27, ptr noundef %10)
  %72 = load double, ptr %26, align 8, !tbaa !14
  %73 = load ptr, ptr %61, align 8, !tbaa !13
  %74 = getelementptr inbounds double, ptr %73, i64 %.0120127
  store double %72, ptr %74, align 8, !tbaa !14
  %75 = add nuw nsw i64 %.0120127, 1
  %exitcond.not = icmp eq i64 %75, %8
  br i1 %exitcond.not, label %.loopexit, label %63, !llvm.loop !16

.loopexit:                                        ; preds = %63, %46
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %21, ptr noundef nonnull %25, i64 noundef %8, ptr noundef %10)
  call void @_ZN11alglib_impl29spline1dgriddiffcubicinternalEPKNS_9ae_vectorEPS0_lldldS3_S3_S3_S3_S3_S3_PNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %14, i64 noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, double noundef %6, ptr noundef nonnull %20, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %21, ptr noundef %10)
  call void @_ZN11alglib_impl24spline1dconvdiffinternalEPKNS_9ae_vectorES2_S2_lS2_lPS0_bS3_bS3_bPNS_8ae_stateE(ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %20, i64 noundef %2, ptr noundef nonnull %15, i64 noundef %8, ptr noundef %9, i1 noundef zeroext true, ptr noundef nonnull %22, i1 noundef zeroext false, ptr noundef nonnull %23, i1 noundef zeroext false, ptr noundef %10)
  %76 = load i64, ptr %21, align 8, !tbaa !5
  %77 = icmp sge i64 %76, %8
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %77, ptr noundef nonnull @.str.312, ptr noundef %10)
  br i1 %.not.not126, label %.lr.ph130, label %._crit_edge

.lr.ph130:                                        ; preds = %.loopexit
  %78 = getelementptr inbounds i8, ptr %9, i64 56
  %79 = getelementptr inbounds i8, ptr %21, i64 56
  %80 = getelementptr inbounds i8, ptr %25, i64 56
  %xtraiter = and i64 %8, 1
  %81 = icmp eq i64 %8, 1
  br i1 %81, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph130.new

.lr.ph130.new:                                    ; preds = %.lr.ph130
  %unroll_iter = and i64 %8, 9223372036854775806
  br label %82

82:                                               ; preds = %82, %.lr.ph130.new
  %.1129 = phi i64 [ 0, %.lr.ph130.new ], [ %100, %82 ]
  %niter = phi i64 [ 0, %.lr.ph130.new ], [ %niter.next.1, %82 ]
  %83 = load ptr, ptr %78, align 8, !tbaa !13
  %84 = getelementptr inbounds double, ptr %83, i64 %.1129
  %85 = load double, ptr %84, align 8, !tbaa !14
  %86 = load ptr, ptr %79, align 8, !tbaa !13
  %87 = load ptr, ptr %80, align 8, !tbaa !13
  %88 = getelementptr inbounds i64, ptr %87, i64 %.1129
  %89 = load i64, ptr %88, align 8, !tbaa !18
  %90 = getelementptr inbounds double, ptr %86, i64 %89
  store double %85, ptr %90, align 8, !tbaa !14
  %91 = or disjoint i64 %.1129, 1
  %92 = load ptr, ptr %78, align 8, !tbaa !13
  %93 = getelementptr inbounds double, ptr %92, i64 %91
  %94 = load double, ptr %93, align 8, !tbaa !14
  %95 = load ptr, ptr %79, align 8, !tbaa !13
  %96 = load ptr, ptr %80, align 8, !tbaa !13
  %97 = getelementptr inbounds i64, ptr %96, i64 %91
  %98 = load i64, ptr %97, align 8, !tbaa !18
  %99 = getelementptr inbounds double, ptr %95, i64 %98
  store double %94, ptr %99, align 8, !tbaa !14
  %100 = add nuw nsw i64 %.1129, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %82, !llvm.loop !19

._crit_edge.loopexit.unr-lcssa:                   ; preds = %82, %.lr.ph130
  %.1129.unr = phi i64 [ 0, %.lr.ph130 ], [ %100, %82 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %101 = load ptr, ptr %78, align 8, !tbaa !13
  %102 = getelementptr inbounds double, ptr %101, i64 %.1129.unr
  %103 = load double, ptr %102, align 8, !tbaa !14
  %104 = load ptr, ptr %79, align 8, !tbaa !13
  %105 = load ptr, ptr %80, align 8, !tbaa !13
  %106 = getelementptr inbounds i64, ptr %105, i64 %.1129.unr
  %107 = load i64, ptr %106, align 8, !tbaa !18
  %108 = getelementptr inbounds double, ptr %104, i64 %107
  store double %103, ptr %108, align 8, !tbaa !14
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.loopexit
  %109 = add nsw i64 %8, -1
  %110 = getelementptr inbounds i8, ptr %9, i64 56
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = getelementptr inbounds i8, ptr %21, i64 56
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %109)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %111, i64 noundef 1, ptr noundef %113, i64 noundef 1, i64 noundef %114)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %25) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %24) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(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_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, 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_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) 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_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

declare void @_ZN11alglib_impl13apperiodicmapEPdddS0_PNS_8ae_stateE(ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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


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