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

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

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

@.str.214 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.215 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.216 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [63 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_impl19barycentricbuildxywEPKNS_9ae_vectorES2_S2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15polynomialbuildEPKNS_9ae_vectorES2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, 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
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %23, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %12, ptr noundef %24, ptr noundef %25, i1 noundef zeroext true)
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %13, ptr noundef %26, ptr noundef %27, i1 noundef zeroext true)
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %28)
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 3, ptr noundef %29, i1 noundef zeroext true)
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 3, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %10, 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 %31, i1 noundef zeroext true)
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = icmp sgt i64 %32, 0
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.214, ptr noundef %34)
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 0
  %36 = load i64, ptr %35, align 8, !tbaa !11
  %37 = load i64, ptr %8, align 8, !tbaa !9
  %38 = icmp sge i64 %36, %37
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.215, ptr noundef %39)
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %13, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = icmp sge i64 %41, %42
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.216, ptr noundef %44)
  %45 = load i64, ptr %8, align 8, !tbaa !9
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %45, ptr noundef %46)
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.217, ptr noundef %48)
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %13, i64 noundef %49, ptr noundef %50)
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %51, ptr noundef @.str.218, ptr noundef %52)
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %12, ptr noundef %13, ptr noundef %21, ptr noundef %22, i64 noundef %53, ptr noundef %54)
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %55, ptr noundef %56)
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.219, ptr noundef %58)
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %59, ptr noundef %60)
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  %63 = getelementptr inbounds double, ptr %62, i64 0
  %64 = load double, ptr %63, align 8, !tbaa !16
  store double %64, ptr %18, align 8, !tbaa !16
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = getelementptr inbounds double, ptr %66, i64 0
  %68 = load double, ptr %67, align 8, !tbaa !16
  store double %68, ptr %17, align 8, !tbaa !16
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %95, %5
  %70 = load i64, ptr %14, align 8, !tbaa !9
  %71 = load i64, ptr %8, align 8, !tbaa !9
  %72 = sub nsw i64 %71, 1
  %73 = icmp sle i64 %70, %72
  br i1 %73, label %74, label %98

74:                                               ; preds = %69
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load i64, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %76, i64 %77
  store double 1.000000e+00, ptr %78, align 8, !tbaa !16
  %79 = load double, ptr %18, align 8, !tbaa !16
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = load i64, ptr %14, align 8, !tbaa !9
  %83 = getelementptr inbounds double, ptr %81, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !16
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %79, double noundef %84, ptr noundef %85)
  store double %86, ptr %18, align 8, !tbaa !16
  %87 = load double, ptr %17, align 8, !tbaa !16
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !15
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !16
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %87, double noundef %92, ptr noundef %93)
  store double %94, ptr %17, align 8, !tbaa !16
  br label %95

95:                                               ; preds = %74
  %96 = load i64, ptr %14, align 8, !tbaa !9
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %14, align 8, !tbaa !9
  br label %69, !llvm.loop !18

98:                                               ; preds = %69
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %177, %98
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = load i64, ptr %8, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %180

104:                                              ; preds = %99
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  %107 = load i64, ptr %15, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !16
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %109, ptr noundef %110)
  store double %111, ptr %20, align 8, !tbaa !16
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %159, %104
  %113 = load i64, ptr %14, align 8, !tbaa !9
  %114 = load i64, ptr %8, align 8, !tbaa !9
  %115 = sub nsw i64 %114, 1
  %116 = icmp sle i64 %113, %115
  br i1 %116, label %117, label %162

117:                                              ; preds = %112
  %118 = load i64, ptr %14, align 8, !tbaa !9
  %119 = load i64, ptr %15, align 8, !tbaa !9
  %120 = icmp ne i64 %118, %119
  br i1 %120, label %121, label %158

121:                                              ; preds = %117
  %122 = load double, ptr %17, align 8, !tbaa !16
  %123 = load double, ptr %18, align 8, !tbaa !16
  %124 = fsub double %122, %123
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !15
  %127 = load i64, ptr %14, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !16
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = load i64, ptr %15, align 8, !tbaa !9
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !16
  %135 = fsub double %129, %134
  %136 = fdiv double %124, %135
  store double %136, ptr %19, align 8, !tbaa !16
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !15
  %139 = load i64, ptr %14, align 8, !tbaa !9
  %140 = getelementptr inbounds double, ptr %138, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !16
  %142 = load double, ptr %19, align 8, !tbaa !16
  %143 = fmul double %141, %142
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !15
  %146 = load i64, ptr %14, align 8, !tbaa !9
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  store double %143, ptr %147, align 8, !tbaa !16
  %148 = load double, ptr %20, align 8, !tbaa !16
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %150 = load ptr, ptr %149, align 8, !tbaa !15
  %151 = load i64, ptr %14, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %150, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !16
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %153, ptr noundef %154)
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %148, double noundef %155, ptr noundef %156)
  store double %157, ptr %20, align 8, !tbaa !16
  br label %158

158:                                              ; preds = %121, %117
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %14, align 8, !tbaa !9
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %14, align 8, !tbaa !9
  br label %112, !llvm.loop !20

162:                                              ; preds = %112
  %163 = load i64, ptr %15, align 8, !tbaa !9
  %164 = srem i64 %163, 5
  %165 = icmp eq i64 %164, 0
  br i1 %165, label %166, label %176

166:                                              ; preds = %162
  %167 = load double, ptr %20, align 8, !tbaa !16
  %168 = fdiv double 1.000000e+00, %167
  store double %168, ptr %19, align 8, !tbaa !16
  %169 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %170 = load ptr, ptr %169, align 8, !tbaa !15
  %171 = getelementptr inbounds double, ptr %170, i64 0
  %172 = load i64, ptr %8, align 8, !tbaa !9
  %173 = sub nsw i64 %172, 1
  %174 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %173)
  %175 = load double, ptr %19, align 8, !tbaa !16
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %171, i64 noundef 1, i64 noundef %174, double noundef %175)
  br label %176

176:                                              ; preds = %166, %162
  br label %177

177:                                              ; preds = %176
  %178 = load i64, ptr %15, align 8, !tbaa !9
  %179 = add nsw i64 %178, 1
  store i64 %179, ptr %15, align 8, !tbaa !9
  br label %99, !llvm.loop !21

180:                                              ; preds = %99
  %181 = load i64, ptr %8, align 8, !tbaa !9
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19barycentricbuildxywEPKNS_9ae_vectorES2_S2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %12, ptr noundef %13, ptr noundef %16, i64 noundef %181, ptr noundef %182, ptr noundef %183)
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %184)
  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 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  ret void
}

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(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_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_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

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_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !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.214 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.215 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.216 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [63 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_impl19barycentricbuildxywEPKNS_9ae_vectorES2_S2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15polynomialbuildEPKNS_9ae_vectorES2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %7, ptr noundef %0, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %1, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %12 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.214, ptr noundef %4)
  %13 = load i64, ptr %7, align 8, !tbaa !5
  %14 = icmp sge i64 %13, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.215, ptr noundef %4)
  %15 = load i64, ptr %8, align 8, !tbaa !5
  %16 = icmp sge i64 %15, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.216, ptr noundef %4)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.217, ptr noundef %4)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.218, ptr noundef %4)
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %2, ptr noundef %4)
  %19 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.219, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, ptr noundef %4)
  %20 = getelementptr inbounds i8, ptr %7, i64 56
  br i1 %12, label %.lr.ph, label %._crit_edge87

.lr.ph:                                           ; preds = %5
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = load double, ptr %21, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %9, i64 56
  br label %59

.preheader:                                       ; preds = %59
  %24 = add nsw i64 %2, -1
  br i1 %12, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %9, i64 56
  %26 = fsub double %69, %65
  br label %.lr.ph82.us

.lr.ph82.us:                                      ; preds = %35, %.lr.ph86
  %.06885.us = phi i64 [ 0, %.lr.ph86 ], [ %36, %35 ]
  %27 = load ptr, ptr %25, align 8, !tbaa !13
  %28 = getelementptr inbounds double, ptr %27, i64 %.06885.us
  %29 = load double, ptr %28, align 8, !tbaa !14
  %30 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %29, ptr noundef %4)
  br label %37

