; 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::barycentricinterpolant" = type { i64, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"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::barycentricfitreport" = type { double, i64, double, double, double, double }

@.str.470 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.471 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.472 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.473 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.474 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.475 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.476 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.477 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.478 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.479 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.480 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.481 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.482 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.483 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.484 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.485 = external hidden unnamed_addr constant [79 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_impl28_barycentricinterpolant_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26_barycentricfitreport_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30barycentricfitfloaterhormannwcEPNS_9ae_vectorES1_S1_lS1_S1_S1_llPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i64 noundef %7, i64 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) #3 {
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"struct.alglib_impl::ae_frame", align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca %"struct.alglib_impl::barycentricinterpolant", align 8
  %33 = alloca %"struct.alglib_impl::barycentricfitreport", align 8
  %34 = alloca i64, align 8
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %1, ptr %15, align 8, !tbaa !5
  store ptr %2, ptr %16, align 8, !tbaa !5
  store i64 %3, ptr %17, align 8, !tbaa !9
  store ptr %4, ptr %18, align 8, !tbaa !5
  store ptr %5, ptr %19, align 8, !tbaa !5
  store ptr %6, ptr %20, align 8, !tbaa !5
  store i64 %7, ptr %21, align 8, !tbaa !9
  store i64 %8, ptr %22, align 8, !tbaa !9
  store ptr %9, ptr %23, align 8, !tbaa !5
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  store ptr %12, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %35 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %35, ptr noundef %27)
  call void @llvm.memset.p0.i64(ptr align 8 %32, i8 0, i64 208, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 48, i1 false)
  %36 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %36, align 8, !tbaa !9
  %37 = load ptr, ptr %24, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %37)
  %38 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl27_barycentricfitreport_clearEPv(ptr noundef %38)
  %39 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl28_barycentricinterpolant_initEPvPNS_8ae_stateEb(ptr noundef %32, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl26_barycentricfitreport_initEPvPNS_8ae_stateEb(ptr noundef %33, ptr noundef %40, i1 noundef zeroext true)
  %41 = load i64, ptr %17, align 8, !tbaa !9
  %42 = icmp sgt i64 %41, 0
  %43 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.470, ptr noundef %43)
  %44 = load i64, ptr %22, align 8, !tbaa !9
  %45 = icmp sgt i64 %44, 0
  %46 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.471, ptr noundef %46)
  %47 = load i64, ptr %21, align 8, !tbaa !9
  %48 = icmp sge i64 %47, 0
  %49 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.472, ptr noundef %49)
  %50 = load i64, ptr %21, align 8, !tbaa !9
  %51 = load i64, ptr %22, align 8, !tbaa !9
  %52 = icmp slt i64 %50, %51
  %53 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.473, ptr noundef %53)
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = load i64, ptr %17, align 8, !tbaa !9
  %58 = icmp sge i64 %56, %57
  %59 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.474, ptr noundef %59)
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %60, i32 0, i32 0
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = load i64, ptr %17, align 8, !tbaa !9
  %64 = icmp sge i64 %62, %63
  %65 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.475, ptr noundef %65)
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = load i64, ptr %17, align 8, !tbaa !9
  %70 = icmp sge i64 %68, %69
  %71 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %70, ptr noundef @.str.476, ptr noundef %71)
  %72 = load ptr, ptr %18, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 0
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = load i64, ptr %21, align 8, !tbaa !9
  %76 = icmp sge i64 %74, %75
  %77 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %76, ptr noundef @.str.477, ptr noundef %77)
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 0
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %81 = load i64, ptr %21, align 8, !tbaa !9
  %82 = icmp sge i64 %80, %81
  %83 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %82, ptr noundef @.str.478, ptr noundef %83)
  %84 = load ptr, ptr %20, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %84, i32 0, i32 0
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load i64, ptr %21, align 8, !tbaa !9
  %88 = icmp sge i64 %86, %87
  %89 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %88, ptr noundef @.str.479, ptr noundef %89)
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = load i64, ptr %17, align 8, !tbaa !9
  %92 = load ptr, ptr %26, align 8, !tbaa !5
  %93 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %90, i64 noundef %91, ptr noundef %92)
  %94 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %93, ptr noundef @.str.480, ptr noundef %94)
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = load i64, ptr %17, align 8, !tbaa !9
  %97 = load ptr, ptr %26, align 8, !tbaa !5
  %98 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %95, i64 noundef %96, ptr noundef %97)
  %99 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %98, ptr noundef @.str.481, ptr noundef %99)
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i64, ptr %17, align 8, !tbaa !9
  %102 = load ptr, ptr %26, align 8, !tbaa !5
  %103 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %100, i64 noundef %101, ptr noundef %102)
  %104 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %103, ptr noundef @.str.480, ptr noundef %104)
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = load i64, ptr %21, align 8, !tbaa !9
  %107 = load ptr, ptr %26, align 8, !tbaa !5
  %108 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %105, i64 noundef %106, ptr noundef %107)
  %109 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %108, ptr noundef @.str.482, ptr noundef %109)
  %110 = load ptr, ptr %19, align 8, !tbaa !5
  %111 = load i64, ptr %21, align 8, !tbaa !9
  %112 = load ptr, ptr %26, align 8, !tbaa !5
  %113 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %110, i64 noundef %111, ptr noundef %112)
  %114 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %113, ptr noundef @.str.483, ptr noundef %114)
  store i64 0, ptr %29, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %139, %13
  %116 = load i64, ptr %29, align 8, !tbaa !9
  %117 = load i64, ptr %21, align 8, !tbaa !9
  %118 = sub nsw i64 %117, 1
  %119 = icmp sle i64 %116, %118
  br i1 %119, label %120, label %142

120:                                              ; preds = %115
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = load i64, ptr %29, align 8, !tbaa !9
  %125 = getelementptr inbounds i64, ptr %123, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !9
  %127 = icmp eq i64 %126, 0
  br i1 %127, label %136, label %128

128:                                              ; preds = %120
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = load i64, ptr %29, align 8, !tbaa !9
  %133 = getelementptr inbounds i64, ptr %131, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !9
  %135 = icmp eq i64 %134, 1
  br label %136

136:                                              ; preds = %128, %120
  %137 = phi i1 [ true, %120 ], [ %135, %128 ]
  %138 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %137, ptr noundef @.str.484, ptr noundef %138)
  br label %139

139:                                              ; preds = %136
  %140 = load i64, ptr %29, align 8, !tbaa !9
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %29, align 8, !tbaa !9
  br label %115, !llvm.loop !16

142:                                              ; preds = %115
  store double 1.000000e+300, ptr %31, align 8, !tbaa !18
  %143 = load ptr, ptr %25, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %143, i32 0, i32 1
  store i64 -1, ptr %144, align 8, !tbaa !20
  %145 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -3, ptr %145, align 8, !tbaa !9
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %146

146:                                              ; preds = %270, %142
  %147 = load i64, ptr %28, align 8, !tbaa !9
  %148 = load i64, ptr %17, align 8, !tbaa !9
  %149 = sub nsw i64 %148, 1
  %150 = load ptr, ptr %26, align 8, !tbaa !5
  %151 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef 9, i64 noundef %149, ptr noundef %150)
  %152 = icmp sle i64 %147, %151
  br i1 %152, label %153, label %273

153:                                              ; preds = %146
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = load i64, ptr %17, align 8, !tbaa !9
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = load ptr, ptr %20, align 8, !tbaa !5
  %161 = load i64, ptr %21, align 8, !tbaa !9
  %162 = load i64, ptr %22, align 8, !tbaa !9
  %163 = load i64, ptr %28, align 8, !tbaa !9
  %164 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_implL28lsfit_barycentricfitwcfixeddEPNS_9ae_vectorES1_S1_lS1_S1_S1_lllPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef %154, ptr noundef %155, ptr noundef %156, i64 noundef %157, ptr noundef %158, ptr noundef %159, ptr noundef %160, i64 noundef %161, i64 noundef %162, i64 noundef %163, ptr noundef %34, ptr noundef %32, ptr noundef %33, ptr noundef %164)
  %165 = load i64, ptr %34, align 8, !tbaa !9
  %166 = icmp eq i64 %165, -4
  br i1 %166, label %173, label %167

167:                                              ; preds = %153
  %168 = load i64, ptr %34, align 8, !tbaa !9
  %169 = icmp eq i64 %168, -3
  br i1 %169, label %173, label %170

170:                                              ; preds = %167
  %171 = load i64, ptr %34, align 8, !tbaa !9
  %172 = icmp sgt i64 %171, 0
  br label %173

173:                                              ; preds = %170, %167, %153
  %174 = phi i1 [ true, %167 ], [ true, %153 ], [ %172, %170 ]
  %175 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %174, ptr noundef @.str.485, ptr noundef %175)
  %176 = load i64, ptr %34, align 8, !tbaa !9
  %177 = icmp sgt i64 %176, 0
  br i1 %177, label %178, label %258

178:                                              ; preds = %173
  store double 0.000000e+00, ptr %30, align 8, !tbaa !18
  store i64 0, ptr %29, align 8, !tbaa !9
  br label %179

179:                                              ; preds = %211, %178
  %180 = load i64, ptr %29, align 8, !tbaa !9
  %181 = load i64, ptr %17, align 8, !tbaa !9
  %182 = sub nsw i64 %181, 1
  %183 = icmp sle i64 %180, %182
  br i1 %183, label %184, label %214

184:                                              ; preds = %179
  %185 = load double, ptr %30, align 8, !tbaa !18
  %186 = load ptr, ptr %16, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %186, i32 0, i32 4
  %188 = load ptr, ptr %187, align 8, !tbaa !15
  %189 = load i64, ptr %29, align 8, !tbaa !9
  %190 = getelementptr inbounds double, ptr %188, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !18
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %192, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !15
  %195 = load i64, ptr %29, align 8, !tbaa !9
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  %197 = load double, ptr %196, align 8, !tbaa !18
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %198, i32 0, i32 4
  %200 = load ptr, ptr %199, align 8, !tbaa !15
  %201 = load i64, ptr %29, align 8, !tbaa !9
  %202 = getelementptr inbounds double, ptr %200, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !18
  %204 = load ptr, ptr %26, align 8, !tbaa !5
  %205 = call noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef %32, double noundef %203, ptr noundef %204)
  %206 = fsub double %197, %205
  %207 = fmul double %191, %206
  %208 = load ptr, ptr %26, align 8, !tbaa !5
  %209 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %207, ptr noundef %208)
  %210 = fadd double %185, %209
  store double %210, ptr %30, align 8, !tbaa !18
  br label %211

211:                                              ; preds = %184
  %212 = load i64, ptr %29, align 8, !tbaa !9
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %29, align 8, !tbaa !9
  br label %179, !llvm.loop !22

214:                                              ; preds = %179
  %215 = load double, ptr %30, align 8, !tbaa !18
  %216 = load i64, ptr %17, align 8, !tbaa !9
  %217 = sitofp i64 %216 to double
  %218 = fdiv double %215, %217
  %219 = load ptr, ptr %26, align 8, !tbaa !5
  %220 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %218, ptr noundef %219)
  store double %220, ptr %30, align 8, !tbaa !18
  %221 = load double, ptr %30, align 8, !tbaa !18
  %222 = load double, ptr %31, align 8, !tbaa !18
  %223 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %221, double noundef %222)
  br i1 %223, label %229, label %224

224:                                              ; preds = %214
  %225 = load ptr, ptr %25, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %225, i32 0, i32 1
  %227 = load i64, ptr %226, align 8, !tbaa !20
  %228 = icmp slt i64 %227, 0
  br i1 %228, label %229, label %257

229:                                              ; preds = %224, %214
  %230 = load ptr, ptr %24, align 8, !tbaa !5
  %231 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl15barycentriccopyEPNS_22barycentricinterpolantES1_PNS_8ae_stateE(ptr noundef %32, ptr noundef %230, ptr noundef %231)
  %232 = load i64, ptr %28, align 8, !tbaa !9
  %233 = load ptr, ptr %25, align 8, !tbaa !5
  %234 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %233, i32 0, i32 1
  store i64 %232, ptr %234, align 8, !tbaa !20
  %235 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 1, ptr %235, align 8, !tbaa !9
  %236 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %33, i32 0, i32 2
  %237 = load double, ptr %236, align 8, !tbaa !23
  %238 = load ptr, ptr %25, align 8, !tbaa !5
  %239 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %238, i32 0, i32 2
  store double %237, ptr %239, align 8, !tbaa !23
  %240 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %33, i32 0, i32 3
  %241 = load double, ptr %240, align 8, !tbaa !24
  %242 = load ptr, ptr %25, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %242, i32 0, i32 3
  store double %241, ptr %243, align 8, !tbaa !24
  %244 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %33, i32 0, i32 4
  %245 = load double, ptr %244, align 8, !tbaa !25
  %246 = load ptr, ptr %25, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %246, i32 0, i32 4
  store double %245, ptr %247, align 8, !tbaa !25
  %248 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %33, i32 0, i32 5
  %249 = load double, ptr %248, align 8, !tbaa !26
  %250 = load ptr, ptr %25, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %250, i32 0, i32 5
  store double %249, ptr %251, align 8, !tbaa !26
  %252 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %33, i32 0, i32 0
  %253 = load double, ptr %252, align 8, !tbaa !27
  %254 = load ptr, ptr %25, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.alglib_impl::barycentricfitreport", ptr %254, i32 0, i32 0
  store double %253, ptr %255, align 8, !tbaa !27
  %256 = load double, ptr %30, align 8, !tbaa !18
  store double %256, ptr %31, align 8, !tbaa !18
  br label %257

257:                                              ; preds = %229, %224
  br label %269

258:                                              ; preds = %173
  %259 = load i64, ptr %34, align 8, !tbaa !9
  %260 = icmp ne i64 %259, -3
  br i1 %260, label %261, label %268

261:                                              ; preds = %258
  %262 = load ptr, ptr %23, align 8, !tbaa !5
  %263 = load i64, ptr %262, align 8, !tbaa !9
  %264 = icmp slt i64 %263, 0
  br i1 %264, label %265, label %268

265:                                              ; preds = %261
  %266 = load i64, ptr %34, align 8, !tbaa !9
  %267 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 %266, ptr %267, align 8, !tbaa !9
  br label %268

268:                                              ; preds = %265, %261, %258
  br label %269

269:                                              ; preds = %268, %257
  br label %270

270:                                              ; preds = %269
  %271 = load i64, ptr %28, align 8, !tbaa !9
  %272 = add nsw i64 %271, 1
  store i64 %272, ptr %28, align 8, !tbaa !9
  br label %146, !llvm.loop !28

273:                                              ; preds = %146
  %274 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %274)
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #4
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28lsfit_barycentricfitwcfixeddEPNS_9ae_vectorES1_S1_lS1_S1_S1_lllPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 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, !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 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTSN11alglib_impl20barycentricfitreportE", !19, i64 0, !10, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40}
!22 = distinct !{!22, !17}
!23 = !{!21, !19, i64 16}
!24 = !{!21, !19, i64 24}
!25 = !{!21, !19, i64 32}
!26 = !{!21, !19, i64 40}
!27 = !{!21, !19, i64 0}
!28 = distinct !{!28, !17}


; 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::barycentricinterpolant" = type { i64, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"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::barycentricfitreport" = type { double, i64, double, double, double, double }

@.str.470 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.471 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.472 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.473 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.474 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.475 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.476 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.477 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.478 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.479 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.480 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.481 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.482 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.483 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.484 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.485 = external hidden unnamed_addr constant [79 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_impl28_barycentricinterpolant_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26_barycentricfitreport_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30barycentricfitfloaterhormannwcEPNS_9ae_vectorES1_S1_lS1_S1_S1_llPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i64 noundef %7, i64 noundef %8, ptr nocapture noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) local_unnamed_addr #3 {
  %14 = alloca %"struct.alglib_impl::ae_frame", align 8
  %15 = alloca %"struct.alglib_impl::barycentricinterpolant", align 8
  %16 = alloca %"struct.alglib_impl::barycentricfitreport", align 8
  %17 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %12, ptr noundef nonnull %14)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(208) %15, i8 0, i64 208, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %16, i8 0, i64 48, i1 false)
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %10)
  call void @_ZN11alglib_impl27_barycentricfitreport_clearEPv(ptr noundef %11)
  call void @_ZN11alglib_impl28_barycentricinterpolant_initEPvPNS_8ae_stateEb(ptr noundef nonnull %15, ptr noundef %12, i1 noundef zeroext true)
  call void @_ZN11alglib_impl26_barycentricfitreport_initEPvPNS_8ae_stateEb(ptr noundef nonnull %16, ptr noundef %12, i1 noundef zeroext true)
  %18 = icmp sgt i64 %3, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.470, ptr noundef %12)
  %19 = icmp sgt i64 %8, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.471, ptr noundef %12)
  %20 = icmp sgt i64 %7, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.472, ptr noundef %12)
  %21 = icmp slt i64 %7, %8
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.473, ptr noundef %12)
  %22 = load i64, ptr %0, align 8, !tbaa !9
  %23 = icmp sge i64 %22, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.474, ptr noundef %12)
  %24 = load i64, ptr %1, align 8, !tbaa !9
  %25 = icmp sge i64 %24, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.475, ptr noundef %12)
  %26 = load i64, ptr %2, align 8, !tbaa !9
  %27 = icmp sge i64 %26, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.476, ptr noundef %12)
  %28 = load i64, ptr %4, align 8, !tbaa !9
  %29 = icmp sge i64 %28, %7
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.477, ptr noundef %12)
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = icmp sge i64 %30, %7
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef nonnull @.str.478, ptr noundef %12)
  %32 = load i64, ptr %6, align 8, !tbaa !9
  %33 = icmp sge i64 %32, %7
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef nonnull @.str.479, ptr noundef %12)
  %34 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %3, ptr noundef %12)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.480, ptr noundef %12)
  %35 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %3, ptr noundef %12)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef nonnull @.str.481, ptr noundef %12)
  %36 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %3, ptr noundef %12)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef nonnull @.str.480, ptr noundef %12)
  %37 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %7, ptr noundef %12)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef nonnull @.str.482, ptr noundef %12)
  %38 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %7, ptr noundef %12)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef nonnull @.str.483, ptr noundef %12)
  %.not.not121 = icmp sgt i64 %7, 0
  br i1 %.not.not121, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %39 = getelementptr inbounds i8, ptr %6, i64 56
  br label %40

40:                                               ; preds = %.lr.ph, %40
  %.0112122 = phi i64 [ 0, %.lr.ph ], [ %44, %40 ]
  %41 = load ptr, ptr %39, align 8, !tbaa !14
  %42 = getelementptr inbounds i64, ptr %41, i64 %.0112122
  %43 = load i64, ptr %42, align 8, !tbaa !5
  %spec.select = icmp ult i64 %43, 2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.484, ptr noundef %12)
  %44 = add nuw nsw i64 %.0112122, 1
  %exitcond.not = icmp eq i64 %44, %7
  br i1 %exitcond.not, label %._crit_edge, label %40, !llvm.loop !15

._crit_edge:                                      ; preds = %40, %13
  %45 = getelementptr inbounds i8, ptr %11, i64 8
  store i64 -1, ptr %45, align 8, !tbaa !17
  store i64 -3, ptr %9, align 8, !tbaa !5
  %46 = add nsw i64 %3, -1
  %47 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef 9, i64 noundef %46, ptr noundef %12)
  %.not128 = icmp slt i64 %47, 0
  br i1 %.not128, label %._crit_edge133, label %.lr.ph132

.lr.ph132:                                        ; preds = %._crit_edge
  %48 = getelementptr inbounds i8, ptr %2, i64 56
  %49 = getelementptr inbounds i8, ptr %1, i64 56
  %50 = getelementptr inbounds i8, ptr %0, i64 56
  %51 = sitofp i64 %3 to double
  %52 = getelementptr inbounds i8, ptr %16, i64 16
  %53 = getelementptr inbounds i8, ptr %11, i64 16
  %54 = getelementptr inbounds i8, ptr %16, i64 32
  %55 = getelementptr inbounds i8, ptr %11, i64 32
  br label %56

56:                                               ; preds = %.lr.ph132, %92
  %.0130 = phi double [ 1.000000e+300, %.lr.ph132 ], [ %.1, %92 ]
  %.0114129 = phi i64 [ 0, %.lr.ph132 ], [ %93, %92 ]
  call void @_ZN11alglib_implL28lsfit_barycentricfitwcfixeddEPNS_9ae_vectorES1_S1_lS1_S1_S1_lllPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, i64 noundef %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef %7, i64 noundef %8, i64 noundef %.0114129, ptr noundef nonnull %17, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %12)
  %57 = load i64, ptr %17, align 8
  %58 = and i64 %57, -2
  %or.cond = icmp eq i64 %58, -4
  %59 = icmp sgt i64 %57, 0
  %spec.select120 = or i1 %59, %or.cond
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select120, ptr noundef nonnull @.str.485, ptr noundef %12)
  %60 = load i64, ptr %17, align 8, !tbaa !5
  %61 = icmp sgt i64 %60, 0
  br i1 %61, label %.preheader, label %87

