; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (optimization)

; 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::smoothnessmonitor" = type { i64, i64, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::rcommstate", i8, i8, i64, i64, double, double, i8, %"struct.alglib_impl::optguardreport", double, double, %"struct.alglib_impl::optguardnonc0report", %"struct.alglib_impl::optguardnonc0report", double, double, %"struct.alglib_impl::optguardnonc1test0report", %"struct.alglib_impl::optguardnonc1test0report", double, double, %"struct.alglib_impl::optguardnonc1test1report", %"struct.alglib_impl::optguardnonc1test1report", i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::rcommstate", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix" }
%"struct.alglib_impl::optguardreport" = type { i8, i8, i64, double, i8, i8, i8, i64, double, i8, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix" }
%"struct.alglib_impl::optguardnonc0report" = type { i8, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64 }
%"struct.alglib_impl::optguardnonc1test0report" = type { i8, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64 }
%"struct.alglib_impl::optguardnonc1test1report" = type { i8, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64 }
%"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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%"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 }

; 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 nounwind uwtable
declare dso_local void @_ZN11alglib_impl20optguardinitinternalEPNS_14optguardreportEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl21smoothnessmonitorinitEPNS_17smoothnessmonitorEPKNS_9ae_vectorEllbPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i1 noundef zeroext %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store i64 %3, ptr %10, align 8, !tbaa !9
  %14 = zext i1 %4 to i8
  store i8 %14, ptr %11, align 1, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %15 = load i64, ptr %9, align 8, !tbaa !9
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %16, i32 0, i32 0
  store i64 %15, ptr %17, align 8, !tbaa !13
  %18 = load i64, ptr %10, align 8, !tbaa !9
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %19, i32 0, i32 1
  store i64 %18, ptr %20, align 8, !tbaa !25
  %21 = load i8, ptr %11, align 1, !tbaa !11, !range !26, !noundef !27
  %22 = trunc i8 %21 to i1
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %23, i32 0, i32 2
  %25 = zext i1 %22 to i8
  store i8 %25, ptr %24, align 8, !tbaa !28
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %26, i32 0, i32 29
  store i8 0, ptr %27, align 8, !tbaa !29
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %28, i32 0, i32 30
  store i8 0, ptr %29, align 1, !tbaa !30
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %30, i32 0, i32 31
  store i64 -1, ptr %31, align 8, !tbaa !31
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %32, i32 0, i32 32
  store i64 -1, ptr %33, align 8, !tbaa !32
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %34, i32 0, i32 5
  store i64 0, ptr %35, align 8, !tbaa !33
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %36, i32 0, i32 12
  store i64 0, ptr %37, align 8, !tbaa !34
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %38, i32 0, i32 3
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %39, i64 noundef %40, ptr noundef %41)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %60, %6
  %43 = load i64, ptr %13, align 8, !tbaa !9
  %44 = load i64, ptr %9, align 8, !tbaa !9
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %43, %45
  br i1 %46, label %47, label %63

47:                                               ; preds = %42
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !35
  %51 = load i64, ptr %13, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %50, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !36
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %54, i32 0, i32 3
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %55, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !35
  %58 = load i64, ptr %13, align 8, !tbaa !9
  %59 = getelementptr inbounds double, ptr %57, i64 %58
  store double %53, ptr %59, align 8, !tbaa !36
  br label %60

60:                                               ; preds = %47
  %61 = load i64, ptr %13, align 8, !tbaa !9
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %13, align 8, !tbaa !9
  br label %42, !llvm.loop !37

63:                                               ; preds = %42
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %64, i32 0, i32 33
  store double 0.000000e+00, ptr %65, align 8, !tbaa !39
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %66, i32 0, i32 34
  store double 0.000000e+00, ptr %67, align 8, !tbaa !40
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %68, i32 0, i32 36
  %70 = load i64, ptr %9, align 8, !tbaa !9
  %71 = load i64, ptr %10, align 8, !tbaa !9
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20optguardinitinternalEPNS_14optguardreportEllPNS_8ae_stateE(ptr noundef %69, i64 noundef %70, i64 noundef %71, ptr noundef %72)
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %73, i32 0, i32 37
  store double 0.000000e+00, ptr %74, align 8, !tbaa !41
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %75, i32 0, i32 38
  store double -1.000000e+300, ptr %76, align 8, !tbaa !42
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %77, i32 0, i32 39
  %79 = getelementptr inbounds %"struct.alglib_impl::optguardnonc0report", ptr %78, i32 0, i32 0
  store i8 0, ptr %79, align 8, !tbaa !43
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %80, i32 0, i32 40
  %82 = getelementptr inbounds %"struct.alglib_impl::optguardnonc0report", ptr %81, i32 0, i32 0
  store i8 0, ptr %82, align 8, !tbaa !44
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %83, i32 0, i32 41
  store double 0.000000e+00, ptr %84, align 8, !tbaa !45
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %85, i32 0, i32 42
  store double -1.000000e+300, ptr %86, align 8, !tbaa !46
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %87, i32 0, i32 43
  %89 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %88, i32 0, i32 0
  store i8 0, ptr %89, align 8, !tbaa !47
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %90, i32 0, i32 44
  %92 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test0report", ptr %91, i32 0, i32 0
  store i8 0, ptr %92, align 8, !tbaa !48
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %93, i32 0, i32 45
  store double 0.000000e+00, ptr %94, align 8, !tbaa !49
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %95, i32 0, i32 46
  store double -1.000000e+300, ptr %96, align 8, !tbaa !50
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %97, i32 0, i32 47
  %99 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test1report", ptr %98, i32 0, i32 0
  store i8 0, ptr %99, align 8, !tbaa !51
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %100, i32 0, i32 48
  %102 = getelementptr inbounds %"struct.alglib_impl::optguardnonc1test1report", ptr %101, i32 0, i32 0
  store i8 0, ptr %102, align 8, !tbaa !52
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %103, i32 0, i32 35
  store i8 0, ptr %104, align 8, !tbaa !53
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %105, i32 0, i32 53
  %107 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %107, i64 noundef 5, ptr noundef %108)
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %109, i32 0, i32 53
  %111 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %110, i32 0, i32 3
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %111, i64 noundef 4, ptr noundef %112)
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %113, i32 0, i32 53
  %115 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %114, i32 0, i32 0
  store i32 -1, ptr %115, align 8, !tbaa !54
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN11alglib_impl17smoothnessmonitorE", !10, i64 0, !10, i64 8, !12, i64 16, !15, i64 24, !15, i64 88, !10, i64 152, !15, i64 160, !15, i64 224, !15, i64 288, !17, i64 352, !15, i64 432, !15, i64 496, !10, i64 560, !10, i64 568, !10, i64 576, !18, i64 584, !10, i64 592, !15, i64 600, !15, i64 664, !18, i64 728, !15, i64 736, !15, i64 800, !18, i64 864, !17, i64 872, !17, i64 952, !17, i64 1032, !15, i64 1112, !15, i64 1176, !19, i64 1240, !12, i64 1504, !12, i64 1505, !10, i64 1512, !10, i64 1520, !18, i64 1528, !18, i64 1536, !12, i64 1544, !21, i64 1552, !18, i64 1848, !18, i64 1856, !22, i64 1864, !22, i64 2184, !18, i64 2504, !18, i64 2512, !23, i64 2520, !23, i64 2840, !18, i64 3160, !18, i64 3168, !24, i64 3176, !24, i64 3504, !12, i64 3832, !15, i64 3840, !15, i64 3904, !17, i64 3968, !19, i64 4048, !15, i64 4312, !15, i64 4376, !15, i64 4440, !15, i64 4504, !15, i64 4568, !15, i64 4632, !15, i64 4696, !15, i64 4760, !17, i64 4824, !17, i64 4904, !15, i64 4984, !15, i64 5048, !15, i64 5112, !15, i64 5176, !15, i64 5240, !15, i64 5304, !15, i64 5368, !15, i64 5432, !15, i64 5496, !15, i64 5560, !17, i64 5624}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !12, i64 16, !16, i64 24, !7, i64 56}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !16, i64 40, !7, i64 72}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSN11alglib_impl10rcommstateE", !20, i64 0, !15, i64 8, !15, i64 72, !15, i64 136, !15, i64 200}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN11alglib_impl14optguardreportE", !12, i64 0, !12, i64 1, !10, i64 8, !18, i64 16, !12, i64 24, !12, i64 25, !12, i64 26, !10, i64 32, !18, i64 40, !12, i64 48, !10, i64 56, !10, i64 64, !15, i64 72, !17, i64 136, !17, i64 216}
!22 = !{!"_ZTSN11alglib_impl19optguardnonc0reportE", !12, i64 0, !10, i64 8, !15, i64 16, !15, i64 80, !10, i64 144, !15, i64 152, !15, i64 216, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312}
!23 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !12, i64 0, !10, i64 8, !15, i64 16, !15, i64 80, !10, i64 144, !15, i64 152, !15, i64 216, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312}
!24 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !12, i64 0, !10, i64 8, !10, i64 16, !15, i64 24, !15, i64 88, !10, i64 152, !15, i64 160, !15, i64 224, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320}
!25 = !{!14, !10, i64 8}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!14, !12, i64 16}
!29 = !{!14, !12, i64 1504}
!30 = !{!14, !12, i64 1505}
!31 = !{!14, !10, i64 1512}
!32 = !{!14, !10, i64 1520}
!33 = !{!14, !10, i64 152}
!34 = !{!14, !10, i64 560}
!35 = !{!7, !7, i64 0}
!36 = !{!18, !18, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!14, !18, i64 1528}
!40 = !{!14, !18, i64 1536}
!41 = !{!14, !18, i64 1848}
!42 = !{!14, !18, i64 1856}
!43 = !{!14, !12, i64 1864}
!44 = !{!14, !12, i64 2184}
!45 = !{!14, !18, i64 2504}
!46 = !{!14, !18, i64 2512}
!47 = !{!14, !12, i64 2520}
!48 = !{!14, !12, i64 2840}
!49 = !{!14, !18, i64 3160}
!50 = !{!14, !18, i64 3168}
!51 = !{!14, !12, i64 3176}
!52 = !{!14, !12, i64 3504}
!53 = !{!14, !12, i64 1544}
!54 = !{!14, !20, i64 4048}


; 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 nounwind uwtable
declare dso_local void @_ZN11alglib_impl20optguardinitinternalEPNS_14optguardreportEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl21smoothnessmonitorinitEPNS_17smoothnessmonitorEPKNS_9ae_vectorEllbPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, i64 noundef %3, i1 noundef zeroext %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = zext i1 %4 to i8
  store i64 %2, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %3, ptr %8, align 8, !tbaa !22
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 %7, ptr %9, align 8, !tbaa !23
  %10 = getelementptr inbounds i8, ptr %0, i64 1504
  store i8 0, ptr %10, align 8, !tbaa !24
  %11 = getelementptr inbounds i8, ptr %0, i64 1505
  store i8 0, ptr %11, align 1, !tbaa !25
  %12 = getelementptr inbounds i8, ptr %0, i64 1512
  %13 = getelementptr inbounds i8, ptr %0, i64 152
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 -1, i64 16, i1 false)
  store i64 0, ptr %13, align 8, !tbaa !26
  %14 = getelementptr inbounds i8, ptr %0, i64 560
  store i64 0, ptr %14, align 8, !tbaa !27
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %2, ptr noundef %5)
  %.not.not45 = icmp sgt i64 %2, 0
  br i1 %.not.not45, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %16 = getelementptr inbounds i8, ptr %1, i64 56
  %17 = getelementptr inbounds i8, ptr %0, i64 80
  %xtraiter = and i64 %2, 3
  %18 = icmp ult i64 %2, 4
  br i1 %18, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %2, 9223372036854775804
  br label %19

19:                                               ; preds = %19, %.lr.ph.new
  %.046 = phi i64 [ 0, %.lr.ph.new ], [ %43, %19 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %19 ]
  %20 = load ptr, ptr %16, align 8, !tbaa !28
  %21 = getelementptr inbounds double, ptr %20, i64 %.046
  %22 = load double, ptr %21, align 8, !tbaa !29
  %23 = load ptr, ptr %17, align 8, !tbaa !28
  %24 = getelementptr inbounds double, ptr %23, i64 %.046
  store double %22, ptr %24, align 8, !tbaa !29
  %25 = or disjoint i64 %.046, 1
  %26 = load ptr, ptr %16, align 8, !tbaa !28
  %27 = getelementptr inbounds double, ptr %26, i64 %25
  %28 = load double, ptr %27, align 8, !tbaa !29
  %29 = load ptr, ptr %17, align 8, !tbaa !28
  %30 = getelementptr inbounds double, ptr %29, i64 %25
  store double %28, ptr %30, align 8, !tbaa !29
  %31 = or disjoint i64 %.046, 2
  %32 = load ptr, ptr %16, align 8, !tbaa !28
  %33 = getelementptr inbounds double, ptr %32, i64 %31
  %34 = load double, ptr %33, align 8, !tbaa !29
  %35 = load ptr, ptr %17, align 8, !tbaa !28
  %36 = getelementptr inbounds double, ptr %35, i64 %31
  store double %34, ptr %36, align 8, !tbaa !29
  %37 = or disjoint i64 %.046, 3
  %38 = load ptr, ptr %16, align 8, !tbaa !28
  %39 = getelementptr inbounds double, ptr %38, i64 %37
  %40 = load double, ptr %39, align 8, !tbaa !29
  %41 = load ptr, ptr %17, align 8, !tbaa !28
  %42 = getelementptr inbounds double, ptr %41, i64 %37
  store double %40, ptr %42, align 8, !tbaa !29
  %43 = add nuw nsw i64 %.046, 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.loopexit.unr-lcssa, label %19, !llvm.loop !30

._crit_edge.loopexit.unr-lcssa:                   ; preds = %19, %.lr.ph
  %.046.unr = phi i64 [ 0, %.lr.ph ], [ %43, %19 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.046.epil = phi i64 [ %49, %.epil.preheader ], [ %.046.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %44 = load ptr, ptr %16, align 8, !tbaa !28
  %45 = getelementptr inbounds double, ptr %44, i64 %.046.epil
  %46 = load double, ptr %45, align 8, !tbaa !29
  %47 = load ptr, ptr %17, align 8, !tbaa !28
  %48 = getelementptr inbounds double, ptr %47, i64 %.046.epil
  store double %46, ptr %48, align 8, !tbaa !29
  %49 = add nuw nsw i64 %.046.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, label %.epil.preheader, !llvm.loop !32

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %6
  %50 = getelementptr inbounds i8, ptr %0, i64 1528
  %51 = getelementptr inbounds i8, ptr %0, i64 1552
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %50, i8 0, i64 16, i1 false)
  tail call void @_ZN11alglib_impl20optguardinitinternalEPNS_14optguardreportEllPNS_8ae_stateE(ptr noundef nonnull %51, i64 noundef %2, i64 noundef %3, ptr noundef %5)
  %52 = getelementptr inbounds i8, ptr %0, i64 1848
  store <2 x double> <double 0.000000e+00, double -1.000000e+300>, ptr %52, align 8, !tbaa !29
  %53 = getelementptr inbounds i8, ptr %0, i64 1864
  store i8 0, ptr %53, align 8, !tbaa !34
  %54 = getelementptr inbounds i8, ptr %0, i64 2184
  store i8 0, ptr %54, align 8, !tbaa !35
  %55 = getelementptr inbounds i8, ptr %0, i64 2504
  store <2 x double> <double 0.000000e+00, double -1.000000e+300>, ptr %55, align 8, !tbaa !29
  %56 = getelementptr inbounds i8, ptr %0, i64 2520
  store i8 0, ptr %56, align 8, !tbaa !36
  %57 = getelementptr inbounds i8, ptr %0, i64 2840
  store i8 0, ptr %57, align 8, !tbaa !37
  %58 = getelementptr inbounds i8, ptr %0, i64 3160
  store <2 x double> <double 0.000000e+00, double -1.000000e+300>, ptr %58, align 8, !tbaa !29
  %59 = getelementptr inbounds i8, ptr %0, i64 3176
  store i8 0, ptr %59, align 8, !tbaa !38
  %60 = getelementptr inbounds i8, ptr %0, i64 3504
  store i8 0, ptr %60, align 8, !tbaa !39
  %61 = getelementptr inbounds i8, ptr %0, i64 1544
  store i8 0, ptr %61, align 8, !tbaa !40
  %62 = getelementptr inbounds i8, ptr %0, i64 4048
  %63 = getelementptr inbounds i8, ptr %0, i64 4056
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %63, i64 noundef 5, ptr noundef %5)
  %64 = getelementptr inbounds i8, ptr %0, i64 4184
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %64, i64 noundef 4, ptr noundef %5)
  store i32 -1, ptr %62, align 8, !tbaa !41
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress nounwind 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" }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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_impl17smoothnessmonitorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 88, !7, i64 152, !11, i64 160, !11, i64 224, !11, i64 288, !14, i64 352, !11, i64 432, !11, i64 496, !7, i64 560, !7, i64 568, !7, i64 576, !15, i64 584, !7, i64 592, !11, i64 600, !11, i64 664, !15, i64 728, !11, i64 736, !11, i64 800, !15, i64 864, !14, i64 872, !14, i64 952, !14, i64 1032, !11, i64 1112, !11, i64 1176, !16, i64 1240, !10, i64 1504, !10, i64 1505, !7, i64 1512, !7, i64 1520, !15, i64 1528, !15, i64 1536, !10, i64 1544, !18, i64 1552, !15, i64 1848, !15, i64 1856, !19, i64 1864, !19, i64 2184, !15, i64 2504, !15, i64 2512, !20, i64 2520, !20, i64 2840, !15, i64 3160, !15, i64 3168, !21, i64 3176, !21, i64 3504, !10, i64 3832, !11, i64 3840, !11, i64 3904, !14, i64 3968, !16, i64 4048, !11, i64 4312, !11, i64 4376, !11, i64 4440, !11, i64 4504, !11, i64 4568, !11, i64 4632, !11, i64 4696, !11, i64 4760, !14, i64 4824, !14, i64 4904, !11, i64 4984, !11, i64 5048, !11, i64 5112, !11, i64 5176, !11, i64 5240, !11, i64 5304, !11, i64 5368, !11, i64 5432, !11, i64 5496, !11, i64 5560, !14, i64 5624}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 24, !8, i64 56}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !12, i64 40, !8, i64 72}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl10rcommstateE", !17, i64 0, !11, i64 8, !11, i64 72, !11, i64 136, !11, i64 200}
!17 = !{!"int", !8, i64 0}
!18 = !{!"_ZTSN11alglib_impl14optguardreportE", !10, i64 0, !10, i64 1, !7, i64 8, !15, i64 16, !10, i64 24, !10, i64 25, !10, i64 26, !7, i64 32, !15, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !14, i64 136, !14, i64 216}
!19 = !{!"_ZTSN11alglib_impl19optguardnonc0reportE", !10, i64 0, !7, i64 8, !11, i64 16, !11, i64 80, !7, i64 144, !11, i64 152, !11, i64 216, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312}
!20 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !10, i64 0, !7, i64 8, !11, i64 16, !11, i64 80, !7, i64 144, !11, i64 152, !11, i64 216, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312}
!21 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !10, i64 0, !7, i64 8, !7, i64 16, !11, i64 24, !11, i64 88, !7, i64 152, !11, i64 160, !11, i64 224, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320}
!22 = !{!6, !7, i64 8}
!23 = !{!6, !10, i64 16}
!24 = !{!6, !10, i64 1504}
!25 = !{!6, !10, i64 1505}
!26 = !{!6, !7, i64 152}
!27 = !{!6, !7, i64 560}
!28 = !{!8, !8, i64 0}
!29 = !{!15, !15, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.unroll.disable"}
!34 = !{!6, !10, i64 1864}
!35 = !{!6, !10, i64 2184}
!36 = !{!6, !10, i64 2520}
!37 = !{!6, !10, i64 2840}
!38 = !{!6, !10, i64 3176}
!39 = !{!6, !10, i64 3504}
!40 = !{!6, !10, i64 1544}
!41 = !{!6, !17, i64 4048}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass