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

@.str.347 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [76 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 noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef, double noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18polynomialbar2chebEPNS_22barycentricinterpolantEddPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store double %1, ptr %7, align 8, !tbaa !9
  store double %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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %19, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, 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 %17, i8 0, i64 64, i1 false)
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %20)
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %21, i1 noundef zeroext true)
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %22, i1 noundef zeroext true)
  %23 = 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 %23, i1 noundef zeroext true)
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %24, i1 noundef zeroext true)
  %25 = load double, ptr %7, align 8, !tbaa !9
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %25, ptr noundef %26)
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.347, ptr noundef %28)
  %29 = load double, ptr %8, align 8, !tbaa !9
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %29, ptr noundef %30)
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.348, ptr noundef %32)
  %33 = load double, ptr %7, align 8, !tbaa !9
  %34 = load double, ptr %8, align 8, !tbaa !9
  %35 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %33, double noundef %34)
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.349, ptr noundef %36)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %37, i32 0, i32 0
  %39 = load i64, ptr %38, align 8, !tbaa !11
  %40 = icmp sgt i64 %39, 0
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.350, ptr noundef %41)
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %42, i32 0, i32 0
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %44, ptr noundef %45)
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %48, ptr noundef %49)
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %50

50:                                               ; preds = %92, %5
  %51 = load i64, ptr %12, align 8, !tbaa !17
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %52, i32 0, i32 0
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = sub nsw i64 %54, 1
  %56 = icmp sle i64 %51, %55
  br i1 %56, label %57, label %95

57:                                               ; preds = %50
  %58 = load i64, ptr %12, align 8, !tbaa !17
  %59 = sitofp i64 %58 to double
  %60 = fadd double %59, 5.000000e-01
  %61 = fmul double 0x400921FB54442D18, %60
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %62, i32 0, i32 0
  %64 = load i64, ptr %63, align 8, !tbaa !11
  %65 = sitofp i64 %64 to double
  %66 = fdiv double %61, %65
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %66, ptr noundef %67)
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = load i64, ptr %12, align 8, !tbaa !17
  %72 = getelementptr inbounds double, ptr %70, i64 %71
  store double %68, ptr %72, align 8, !tbaa !9
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !18
  %76 = load i64, ptr %12, align 8, !tbaa !17
  %77 = getelementptr inbounds double, ptr %75, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = fadd double %78, 1.000000e+00
  %80 = fmul double 5.000000e-01, %79
  %81 = load double, ptr %8, align 8, !tbaa !9
  %82 = load double, ptr %7, align 8, !tbaa !9
  %83 = fsub double %81, %82
  %84 = load double, ptr %7, align 8, !tbaa !9
  %85 = call double @llvm.fmuladd.f64(double %80, double %83, double %84)
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = call noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef %73, double noundef %85, ptr noundef %86)
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  %90 = load i64, ptr %12, align 8, !tbaa !17
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  store double %87, ptr %91, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %57
  %93 = load i64, ptr %12, align 8, !tbaa !17
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %12, align 8, !tbaa !17
  br label %50, !llvm.loop !19

95:                                               ; preds = %50
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %97, i32 0, i32 0
  %99 = load i64, ptr %98, align 8, !tbaa !11
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %96, i64 noundef %99, ptr noundef %100)
  store double 0.000000e+00, ptr %18, align 8, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %101

101:                                              ; preds = %116, %95
  %102 = load i64, ptr %12, align 8, !tbaa !17
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %103, i32 0, i32 0
  %105 = load i64, ptr %104, align 8, !tbaa !11
  %106 = sub nsw i64 %105, 1
  %107 = icmp sle i64 %102, %106
  br i1 %107, label %108, label %119

108:                                              ; preds = %101
  %109 = load double, ptr %18, align 8, !tbaa !9
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = load i64, ptr %12, align 8, !tbaa !17
  %113 = getelementptr inbounds double, ptr %111, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !9
  %115 = fadd double %109, %114
  store double %115, ptr %18, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %108
  %117 = load i64, ptr %12, align 8, !tbaa !17
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %12, align 8, !tbaa !17
  br label %101, !llvm.loop !21

119:                                              ; preds = %101
  %120 = load double, ptr %18, align 8, !tbaa !9
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %121, i32 0, i32 0
  %123 = load i64, ptr %122, align 8, !tbaa !11
  %124 = sitofp i64 %123 to double
  %125 = fdiv double %120, %124
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %126, i32 0, i32 4
  %128 = load ptr, ptr %127, align 8, !tbaa !18
  %129 = getelementptr inbounds double, ptr %128, i64 0
  store double %125, ptr %129, align 8, !tbaa !9
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %130, i32 0, i32 0
  %132 = load i64, ptr %131, align 8, !tbaa !11
  %133 = icmp sgt i64 %132, 1
  br i1 %133, label %134, label %248

134:                                              ; preds = %119
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %135, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !11
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %137, ptr noundef %138)
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %139, i32 0, i32 0
  %141 = load i64, ptr %140, align 8, !tbaa !11
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %141, ptr noundef %142)
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %143

143:                                              ; preds = %164, %134
  %144 = load i64, ptr %12, align 8, !tbaa !17
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %145, i32 0, i32 0
  %147 = load i64, ptr %146, align 8, !tbaa !11
  %148 = sub nsw i64 %147, 1
  %149 = icmp sle i64 %144, %148
  br i1 %149, label %150, label %167

150:                                              ; preds = %143
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !18
  %153 = load i64, ptr %12, align 8, !tbaa !17
  %154 = getelementptr inbounds double, ptr %152, i64 %153
  %155 = load double, ptr %154, align 8, !tbaa !9
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !18
  %158 = load i64, ptr %12, align 8, !tbaa !17
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  store double %155, ptr %159, align 8, !tbaa !9
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !18
  %162 = load i64, ptr %12, align 8, !tbaa !17
  %163 = getelementptr inbounds double, ptr %161, i64 %162
  store double 1.000000e+00, ptr %163, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %150
  %165 = load i64, ptr %12, align 8, !tbaa !17
  %166 = add nsw i64 %165, 1
  store i64 %166, ptr %12, align 8, !tbaa !17
  br label %143, !llvm.loop !22

167:                                              ; preds = %143
  store i64 1, ptr %13, align 8, !tbaa !17
  br label %168

168:                                              ; preds = %244, %167
  %169 = load i64, ptr %13, align 8, !tbaa !17
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %170, i32 0, i32 0
  %172 = load i64, ptr %171, align 8, !tbaa !11
  %173 = sub nsw i64 %172, 1
  %174 = icmp sle i64 %169, %173
  br i1 %174, label %175, label %247

175:                                              ; preds = %168
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !18
  %178 = getelementptr inbounds double, ptr %177, i64 0
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !18
  %181 = getelementptr inbounds double, ptr %180, i64 0
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %182, i32 0, i32 0
  %184 = load i64, ptr %183, align 8, !tbaa !11
  %185 = sub nsw i64 %184, 1
  %186 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %185)
  %187 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %178, i64 noundef 1, ptr noundef %181, i64 noundef 1, i64 noundef %186)
  store double %187, ptr %18, align 8, !tbaa !9
  %188 = load double, ptr %18, align 8, !tbaa !9
  %189 = load ptr, ptr %6, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %189, i32 0, i32 0
  %191 = load i64, ptr %190, align 8, !tbaa !11
  %192 = sitofp i64 %191 to double
  %193 = fmul double 5.000000e-01, %192
  %194 = fdiv double %188, %193
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %195, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !18
  %198 = load i64, ptr %13, align 8, !tbaa !17
  %199 = getelementptr inbounds double, ptr %197, i64 %198
  store double %194, ptr %199, align 8, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %200

200:                                              ; preds = %240, %175
  %201 = load i64, ptr %12, align 8, !tbaa !17
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::barycentricinterpolant", ptr %202, i32 0, i32 0
  %204 = load i64, ptr %203, align 8, !tbaa !11
  %205 = sub nsw i64 %204, 1
  %206 = icmp sle i64 %201, %205
  br i1 %206, label %207, label %243

207:                                              ; preds = %200
  %208 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %209 = load ptr, ptr %208, align 8, !tbaa !18
  %210 = load i64, ptr %12, align 8, !tbaa !17
  %211 = getelementptr inbounds double, ptr %209, i64 %210
  %212 = load double, ptr %211, align 8, !tbaa !9
  %213 = fmul double 2.000000e+00, %212
  %214 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %215 = load ptr, ptr %214, align 8, !tbaa !18
  %216 = load i64, ptr %12, align 8, !tbaa !17
  %217 = getelementptr inbounds double, ptr %215, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !9
  %219 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %220 = load ptr, ptr %219, align 8, !tbaa !18
  %221 = load i64, ptr %12, align 8, !tbaa !17
  %222 = getelementptr inbounds double, ptr %220, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !9
  %224 = fneg double %223
  %225 = call double @llvm.fmuladd.f64(double %213, double %218, double %224)
  store double %225, ptr %18, align 8, !tbaa !9
  %226 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %227 = load ptr, ptr %226, align 8, !tbaa !18
  %228 = load i64, ptr %12, align 8, !tbaa !17
  %229 = getelementptr inbounds double, ptr %227, i64 %228
  %230 = load double, ptr %229, align 8, !tbaa !9
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %232 = load ptr, ptr %231, align 8, !tbaa !18
  %233 = load i64, ptr %12, align 8, !tbaa !17
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  store double %230, ptr %234, align 8, !tbaa !9
  %235 = load double, ptr %18, align 8, !tbaa !9
  %236 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %237 = load ptr, ptr %236, align 8, !tbaa !18
  %238 = load i64, ptr %12, align 8, !tbaa !17
  %239 = getelementptr inbounds double, ptr %237, i64 %238
  store double %235, ptr %239, align 8, !tbaa !9
  br label %240

240:                                              ; preds = %207
  %241 = load i64, ptr %12, align 8, !tbaa !17
  %242 = add nsw i64 %241, 1
  store i64 %242, ptr %12, align 8, !tbaa !17
  br label %200, !llvm.loop !23

243:                                              ; preds = %200
  br label %244

244:                                              ; preds = %243
  %245 = load i64, ptr %13, align 8, !tbaa !17
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %13, align 8, !tbaa !17
  br label %168, !llvm.loop !24

247:                                              ; preds = %168
  br label %248

248:                                              ; preds = %247, %119
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %249)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) #2

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

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 double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11alglib_impl22barycentricinterpolantE", !13, i64 0, !10, i64 8, !14, i64 16, !14, i64 80, !14, i64 144}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!13, !13, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


; 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.347 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.350 = external hidden unnamed_addr constant [76 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 noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef, double noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18polynomialbar2chebEPNS_22barycentricinterpolantEddPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, double noundef %1, double 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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #5
  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 @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, 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 %8, 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 %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)
  %11 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %1, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.347, ptr noundef %4)
  %12 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.348, ptr noundef %4)
  %13 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %1, double noundef %2)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.349, ptr noundef %4)
  %14 = load i64, ptr %0, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.350, ptr noundef %4)
  %16 = load i64, ptr %0, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %16, ptr noundef %4)
  %17 = load i64, ptr %0, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %17, ptr noundef %4)
  %18 = load i64, ptr %0, align 8, !tbaa !5
  %.not.not84 = icmp sgt i64 %18, 0
  br i1 %.not.not84, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %19 = getelementptr inbounds i8, ptr %8, i64 56
  %20 = fsub double %2, %1
  %21 = getelementptr inbounds i8, ptr %7, i64 56
  br label %22