.preheader:                                       ; preds = %56
  br i1 %18, label %.lr.ph126, label %._crit_edge127

.lr.ph126:                                        ; preds = %.preheader, %.lr.ph126
  %.0111125 = phi double [ %75, %.lr.ph126 ], [ 0.000000e+00, %.preheader ]
  %.1113124 = phi i64 [ %76, %.lr.ph126 ], [ 0, %.preheader ]
  %62 = load ptr, ptr %48, align 8, !tbaa !14
  %63 = getelementptr inbounds double, ptr %62, i64 %.1113124
  %64 = load double, ptr %63, align 8, !tbaa !20
  %65 = load ptr, ptr %49, align 8, !tbaa !14
  %66 = getelementptr inbounds double, ptr %65, i64 %.1113124
  %67 = load double, ptr %66, align 8, !tbaa !20
  %68 = load ptr, ptr %50, align 8, !tbaa !14
  %69 = getelementptr inbounds double, ptr %68, i64 %.1113124
  %70 = load double, ptr %69, align 8, !tbaa !20
  %71 = call noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef nonnull %15, double noundef %70, ptr noundef %12)
  %72 = fsub double %67, %71
  %73 = fmul double %64, %72
  %74 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %73, ptr noundef %12)
  %75 = fadd double %.0111125, %74
  %76 = add nuw nsw i64 %.1113124, 1
  %exitcond135.not = icmp eq i64 %76, %3
  br i1 %exitcond135.not, label %._crit_edge127, label %.lr.ph126, !llvm.loop !21

._crit_edge127:                                   ; preds = %.lr.ph126, %.preheader
  %.0111.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %75, %.lr.ph126 ]
  %77 = fdiv double %.0111.lcssa, %51
  %78 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %77, ptr noundef %12)
  %79 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %78, double noundef %.0130)
  br i1 %79, label %83, label %80

80:                                               ; preds = %._crit_edge127
  %81 = load i64, ptr %45, align 8, !tbaa !17
  %82 = icmp slt i64 %81, 0
  br i1 %82, label %83, label %92

83:                                               ; preds = %80, %._crit_edge127
  call void @_ZN11alglib_impl15barycentriccopyEPNS_22barycentricinterpolantES1_PNS_8ae_stateE(ptr noundef nonnull %15, ptr noundef %10, ptr noundef %12)
  store i64 %.0114129, ptr %45, align 8, !tbaa !17
  store i64 1, ptr %9, align 8, !tbaa !5
  %84 = load <2 x double>, ptr %52, align 8, !tbaa !20
  store <2 x double> %84, ptr %53, align 8, !tbaa !20
  %85 = load <2 x double>, ptr %54, align 8, !tbaa !20
  store <2 x double> %85, ptr %55, align 8, !tbaa !20
  %86 = load double, ptr %16, align 8, !tbaa !22
  store double %86, ptr %11, align 8, !tbaa !22
  br label %92

87:                                               ; preds = %56
  %.not118 = icmp eq i64 %60, -3
  br i1 %.not118, label %92, label %88

88:                                               ; preds = %87
  %89 = load i64, ptr %9, align 8, !tbaa !5
  %90 = icmp slt i64 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %88
  store i64 %60, ptr %9, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %83, %80, %91, %88, %87
  %.1 = phi double [ %78, %83 ], [ %.0130, %80 ], [ %.0130, %91 ], [ %.0130, %88 ], [ %.0130, %87 ]
  %93 = add nuw nsw i64 %.0114129, 1
  %94 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef 9, i64 noundef %46, ptr noundef %12)
  %.not.not134 = icmp slt i64 %.0114129, %94
  br i1 %.not.not134, label %56, label %._crit_edge133, !llvm.loop !23

._crit_edge133:                                   ; preds = %92, %._crit_edge
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL28lsfit_barycentricfitwcfixeddEPNS_9ae_vectorES1_S1_lS1_S1_S1_lllPlPNS_22barycentricinterpolantEPNS_20barycentricfitreportEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 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, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 24, !7, i64 56}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTSN11alglib_impl20barycentricfitreportE", !19, i64 0, !6, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40}
!19 = !{!"double", !7, i64 0}
!20 = !{!19, !19, i64 0}
!21 = distinct !{!21, !16}
!22 = !{!18, !19, i64 0}
!23 = distinct !{!23, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass