; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::pspline2interpolant" = type { i64, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::spline1dinterpolant", %"struct.alglib_impl::spline1dinterpolant" }
%"struct.alglib_impl::spline1dinterpolant" = type { i8, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.668 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.669 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.670 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.671 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.672 = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13pspline2buildEPKNS_9ae_matrixElllPNS_19pspline2interpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store i64 %2, ptr %9, align 8, !tbaa !9
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #4
  %16 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %16, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 64, i1 false)
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %14, ptr noundef %17, ptr noundef %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_pspline2interpolant_clearEPv(ptr noundef %19)
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %9, align 8, !tbaa !9
  %22 = icmp sge i64 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %6
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = icmp sle i64 %24, 2
  br label %26

26:                                               ; preds = %23, %6
  %27 = phi i1 [ false, %6 ], [ %25, %23 ]
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.668, ptr noundef %28)
  %29 = load i64, ptr %10, align 8, !tbaa !9
  %30 = icmp sge i64 %29, 0
  br i1 %30, label %31, label %34

31:                                               ; preds = %26
  %32 = load i64, ptr %10, align 8, !tbaa !9
  %33 = icmp sle i64 %32, 2
  br label %34

34:                                               ; preds = %31, %26
  %35 = phi i1 [ false, %26 ], [ %33, %31 ]
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.669, ptr noundef %36)
  %37 = load i64, ptr %9, align 8, !tbaa !9
  %38 = icmp eq i64 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %34
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = icmp sge i64 %40, 5
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef @.str.670, ptr noundef %42)
  br label %47

43:                                               ; preds = %34
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = icmp sge i64 %44, 2
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.671, ptr noundef %46)
  br label %47

47:                                               ; preds = %43, %39
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %49, i32 0, i32 0
  store i64 %48, ptr %50, align 8, !tbaa !11
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %51, i32 0, i32 1
  store i8 0, ptr %52, align 8, !tbaa !17
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %53, ptr noundef %54)
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = load i64, ptr %10, align 8, !tbaa !9
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_implL22parametric_pspline2parEPKNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %14, i64 noundef %55, i64 noundef %56, ptr noundef %58, ptr noundef %59)
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %60, i32 0, i32 2
  %62 = load i64, ptr %8, align 8, !tbaa !9
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %61, i64 noundef %62, ptr noundef %63)
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.672, ptr noundef %65)
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = icmp eq i64 %66, 0
  br i1 %67, label %68, label %107

68:                                               ; preds = %47
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = getelementptr inbounds double, ptr %70, i64 0
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %73 = load ptr, ptr %72, align 8, !tbaa !18
  %74 = getelementptr inbounds ptr, ptr %73, i64 0
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 0
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %78 = load i64, ptr %77, align 8, !tbaa !19
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  %81 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %80)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %71, i64 noundef 1, ptr noundef %76, i64 noundef %78, i64 noundef %81)
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %82, i32 0, i32 2
  %84 = load i64, ptr %8, align 8, !tbaa !9
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %85, i32 0, i32 3
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildakimaEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %83, ptr noundef %15, i64 noundef %84, ptr noundef %86, ptr noundef %87)
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  %90 = getelementptr inbounds double, ptr %89, i64 0
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  %93 = getelementptr inbounds ptr, ptr %92, i64 0
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i64 1
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %97 = load i64, ptr %96, align 8, !tbaa !19
  %98 = load i64, ptr %8, align 8, !tbaa !9
  %99 = sub nsw i64 %98, 1
  %100 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %99)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %90, i64 noundef 1, ptr noundef %95, i64 noundef %97, i64 noundef %100)
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %101, i32 0, i32 2
  %103 = load i64, ptr %8, align 8, !tbaa !9
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildakimaEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %102, ptr noundef %15, i64 noundef %103, ptr noundef %105, ptr noundef %106)
  br label %107

107:                                              ; preds = %68, %47
  %108 = load i64, ptr %9, align 8, !tbaa !9
  %109 = icmp eq i64 %108, 1
  br i1 %109, label %110, label %149

110:                                              ; preds = %107
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = getelementptr inbounds double, ptr %112, i64 0
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !18
  %116 = getelementptr inbounds ptr, ptr %115, i64 0
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds double, ptr %117, i64 0
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %120 = load i64, ptr %119, align 8, !tbaa !19
  %121 = load i64, ptr %8, align 8, !tbaa !9
  %122 = sub nsw i64 %121, 1
  %123 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %122)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %113, i64 noundef 1, ptr noundef %118, i64 noundef %120, i64 noundef %123)
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %124, i32 0, i32 2
  %126 = load i64, ptr %8, align 8, !tbaa !9
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %127, i32 0, i32 3
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %125, ptr noundef %15, i64 noundef %126, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %128, ptr noundef %129)
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = getelementptr inbounds double, ptr %131, i64 0
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !18
  %135 = getelementptr inbounds ptr, ptr %134, i64 0
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 1
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %139 = load i64, ptr %138, align 8, !tbaa !19
  %140 = load i64, ptr %8, align 8, !tbaa !9
  %141 = sub nsw i64 %140, 1
  %142 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %141)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %132, i64 noundef 1, ptr noundef %137, i64 noundef %139, i64 noundef %142)
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %143, i32 0, i32 2
  %145 = load i64, ptr %8, align 8, !tbaa !9
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %144, ptr noundef %15, i64 noundef %145, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %147, ptr noundef %148)
  br label %149

149:                                              ; preds = %110, %107
  %150 = load i64, ptr %9, align 8, !tbaa !9
  %151 = icmp eq i64 %150, 2
  br i1 %151, label %152, label %191

152:                                              ; preds = %149
  %153 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !18
  %155 = getelementptr inbounds double, ptr %154, i64 0
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %157 = load ptr, ptr %156, align 8, !tbaa !18
  %158 = getelementptr inbounds ptr, ptr %157, i64 0
  %159 = load ptr, ptr %158, align 8, !tbaa !5
  %160 = getelementptr inbounds double, ptr %159, i64 0
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %162 = load i64, ptr %161, align 8, !tbaa !19
  %163 = load i64, ptr %8, align 8, !tbaa !9
  %164 = sub nsw i64 %163, 1
  %165 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %164)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %155, i64 noundef 1, ptr noundef %160, i64 noundef %162, i64 noundef %165)
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %166, i32 0, i32 2
  %168 = load i64, ptr %8, align 8, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %169, i32 0, i32 3
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %167, ptr noundef %15, i64 noundef %168, i64 noundef 0, double noundef 0.000000e+00, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %170, ptr noundef %171)
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %173 = load ptr, ptr %172, align 8, !tbaa !18
  %174 = getelementptr inbounds double, ptr %173, i64 0
  %175 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 6
  %176 = load ptr, ptr %175, align 8, !tbaa !18
  %177 = getelementptr inbounds ptr, ptr %176, i64 0
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = getelementptr inbounds double, ptr %178, i64 1
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %14, i32 0, i32 2
  %181 = load i64, ptr %180, align 8, !tbaa !19
  %182 = load i64, ptr %8, align 8, !tbaa !9
  %183 = sub nsw i64 %182, 1
  %184 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %183)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %174, i64 noundef 1, ptr noundef %179, i64 noundef %181, i64 noundef %184)
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %185, i32 0, i32 2
  %187 = load i64, ptr %8, align 8, !tbaa !9
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.alglib_impl::pspline2interpolant", ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %186, ptr noundef %15, i64 noundef %187, i64 noundef 0, double noundef 0.000000e+00, i64 noundef 0, double noundef 0.000000e+00, ptr noundef %189, ptr noundef %190)
  br label %191

191:                                              ; preds = %152, %149
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %192)
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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 void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

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

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

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

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

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

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


; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { 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.668 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.669 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.670 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.671 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.672 = external hidden unnamed_addr constant [48 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13pspline2buildEPKNS_9ae_matrixElllPNS_19pspline2interpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %8, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %0, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl26_pspline2interpolant_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %5, i1 noundef zeroext true)
  %10 = icmp ult i64 %2, 3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.668, ptr noundef %5)
  %11 = icmp ult i64 %3, 3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.669, ptr noundef %5)
  %12 = icmp eq i64 %2, 0
  %. = select i1 %12, i64 4, i64 1
  %.str.670..str.671 = select i1 %12, ptr @.str.670, ptr @.str.671
  %13 = icmp slt i64 %., %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull %.str.670..str.671, ptr noundef %5)
  store i64 %1, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  store i8 0, ptr %14, align 8, !tbaa !15
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef %5)
  %15 = getelementptr inbounds i8, ptr %4, i64 16
  call void @_ZN11alglib_implL22parametric_pspline2parEPKNS_9ae_matrixEllPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, i64 noundef %3, ptr noundef nonnull %15, ptr noundef %5)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %1, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.672, ptr noundef %5)
  br i1 %12, label %.thread, label %34