22:                                               ; preds = %.lr.ph, %22
  %23 = phi i64 [ %18, %.lr.ph ], [ %42, %22 ]
  %.07685 = phi i64 [ 0, %.lr.ph ], [ %41, %22 ]
  %24 = uitofp nneg i64 %.07685 to double
  %25 = fadd double %24, 5.000000e-01
  %26 = fmul double %25, 0x400921FB54442D18
  %27 = sitofp i64 %23 to double
  %28 = fdiv double %26, %27
  %29 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %28, ptr noundef %4)
  %30 = load ptr, ptr %19, align 8, !tbaa !15
  %31 = getelementptr inbounds double, ptr %30, i64 %.07685
  store double %29, ptr %31, align 8, !tbaa !16
  %32 = load ptr, ptr %19, align 8, !tbaa !15
  %33 = getelementptr inbounds double, ptr %32, i64 %.07685
  %34 = load double, ptr %33, align 8, !tbaa !16
  %35 = fadd double %34, 1.000000e+00
  %36 = fmul double %35, 5.000000e-01
  %37 = call double @llvm.fmuladd.f64(double %36, double %20, double %1)
  %38 = call noundef double @_ZN11alglib_impl15barycentriccalcEPNS_22barycentricinterpolantEdPNS_8ae_stateE(ptr noundef nonnull %0, double noundef %37, ptr noundef %4)
  %39 = load ptr, ptr %21, align 8, !tbaa !15
  %40 = getelementptr inbounds double, ptr %39, i64 %.07685
  store double %38, ptr %40, align 8, !tbaa !16
  %41 = add nuw nsw i64 %.07685, 1
  %42 = load i64, ptr %0, align 8, !tbaa !5
  %.not.not = icmp slt i64 %41, %42
  br i1 %.not.not, label %22, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %22, %5
  %.lcssa83 = phi i64 [ %18, %5 ], [ %42, %22 ]
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %.lcssa83, ptr noundef %4)
  %43 = load i64, ptr %0, align 8, !tbaa !5
  %.not.not7986 = icmp sgt i64 %43, 0
  br i1 %.not.not7986, label %.lr.ph90, label %._crit_edge91.thread

._crit_edge91.thread:                             ; preds = %._crit_edge
  %44 = sitofp i64 %43 to double
  %45 = fdiv double 0.000000e+00, %44
  %46 = getelementptr inbounds i8, ptr %3, i64 56
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  store double %45, ptr %47, align 8, !tbaa !16
  br label %.loopexit

.lr.ph90:                                         ; preds = %._crit_edge
  %48 = getelementptr inbounds i8, ptr %7, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  %xtraiter = and i64 %43, 7
  %50 = icmp ult i64 %43, 8
  br i1 %50, label %._crit_edge91.unr-lcssa, label %.lr.ph90.new

.lr.ph90.new:                                     ; preds = %.lr.ph90
  %unroll_iter = and i64 %43, 9223372036854775800
  br label %51

51:                                               ; preds = %51, %.lr.ph90.new
  %.088 = phi double [ 0.000000e+00, %.lr.ph90.new ], [ %82, %51 ]
  %.187 = phi i64 [ 0, %.lr.ph90.new ], [ %83, %51 ]
  %niter = phi i64 [ 0, %.lr.ph90.new ], [ %niter.next.7, %51 ]
  %52 = getelementptr inbounds double, ptr %49, i64 %.187
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = fadd double %.088, %53
  %55 = or disjoint i64 %.187, 1
  %56 = getelementptr inbounds double, ptr %49, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !16
  %58 = fadd double %54, %57
  %59 = or disjoint i64 %.187, 2
  %60 = getelementptr inbounds double, ptr %49, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = fadd double %58, %61
  %63 = or disjoint i64 %.187, 3
  %64 = getelementptr inbounds double, ptr %49, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !16
  %66 = fadd double %62, %65
  %67 = or disjoint i64 %.187, 4
  %68 = getelementptr inbounds double, ptr %49, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !16
  %70 = fadd double %66, %69
  %71 = or disjoint i64 %.187, 5
  %72 = getelementptr inbounds double, ptr %49, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !16
  %74 = fadd double %70, %73
  %75 = or disjoint i64 %.187, 6
  %76 = getelementptr inbounds double, ptr %49, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !16
  %78 = fadd double %74, %77
  %79 = or disjoint i64 %.187, 7
  %80 = getelementptr inbounds double, ptr %49, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !16
  %82 = fadd double %78, %81
  %83 = add nuw nsw i64 %.187, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge91.unr-lcssa, label %51, !llvm.loop !19

._crit_edge91.unr-lcssa:                          ; preds = %51, %.lr.ph90
  %.lcssa.ph = phi double [ poison, %.lr.ph90 ], [ %82, %51 ]
  %.088.unr = phi double [ 0.000000e+00, %.lr.ph90 ], [ %82, %51 ]
  %.187.unr = phi i64 [ 0, %.lr.ph90 ], [ %83, %51 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge91, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge91.unr-lcssa, %.epil.preheader
  %.088.epil = phi double [ %86, %.epil.preheader ], [ %.088.unr, %._crit_edge91.unr-lcssa ]
  %.187.epil = phi i64 [ %87, %.epil.preheader ], [ %.187.unr, %._crit_edge91.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge91.unr-lcssa ]
  %84 = getelementptr inbounds double, ptr %49, i64 %.187.epil
  %85 = load double, ptr %84, align 8, !tbaa !16
  %86 = fadd double %.088.epil, %85
  %87 = add nuw nsw i64 %.187.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge91, label %.epil.preheader, !llvm.loop !20

._crit_edge91:                                    ; preds = %.epil.preheader, %._crit_edge91.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge91.unr-lcssa ], [ %86, %.epil.preheader ]
  %88 = sitofp i64 %43 to double
  %89 = fdiv double %.lcssa, %88
  %90 = getelementptr inbounds i8, ptr %3, i64 56
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  store double %89, ptr %91, align 8, !tbaa !16
  %.not = icmp eq i64 %43, 1
  br i1 %.not, label %.loopexit, label %92

92:                                               ; preds = %._crit_edge91
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %43, ptr noundef %4)
  %93 = load i64, ptr %0, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %93, ptr noundef %4)
  %94 = load i64, ptr %0, align 8, !tbaa !5
  %.not.not8094 = icmp sgt i64 %94, 0
  br i1 %.not.not8094, label %.lr.ph97, label %.loopexit

.lr.ph97:                                         ; preds = %92
  %95 = getelementptr inbounds i8, ptr %8, i64 56
  %96 = getelementptr inbounds i8, ptr %9, i64 56
  %97 = getelementptr inbounds i8, ptr %10, i64 56
  %xtraiter116 = and i64 %94, 1
  %98 = icmp eq i64 %94, 1
  br i1 %98, label %.preheader.unr-lcssa, label %.lr.ph97.new

.lr.ph97.new:                                     ; preds = %.lr.ph97
  %unroll_iter119 = and i64 %94, 9223372036854775806
  br label %110

.preheader.unr-lcssa:                             ; preds = %110, %.lr.ph97
  %.295.unr = phi i64 [ 0, %.lr.ph97 ], [ %126, %110 ]
  %lcmp.mod118.not = icmp eq i64 %xtraiter116, 0
  br i1 %lcmp.mod118.not, label %.preheader, label %.preheader.epilog-lcssa

.preheader.epilog-lcssa:                          ; preds = %.preheader.unr-lcssa
  %99 = load ptr, ptr %95, align 8, !tbaa !15
  %100 = getelementptr inbounds double, ptr %99, i64 %.295.unr
  %101 = load double, ptr %100, align 8, !tbaa !16
  %102 = load ptr, ptr %96, align 8, !tbaa !15
  %103 = getelementptr inbounds double, ptr %102, i64 %.295.unr
  store double %101, ptr %103, align 8, !tbaa !16
  %104 = load ptr, ptr %97, align 8, !tbaa !15
  %105 = getelementptr inbounds double, ptr %104, i64 %.295.unr
  store double 1.000000e+00, ptr %105, align 8, !tbaa !16
  br label %.preheader

.preheader:                                       ; preds = %.preheader.unr-lcssa, %.preheader.epilog-lcssa
  %.not.not81103.not = icmp eq i64 %94, 1
  br i1 %.not.not81103.not, label %.loopexit, label %.lr.ph105

.lr.ph105:                                        ; preds = %.preheader
  %106 = getelementptr inbounds i8, ptr %9, i64 56
  %107 = getelementptr inbounds i8, ptr %7, i64 56
  %108 = getelementptr inbounds i8, ptr %8, i64 56
  %109 = getelementptr inbounds i8, ptr %10, i64 56
  br label %127

