; 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.359 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.360 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.361 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.362 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.363 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.364 = external hidden unnamed_addr constant [43 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_impl17polynomialpow2barEPNS_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
  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
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %20, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %21)
  %22 = 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 %22, i1 noundef zeroext true)
  %23 = load double, ptr %9, align 8, !tbaa !11
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %23, ptr noundef %24)
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.359, ptr noundef %26)
  %27 = load double, ptr %10, align 8, !tbaa !11
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %27, ptr noundef %28)
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef @.str.360, ptr noundef %30)
  %31 = load double, ptr %10, align 8, !tbaa !11
  %32 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %31, double noundef 0.000000e+00)
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.361, ptr noundef %33)
  %34 = load i64, ptr %8, align 8, !tbaa !9
  %35 = icmp sge i64 %34, 1
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.362, ptr noundef %36)
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 0
  %39 = load i64, ptr %38, align 8, !tbaa !13
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = icmp sge i64 %39, %40
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef @.str.363, ptr noundef %42)
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %43, i64 noundef %44, ptr noundef %45)
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.364, ptr noundef %47)
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %48, ptr noundef %49)
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %98, %6
  %51 = load i64, ptr %14, align 8, !tbaa !9
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = sub nsw i64 %52, 1
  %54 = icmp sle i64 %51, %53
  br i1 %54, label %55, label %101

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

71:                                               ; preds = %89, %55
  %72 = load i64, ptr %15, align 8, !tbaa !9
  %73 = load i64, ptr %8, align 8, !tbaa !9
  %74 = sub nsw i64 %73, 1
  %75 = icmp sle i64 %72, %74
  br i1 %75, label %76, label %92

76:                                               ; preds = %71
  %77 = load double, ptr %18, align 8, !tbaa !11
  %78 = load double, ptr %19, align 8, !tbaa !11
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = load i64, ptr %15, align 8, !tbaa !9
  %83 = getelementptr inbounds double, ptr %81, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = call double @llvm.fmuladd.f64(double %78, double %84, double %77)
  store double %85, ptr %18, align 8, !tbaa !11
  %86 = load double, ptr %19, align 8, !tbaa !11
  %87 = load double, ptr %17, align 8, !tbaa !11
  %88 = fmul double %86, %87
  store double %88, ptr %19, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %76
  %90 = load i64, ptr %15, align 8, !tbaa !9
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %15, align 8, !tbaa !9
  br label %71, !llvm.loop !18

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

98:                                               ; preds = %92
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %14, align 8, !tbaa !9
  br label %50, !llvm.loop !20

101:                                              ; preds = %50
  %102 = load double, ptr %9, align 8, !tbaa !11
  %103 = load double, ptr %10, align 8, !tbaa !11
  %104 = fsub double %102, %103
  %105 = load double, ptr %9, align 8, !tbaa !11
  %106 = load double, ptr %10, align 8, !tbaa !11
  %107 = fadd double %105, %106
  %108 = load i64, ptr %8, align 8, !tbaa !9
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20polynomialbuildcheb1EddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %104, double noundef %107, ptr noundef %16, i64 noundef %108, ptr noundef %109, ptr noundef %110)
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %111)
  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.359 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.360 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.361 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.362 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.363 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.364 = external hidden unnamed_addr constant [43 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_impl17polynomialpow2barEPNS_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.359, 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.360, ptr noundef %5)
  %11 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %3, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.361, ptr noundef %5)
  %12 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.362, 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.363, 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.364, 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.ph60, label %._crit_edge61

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

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

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.04958.us = phi i64 [ %51, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %22 = uitofp nneg i64 %.04958.us to double
  %23 = fadd double %22, 5.000000e-01
  %24 = fmul double %23, 0x400921FB54442D18
  %25 = fdiv double %24, %16
  %26 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %25, ptr noundef %5)
  %27 = load ptr, ptr %17, align 8, !tbaa !13
  %28 = load double, ptr %27, align 8, !tbaa !14
  br i1 %21, 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 %27, i64 8
  %invariant.gep72 = getelementptr inbounds i8, ptr %27, i64 16
  %invariant.gep74 = getelementptr inbounds i8, ptr %27, i64 24
  br label %29

29:                                               ; preds = %29, %.lr.ph.us.new
  %.056.us = phi double [ %26, %.lr.ph.us.new ], [ %42, %29 ]
  %.04855.us = phi double [ %28, %.lr.ph.us.new ], [ %41, %29 ]
  %.05054.us = phi i64 [ 1, %.lr.ph.us.new ], [ %43, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.us.new ], [ %niter.next.3, %29 ]
  %30 = getelementptr inbounds double, ptr %27, i64 %.05054.us
  %31 = load double, ptr %30, align 8, !tbaa !14
  %32 = call double @llvm.fmuladd.f64(double %.056.us, double %31, double %.04855.us)
  %33 = fmul double %26, %.056.us
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %.05054.us
  %34 = load double, ptr %gep, align 8, !tbaa !14
  %35 = call double @llvm.fmuladd.f64(double %33, double %34, double %32)
  %36 = fmul double %26, %33
  %gep73 = getelementptr inbounds double, ptr %invariant.gep72, i64 %.05054.us
  %37 = load double, ptr %gep73, align 8, !tbaa !14
  %38 = call double @llvm.fmuladd.f64(double %36, double %37, double %35)
  %39 = fmul double %26, %36
  %gep75 = getelementptr inbounds double, ptr %invariant.gep74, i64 %.05054.us
  %40 = load double, ptr %gep75, align 8, !tbaa !14
  %41 = call double @llvm.fmuladd.f64(double %39, double %40, double %38)
  %42 = fmul double %26, %39
  %43 = add nuw nsw i64 %.05054.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, 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 ], [ %41, %29 ]
  %.056.us.unr = phi double [ %26, %.lr.ph.us ], [ %42, %29 ]
  %.04855.us.unr = phi double [ %28, %.lr.ph.us ], [ %41, %29 ]
  %.05054.us.unr = phi i64 [ 1, %.lr.ph.us ], [ %43, %29 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.056.us.epil = phi double [ %47, %.epil.preheader ], [ %.056.us.unr, %._crit_edge.us.unr-lcssa ]
  %.04855.us.epil = phi double [ %46, %.epil.preheader ], [ %.04855.us.unr, %._crit_edge.us.unr-lcssa ]
  %.05054.us.epil = phi i64 [ %48, %.epil.preheader ], [ %.05054.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %44 = getelementptr inbounds double, ptr %27, i64 %.05054.us.epil
  %45 = load double, ptr %44, align 8, !tbaa !14
  %46 = call double @llvm.fmuladd.f64(double %.056.us.epil, double %45, double %.04855.us.epil)
  %47 = fmul double %26, %.056.us.epil
  %48 = add nuw nsw i64 %.05054.us.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_edge.us, label %.epil.preheader, !llvm.loop !18

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %46, %.epil.preheader ]
  %49 = load ptr, ptr %18, align 8, !tbaa !13
  %50 = getelementptr inbounds double, ptr %49, i64 %.04958.us
  store double %.lcssa, ptr %50, align 8, !tbaa !14
  %51 = add nuw nsw i64 %.04958.us, 1
  %exitcond63.not = icmp eq i64 %51, %1
  br i1 %exitcond63.not, label %._crit_edge61, label %.lr.ph.us, !llvm.loop !20

._crit_edge61.loopexit:                           ; preds = %.lr.ph60
  %52 = fdiv double 0x3FF921FB54442D18, %16
  %53 = call noundef double @_ZN11alglib_impl6ae_cosEdPNS_8ae_stateE(double noundef %52, ptr noundef %5)
  %54 = load ptr, ptr %17, align 8, !tbaa !13
  %55 = load double, ptr %54, align 8, !tbaa !14
  %56 = load ptr, ptr %18, align 8, !tbaa !13
  store double %55, ptr %56, align 8, !tbaa !14
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %._crit_edge.us, %._crit_edge61.loopexit, %6
  %57 = fsub double %2, %3
  %58 = fadd double %2, %3
  call void @_ZN11alglib_impl20polynomialbuildcheb1EddPNS_9ae_vectorElPNS_22barycentricinterpolantEPNS_8ae_stateE(double noundef %57, double noundef %58, 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, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !17}


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