31:                                               ; preds = %._crit_edge.us
  %32 = fdiv double 1.000000e+00, %.1.us
  %33 = load ptr, ptr %25, align 8, !tbaa !13
  %34 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %24)
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %33, i64 noundef 1, i64 noundef %34, double noundef %32)
  br label %35

35:                                               ; preds = %31, %._crit_edge.us
  %36 = add nuw nsw i64 %.06885.us, 1
  %exitcond90.not = icmp eq i64 %36, %2
  br i1 %exitcond90.not, label %._crit_edge87, label %.lr.ph82.us, !llvm.loop !16

37:                                               ; preds = %.lr.ph82.us, %55
  %.081.us = phi double [ %30, %.lr.ph82.us ], [ %.1.us, %55 ]
  %.17080.us = phi i64 [ 0, %.lr.ph82.us ], [ %56, %55 ]
  %.not.us = icmp eq i64 %.17080.us, %.06885.us
  br i1 %.not.us, label %55, label %38

38:                                               ; preds = %37
  %39 = load ptr, ptr %20, align 8, !tbaa !13
  %40 = getelementptr inbounds double, ptr %39, i64 %.17080.us
  %41 = load double, ptr %40, align 8, !tbaa !14
  %42 = getelementptr inbounds double, ptr %39, i64 %.06885.us
  %43 = load double, ptr %42, align 8, !tbaa !14
  %44 = fsub double %41, %43
  %45 = fdiv double %26, %44
  %46 = load ptr, ptr %25, align 8, !tbaa !13
  %47 = getelementptr inbounds double, ptr %46, i64 %.17080.us
  %48 = load double, ptr %47, align 8, !tbaa !14
  %49 = fmul double %48, %45
  store double %49, ptr %47, align 8, !tbaa !14
  %50 = load ptr, ptr %25, align 8, !tbaa !13
  %51 = getelementptr inbounds double, ptr %50, i64 %.17080.us
  %52 = load double, ptr %51, align 8, !tbaa !14
  %53 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %52, ptr noundef %4)
  %54 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.081.us, double noundef %53, ptr noundef %4)
  br label %55

55:                                               ; preds = %38, %37
  %.1.us = phi double [ %54, %38 ], [ %.081.us, %37 ]
  %56 = add nuw nsw i64 %.17080.us, 1
  %exitcond89.not = icmp eq i64 %56, %2
  br i1 %exitcond89.not, label %._crit_edge.us, label %37, !llvm.loop !18

._crit_edge.us:                                   ; preds = %55
  %57 = urem i64 %.06885.us, 5
  %58 = icmp eq i64 %57, 0
  br i1 %58, label %31, label %35

59:                                               ; preds = %.lr.ph, %59
  %.06677 = phi double [ %22, %.lr.ph ], [ %65, %59 ]
  %.06776 = phi double [ %22, %.lr.ph ], [ %69, %59 ]
  %.06975 = phi i64 [ 0, %.lr.ph ], [ %70, %59 ]
  %60 = load ptr, ptr %23, align 8, !tbaa !13
  %61 = getelementptr inbounds double, ptr %60, i64 %.06975
  store double 1.000000e+00, ptr %61, align 8, !tbaa !14
  %62 = load ptr, ptr %20, align 8, !tbaa !13
  %63 = getelementptr inbounds double, ptr %62, i64 %.06975
  %64 = load double, ptr %63, align 8, !tbaa !14
  %65 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %.06677, double noundef %64, ptr noundef %4)
  %66 = load ptr, ptr %20, align 8, !tbaa !13
  %67 = getelementptr inbounds double, ptr %66, i64 %.06975
  %68 = load double, ptr %67, align 8, !tbaa !14
  %69 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.06776, double noundef %68, ptr noundef %4)
  %70 = add nuw nsw i64 %.06975, 1
  %exitcond.not = icmp eq i64 %70, %2
  br i1 %exitcond.not, label %.preheader, label %59, !llvm.loop !19

._crit_edge87:                                    ; preds = %35, %5, %.preheader
  call void @_ZN11alglib_impl19barycentricbuildxywEPKNS_9ae_vectorES2_S2_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, i64 noundef %2, ptr noundef %3, ptr noundef %4)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(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_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_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

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 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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