.thread:                                          ; preds = %6
  %17 = getelementptr inbounds i8, ptr %9, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = getelementptr inbounds i8, ptr %8, i64 72
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %8, i64 16
  %23 = load i64, ptr %22, align 8, !tbaa !18
  %24 = add nsw i64 %1, -1
  %25 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %24)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %18, i64 noundef 1, ptr noundef %21, i64 noundef %23, i64 noundef %25)
  %26 = getelementptr inbounds i8, ptr %4, i64 80
  call void @_ZN11alglib_impl18spline1dbuildakimaEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, ptr noundef nonnull %26, ptr noundef %5)
  %27 = load ptr, ptr %17, align 8, !tbaa !16
  %28 = load ptr, ptr %19, align 8, !tbaa !16
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load i64, ptr %22, align 8, !tbaa !18
  %32 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %24)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %27, i64 noundef 1, ptr noundef nonnull %30, i64 noundef %31, i64 noundef %32)
  %33 = getelementptr inbounds i8, ptr %4, i64 240
  call void @_ZN11alglib_impl18spline1dbuildakimaEPKNS_9ae_vectorES2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, ptr noundef nonnull %33, ptr noundef %5)
  br label %71

34:                                               ; preds = %6
  switch i64 %2, label %71 [
    i64 1, label %35
    i64 2, label %53
  ]

35:                                               ; preds = %34
  %36 = getelementptr inbounds i8, ptr %9, i64 56
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %8, i64 72
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %8, i64 16
  %42 = load i64, ptr %41, align 8, !tbaa !18
  %43 = add nsw i64 %1, -1
  %44 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %43)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %37, i64 noundef 1, ptr noundef %40, i64 noundef %42, i64 noundef %44)
  %45 = getelementptr inbounds i8, ptr %4, i64 80
  call void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %45, ptr noundef %5)
  %46 = load ptr, ptr %36, align 8, !tbaa !16
  %47 = load ptr, ptr %38, align 8, !tbaa !16
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load i64, ptr %41, align 8, !tbaa !18
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %43)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %46, i64 noundef 1, ptr noundef nonnull %49, i64 noundef %50, i64 noundef %51)
  %52 = getelementptr inbounds i8, ptr %4, i64 240
  call void @_ZN11alglib_impl23spline1dbuildcatmullromEPKNS_9ae_vectorES2_lldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %52, ptr noundef %5)
  br label %71

53:                                               ; preds = %34
  %54 = getelementptr inbounds i8, ptr %9, i64 56
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds i8, ptr %8, i64 72
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds i8, ptr %8, i64 16
  %60 = load i64, ptr %59, align 8, !tbaa !18
  %61 = add nsw i64 %1, -1
  %62 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %61)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %55, i64 noundef 1, ptr noundef %58, i64 noundef %60, i64 noundef %62)
  %63 = getelementptr inbounds i8, ptr %4, i64 80
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, i64 noundef 0, double noundef 0.000000e+00, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %63, ptr noundef %5)
  %64 = load ptr, ptr %54, align 8, !tbaa !16
  %65 = load ptr, ptr %56, align 8, !tbaa !16
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load i64, ptr %59, align 8, !tbaa !18
  %69 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %61)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %64, i64 noundef 1, ptr noundef nonnull %67, i64 noundef %68, i64 noundef %69)
  %70 = getelementptr inbounds i8, ptr %4, i64 240
  call void @_ZN11alglib_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef nonnull %9, i64 noundef %1, i64 noundef 0, double noundef 0.000000e+00, i64 noundef 0, double noundef 0.000000e+00, ptr noundef nonnull %70, ptr noundef %5)
  br label %71

71:                                               ; preds = %.thread, %35, %34, %53
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  ret void
}

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass