; 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.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.351 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.353 = 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
define dso_local void @_ZN11alglib_impl18polynomialcheb2barEPNS_9ae_vectorElddPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, double noundef %2, double noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca double, 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 i64, align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store double %2, ptr %9, align 8, !tbaa !11
  store double %3, ptr %10, align 8, !tbaa !11
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  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 8, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %23)
  %24 = load ptr, ptr %12, 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 %24, i1 noundef zeroext true)
  %25 = load double, ptr %9, align 8, !tbaa !11
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %25, ptr noundef %26)
  %28 = load ptr, ptr %12, 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 %10, align 8, !tbaa !11
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %29, ptr noundef %30)
  %32 = load ptr, ptr %12, 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 %9, align 8, !tbaa !11
  %34 = load double, ptr %10, align 8, !tbaa !11
  %35 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %33, double noundef %34)
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.349, ptr noundef %36)
  %37 = load i64, ptr %8, align 8, !tbaa !9
  %38 = icmp sge i64 %37, 1
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.351, ptr noundef %39)
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !13
  %43 = load i64, ptr %8, align 8, !tbaa !9
  %44 = icmp sge i64 %42, %43
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.352, ptr noundef %45)
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load i64, ptr %8, align 8, !tbaa !9
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %46, i64 noundef %47, ptr noundef %48)
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.353, ptr noundef %50)
  %51 = load i64, ptr %8, align 8, !tbaa !9
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %51, ptr noundef %52)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %53

53:                                               ; preds = %106, %6
  %54 = load i64, ptr %14, align 8, !tbaa !9
  %55 = load i64, ptr %8, align 8, !tbaa !9
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %54, %56
  br i1 %57, label %58, label %109

58:                                               ; preds = %53
  %59 = load i64, ptr %14, align 8, !tbaa !9
  %60 = sitofp i64 %59 to double
  %61 = fadd double %60, 5.000000e-01
  %62 = fmul double 0x400921FB54442D18, %61
  %63 = load i64, ptr %8, align 8, !tbaa !9
  %64 = sitofp i64 %63 to double
  %65 = fdiv double %62, %64
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %65, ptr noundef %66)
  store double %67, ptr %19, align 8, !tbaa !11
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %68, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds double, ptr %70, i64 0
  %72 = load double, ptr %71, align 8, !tbaa !11
  store double %72, ptr %20, align 8, !tbaa !11
  store double 1.000000e+00, ptr %18, align 8, !tbaa !11
  %73 = load double, ptr %19, align 8, !tbaa !11
  store double %73, ptr %17, align 8, !tbaa !11
  store i64 1, ptr %15, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %97, %58
  %75 = load i64, ptr %15, align 8, !tbaa !9
  %76 = load i64, ptr %8, align 8, !tbaa !9
  %77 = sub nsw i64 %76, 1
  %78 = icmp sle i64 %75, %77
  br i1 %78, label %79, label %100

79:                                               ; preds = %74
  %80 = load double, ptr %20, align 8, !tbaa !11
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = load i64, ptr %15, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = load double, ptr %17, align 8, !tbaa !11
  %88 = call double @llvm.fmuladd.f64(double %86, double %87, double %80)
  store double %88, ptr %20, align 8, !tbaa !11
  %89 = load double, ptr %19, align 8, !tbaa !11
  %90 = fmul double 2.000000e+00, %89
  %91 = load double, ptr %17, align 8, !tbaa !11
  %92 = load double, ptr %18, align 8, !tbaa !11
  %93 = fneg double %92
  %94 = call double @llvm.fmuladd.f64(double %90, double %91, double %93)
  store double %94, ptr %21, align 8, !tbaa !11
  %95 = load double, ptr %17, align 8, !tbaa !11
  store double %95, ptr %18, align 8, !tbaa !11
  %96 = load double, ptr %21, align 8, !tbaa !11
  store double %96, ptr %17, align 8, !tbaa !11
  br label %97

97:                                               ; preds = %79
  %98 = load i64, ptr %15, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %15, align 8, !tbaa !9
  br label %74, !llvm.loop !18

100:                                              ; preds = %74
  %101 = load double, ptr %20, align 8, !tbaa !11
  %102 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i64, ptr %14, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  store double %101, ptr %105, align 8, !tbaa !11
  br label %106

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

109:                                              ; preds = %53
  %110 = load double, ptr %9, align 8, !tbaa !11
  %111 = load double, ptr %10, align 8, !tbaa !11
  %112 = load i64, ptr %8, align 8, !tbaa !9
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20polynomialbuildcheb1EddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %110, double noundef %111, ptr noundef %16, i64 noundef %112, ptr noundef %113, ptr noundef %114)
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %115)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  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 8, 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
  ret void
}

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str.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.351 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.352 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.353 = 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
define dso_local void @_ZN11alglib_impl18polynomialcheb2barEPNS_9ae_vectorElddPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, double noundef %2, double 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
  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 @_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 @_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)
  %9 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %2, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.347, ptr noundef %5)
  %10 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %3, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.348, ptr noundef %5)
  %11 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %2, double noundef %3)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.349, ptr noundef %5)
  %12 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.351, ptr noundef %5)
  %13 = load i64, ptr %0, align 8, !tbaa !5
  %14 = icmp sge i64 %13, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.352, ptr noundef %5)
  %15 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.353, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %5)
  br i1 %12, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %6
  %16 = uitofp nneg i64 %1 to double
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %.not.not5556.not = icmp eq i64 %1, 1
  %18 = getelementptr inbounds i8, ptr %8, i64 56
  br i1 %.not.not5556.not, label %._crit_edge65.loopexit, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph64
  %19 = add nsw i64 %1, -1
  %xtraiter = and i64 %19, 1
  %20 = icmp eq i64 %1, 2
  %unroll_iter = and i64 %19, -2
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.062.us = phi i64 [ %45, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %21 = uitofp nneg i64 %.062.us to double
  %22 = fadd double %21, 5.000000e-01
  %23 = fmul double %22, 0x400921FB54442D18
  %24 = fdiv double %23, %16
  %25 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %24, ptr noundef %5)
  %26 = load ptr, ptr %17, align 8, !tbaa !13
  %27 = load double, ptr %26, align 8, !tbaa !14
  %28 = fmul double %25, 2.000000e+00
  br i1 %20, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us
  %invariant.gep = getelementptr inbounds i8, ptr %26, i64 8
  br label %29

29:                                               ; preds = %29, %.lr.ph.us.new
  %.05060.us = phi double [ %27, %.lr.ph.us.new ], [ %36, %29 ]
  %.05159.us = phi i64 [ 1, %.lr.ph.us.new ], [ %39, %29 ]
  %.05258.us = phi double [ 1.000000e+00, %.lr.ph.us.new ], [ %34, %29 ]
  %.05357.us = phi double [ %25, %.lr.ph.us.new ], [ %38, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.us.new ], [ %niter.next.1, %29 ]
  %30 = getelementptr inbounds double, ptr %26, i64 %.05159.us
  %31 = load double, ptr %30, align 8, !tbaa !14
  %32 = call double @llvm.fmuladd.f64(double %31, double %.05357.us, double %.05060.us)
  %33 = fneg double %.05258.us
  %34 = call double @llvm.fmuladd.f64(double %28, double %.05357.us, double %33)
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %.05159.us
  %35 = load double, ptr %gep, align 8, !tbaa !14
  %36 = call double @llvm.fmuladd.f64(double %35, double %34, double %32)
  %37 = fneg double %.05357.us
  %38 = call double @llvm.fmuladd.f64(double %28, double %34, double %37)
  %39 = add nuw nsw i64 %.05159.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %29, !llvm.loop !16

._crit_edge.us.unr-lcssa:                         ; preds = %29, %.lr.ph.us
  %.lcssa.ph = phi double [ poison, %.lr.ph.us ], [ %36, %29 ]
  %.05060.us.unr = phi double [ %27, %.lr.ph.us ], [ %36, %29 ]
  %.05159.us.unr = phi i64 [ 1, %.lr.ph.us ], [ %39, %29 ]
  %.05357.us.unr = phi double [ %25, %.lr.ph.us ], [ %38, %29 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %40 = getelementptr inbounds double, ptr %26, i64 %.05159.us.unr
  %41 = load double, ptr %40, align 8, !tbaa !14
  %42 = call double @llvm.fmuladd.f64(double %41, double %.05357.us.unr, double %.05060.us.unr)
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %42, %._crit_edge.us.epilog-lcssa ]
  %43 = load ptr, ptr %18, align 8, !tbaa !13
  %44 = getelementptr inbounds double, ptr %43, i64 %.062.us
  store double %.lcssa, ptr %44, align 8, !tbaa !14
  %45 = add nuw nsw i64 %.062.us, 1
  %exitcond67.not = icmp eq i64 %45, %1
  br i1 %exitcond67.not, label %._crit_edge65, label %.lr.ph.us, !llvm.loop !18

._crit_edge65.loopexit:                           ; preds = %.lr.ph64
  %46 = fdiv double 0x3FF921FB54442D18, %16
  %47 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %46, ptr noundef %5)
  %48 = load ptr, ptr %17, align 8, !tbaa !13
  %49 = load double, ptr %48, align 8, !tbaa !14
  %50 = load ptr, ptr %18, align 8, !tbaa !13
  store double %49, ptr %50, align 8, !tbaa !14
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %._crit_edge.us, %._crit_edge65.loopexit, %6
  call void @_ZN11alglib_impl20polynomialbuildcheb1EddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %2, double noundef %3, ptr noundef nonnull %8, i64 noundef %1, 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 %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  ret void
}

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

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}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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