; 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.371 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.373 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.374 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.375 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.376 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.377 = external hidden unnamed_addr constant [44 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_impl21polynomialbuildeqdistEddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %0, double noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  store double %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !9
  store i64 %3, ptr %10, align 8, !tbaa !11
  store ptr %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 64, 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
  %19 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %19, ptr noundef %13)
  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)
  %20 = load ptr, ptr %11, align 8, !tbaa !9
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %20)
  %21 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %21, i1 noundef zeroext true)
  %22 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 3, ptr noundef %22, i1 noundef zeroext true)
  %23 = load i64, ptr %10, align 8, !tbaa !11
  %24 = icmp sgt i64 %23, 0
  %25 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef @.str.371, ptr noundef %25)
  %26 = load ptr, ptr %9, align 8, !tbaa !9
  %27 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = load i64, ptr %10, align 8, !tbaa !11
  %30 = icmp sge i64 %28, %29
  %31 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %30, ptr noundef @.str.372, ptr noundef %31)
  %32 = load double, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %12, align 8, !tbaa !9
  %34 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %32, ptr noundef %33)
  %35 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.373, ptr noundef %35)
  %36 = load double, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !9
  %38 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %36, ptr noundef %37)
  %39 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.374, ptr noundef %39)
  %40 = load ptr, ptr %9, align 8, !tbaa !9
  %41 = load i64, ptr %10, align 8, !tbaa !11
  %42 = load ptr, ptr %12, align 8, !tbaa !9
  %43 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %40, i64 noundef %41, ptr noundef %42)
  %44 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.375, ptr noundef %44)
  %45 = load double, ptr %8, align 8, !tbaa !5
  %46 = load double, ptr %7, align 8, !tbaa !5
  %47 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %45, double noundef %46)
  %48 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.376, ptr noundef %48)
  %49 = load double, ptr %7, align 8, !tbaa !5
  %50 = load double, ptr %8, align 8, !tbaa !5
  %51 = load double, ptr %7, align 8, !tbaa !5
  %52 = fsub double %50, %51
  %53 = load i64, ptr %10, align 8, !tbaa !11
  %54 = sitofp i64 %53 to double
  %55 = fdiv double %52, %54
  %56 = fadd double %49, %55
  %57 = load double, ptr %7, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %56, double noundef %57)
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.377, ptr noundef %59)
  %60 = load i64, ptr %10, align 8, !tbaa !11
  %61 = icmp eq i64 %60, 1
  br i1 %61, label %62, label %79

62:                                               ; preds = %6
  %63 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef 1, ptr noundef %63)
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef 1, ptr noundef %64)
  %65 = load double, ptr %8, align 8, !tbaa !5
  %66 = load double, ptr %7, align 8, !tbaa !5
  %67 = fadd double %65, %66
  %68 = fmul double 5.000000e-01, %67
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds double, ptr %70, i64 0
  store double %68, ptr %71, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !17
  %74 = getelementptr inbounds double, ptr %73, i64 0
  store double 1.000000e+00, ptr %74, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %11, align 8, !tbaa !9
  %77 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %75, ptr noundef %15, i64 noundef 1, ptr noundef %76, ptr noundef %77)
  %78 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %78)
  store i32 1, ptr %18, align 4
  br label %133

79:                                               ; preds = %6
  %80 = load i64, ptr %10, align 8, !tbaa !11
  %81 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %80, ptr noundef %81)
  %82 = load i64, ptr %10, align 8, !tbaa !11
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %82, ptr noundef %83)
  store double 1.000000e+00, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %84

84:                                               ; preds = %124, %79
  %85 = load i64, ptr %14, align 8, !tbaa !11
  %86 = load i64, ptr %10, align 8, !tbaa !11
  %87 = sub nsw i64 %86, 1
  %88 = icmp sle i64 %85, %87
  br i1 %88, label %89, label %127

89:                                               ; preds = %84
  %90 = load double, ptr %17, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load i64, ptr %14, align 8, !tbaa !11
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  store double %90, ptr %94, align 8, !tbaa !5
  %95 = load double, ptr %7, align 8, !tbaa !5
  %96 = load double, ptr %8, align 8, !tbaa !5
  %97 = load double, ptr %7, align 8, !tbaa !5
  %98 = fsub double %96, %97
  %99 = load i64, ptr %14, align 8, !tbaa !11
  %100 = sitofp i64 %99 to double
  %101 = fmul double %98, %100
  %102 = load i64, ptr %10, align 8, !tbaa !11
  %103 = sub nsw i64 %102, 1
  %104 = sitofp i64 %103 to double
  %105 = fdiv double %101, %104
  %106 = fadd double %95, %105
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !17
  %109 = load i64, ptr %14, align 8, !tbaa !11
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  store double %106, ptr %110, align 8, !tbaa !5
  %111 = load double, ptr %17, align 8, !tbaa !5
  %112 = fneg double %111
  %113 = load i64, ptr %10, align 8, !tbaa !11
  %114 = sub nsw i64 %113, 1
  %115 = load i64, ptr %14, align 8, !tbaa !11
  %116 = sub nsw i64 %114, %115
  %117 = sitofp i64 %116 to double
  %118 = fmul double %112, %117
  store double %118, ptr %17, align 8, !tbaa !5
  %119 = load double, ptr %17, align 8, !tbaa !5
  %120 = load i64, ptr %14, align 8, !tbaa !11
  %121 = add nsw i64 %120, 1
  %122 = sitofp i64 %121 to double
  %123 = fdiv double %119, %122
  store double %123, ptr %17, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %89
  %125 = load i64, ptr %14, align 8, !tbaa !11
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %14, align 8, !tbaa !11
  br label %84, !llvm.loop !18

127:                                              ; preds = %84
  %128 = load ptr, ptr %9, align 8, !tbaa !9
  %129 = load i64, ptr %10, align 8, !tbaa !11
  %130 = load ptr, ptr %11, align 8, !tbaa !9
  %131 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %128, ptr noundef %15, i64 noundef %129, ptr noundef %130, ptr noundef %131)
  %132 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %132)
  store i32 0, ptr %18, align 4
  br label %133

133:                                              ; preds = %127, %62
  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 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %134 = load i32, ptr %18, align 4
  switch i32 %134, label %136 [
    i32 0, label %135
    i32 1, label %135
  ]

135:                                              ; preds = %133, %133
  ret void

136:                                              ; preds = %133
  unreachable
}

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

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 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

; 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

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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; 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.371 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.373 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.374 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.375 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.376 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.377 = external hidden unnamed_addr constant [44 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_impl21polynomialbuildeqdistEddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %0, double noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, 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 @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  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 @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %5, 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 %5, i1 noundef zeroext true)
  %10 = icmp sgt i64 %3, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.371, ptr noundef %5)
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = icmp sge i64 %11, %3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.372, ptr noundef %5)
  %13 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %0, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.373, ptr noundef %5)
  %14 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %1, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.374, ptr noundef %5)
  %15 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %3, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.375, ptr noundef %5)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %1, double noundef %0)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.376, ptr noundef %5)
  %17 = fsub double %1, %0
  %18 = sitofp i64 %3 to double
  %19 = fdiv double %17, %18
  %20 = fadd double %19, %0
  %21 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %20, double noundef %0)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.377, ptr noundef %5)
  %22 = icmp eq i64 %3, 1
  br i1 %22, label %23, label %30

23:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef 1, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef 1, ptr noundef %5)
  %24 = fadd double %0, %1
  %25 = fmul double %24, 5.000000e-01
  %26 = getelementptr inbounds i8, ptr %9, i64 56
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  store double %25, ptr %27, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %8, i64 56
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  store double 1.000000e+00, ptr %29, align 8, !tbaa !14
  br label %._crit_edge

30:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %3, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %3, ptr noundef %5)
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %30
  %31 = add nsw i64 %3, -1
  %32 = getelementptr inbounds i8, ptr %8, i64 56
  %33 = uitofp nneg i64 %31 to double
  %34 = getelementptr inbounds i8, ptr %9, i64 56
  br label %35

35:                                               ; preds = %.lr.ph, %35
  %.066 = phi double [ 1.000000e+00, %.lr.ph ], [ %50, %35 ]
  %.06165 = phi i64 [ 0, %.lr.ph ], [ %48, %35 ]
  %36 = load ptr, ptr %32, align 8, !tbaa !13
  %37 = getelementptr inbounds double, ptr %36, i64 %.06165
  store double %.066, ptr %37, align 8, !tbaa !14
  %38 = uitofp nneg i64 %.06165 to double
  %39 = fmul double %17, %38
  %40 = fdiv double %39, %33
  %41 = fadd double %40, %0
  %42 = load ptr, ptr %34, align 8, !tbaa !13
  %43 = getelementptr inbounds double, ptr %42, i64 %.06165
  store double %41, ptr %43, align 8, !tbaa !14
  %44 = fneg double %.066
  %45 = sub nsw i64 %31, %.06165
  %46 = sitofp i64 %45 to double
  %47 = fmul double %44, %46
  %48 = add nuw nsw i64 %.06165, 1
  %49 = uitofp nneg i64 %48 to double
  %50 = fdiv double %47, %49
  %exitcond.not = icmp eq i64 %48, %3
  br i1 %exitcond.not, label %._crit_edge, label %35, !llvm.loop !16

._crit_edge:                                      ; preds = %35, %30, %23
  %.sink = phi i64 [ 1, %23 ], [ %3, %30 ], [ %3, %35 ]
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef nonnull %2, ptr noundef nonnull %8, i64 noundef %.sink, ptr noundef %4, ptr noundef %5)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  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 32, ptr nonnull %7) #4
  ret void
}

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

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 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

; 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

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"}


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