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

@.str.200 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.212 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.213 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.214 = 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_impl17spline1dconvcubicEPNS_9ae_vectorES1_lldldS1_lS1_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_vectorES1_PNS_8ae_stateEb(ptr noundef %24, ptr noundef %42, ptr noundef %43, i1 noundef zeroext true)
  store ptr %24, ptr %12, align 8, !tbaa !5
  %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_vectorES1_PNS_8ae_stateEb(ptr noundef %25, ptr noundef %44, ptr noundef %45, i1 noundef zeroext true)
  store ptr %25, ptr %13, align 8, !tbaa !5
  %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_vectorES1_PNS_8ae_stateEb(ptr noundef %26, ptr noundef %46, ptr noundef %47, i1 noundef zeroext true)
  store ptr %26, ptr %19, align 8, !tbaa !5
  %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.200, 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.201, 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.202, 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.203, 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.204, 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.205, ptr noundef %127)
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 0
  %130 = load i64, ptr %129, align 8, !tbaa !13
  %131 = load i64, ptr %14, align 8, !tbaa !9
  %132 = icmp sge i64 %130, %131
  %133 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %132, ptr noundef @.str.206, ptr noundef %133)
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %134, i32 0, i32 0
  %136 = load i64, ptr %135, align 8, !tbaa !13
  %137 = load i64, ptr %14, align 8, !tbaa !9
  %138 = icmp sge i64 %136, %137
  %139 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %138, ptr noundef @.str.207, ptr noundef %139)
  %140 = load i64, ptr %20, align 8, !tbaa !9
  %141 = icmp sge i64 %140, 2
  %142 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %141, ptr noundef @.str.208, ptr noundef %142)
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !13
  %146 = load i64, ptr %20, align 8, !tbaa !9
  %147 = icmp sge i64 %145, %146
  %148 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %147, ptr noundef @.str.209, ptr noundef %148)
  %149 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %149, ptr %38, align 8, !tbaa !9
  %150 = load i64, ptr %15, align 8, !tbaa !9
  %151 = icmp eq i64 %150, -1
  br i1 %151, label %152, label %155

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

155:                                              ; preds = %152, %124
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = load i64, ptr %14, align 8, !tbaa !9
  %158 = load ptr, ptr %22, align 8, !tbaa !5
  %159 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %156, 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.210, ptr noundef %160)
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = load i64, ptr %38, align 8, !tbaa !9
  %163 = load ptr, ptr %22, align 8, !tbaa !5
  %164 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %161, i64 noundef %162, ptr noundef %163)
  %165 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %164, ptr noundef @.str.211, ptr noundef %165)
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  %167 = load i64, ptr %20, align 8, !tbaa !9
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  %169 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %166, 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.212, ptr noundef %170)
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  %173 = load i64, ptr %14, align 8, !tbaa !9
  %174 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %171, ptr noundef %172, ptr noundef %35, i64 noundef %173, ptr noundef %174)
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = load i64, ptr %14, align 8, !tbaa !9
  %177 = load ptr, ptr %22, align 8, !tbaa !5
  %178 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %175, i64 noundef %176, ptr noundef %177)
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %178, ptr noundef @.str.213, ptr noundef %179)
  %180 = load i64, ptr %14, align 8, !tbaa !9
  %181 = load i64, ptr %20, align 8, !tbaa !9
  %182 = load ptr, ptr %22, align 8, !tbaa !5
  %183 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %180, i64 noundef %181, ptr noundef %182)
  %184 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %32, i64 noundef %183, ptr noundef %184)
  %185 = load i64, ptr %17, align 8, !tbaa !9
  %186 = icmp eq i64 %185, -1
  br i1 %186, label %187, label %226

187:                                              ; preds = %155
  %188 = load i64, ptr %15, align 8, !tbaa !9
  %189 = icmp eq i64 %188, -1
  br i1 %189, label %190, label %226

190:                                              ; preds = %187
  store i64 0, ptr %37, align 8, !tbaa !9
  br label %191

191:                                              ; preds = %222, %190
  %192 = load i64, ptr %37, align 8, !tbaa !9
  %193 = load i64, ptr %20, align 8, !tbaa !9
  %194 = sub nsw i64 %193, 1
  %195 = icmp sle i64 %192, %194
  br i1 %195, label %196, label %225

196:                                              ; preds = %191
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !17
  %200 = load i64, ptr %37, align 8, !tbaa !9
  %201 = getelementptr inbounds double, ptr %199, i64 %200
  %202 = load double, ptr %201, align 8, !tbaa !11
  store double %202, ptr %39, align 8, !tbaa !11
  %203 = load ptr, ptr %12, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %203, i32 0, i32 4
  %205 = load ptr, ptr %204, align 8, !tbaa !17
  %206 = getelementptr inbounds double, ptr %205, i64 0
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %208, i32 0, i32 4
  %210 = load ptr, ptr %209, align 8, !tbaa !17
  %211 = load i64, ptr %14, align 8, !tbaa !9
  %212 = sub nsw i64 %211, 1
  %213 = getelementptr inbounds double, ptr %210, i64 %212
  %214 = load double, ptr %213, align 8, !tbaa !11
  %215 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl13apperiodicmapEPdddS0_PNS_8ae_stateE(ptr noundef %39, double noundef %207, double noundef %214, ptr noundef %40, ptr noundef %215)
  %216 = load double, ptr %39, align 8, !tbaa !11
  %217 = load ptr, ptr %19, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %217, i32 0, i32 4
  %219 = load ptr, ptr %218, align 8, !tbaa !17
  %220 = load i64, ptr %37, align 8, !tbaa !9
  %221 = getelementptr inbounds double, ptr %219, i64 %220
  store double %216, ptr %221, align 8, !tbaa !11
  br label %222

222:                                              ; preds = %196
  %223 = load i64, ptr %37, align 8, !tbaa !9
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %37, align 8, !tbaa !9
  br label %191, !llvm.loop !18

225:                                              ; preds = %191
  br label %226

226:                                              ; preds = %225, %187, %155
  %227 = load ptr, ptr %19, align 8, !tbaa !5
  %228 = load i64, ptr %20, align 8, !tbaa !9
  %229 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %227, ptr noundef %32, ptr noundef %36, i64 noundef %228, ptr noundef %229)
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  %232 = load i64, ptr %14, align 8, !tbaa !9
  %233 = load i64, ptr %15, align 8, !tbaa !9
  %234 = load double, ptr %16, align 8, !tbaa !11
  %235 = load i64, ptr %17, align 8, !tbaa !9
  %236 = load double, ptr %18, align 8, !tbaa !11
  %237 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_implL38spline1d_spline1dgriddiffcubicinternalEPNS_9ae_vectorES1_lldldS1_S1_S1_S1_S1_S1_PNS_8ae_stateE(ptr noundef %230, ptr noundef %231, i64 noundef %232, i64 noundef %233, double noundef %234, i64 noundef %235, double noundef %236, ptr noundef %31, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %32, ptr noundef %237)
  %238 = load ptr, ptr %12, align 8, !tbaa !5
  %239 = load ptr, ptr %13, align 8, !tbaa !5
  %240 = load i64, ptr %14, align 8, !tbaa !9
  %241 = load ptr, ptr %19, align 8, !tbaa !5
  %242 = load i64, ptr %20, align 8, !tbaa !9
  %243 = load ptr, ptr %21, align 8, !tbaa !5
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl24spline1dconvdiffinternalEPNS_9ae_vectorES1_S1_lS1_lS1_bS1_bS1_bPNS_8ae_stateE(ptr noundef %238, ptr noundef %239, ptr noundef %31, i64 noundef %240, ptr noundef %241, i64 noundef %242, ptr noundef %243, i1 noundef zeroext true, ptr noundef %33, i1 noundef zeroext false, ptr noundef %34, i1 noundef zeroext false, ptr noundef %244)
  %245 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 0
  %246 = load i64, ptr %245, align 8, !tbaa !13
  %247 = load i64, ptr %20, align 8, !tbaa !9
  %248 = icmp sge i64 %246, %247
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %248, ptr noundef @.str.214, ptr noundef %249)
  store i64 0, ptr %37, align 8, !tbaa !9
  br label %250

250:                                              ; preds = %270, %226
  %251 = load i64, ptr %37, align 8, !tbaa !9
  %252 = load i64, ptr %20, align 8, !tbaa !9
  %253 = sub nsw i64 %252, 1
  %254 = icmp sle i64 %251, %253
  br i1 %254, label %255, label %273

255:                                              ; preds = %250
  %256 = load ptr, ptr %21, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %256, i32 0, i32 4
  %258 = load ptr, ptr %257, align 8, !tbaa !17
  %259 = load i64, ptr %37, align 8, !tbaa !9
  %260 = getelementptr inbounds double, ptr %258, i64 %259
  %261 = load double, ptr %260, align 8, !tbaa !11
  %262 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %263 = load ptr, ptr %262, align 8, !tbaa !17
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %36, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !17
  %266 = load i64, ptr %37, align 8, !tbaa !9
  %267 = getelementptr inbounds i64, ptr %265, i64 %266
  %268 = load i64, ptr %267, align 8, !tbaa !9
  %269 = getelementptr inbounds double, ptr %263, i64 %268
  store double %261, ptr %269, align 8, !tbaa !11
  br label %270

270:                                              ; preds = %255
  %271 = load i64, ptr %37, align 8, !tbaa !9
  %272 = add nsw i64 %271, 1
  store i64 %272, ptr %37, align 8, !tbaa !9
  br label %250, !llvm.loop !20

273:                                              ; preds = %250
  %274 = load ptr, ptr %21, align 8, !tbaa !5
  %275 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %274, i32 0, i32 4
  %276 = load ptr, ptr %275, align 8, !tbaa !17
  %277 = getelementptr inbounds double, ptr %276, i64 0
  %278 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %279 = load ptr, ptr %278, align 8, !tbaa !17
  %280 = getelementptr inbounds double, ptr %279, i64 0
  %281 = load i64, ptr %20, align 8, !tbaa !9
  %282 = sub nsw i64 %281, 1
  %283 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %282)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %277, i64 noundef 1, ptr noundef %280, i64 noundef 1, i64 noundef %283)
  %284 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %284)
  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_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL38spline1d_spline1dgriddiffcubicinternalEPNS_9ae_vectorES1_lldldS1_S1_S1_S1_S1_S1_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_impl24spline1dconvdiffinternalEPNS_9ae_vectorES1_S1_lS1_lS1_bS1_bS1_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.200 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.212 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.213 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.214 = 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_impl17spline1dconvcubicEPNS_9ae_vectorES1_lldldS1_lS1_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_vectorES1_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_vectorES1_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_vectorES1_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.200, 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.201, 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.202, 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.203, 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.204, 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.205, 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.206, 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.207, ptr noundef %10)
  %52 = icmp sgt i64 %8, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef nonnull @.str.208, 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.209, ptr noundef %10)
  %55 = sext i1 %28 to i64
  %spec.select144 = add nsw i64 %55, %2
  %56 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.210, ptr noundef %10)
  %57 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %14, i64 noundef %spec.select144, ptr noundef %10)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef nonnull @.str.211, ptr noundef %10)
  %58 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.212, 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_impl11aredistinctEPNS_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.213, 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.not145 = icmp sgt i64 %8, 0
  %or.cond = and i1 %or.cond9, %.not.not145
  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
  %.0139146 = phi i64 [ 0, %.lr.ph ], [ %75, %63 ]
  %64 = load ptr, ptr %61, align 8, !tbaa !13
  %65 = getelementptr inbounds double, ptr %64, i64 %.0139146
  %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 %.0139146
  store double %72, ptr %74, align 8, !tbaa !14
  %75 = add nuw nsw i64 %.0139146, 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_implL38spline1d_spline1dgriddiffcubicinternalEPNS_9ae_vectorES1_lldldS1_S1_S1_S1_S1_S1_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_impl24spline1dconvdiffinternalEPNS_9ae_vectorES1_S1_lS1_lS1_bS1_bS1_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.214, ptr noundef %10)
  br i1 %.not.not145, label %.lr.ph149, label %._crit_edge

.lr.ph149:                                        ; 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.ph149.new

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

82:                                               ; preds = %82, %.lr.ph149.new
  %.1148 = phi i64 [ 0, %.lr.ph149.new ], [ %100, %82 ]
  %niter = phi i64 [ 0, %.lr.ph149.new ], [ %niter.next.1, %82 ]
  %83 = load ptr, ptr %78, align 8, !tbaa !13
  %84 = getelementptr inbounds double, ptr %83, i64 %.1148
  %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 %.1148
  %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 %.1148, 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 %.1148, 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.ph149
  %.1148.unr = phi i64 [ 0, %.lr.ph149 ], [ %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 %.1148.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 %.1148.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_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL38spline1d_spline1dgriddiffcubicinternalEPNS_9ae_vectorES1_lldldS1_S1_S1_S1_S1_S1_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_impl24spline1dconvdiffinternalEPNS_9ae_vectorES1_S1_lS1_lS1_bS1_bS1_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