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

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

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

@.str.265 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.266 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.267 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.268 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.269 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.270 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.271 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.272 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.273 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.274 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [66 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_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_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, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", 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 %"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 i64, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i64 %2, ptr %12, align 8, !tbaa !9
  store i64 %3, ptr %13, align 8, !tbaa !9
  store double %4, ptr %14, align 8, !tbaa !11
  store i64 %5, ptr %15, align 8, !tbaa !9
  store double %6, ptr %16, align 8, !tbaa !11
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 64, 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 8, ptr %29) #4
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %30, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  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)
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %20, ptr noundef %31, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %21, ptr noundef %33, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %35)
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 3, ptr noundef %36, i1 noundef zeroext true)
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %37, i1 noundef zeroext true)
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 3, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %26, i64 noundef 0, i64 noundef 3, ptr noundef %40, i1 noundef zeroext true)
  %41 = load ptr, ptr %18, 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 %41, i1 noundef zeroext true)
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %28, i64 noundef 0, i64 noundef 2, ptr noundef %42, i1 noundef zeroext true)
  %43 = load i64, ptr %13, align 8, !tbaa !9
  %44 = icmp eq i64 %43, -1
  br i1 %44, label %54, label %45

45:                                               ; preds = %9
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %54, label %48

48:                                               ; preds = %45
  %49 = load i64, ptr %13, align 8, !tbaa !9
  %50 = icmp eq i64 %49, 1
  br i1 %50, label %54, label %51

51:                                               ; preds = %48
  %52 = load i64, ptr %13, align 8, !tbaa !9
  %53 = icmp eq i64 %52, 2
  br label %54

54:                                               ; preds = %51, %48, %45, %9
  %55 = phi i1 [ true, %48 ], [ true, %45 ], [ true, %9 ], [ %53, %51 ]
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %55, ptr noundef @.str.265, ptr noundef %56)
  %57 = load i64, ptr %15, align 8, !tbaa !9
  %58 = icmp eq i64 %57, -1
  br i1 %58, label %68, label %59

59:                                               ; preds = %54
  %60 = load i64, ptr %15, align 8, !tbaa !9
  %61 = icmp eq i64 %60, 0
  br i1 %61, label %68, label %62

62:                                               ; preds = %59
  %63 = load i64, ptr %15, align 8, !tbaa !9
  %64 = icmp eq i64 %63, 1
  br i1 %64, label %68, label %65

65:                                               ; preds = %62
  %66 = load i64, ptr %15, align 8, !tbaa !9
  %67 = icmp eq i64 %66, 2
  br label %68

68:                                               ; preds = %65, %62, %59, %54
  %69 = phi i1 [ true, %62 ], [ true, %59 ], [ true, %54 ], [ %67, %65 ]
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %69, ptr noundef @.str.266, ptr noundef %70)
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = icmp eq i64 %71, -1
  br i1 %72, label %73, label %76

73:                                               ; preds = %68
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = icmp eq i64 %74, -1
  br i1 %75, label %84, label %76

76:                                               ; preds = %73, %68
  %77 = load i64, ptr %15, align 8, !tbaa !9
  %78 = icmp ne i64 %77, -1
  br i1 %78, label %79, label %82

79:                                               ; preds = %76
  %80 = load i64, ptr %13, align 8, !tbaa !9
  %81 = icmp ne i64 %80, -1
  br label %82

82:                                               ; preds = %79, %76
  %83 = phi i1 [ false, %76 ], [ %81, %79 ]
  br label %84

84:                                               ; preds = %82, %73
  %85 = phi i1 [ true, %73 ], [ %83, %82 ]
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %85, ptr noundef @.str.267, ptr noundef %86)
  %87 = load i64, ptr %13, align 8, !tbaa !9
  %88 = icmp eq i64 %87, 1
  br i1 %88, label %92, label %89

89:                                               ; preds = %84
  %90 = load i64, ptr %13, align 8, !tbaa !9
  %91 = icmp eq i64 %90, 2
  br i1 %91, label %92, label %97

92:                                               ; preds = %89, %84
  %93 = load double, ptr %14, align 8, !tbaa !11
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %93, ptr noundef %94)
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %95, ptr noundef @.str.268, ptr noundef %96)
  br label %97

97:                                               ; preds = %92, %89
  %98 = load i64, ptr %15, align 8, !tbaa !9
  %99 = icmp eq i64 %98, 1
  br i1 %99, label %103, label %100

100:                                              ; preds = %97
  %101 = load i64, ptr %15, align 8, !tbaa !9
  %102 = icmp eq i64 %101, 2
  br i1 %102, label %103, label %108

103:                                              ; preds = %100, %97
  %104 = load double, ptr %16, align 8, !tbaa !11
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %104, ptr noundef %105)
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %106, ptr noundef @.str.269, ptr noundef %107)
  br label %108

108:                                              ; preds = %103, %100
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = icmp sge i64 %109, 2
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %110, ptr noundef @.str.270, ptr noundef %111)
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 0
  %113 = load i64, ptr %112, align 8, !tbaa !13
  %114 = load i64, ptr %12, align 8, !tbaa !9
  %115 = icmp sge i64 %113, %114
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %115, ptr noundef @.str.271, ptr noundef %116)
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 0
  %118 = load i64, ptr %117, align 8, !tbaa !13
  %119 = load i64, ptr %12, align 8, !tbaa !9
  %120 = icmp sge i64 %118, %119
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %120, ptr noundef @.str.272, ptr noundef %121)
  %122 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %122, ptr %29, align 8, !tbaa !9
  %123 = load i64, ptr %13, align 8, !tbaa !9
  %124 = icmp eq i64 %123, -1
  br i1 %124, label %125, label %128

125:                                              ; preds = %108
  %126 = load i64, ptr %12, align 8, !tbaa !9
  %127 = sub nsw i64 %126, 1
  store i64 %127, ptr %29, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %125, %108
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  %131 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %129, ptr noundef %130)
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %131, ptr noundef @.str.273, ptr noundef %132)
  %133 = load i64, ptr %29, align 8, !tbaa !9
  %134 = load ptr, ptr %18, align 8, !tbaa !5
  %135 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %21, i64 noundef %133, ptr noundef %134)
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %135, ptr noundef @.str.274, ptr noundef %136)
  %137 = load i64, ptr %12, align 8, !tbaa !9
  %138 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef %20, ptr noundef %21, ptr noundef %28, i64 noundef %137, ptr noundef %138)
  %139 = load i64, ptr %12, align 8, !tbaa !9
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %139, ptr noundef %140)
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %141, ptr noundef @.str.275, ptr noundef %142)
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = icmp eq i64 %143, -1
  br i1 %144, label %148, label %145

145:                                              ; preds = %128
  %146 = load i64, ptr %15, align 8, !tbaa !9
  %147 = icmp eq i64 %146, -1
  br i1 %147, label %148, label %158

148:                                              ; preds = %145, %128
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %150 = load ptr, ptr %149, align 8, !tbaa !17
  %151 = getelementptr inbounds double, ptr %150, i64 0
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %21, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !17
  %155 = load i64, ptr %12, align 8, !tbaa !9
  %156 = sub nsw i64 %155, 1
  %157 = getelementptr inbounds double, ptr %154, i64 %156
  store double %152, ptr %157, align 8, !tbaa !11
  br label %158

158:                                              ; preds = %148, %145
  %159 = load i64, ptr %12, align 8, !tbaa !9
  %160 = load i64, ptr %13, align 8, !tbaa !9
  %161 = load double, ptr %14, align 8, !tbaa !11
  %162 = load i64, ptr %15, align 8, !tbaa !9
  %163 = load double, ptr %16, align 8, !tbaa !11
  %164 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl29spline1dgriddiffcubicinternalEPKNS_9ae_vectorEPS0_lldldS3_S3_S3_S3_S3_S3_PNS_8ae_stateE(ptr noundef %20, ptr noundef %21, i64 noundef %159, i64 noundef %160, double noundef %161, i64 noundef %162, double noundef %163, ptr noundef %27, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %164)
  %165 = load i64, ptr %12, align 8, !tbaa !9
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef %20, ptr noundef %21, ptr noundef %27, i64 noundef %165, ptr noundef %166, ptr noundef %167)
  %168 = load i64, ptr %13, align 8, !tbaa !9
  %169 = icmp eq i64 %168, -1
  br i1 %169, label %173, label %170

170:                                              ; preds = %158
  %171 = load i64, ptr %15, align 8, !tbaa !9
  %172 = icmp eq i64 %171, -1
  br label %173

173:                                              ; preds = %170, %158
  %174 = phi i1 [ true, %158 ], [ %172, %170 ]
  %175 = load ptr, ptr %17, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::spline1dinterpolant", ptr %175, i32 0, i32 0
  %177 = zext i1 %174 to i8
  store i8 %177, ptr %176, align 8, !tbaa !18
  %178 = load ptr, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.alglib_impl::spline1dinterpolant", ptr %178, i32 0, i32 3
  store i64 2, ptr %179, align 8, !tbaa !20
  %180 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %180)
  call void @llvm.lifetime.end.p0(i64 8, 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 64, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  ret void
}

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_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 dso_local void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef) #3

; 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

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 = !{!19, !15, i64 0}
!19 = !{!"_ZTSN11alglib_impl19spline1dinterpolantE", !15, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !14, i64 96}
!20 = !{!19, !10, i64 24}


; 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.265 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.266 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.267 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.268 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.269 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.270 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.271 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.272 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.273 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.274 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [66 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_impl18spline1dbuildcubicEPKNS_9ae_vectorES2_lldldPNS_19spline1dinterpolantEPNS_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, ptr noundef %8) local_unnamed_addr #3 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", 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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, 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 @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  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 @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %0, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %1, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef %7)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 3, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 3, ptr noundef %8, 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 %8, 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 %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %19, i64 noundef 0, i64 noundef 2, ptr noundef %8, i1 noundef zeroext true)
  %20 = icmp eq i64 %3, -1
  %21 = add i64 %3, 1
  %spec.select = icmp ult i64 %21, 4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.265, ptr noundef %8)
  %22 = icmp eq i64 %5, -1
  %23 = add i64 %5, 1
  %24 = icmp ult i64 %23, 4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.266, ptr noundef %8)
  %25 = and i64 %5, %3
  %or.cond9 = icmp eq i64 %25, -1
  br i1 %or.cond9, label %30, label %26

26:                                               ; preds = %9
  %27 = icmp ne i64 %5, -1
  %28 = icmp ne i64 %3, -1
  %29 = and i1 %28, %27
  br label %30

30:                                               ; preds = %9, %26
  %31 = phi i1 [ %29, %26 ], [ true, %9 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef nonnull @.str.267, ptr noundef %8)
  %32 = add i64 %3, -1
  %or.cond11 = icmp ult i64 %32, 2
  br i1 %or.cond11, label %33, label %35

33:                                               ; preds = %30
  %34 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %4, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.268, ptr noundef %8)
  br label %35

35:                                               ; preds = %30, %33
  %36 = add i64 %5, -1
  %or.cond13 = icmp ult i64 %36, 2
  br i1 %or.cond13, label %37, label %39

37:                                               ; preds = %35
  %38 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %6, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef nonnull @.str.269, ptr noundef %8)
  br label %39

39:                                               ; preds = %35, %37
  %40 = icmp sgt i64 %2, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef nonnull @.str.270, ptr noundef %8)
  %41 = load i64, ptr %11, align 8, !tbaa !5
  %42 = icmp sge i64 %41, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef nonnull @.str.271, ptr noundef %8)
  %43 = load i64, ptr %12, align 8, !tbaa !5
  %44 = icmp sge i64 %43, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef nonnull @.str.272, ptr noundef %8)
  %45 = sext i1 %20 to i64
  %spec.select91 = add nsw i64 %45, %2
  %46 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %2, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef nonnull @.str.273, ptr noundef %8)
  %47 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %spec.select91, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef nonnull @.str.274, ptr noundef %8)
  call void @_ZN11alglib_implL24spline1d_heapsortppointsEPNS_9ae_vectorES1_S1_lPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %19, i64 noundef %2, ptr noundef %8)
  %48 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %2, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef nonnull @.str.275, ptr noundef %8)
  %or.cond15 = or i1 %20, %22
  br i1 %or.cond15, label %49, label %55

49:                                               ; preds = %39
  %50 = getelementptr inbounds i8, ptr %12, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load double, ptr %51, align 8, !tbaa !14
  %53 = getelementptr double, ptr %51, i64 %2
  %54 = getelementptr i8, ptr %53, i64 -8
  store double %52, ptr %54, align 8, !tbaa !14
  br label %55

55:                                               ; preds = %39, %49
  call void @_ZN11alglib_impl29spline1dgriddiffcubicinternalEPKNS_9ae_vectorEPS0_lldldS3_S3_S3_S3_S3_S3_PNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %12, i64 noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, double noundef %6, ptr noundef nonnull %18, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %8)
  call void @_ZN11alglib_impl20spline1dbuildhermiteEPKNS_9ae_vectorES2_S2_lPNS_19spline1dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %18, i64 noundef %2, ptr noundef %7, ptr noundef %8)
  %56 = zext i1 %or.cond15 to i8
  store i8 %56, ptr %7, align 8, !tbaa !16
  %57 = getelementptr inbounds i8, ptr %7, i64 24
  store i64 2, ptr %57, align 8, !tbaa !18
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  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 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  ret void
}

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_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 dso_local void @_ZN11alglib_impl26_spline1dinterpolant_clearEPv(ptr noundef) local_unnamed_addr #3

; 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

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 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl19spline1dinterpolantE", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !6, i64 32, !6, i64 96}
!18 = !{!17, !7, i64 24}


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