; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (interpolation)

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

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

@.str.365 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.366 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.367 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.368 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.369 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.370 = 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_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_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_impl15polynomialbuildEPNS_9ae_vectorES1_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_vectorES1_PNS_8ae_stateEb(ptr noundef %12, ptr noundef %24, ptr noundef %25, i1 noundef zeroext true)
  store ptr %12, ptr %6, align 8, !tbaa !5
  %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_vectorES1_PNS_8ae_stateEb(ptr noundef %13, ptr noundef %26, ptr noundef %27, i1 noundef zeroext true)
  store ptr %13, ptr %7, align 8, !tbaa !5
  %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.365, ptr noundef %34)
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %35, i32 0, i32 0
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = icmp sge i64 %37, %38
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.366, ptr noundef %40)
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.367, ptr noundef %46)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %47, i64 noundef %48, ptr noundef %49)
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.368, ptr noundef %51)
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %52, i64 noundef %53, ptr noundef %54)
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %55, ptr noundef @.str.369, ptr noundef %56)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl12tagsortfastrEPNS_9ae_vectorES1_S1_S1_lPNS_8ae_stateE(ptr noundef %57, ptr noundef %58, ptr noundef %21, ptr noundef %22, i64 noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i64, ptr %8, align 8, !tbaa !9
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = call noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %61, i64 noundef %62, ptr noundef %63)
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.370, ptr noundef %65)
  %66 = load i64, ptr %8, align 8, !tbaa !9
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %66, ptr noundef %67)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %68, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds double, ptr %70, i64 0
  %72 = load double, ptr %71, align 8, !tbaa !16
  store double %72, ptr %18, align 8, !tbaa !16
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = getelementptr inbounds double, ptr %75, i64 0
  %77 = load double, ptr %76, align 8, !tbaa !16
  store double %77, ptr %17, align 8, !tbaa !16
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %106, %5
  %79 = load i64, ptr %14, align 8, !tbaa !9
  %80 = load i64, ptr %8, align 8, !tbaa !9
  %81 = sub nsw i64 %80, 1
  %82 = icmp sle i64 %79, %81
  br i1 %82, label %83, label %109

83:                                               ; preds = %78
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = load i64, ptr %14, align 8, !tbaa !9
  %87 = getelementptr inbounds double, ptr %85, i64 %86
  store double 1.000000e+00, ptr %87, align 8, !tbaa !16
  %88 = load double, ptr %18, align 8, !tbaa !16
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %89, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  %92 = load i64, ptr %14, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !16
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %88, double noundef %94, ptr noundef %95)
  store double %96, ptr %18, align 8, !tbaa !16
  %97 = load double, ptr %17, align 8, !tbaa !16
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !15
  %101 = load i64, ptr %14, align 8, !tbaa !9
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !16
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %97, double noundef %103, ptr noundef %104)
  store double %105, ptr %17, align 8, !tbaa !16
  br label %106

106:                                              ; preds = %83
  %107 = load i64, ptr %14, align 8, !tbaa !9
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %14, align 8, !tbaa !9
  br label %78, !llvm.loop !18

109:                                              ; preds = %78
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %190, %109
  %111 = load i64, ptr %15, align 8, !tbaa !9
  %112 = load i64, ptr %8, align 8, !tbaa !9
  %113 = sub nsw i64 %112, 1
  %114 = icmp sle i64 %111, %113
  br i1 %114, label %115, label %193

115:                                              ; preds = %110
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = load i64, ptr %15, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !16
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %120, ptr noundef %121)
  store double %122, ptr %20, align 8, !tbaa !16
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %172, %115
  %124 = load i64, ptr %14, align 8, !tbaa !9
  %125 = load i64, ptr %8, align 8, !tbaa !9
  %126 = sub nsw i64 %125, 1
  %127 = icmp sle i64 %124, %126
  br i1 %127, label %128, label %175

128:                                              ; preds = %123
  %129 = load i64, ptr %14, align 8, !tbaa !9
  %130 = load i64, ptr %15, align 8, !tbaa !9
  %131 = icmp ne i64 %129, %130
  br i1 %131, label %132, label %171

132:                                              ; preds = %128
  %133 = load double, ptr %17, align 8, !tbaa !16
  %134 = load double, ptr %18, align 8, !tbaa !16
  %135 = fsub double %133, %134
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %136, 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 ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !15
  %145 = load i64, ptr %15, align 8, !tbaa !9
  %146 = getelementptr inbounds double, ptr %144, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !16
  %148 = fsub double %141, %147
  %149 = fdiv double %135, %148
  store double %149, ptr %19, align 8, !tbaa !16
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !15
  %152 = load i64, ptr %14, align 8, !tbaa !9
  %153 = getelementptr inbounds double, ptr %151, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !16
  %155 = load double, ptr %19, align 8, !tbaa !16
  %156 = fmul double %154, %155
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !15
  %159 = load i64, ptr %14, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %158, i64 %159
  store double %156, ptr %160, align 8, !tbaa !16
  %161 = load double, ptr %20, align 8, !tbaa !16
  %162 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %163 = load ptr, ptr %162, align 8, !tbaa !15
  %164 = load i64, ptr %14, align 8, !tbaa !9
  %165 = getelementptr inbounds double, ptr %163, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !16
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %166, ptr noundef %167)
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %161, double noundef %168, ptr noundef %169)
  store double %170, ptr %20, align 8, !tbaa !16
  br label %171

