; LLVM IR from Dimandragon/non-parametric-dsp :: 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::lsfitreport" = type { i64, double, i64, i64, double, double, double, double, double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%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 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22_lsfitreport_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %11 = zext i1 %3 to i8
  store i8 %11, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %12, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %13, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %14, i32 0, i32 0
  %16 = load i64, ptr %15, align 8, !tbaa !11
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %17, i32 0, i32 0
  store i64 %16, ptr %18, align 8, !tbaa !11
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %19, i32 0, i32 1
  %21 = load double, ptr %20, align 8, !tbaa !18
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %22, i32 0, i32 1
  store double %21, ptr %23, align 8, !tbaa !18
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %24, i32 0, i32 2
  %26 = load i64, ptr %25, align 8, !tbaa !19
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %27, i32 0, i32 2
  store i64 %26, ptr %28, align 8, !tbaa !19
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %29, i32 0, i32 3
  %31 = load i64, ptr %30, align 8, !tbaa !20
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %32, i32 0, i32 3
  store i64 %31, ptr %33, align 8, !tbaa !20
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %34, i32 0, i32 4
  %36 = load double, ptr %35, align 8, !tbaa !21
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %37, i32 0, i32 4
  store double %36, ptr %38, align 8, !tbaa !21
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %39, i32 0, i32 5
  %41 = load double, ptr %40, align 8, !tbaa !22
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %42, i32 0, i32 5
  store double %41, ptr %43, align 8, !tbaa !22
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %44, i32 0, i32 6
  %46 = load double, ptr %45, align 8, !tbaa !23
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %47, i32 0, i32 6
  store double %46, ptr %48, align 8, !tbaa !23
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %49, i32 0, i32 7
  %51 = load double, ptr %50, align 8, !tbaa !24
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %52, i32 0, i32 7
  store double %51, ptr %53, align 8, !tbaa !24
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %54, i32 0, i32 8
  %56 = load double, ptr %55, align 8, !tbaa !25
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %57, i32 0, i32 8
  store double %56, ptr %58, align 8, !tbaa !25
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %59, i32 0, i32 9
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %61, i32 0, i32 9
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load i8, ptr %8, align 1, !tbaa !9, !range !26, !noundef !27
  %65 = trunc i8 %64 to i1
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %60, ptr noundef %62, ptr noundef %63, i1 noundef zeroext %65)
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %66, i32 0, i32 10
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %68, i32 0, i32 10
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i8, ptr %8, align 1, !tbaa !9, !range !26, !noundef !27
  %72 = trunc i8 %71 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %67, ptr noundef %69, ptr noundef %70, i1 noundef zeroext %72)
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %73, i32 0, i32 11
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %75, i32 0, i32 11
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load i8, ptr %8, align 1, !tbaa !9, !range !26, !noundef !27
  %79 = trunc i8 %78 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %74, ptr noundef %76, ptr noundef %77, i1 noundef zeroext %79)
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %80, i32 0, i32 12
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %82, i32 0, i32 12
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load i8, ptr %8, align 1, !tbaa !9, !range !26, !noundef !27
  %86 = trunc i8 %85 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %81, ptr noundef %83, ptr noundef %84, i1 noundef zeroext %86)
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %87, i32 0, i32 13
  %89 = load double, ptr %88, align 8, !tbaa !28
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::lsfitreport", ptr %90, i32 0, i32 13
  store double %89, ptr %91, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11alglib_impl11lsfitreportE", !13, i64 0, !14, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !15, i64 72, !17, i64 152, !17, i64 216, !17, i64 280, !14, i64 344}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !16, i64 40, !7, i64 72}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, i64 8, !10, i64 16, !16, i64 24, !7, i64 56}
!18 = !{!12, !14, i64 8}
!19 = !{!12, !13, i64 16}
!20 = !{!12, !13, i64 24}
!21 = !{!12, !14, i64 32}
!22 = !{!12, !14, i64 40}
!23 = !{!12, !14, i64 48}
!24 = !{!12, !14, i64 56}
!25 = !{!12, !14, i64 64}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!12, !14, i64 344}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22_lsfitreport_init_copyEPvPKvPNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) local_unnamed_addr #0 {
  %5 = load i64, ptr %1, align 8, !tbaa !5
  store i64 %5, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load double, ptr %6, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store double %7, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load <2 x i64>, ptr %9, align 8, !tbaa !17
  store <2 x i64> %11, ptr %10, align 8, !tbaa !17
  %12 = getelementptr inbounds i8, ptr %1, i64 32
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = load <2 x double>, ptr %12, align 8, !tbaa !18
  store <2 x double> %14, ptr %13, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %1, i64 48
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load <2 x double>, ptr %15, align 8, !tbaa !18
  store <2 x double> %17, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %1, i64 64
  %19 = load double, ptr %18, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  store double %19, ptr %20, align 8, !tbaa !19
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  %22 = getelementptr inbounds i8, ptr %1, i64 72
  tail call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef %2, i1 noundef zeroext %3)
  %23 = getelementptr inbounds i8, ptr %0, i64 152
  %24 = getelementptr inbounds i8, ptr %1, i64 152
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef %2, i1 noundef zeroext %3)
  %25 = getelementptr inbounds i8, ptr %0, i64 216
  %26 = getelementptr inbounds i8, ptr %1, i64 216
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef %2, i1 noundef zeroext %3)
  %27 = getelementptr inbounds i8, ptr %0, i64 280
  %28 = getelementptr inbounds i8, ptr %1, i64 280
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %2, i1 noundef zeroext %3)
  %29 = getelementptr inbounds i8, ptr %1, i64 344
  %30 = load double, ptr %29, align 8, !tbaa !20
  %31 = getelementptr inbounds i8, ptr %0, i64 344
  store double %30, ptr %31, align 8, !tbaa !20
  ret void
}

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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" }

!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_impl11lsfitreportE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !15, i64 152, !15, i64 216, !15, i64 280, !10, i64 344}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !12, i64 32, !13, i64 40, !8, i64 72}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !12, i64 16, !13, i64 24, !8, i64 56}
!16 = !{!6, !10, i64 8}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !10, i64 64}
!20 = !{!6, !10, i64 344}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass