; 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::autogkstate" = type { double, double, double, double, double, double, double, double, i8, double, i64, %"struct.alglib_impl::autogkinternalstate", %"struct.alglib_impl::rcommstate", double, i64, i64, i64 }
%"struct.alglib_impl::autogkinternalstate" = type { double, double, double, double, double, double, i64, double, %"struct.alglib_impl::ae_matrix", i64, i64, i64, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::autogkreport" = type { i64, i64, i64 }
%"struct.alglib_impl::pspline3interpolant" = type { i64, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::spline1dinterpolant", %"struct.alglib_impl::spline1dinterpolant", %"struct.alglib_impl::spline1dinterpolant" }
%"struct.alglib_impl::spline1dinterpolant" = type { i8, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.319 = external hidden unnamed_addr constant [35 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_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl17pspline3arclengthEPNS_19pspline3interpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::autogkstate", align 8
  %11 = alloca %"struct.alglib_impl::autogkreport", align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, 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 %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 1096, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 1096, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 24, i1 false)
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl17_autogkstate_initEPvPNS_8ae_stateEb(ptr noundef %10, ptr noundef %23, i1 noundef zeroext true)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_autogkreport_initEPvPNS_8ae_stateEb(ptr noundef %11, ptr noundef %24, i1 noundef zeroext true)
  %25 = load double, ptr %6, align 8, !tbaa !9
  %26 = load double, ptr %7, align 8, !tbaa !9
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl12autogksmoothEddPNS_11autogkstateEPNS_8ae_stateE(double noundef %25, double noundef %26, ptr noundef %10, ptr noundef %27)
  br label %28

28:                                               ; preds = %31, %4
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef %10, ptr noundef %29)
  br i1 %30, label %31, label %53

31:                                               ; preds = %28
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::pspline3interpolant", ptr %32, i32 0, i32 3
  %34 = getelementptr inbounds %"struct.alglib_impl::autogkstate", ptr %10, i32 0, i32 5
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef %33, double noundef %35, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %36)
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::pspline3interpolant", ptr %37, i32 0, i32 4
  %39 = getelementptr inbounds %"struct.alglib_impl::autogkstate", ptr %10, i32 0, i32 5
  %40 = load double, ptr %39, align 8, !tbaa !11
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef %38, double noundef %40, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %41)
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::pspline3interpolant", ptr %42, i32 0, i32 5
  %44 = getelementptr inbounds %"struct.alglib_impl::autogkstate", ptr %10, i32 0, i32 5
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef %43, double noundef %45, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %46)
  %47 = load double, ptr %13, align 8, !tbaa !9
  %48 = load double, ptr %16, align 8, !tbaa !9
  %49 = load double, ptr %19, align 8, !tbaa !9
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = call noundef double @_ZN11alglib_impl11safepythag3EdddPNS_8ae_stateE(double noundef %47, double noundef %48, double noundef %49, ptr noundef %50)
  %52 = getelementptr inbounds %"struct.alglib_impl::autogkstate", ptr %10, i32 0, i32 9
  store double %51, ptr %52, align 8, !tbaa !21
  br label %28, !llvm.loop !22

53:                                               ; preds = %28
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13autogkresultsEPNS_11autogkstateEPdPNS_12autogkreportEPNS_8ae_stateE(ptr noundef %10, ptr noundef %21, ptr noundef %11, ptr noundef %54)
  %55 = getelementptr inbounds %"struct.alglib_impl::autogkreport", ptr %11, i32 0, i32 0
  %56 = load i64, ptr %55, align 8, !tbaa !24
  %57 = icmp sgt i64 %56, 0
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.319, ptr noundef %58)
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %59)
  %60 = load double, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1096, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  ret double %60
}

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

declare void @_ZN11alglib_impl17_autogkstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl18_autogkreport_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl12autogksmoothEddPNS_11autogkstateEPNS_8ae_stateE(double noundef, double noundef, ptr noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl13autogkresultsEPNS_11autogkstateEPdPNS_12autogkreportEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr 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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 40}
!12 = !{!"_ZTSN11alglib_impl11autogkstateE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !13, i64 64, !10, i64 72, !14, i64 80, !15, i64 88, !19, i64 800, !10, i64 1064, !14, i64 1072, !14, i64 1080, !14, i64 1088}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl19autogkinternalstateE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !14, i64 48, !10, i64 56, !16, i64 64, !14, i64 144, !14, i64 152, !14, i64 160, !10, i64 168, !10, i64 176, !18, i64 184, !18, i64 248, !18, i64 312, !18, i64 376, !14, i64 440, !19, i64 448}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !13, i64 32, !17, i64 40, !7, i64 72}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !14, i64 0, !14, i64 8, !13, i64 16, !17, i64 24, !7, i64 56}
!19 = !{!"_ZTSN11alglib_impl10rcommstateE", !20, i64 0, !18, i64 8, !18, i64 72, !18, i64 136, !18, i64 200}
!20 = !{!"int", !7, i64 0}
!21 = !{!12, !10, i64 72}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !14, i64 0}
!25 = !{!"_ZTSN11alglib_impl12autogkreportE", !14, i64 0, !14, i64 8, !14, i64 16}


; 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::autogkstate" = type { double, double, double, double, double, double, double, double, i8, double, i64, %"struct.alglib_impl::autogkinternalstate", %"struct.alglib_impl::rcommstate", double, i64, i64, i64 }
%"struct.alglib_impl::autogkinternalstate" = type { double, double, double, double, double, double, i64, double, %"struct.alglib_impl::ae_matrix", i64, i64, i64, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::autogkreport" = type { i64, i64, i64 }

@.str.319 = external hidden unnamed_addr constant [35 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_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl17pspline3arclengthEPNS_19pspline3interpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::autogkstate", align 8
  %7 = alloca %"struct.alglib_impl::autogkreport", align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 1096, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1096) %6, i8 0, i64 1096, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @_ZN11alglib_impl17_autogkstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl18_autogkreport_initEPvPNS_8ae_stateEb(ptr noundef nonnull %7, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl12autogksmoothEddPNS_11autogkstateEPNS_8ae_stateE(double noundef %1, double noundef %2, ptr noundef nonnull %6, ptr noundef %3)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  %20 = getelementptr inbounds i8, ptr %6, i64 40
  %21 = getelementptr inbounds i8, ptr %0, i64 240
  %22 = getelementptr inbounds i8, ptr %0, i64 400
  %23 = getelementptr inbounds i8, ptr %6, i64 72
  br label %24

24:                                               ; preds = %.lr.ph, %24
  %25 = load double, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef nonnull %19, double noundef %25, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %3)
  %26 = load double, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef nonnull %21, double noundef %26, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %3)
  %27 = load double, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl12spline1ddiffEPNS_19spline1dinterpolantEdPdS2_S2_PNS_8ae_stateE(ptr noundef nonnull %22, double noundef %27, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %3)
  %28 = load double, ptr %9, align 8, !tbaa !19
  %29 = load double, ptr %12, align 8, !tbaa !19
  %30 = load double, ptr %15, align 8, !tbaa !19
  %31 = call noundef double @_ZN11alglib_impl11safepythag3EdddPNS_8ae_stateE(double noundef %28, double noundef %29, double noundef %30, ptr noundef %3)
  store double %31, ptr %23, align 8, !tbaa !20
  %32 = call noundef zeroext i1 @_ZN11alglib_impl15autogkiterationEPNS_11autogkstateEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef %3)
  br i1 %32, label %24, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %24, %4
  call void @_ZN11alglib_impl13autogkresultsEPNS_11autogkstateEPdPNS_12autogkreportEPNS_8ae_stateE(ptr noundef nonnull %6, ptr noundef nonnull %17, ptr noundef nonnull %7, ptr noundef %3)
  %33 = load i64, ptr %7, align 8, !tbaa !23
  %34 = icmp sgt i64 %33, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.319, ptr noundef %3)
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  %35 = load double, ptr %17, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1096, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret double %35
}

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

declare void @_ZN11alglib_impl17_autogkstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl18_autogkreport_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl12autogksmoothEddPNS_11autogkstateEPNS_8ae_stateE(double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl13autogkresultsEPNS_11autogkstateEPdPNS_12autogkreportEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr 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 = { 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 40}
!6 = !{!"_ZTSN11alglib_impl11autogkstateE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !11, i64 80, !12, i64 88, !17, i64 800, !7, i64 1064, !11, i64 1072, !11, i64 1080, !11, i64 1088}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl19autogkinternalstateE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !13, i64 64, !11, i64 144, !11, i64 152, !11, i64 160, !7, i64 168, !7, i64 176, !16, i64 184, !16, i64 248, !16, i64 312, !16, i64 376, !11, i64 440, !17, i64 448}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !10, i64 32, !14, i64 40, !8, i64 72}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !10, i64 16, !14, i64 24, !8, i64 56}
!17 = !{!"_ZTSN11alglib_impl10rcommstateE", !18, i64 0, !16, i64 8, !16, i64 72, !16, i64 136, !16, i64 200}
!18 = !{!"int", !8, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !7, i64 72}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !11, i64 0}
!24 = !{!"_ZTSN11alglib_impl12autogkreportE", !11, i64 0, !11, i64 8, !11, i64 16}


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