110:                                              ; preds = %110, %.lr.ph97.new
  %.295 = phi i64 [ 0, %.lr.ph97.new ], [ %126, %110 ]
  %niter120 = phi i64 [ 0, %.lr.ph97.new ], [ %niter120.next.1, %110 ]
  %111 = load ptr, ptr %95, align 8, !tbaa !15
  %112 = getelementptr inbounds double, ptr %111, i64 %.295
  %113 = load double, ptr %112, align 8, !tbaa !16
  %114 = load ptr, ptr %96, align 8, !tbaa !15
  %115 = getelementptr inbounds double, ptr %114, i64 %.295
  store double %113, ptr %115, align 8, !tbaa !16
  %116 = load ptr, ptr %97, align 8, !tbaa !15
  %117 = getelementptr inbounds double, ptr %116, i64 %.295
  store double 1.000000e+00, ptr %117, align 8, !tbaa !16
  %118 = or disjoint i64 %.295, 1
  %119 = load ptr, ptr %95, align 8, !tbaa !15
  %120 = getelementptr inbounds double, ptr %119, i64 %118
  %121 = load double, ptr %120, align 8, !tbaa !16
  %122 = load ptr, ptr %96, align 8, !tbaa !15
  %123 = getelementptr inbounds double, ptr %122, i64 %118
  store double %121, ptr %123, align 8, !tbaa !16
  %124 = load ptr, ptr %97, align 8, !tbaa !15
  %125 = getelementptr inbounds double, ptr %124, i64 %118
  store double 1.000000e+00, ptr %125, align 8, !tbaa !16
  %126 = add nuw nsw i64 %.295, 2
  %niter120.next.1 = add i64 %niter120, 2
  %niter120.ncmp.1 = icmp eq i64 %niter120.next.1, %unroll_iter119
  br i1 %niter120.ncmp.1, label %.preheader.unr-lcssa, label %110, !llvm.loop !22

127:                                              ; preds = %.lr.ph105, %._crit_edge102
  %128 = phi i64 [ %94, %.lr.ph105 ], [ %134, %._crit_edge102 ]
  %.075104 = phi i64 [ 1, %.lr.ph105 ], [ %155, %._crit_edge102 ]
  %129 = add nsw i64 %128, -1
  %130 = load ptr, ptr %106, align 8, !tbaa !15
  %131 = load ptr, ptr %107, align 8, !tbaa !15
  %132 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %129)
  %133 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %130, i64 noundef 1, ptr noundef %131, i64 noundef 1, i64 noundef %132)
  %134 = load i64, ptr %0, align 8, !tbaa !5
  %135 = sitofp i64 %134 to double
  %136 = fmul double %135, 5.000000e-01
  %137 = fdiv double %133, %136
  %138 = load ptr, ptr %90, align 8, !tbaa !15
  %139 = getelementptr inbounds double, ptr %138, i64 %.075104
  store double %137, ptr %139, align 8, !tbaa !16
  %.not.not8298 = icmp sgt i64 %134, 0
  br i1 %.not.not8298, label %.lr.ph101, label %._crit_edge102

.lr.ph101:                                        ; preds = %127, %.lr.ph101
  %.399 = phi i64 [ %154, %.lr.ph101 ], [ 0, %127 ]
  %140 = load ptr, ptr %108, align 8, !tbaa !15
  %141 = getelementptr inbounds double, ptr %140, i64 %.399
  %142 = load double, ptr %141, align 8, !tbaa !16
  %143 = fmul double %142, 2.000000e+00
  %144 = load ptr, ptr %106, align 8, !tbaa !15
  %145 = getelementptr inbounds double, ptr %144, i64 %.399
  %146 = load double, ptr %145, align 8, !tbaa !16
  %147 = load ptr, ptr %109, align 8, !tbaa !15
  %148 = getelementptr inbounds double, ptr %147, i64 %.399
  %149 = load double, ptr %148, align 8, !tbaa !16
  %150 = fneg double %149
  %151 = call double @llvm.fmuladd.f64(double %143, double %146, double %150)
  store double %146, ptr %148, align 8, !tbaa !16
  %152 = load ptr, ptr %106, align 8, !tbaa !15
  %153 = getelementptr inbounds double, ptr %152, i64 %.399
  store double %151, ptr %153, align 8, !tbaa !16
  %154 = add nuw nsw i64 %.399, 1
  %exitcond108.not = icmp eq i64 %154, %134
  br i1 %exitcond108.not, label %._crit_edge102, label %.lr.ph101, !llvm.loop !23

._crit_edge102:                                   ; preds = %.lr.ph101, %127
  %155 = add nuw nsw i64 %.075104, 1
  %.not.not81 = icmp slt i64 %155, %134
  br i1 %.not.not81, label %127, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %._crit_edge102, %92, %._crit_edge91.thread, %.preheader, %._crit_edge91
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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 noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double 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_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 double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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_impl22barycentricinterpolantE", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 80, !11, i64 144}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !12, i64 16, !13, i64 24, !8, i64 56}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!8, !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


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