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

@.str.196 = external hidden unnamed_addr constant [40 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 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) #1

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

declare void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl32smoothnessmonitorstartlinesearchEPNS_17smoothnessmonitorEPKNS_9ae_vectorES4_PKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

33:                                               ; preds = %9
  store i32 1, ptr %22, align 4
  br label %115

34:                                               ; preds = %9
  %35 = load i64, ptr %20, align 8, !tbaa !11
  %36 = icmp eq i64 %35, 1
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef @.str.196, ptr noundef %37)
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %38, i32 0, i32 71
  %40 = load i64, ptr %19, align 8, !tbaa !11
  %41 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %39, i64 noundef %40, ptr noundef %41)
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %42, i32 0, i32 73
  %44 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %43, i64 noundef 1, ptr noundef %44)
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %45, i32 0, i32 74
  %47 = load i64, ptr %19, align 8, !tbaa !11
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %46, i64 noundef 1, i64 noundef %47, ptr noundef %48)
  %49 = load double, ptr %14, align 8, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %50, i32 0, i32 73
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !29
  %54 = getelementptr inbounds double, ptr %53, i64 0
  store double %49, ptr %54, align 8, !tbaa !9
  store i64 0, ptr %21, align 8, !tbaa !11
  br label %55

55:                                               ; preds = %101, %34
  %56 = load i64, ptr %21, align 8, !tbaa !11
  %57 = load i64, ptr %19, align 8, !tbaa !11
  %58 = sub nsw i64 %57, 1
  %59 = icmp sle i64 %56, %58
  br i1 %59, label %60, label %104

60:                                               ; preds = %55
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !29
  %64 = load i64, ptr %21, align 8, !tbaa !11
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %67, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !29
  %70 = load i64, ptr %21, align 8, !tbaa !11
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fmul double %66, %72
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %74, i32 0, i32 71
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !29
  %78 = load i64, ptr %21, align 8, !tbaa !11
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  store double %73, ptr %79, align 8, !tbaa !9
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !29
  %83 = load i64, ptr %21, align 8, !tbaa !11
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !29
  %89 = load i64, ptr %21, align 8, !tbaa !11
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = fmul double %85, %91
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %93, i32 0, i32 74
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = getelementptr inbounds ptr, ptr %96, i64 0
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i64, ptr %21, align 8, !tbaa !11
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  store double %92, ptr %100, align 8, !tbaa !9
  br label %101

101:                                              ; preds = %60
  %102 = load i64, ptr %21, align 8, !tbaa !11
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %21, align 8, !tbaa !11
  br label %55, !llvm.loop !30

104:                                              ; preds = %55
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %106, i32 0, i32 71
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %108, i32 0, i32 73
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::smoothnessmonitor", ptr %110, i32 0, i32 74
  %112 = load i64, ptr %16, align 8, !tbaa !11
  %113 = load i64, ptr %17, align 8, !tbaa !11
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl32smoothnessmonitorstartlinesearchEPNS_17smoothnessmonitorEPKNS_9ae_vectorES4_PKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %105, ptr noundef %107, ptr noundef %109, ptr noundef %111, i64 noundef %112, i64 noundef %113, ptr noundef %114)
  store i32 0, ptr %22, align 4
  br label %115

115:                                              ; preds = %104, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  %116 = load i32, ptr %22, align 4
  switch i32 %116, label %118 [
    i32 0, label %117
    i32 1, label %117
  ]

117:                                              ; preds = %115, %115
  ret void

118:                                              ; preds = %115
  unreachable
}

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

@.str.196 = external hidden unnamed_addr constant [40 x i8], align 1

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl32smoothnessmonitorstartlinesearchEPNS_17smoothnessmonitorEPKNS_9ae_vectorES4_PKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl34smoothnessmonitorstartlinesearch1uEPNS_17smoothnessmonitorEPKNS_9ae_vectorES4_S4_dS4_llPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, double noundef %4, ptr nocapture noundef readonly %5, i64 noundef %6, i64 noundef %7, ptr noundef %8) local_unnamed_addr #1 {
  %10 = load i64, ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = load i8, ptr %11, align 8, !tbaa !22, !range !23, !noundef !24
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %14, label %50

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i64, ptr %15, align 8, !tbaa !25
  %17 = icmp eq i64 %16, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.196, ptr noundef %8)
  %18 = getelementptr inbounds i8, ptr %0, i64 5432
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %18, i64 noundef %10, ptr noundef %8)
  %19 = getelementptr inbounds i8, ptr %0, i64 5560
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %19, i64 noundef 1, ptr noundef %8)
  %20 = getelementptr inbounds i8, ptr %0, i64 5624
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %20, i64 noundef 1, i64 noundef %10, ptr noundef %8)
  %21 = getelementptr inbounds i8, ptr %0, i64 5616
  %22 = load ptr, ptr %21, align 8, !tbaa !26
  store double %4, ptr %22, align 8, !tbaa !27
  %.not.not36 = icmp sgt i64 %10, 0
  br i1 %.not.not36, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %23 = getelementptr inbounds i8, ptr %3, i64 56
  %24 = getelementptr inbounds i8, ptr %2, i64 56
  %25 = getelementptr inbounds i8, ptr %0, i64 5488
  %26 = getelementptr inbounds i8, ptr %5, i64 56
  %27 = getelementptr inbounds i8, ptr %1, i64 56
  %28 = getelementptr inbounds i8, ptr %0, i64 5696
  br label %29

29:                                               ; preds = %.lr.ph, %29
  %.037 = phi i64 [ 0, %.lr.ph ], [ %49, %29 ]
  %30 = load ptr, ptr %23, align 8, !tbaa !26
  %31 = getelementptr inbounds double, ptr %30, i64 %.037
  %32 = load double, ptr %31, align 8, !tbaa !27
  %33 = load ptr, ptr %24, align 8, !tbaa !26
  %34 = getelementptr inbounds double, ptr %33, i64 %.037
  %35 = load double, ptr %34, align 8, !tbaa !27
  %36 = fmul double %32, %35
  %37 = load ptr, ptr %25, align 8, !tbaa !26
  %38 = getelementptr inbounds double, ptr %37, i64 %.037
  store double %36, ptr %38, align 8, !tbaa !27
  %39 = load ptr, ptr %26, align 8, !tbaa !26
  %40 = getelementptr inbounds double, ptr %39, i64 %.037
  %41 = load double, ptr %40, align 8, !tbaa !27
  %42 = load ptr, ptr %27, align 8, !tbaa !26
  %43 = getelementptr inbounds double, ptr %42, i64 %.037
  %44 = load double, ptr %43, align 8, !tbaa !27
  %45 = fmul double %41, %44
  %46 = load ptr, ptr %28, align 8, !tbaa !26
  %47 = load ptr, ptr %46, align 8, !tbaa !28
  %48 = getelementptr inbounds double, ptr %47, i64 %.037
  store double %45, ptr %48, align 8, !tbaa !27
  %49 = add nuw nsw i64 %.037, 1
  %exitcond.not = icmp eq i64 %49, %10
  br i1 %exitcond.not, label %._crit_edge, label %29, !llvm.loop !29

._crit_edge:                                      ; preds = %29, %14
  tail call void @_ZN11alglib_impl32smoothnessmonitorstartlinesearchEPNS_17smoothnessmonitorEPKNS_9ae_vectorES4_PKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20, i64 noundef %6, i64 noundef %7, ptr noundef %8)
  br label %50

50:                                               ; preds = %9, %._crit_edge
  ret void
}

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

!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, !10, i64 16}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!6, !7, i64 8}
!26 = !{!8, !8, i64 0}
!27 = !{!15, !15, i64 0}
!28 = !{!13, !13, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


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