; 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.384 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.386 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.387 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.388 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.389 = external hidden unnamed_addr constant [57 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_impl20polynomialbuildcheb2EddPNS_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) #5
  call void @llvm.lifetime.start.p0(i64 8, 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 8, ptr %17) #5
  %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.384, 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.385, 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.386, 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.387, ptr noundef %39)
  %40 = load double, ptr %8, align 8, !tbaa !5
  %41 = load double, ptr %7, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %40, double noundef %41)
  %43 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.388, ptr noundef %43)
  %44 = load ptr, ptr %9, align 8, !tbaa !9
  %45 = load i64, ptr %10, align 8, !tbaa !11
  %46 = load ptr, ptr %12, align 8, !tbaa !9
  %47 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %44, i64 noundef %45, ptr 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.389, ptr noundef %48)
  %49 = load i64, ptr %10, align 8, !tbaa !11
  %50 = icmp eq i64 %49, 1
  br i1 %50, label %51, label %68

51:                                               ; preds = %6
  %52 = 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 %52)
  %53 = 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 %53)
  %54 = load double, ptr %8, align 8, !tbaa !5
  %55 = load double, ptr %7, align 8, !tbaa !5
  %56 = fadd double %54, %55
  %57 = fmul double 5.000000e-01, %56
  %58 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = getelementptr inbounds double, ptr %59, i64 0
  store double %57, ptr %60, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %63 = getelementptr inbounds double, ptr %62, i64 0
  store double 1.000000e+00, ptr %63, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !9
  %65 = load ptr, ptr %11, align 8, !tbaa !9
  %66 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %64, ptr noundef %15, i64 noundef 1, ptr noundef %65, ptr noundef %66)
  %67 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %67)
  store i32 1, ptr %18, align 4
  br label %133

68:                                               ; preds = %6
  %69 = load i64, ptr %10, align 8, !tbaa !11
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %69, ptr noundef %70)
  %71 = load i64, ptr %10, align 8, !tbaa !11
  %72 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %71, ptr noundef %72)
  store double 1.000000e+00, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %124, %68
  %74 = load i64, ptr %14, align 8, !tbaa !11
  %75 = load i64, ptr %10, align 8, !tbaa !11
  %76 = sub nsw i64 %75, 1
  %77 = icmp sle i64 %74, %76
  br i1 %77, label %78, label %127

78:                                               ; preds = %73
  %79 = load i64, ptr %14, align 8, !tbaa !11
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %86, label %81

81:                                               ; preds = %78
  %82 = load i64, ptr %14, align 8, !tbaa !11
  %83 = load i64, ptr %10, align 8, !tbaa !11
  %84 = sub nsw i64 %83, 1
  %85 = icmp eq i64 %82, %84
  br i1 %85, label %86, label %93

86:                                               ; preds = %81, %78
  %87 = load double, ptr %17, align 8, !tbaa !5
  %88 = fmul double %87, 5.000000e-01
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %91 = load i64, ptr %14, align 8, !tbaa !11
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  store double %88, ptr %92, align 8, !tbaa !5
  br label %99

93:                                               ; preds = %81
  %94 = load double, ptr %17, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !17
  %97 = load i64, ptr %14, align 8, !tbaa !11
  %98 = getelementptr inbounds double, ptr %96, i64 %97
  store double %94, ptr %98, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %93, %86
  %100 = load double, ptr %8, align 8, !tbaa !5
  %101 = load double, ptr %7, align 8, !tbaa !5
  %102 = fadd double %100, %101
  %103 = load double, ptr %8, align 8, !tbaa !5
  %104 = load double, ptr %7, align 8, !tbaa !5
  %105 = fsub double %103, %104
  %106 = fmul double 5.000000e-01, %105
  %107 = load i64, ptr %14, align 8, !tbaa !11
  %108 = sitofp i64 %107 to double
  %109 = fmul double 0x400921FB54442D18, %108
  %110 = load i64, ptr %10, align 8, !tbaa !11
  %111 = sub nsw i64 %110, 1
  %112 = sitofp i64 %111 to double
  %113 = fdiv double %109, %112
  %114 = load ptr, ptr %12, align 8, !tbaa !9
  %115 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %113, ptr noundef %114)
  %116 = fmul double %106, %115
  %117 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %102, double %116)
  %118 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %119 = load ptr, ptr %118, align 8, !tbaa !17
  %120 = load i64, ptr %14, align 8, !tbaa !11
  %121 = getelementptr inbounds double, ptr %119, i64 %120
  store double %117, ptr %121, align 8, !tbaa !5
  %122 = load double, ptr %17, align 8, !tbaa !5
  %123 = fneg double %122
  store double %123, ptr %17, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %99
  %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 %73, !llvm.loop !18

127:                                              ; preds = %73
  %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, %51
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %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

; 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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"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.384 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.386 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.387 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.388 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.389 = external hidden unnamed_addr constant [57 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_impl20polynomialbuildcheb2EddPNS_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) #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 @_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.384, 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.385, 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.386, 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.387, ptr noundef %5)
  %15 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %1, double noundef %0)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.388, ptr noundef %5)
  %16 = 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 %16, ptr noundef nonnull @.str.389, ptr noundef %5)
  %17 = icmp eq i64 %3, 1
  br i1 %17, label %18, label %25

18:                                               ; 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)
  %19 = fadd double %0, %1
  %20 = fmul double %19, 5.000000e-01
  %21 = getelementptr inbounds i8, ptr %9, i64 56
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  store double %20, ptr %22, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %8, i64 56
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  store double 1.000000e+00, ptr %24, align 8, !tbaa !14
  br label %._crit_edge

25:                                               ; 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)
  %26 = add nsw i64 %3, -1
  br i1 %10, label %.peel.next, label %._crit_edge

.peel.next:                                       ; preds = %25
  %27 = getelementptr inbounds i8, ptr %8, i64 56
  %28 = fadd double %0, %1
  %29 = fsub double %1, %0
  %30 = fmul double %29, 5.000000e-01
  %31 = uitofp nneg i64 %26 to double
  %32 = getelementptr inbounds i8, ptr %9, i64 56
  %33 = load ptr, ptr %27, align 8, !tbaa !13
  store double 5.000000e-01, ptr %33, align 8, !tbaa !14
  %34 = fdiv double 0.000000e+00, %31
  %35 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %34, ptr noundef %5)
  %36 = fmul double %30, %35
  %37 = call double @llvm.fmuladd.f64(double %28, double 5.000000e-01, double %36)
  %38 = load ptr, ptr %32, align 8, !tbaa !13
  store double %37, ptr %38, align 8, !tbaa !14
  br label %39

39:                                               ; preds = %.peel.next, %39
  %.063 = phi double [ -1.000000e+00, %.peel.next ], [ %52, %39 ]
  %.05862 = phi i64 [ 1, %.peel.next ], [ %53, %39 ]
  %40 = icmp eq i64 %.05862, %26
  %41 = fmul double %.063, 5.000000e-01
  %.063.sink = select i1 %40, double %41, double %.063
  %42 = load ptr, ptr %27, align 8, !tbaa !13
  %43 = getelementptr inbounds double, ptr %42, i64 %.05862
  store double %.063.sink, ptr %43, align 8, !tbaa !14
  %44 = uitofp nneg i64 %.05862 to double
  %45 = fmul double %44, 0x400921FB54442D18
  %46 = fdiv double %45, %31
  %47 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %46, ptr noundef %5)
  %48 = fmul double %30, %47
  %49 = call double @llvm.fmuladd.f64(double %28, double 5.000000e-01, double %48)
  %50 = load ptr, ptr %32, align 8, !tbaa !13
  %51 = getelementptr inbounds double, ptr %50, i64 %.05862
  store double %49, ptr %51, align 8, !tbaa !14
  %52 = fneg double %.063
  %53 = add nuw nsw i64 %.05862, 1
  %exitcond.not = icmp eq i64 %53, %3
  br i1 %exitcond.not, label %._crit_edge, label %39, !llvm.loop !16

._crit_edge:                                      ; preds = %39, %25, %18
  %.sink = phi i64 [ 1, %18 ], [ %3, %25 ], [ %3, %39 ]
  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) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  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

; 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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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_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, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.peeled.count", i32 1}


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