171:                                              ; preds = %132, %128
  br label %172

172:                                              ; preds = %171
  %173 = load i64, ptr %14, align 8, !tbaa !9
  %174 = add nsw i64 %173, 1
  store i64 %174, ptr %14, align 8, !tbaa !9
  br label %123, !llvm.loop !20

175:                                              ; preds = %123
  %176 = load i64, ptr %15, align 8, !tbaa !9
  %177 = srem i64 %176, 5
  %178 = icmp eq i64 %177, 0
  br i1 %178, label %179, label %189

179:                                              ; preds = %175
  %180 = load double, ptr %20, align 8, !tbaa !16
  %181 = fdiv double 1.000000e+00, %180
  store double %181, ptr %19, align 8, !tbaa !16
  %182 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %183 = load ptr, ptr %182, align 8, !tbaa !15
  %184 = getelementptr inbounds double, ptr %183, i64 0
  %185 = load i64, ptr %8, align 8, !tbaa !9
  %186 = sub nsw i64 %185, 1
  %187 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %186)
  %188 = load double, ptr %19, align 8, !tbaa !16
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %184, i64 noundef 1, i64 noundef %187, double noundef %188)
  br label %189

189:                                              ; preds = %179, %175
  br label %190

190:                                              ; preds = %189
  %191 = load i64, ptr %15, align 8, !tbaa !9
  %192 = add nsw i64 %191, 1
  store i64 %192, ptr %15, align 8, !tbaa !9
  br label %110, !llvm.loop !21

193:                                              ; preds = %110
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = load i64, ptr %8, align 8, !tbaa !9
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %194, ptr noundef %195, ptr noundef %16, i64 noundef %196, ptr noundef %197, ptr noundef %198)
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %199)
  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 zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

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

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

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

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

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

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_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

; 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_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 noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_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.365 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.366 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.367 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.368 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.369 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.370 = 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_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_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_impl15polynomialbuildEPNS_9ae_vectorES1_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_vectorES1_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_vectorES1_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.365, 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.366, 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.367, ptr noundef %4)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.368, ptr noundef %4)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_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.369, 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_impl11aredistinctEPNS_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.370, 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_edge102

.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.ph101, label %._crit_edge102

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

.lr.ph97.us:                                      ; preds = %35, %.lr.ph101
  %.083100.us = phi i64 [ 0, %.lr.ph101 ], [ %36, %35 ]
  %27 = load ptr, ptr %25, align 8, !tbaa !13
  %28 = getelementptr inbounds double, ptr %27, i64 %.083100.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 %.083100.us, 1
  %exitcond105.not = icmp eq i64 %36, %2
  br i1 %exitcond105.not, label %._crit_edge102, label %.lr.ph97.us, !llvm.loop !16

37:                                               ; preds = %.lr.ph97.us, %55
  %.096.us = phi double [ %30, %.lr.ph97.us ], [ %.1.us, %55 ]
  %.18595.us = phi i64 [ 0, %.lr.ph97.us ], [ %56, %55 ]
  %.not.us = icmp eq i64 %.18595.us, %.083100.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 %.18595.us
  %41 = load double, ptr %40, align 8, !tbaa !14
  %42 = getelementptr inbounds double, ptr %39, i64 %.083100.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 %.18595.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 %.18595.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 %.096.us, double noundef %53, ptr noundef %4)
  br label %55

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

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

59:                                               ; preds = %.lr.ph, %59
  %.08192 = phi double [ %22, %.lr.ph ], [ %65, %59 ]
  %.08291 = phi double [ %22, %.lr.ph ], [ %69, %59 ]
  %.08490 = phi i64 [ 0, %.lr.ph ], [ %70, %59 ]
  %60 = load ptr, ptr %23, align 8, !tbaa !13
  %61 = getelementptr inbounds double, ptr %60, i64 %.08490
  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 %.08490
  %64 = load double, ptr %63, align 8, !tbaa !14
  %65 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %.08192, double noundef %64, ptr noundef %4)
  %66 = load ptr, ptr %20, align 8, !tbaa !13
  %67 = getelementptr inbounds double, ptr %66, i64 %.08490
  %68 = load double, ptr %67, align 8, !tbaa !14
  %69 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.08291, double noundef %68, ptr noundef %4)
  %70 = add nuw nsw i64 %.08490, 1
  %exitcond.not = icmp eq i64 %70, %2
  br i1 %exitcond.not, label %.preheader, label %59, !llvm.loop !19

._crit_edge102:                                   ; preds = %35, %5, %.preheader
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_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 zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(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_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_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

; 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_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 noundef zeroext i1 @_ZN11alglib_impl11aredistinctEPNS_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