; 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.378 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.379 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.380 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.381 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.382 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [27 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_impl20polynomialbuildcheb1EddPNS_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 double, align 8
  %19 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %20 = load ptr, ptr %12, align 8, !tbaa !9
  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 %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  %21 = load ptr, ptr %11, align 8, !tbaa !9
  call void @_ZN11alglib_impl29_barycentricinterpolant_clearEPv(ptr noundef %21)
  %22 = 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 %22, i1 noundef zeroext true)
  %23 = 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 %23, i1 noundef zeroext true)
  %24 = load i64, ptr %10, align 8, !tbaa !11
  %25 = icmp sgt i64 %24, 0
  %26 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.378, ptr noundef %26)
  %27 = load ptr, ptr %9, align 8, !tbaa !9
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = load i64, ptr %10, align 8, !tbaa !11
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.379, ptr noundef %32)
  %33 = load double, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %12, align 8, !tbaa !9
  %35 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %33, ptr noundef %34)
  %36 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.380, ptr noundef %36)
  %37 = load double, ptr %8, align 8, !tbaa !5
  %38 = load ptr, ptr %12, align 8, !tbaa !9
  %39 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %37, ptr noundef %38)
  %40 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.381, ptr noundef %40)
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = load i64, ptr %10, align 8, !tbaa !11
  %43 = load ptr, ptr %12, align 8, !tbaa !9
  %44 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %41, i64 noundef %42, ptr noundef %43)
  %45 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.382, ptr noundef %45)
  %46 = load double, ptr %8, align 8, !tbaa !5
  %47 = load double, ptr %7, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %46, double noundef %47)
  %49 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.383, ptr noundef %49)
  %50 = load i64, ptr %10, align 8, !tbaa !11
  %51 = icmp eq i64 %50, 1
  br i1 %51, label %52, label %69

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

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

74:                                               ; preds = %128, %69
  %75 = load i64, ptr %14, align 8, !tbaa !11
  %76 = load i64, ptr %10, align 8, !tbaa !11
  %77 = sub nsw i64 %76, 1
  %78 = icmp sle i64 %75, %77
  br i1 %78, label %79, label %131

79:                                               ; preds = %74
  %80 = load i64, ptr %14, align 8, !tbaa !11
  %81 = mul nsw i64 2, %80
  %82 = add nsw i64 %81, 1
  %83 = sitofp i64 %82 to double
  %84 = fmul double 0x3FF921FB54442D18, %83
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = mul nsw i64 2, %85
  %87 = sitofp i64 %86 to double
  %88 = fdiv double %84, %87
  %89 = load ptr, ptr %12, align 8, !tbaa !9
  %90 = call noundef double @_ZN11alglib_impl6ae_tanEdPNS_8ae_stateE(double noundef %88, ptr noundef %89)
  store double %90, ptr %18, align 8, !tbaa !5
  %91 = load double, ptr %17, align 8, !tbaa !5
  %92 = fmul double 2.000000e+00, %91
  %93 = load double, ptr %18, align 8, !tbaa !5
  %94 = fmul double %92, %93
  %95 = load double, ptr %18, align 8, !tbaa !5
  %96 = load ptr, ptr %12, align 8, !tbaa !9
  %97 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %95, ptr noundef %96)
  %98 = fadd double 1.000000e+00, %97
  %99 = fdiv double %94, %98
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  %102 = load i64, ptr %14, align 8, !tbaa !11
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  store double %99, ptr %103, align 8, !tbaa !5
  %104 = load double, ptr %8, align 8, !tbaa !5
  %105 = load double, ptr %7, align 8, !tbaa !5
  %106 = fadd double %104, %105
  %107 = load double, ptr %8, align 8, !tbaa !5
  %108 = load double, ptr %7, align 8, !tbaa !5
  %109 = fsub double %107, %108
  %110 = fmul double 5.000000e-01, %109
  %111 = load double, ptr %18, align 8, !tbaa !5
  %112 = load ptr, ptr %12, align 8, !tbaa !9
  %113 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %111, ptr noundef %112)
  %114 = fsub double 1.000000e+00, %113
  %115 = fmul double %110, %114
  %116 = load double, ptr %18, align 8, !tbaa !5
  %117 = load ptr, ptr %12, align 8, !tbaa !9
  %118 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %116, ptr noundef %117)
  %119 = fadd double 1.000000e+00, %118
  %120 = fdiv double %115, %119
  %121 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %106, double %120)
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !17
  %124 = load i64, ptr %14, align 8, !tbaa !11
  %125 = getelementptr inbounds double, ptr %123, i64 %124
  store double %121, ptr %125, align 8, !tbaa !5
  %126 = load double, ptr %17, align 8, !tbaa !5
  %127 = fneg double %126
  store double %127, ptr %17, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %79
  %129 = load i64, ptr %14, align 8, !tbaa !11
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %14, align 8, !tbaa !11
  br label %74, !llvm.loop !18

131:                                              ; preds = %74
  %132 = load ptr, ptr %9, align 8, !tbaa !9
  %133 = load i64, ptr %10, align 8, !tbaa !11
  %134 = load ptr, ptr %11, align 8, !tbaa !9
  %135 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl19barycentricbuildxywEPNS_9ae_vectorES1_S1_lPNS_22barycentricinterpolantEPNS_8ae_stateE(ptr noundef %16, ptr noundef %132, ptr noundef %15, i64 noundef %133, ptr noundef %134, ptr noundef %135)
  %136 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %136)
  store i32 0, ptr %19, align 4
  br label %137

137:                                              ; preds = %131, %52
  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 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
  %138 = load i32, ptr %19, align 4
  switch i32 %138, label %140 [
    i32 0, label %139
    i32 1, label %139
  ]

139:                                              ; preds = %137, %137
  ret void

140:                                              ; preds = %137
  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 noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double 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

declare noundef double @_ZN11alglib_impl6ae_tanEdPNS_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.378 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.379 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.380 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.381 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.382 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [27 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_impl20polynomialbuildcheb1EddPNS_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.378, 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.379, 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.380, 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.381, 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.382, 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.383, 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)
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %25
  %26 = shl nuw nsw i64 %3, 1
  %27 = uitofp nneg i64 %26 to double
  %28 = getelementptr inbounds i8, ptr %8, i64 56
  %29 = fadd double %0, %1
  %30 = fsub double %1, %0
  %31 = fmul double %30, 5.000000e-01
  %32 = getelementptr inbounds i8, ptr %9, i64 56
  br label %33

33:                                               ; preds = %.lr.ph, %33
  %.064 = phi i64 [ 0, %.lr.ph ], [ %57, %33 ]
  %.06063 = phi double [ 1.000000e+00, %.lr.ph ], [ %56, %33 ]
  %34 = shl nuw nsw i64 %.064, 1
  %35 = or disjoint i64 %34, 1
  %36 = uitofp nneg i64 %35 to double
  %37 = fmul double %36, 0x3FF921FB54442D18
  %38 = fdiv double %37, %27
  %39 = call noundef double @_ZN11alglib_impl6ae_tanEdPNS_8ae_stateE(double noundef %38, ptr noundef %5)
  %40 = fmul double %.06063, 2.000000e+00
  %41 = fmul double %40, %39
  %42 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %39, ptr noundef %5)
  %43 = fadd double %42, 1.000000e+00
  %44 = fdiv double %41, %43
  %45 = load ptr, ptr %28, align 8, !tbaa !13
  %46 = getelementptr inbounds double, ptr %45, i64 %.064
  store double %44, ptr %46, align 8, !tbaa !14
  %47 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %39, ptr noundef %5)
  %48 = fsub double 1.000000e+00, %47
  %49 = fmul double %31, %48
  %50 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %39, ptr noundef %5)
  %51 = fadd double %50, 1.000000e+00
  %52 = fdiv double %49, %51
  %53 = call double @llvm.fmuladd.f64(double %29, double 5.000000e-01, double %52)
  %54 = load ptr, ptr %32, align 8, !tbaa !13
  %55 = getelementptr inbounds double, ptr %54, i64 %.064
  store double %53, ptr %55, align 8, !tbaa !14
  %56 = fneg double %.06063
  %57 = add nuw nsw i64 %.064, 1
  %exitcond.not = icmp eq i64 %57, %3
  br i1 %exitcond.not, label %._crit_edge, label %33, !llvm.loop !16

._crit_edge:                                      ; preds = %33, %25, %18
  %.sink = phi i64 [ 1, %18 ], [ %3, %25 ], [ %3, %33 ]
  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 noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double 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

declare noundef double @_ZN11alglib_impl6ae_tanEdPNS_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"}


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