; 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::xbfgshessian" = type { i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, double, double, double, double, double, double, double, i64, double, double, %"struct.alglib_impl::ae_matrix", i64, double, double, double, i64, double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i8, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i8, %"struct.alglib_impl::ae_vector", i8, i64, %"struct.alglib_impl::ae_matrix", %"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", i8, %"struct.alglib_impl::ae_vector", double, double, i64, %"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_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"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::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"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::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 }

@.str.256 = external hidden unnamed_addr constant [25 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 noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15hessianinitbfgsEPNS_12xbfgshessianElldPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, double noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %12 = load i64, ptr %8, align 8, !tbaa !9
  %13 = icmp sge i64 %12, 0
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef @.str.256, ptr noundef %14)
  %15 = load i64, ptr %8, align 8, !tbaa !9
  %16 = load i64, ptr %7, align 8, !tbaa !9
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  %18 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %15, i64 noundef %16, ptr noundef %17)
  store i64 %18, ptr %8, align 8, !tbaa !9
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %19, i32 0, i32 0
  store i64 0, ptr %20, align 8, !tbaa !13
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %22, i32 0, i32 3
  store i64 %21, ptr %23, align 8, !tbaa !19
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %25, i32 0, i32 4
  store i64 %24, ptr %26, align 8, !tbaa !20
  %27 = load double, ptr %9, align 8, !tbaa !11
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %28, i32 0, i32 5
  store double %27, ptr %29, align 8, !tbaa !21
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %30, i32 0, i32 16
  store i64 0, ptr %31, align 8, !tbaa !22
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %32, i32 0, i32 6
  store double 0x3EB0C6F7A0B5ED8D, ptr %33, align 8, !tbaa !23
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %34)
  %36 = fmul double 1.000000e+02, %35
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %37, i32 0, i32 7
  store double %36, ptr %38, align 8, !tbaa !24
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %39)
  %41 = fmul double 1.000000e-02, %40
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %42, i32 0, i32 8
  store double %41, ptr %43, align 8, !tbaa !25
  %44 = load i64, ptr %7, align 8, !tbaa !9
  %45 = sitofp i64 %44 to double
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %45, ptr noundef %46)
  %48 = fadd double 1.000000e+03, %47
  %49 = fmul double %48, 5.000000e-16
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %50, i32 0, i32 9
  store double %49, ptr %51, align 8, !tbaa !26
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %52, i32 0, i32 10
  store double 1.000000e-03, ptr %53, align 8, !tbaa !27
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %54, i32 0, i32 11
  store double 1.000000e+08, ptr %55, align 8, !tbaa !28
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %56)
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %58, i32 0, i32 19
  store double %57, ptr %59, align 8, !tbaa !29
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %60, i32 0, i32 19
  %62 = load double, ptr %61, align 8, !tbaa !29
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %63, i32 0, i32 6
  %65 = load double, ptr %64, align 8, !tbaa !23
  %66 = fmul double %62, %65
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %67, i32 0, i32 17
  store double %66, ptr %68, align 8, !tbaa !30
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %69, i32 0, i32 18
  store double 0.000000e+00, ptr %70, align 8, !tbaa !31
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %71, i32 0, i32 44
  store i64 0, ptr %72, align 8, !tbaa !32
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %73, i32 0, i32 46
  %75 = load i64, ptr %7, align 8, !tbaa !9
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %74, i64 noundef %75, ptr noundef %76)
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %77, i32 0, i32 47
  %79 = load i64, ptr %7, align 8, !tbaa !9
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %78, i64 noundef %79, ptr noundef %80)
  %81 = load i64, ptr %7, align 8, !tbaa !9
  %82 = load i64, ptr %7, align 8, !tbaa !9
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %83, i32 0, i32 15
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl10rsetallocmElldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %81, i64 noundef %82, double noundef 0.000000e+00, ptr noundef %84, ptr noundef %85)
  %86 = load i64, ptr %7, align 8, !tbaa !9
  %87 = load i64, ptr %7, align 8, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %88, i32 0, i32 45
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl10rsetallocmElldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %86, i64 noundef %87, double noundef 0.000000e+00, ptr noundef %89, ptr noundef %90)
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %115, %5
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = load i64, ptr %7, align 8, !tbaa !9
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %92, %94
  br i1 %95, label %96, label %118

96:                                               ; preds = %91
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %97, i32 0, i32 15
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %98, i32 0, i32 6
  %100 = load ptr, ptr %99, align 8, !tbaa !33
  %101 = load i64, ptr %11, align 8, !tbaa !9
  %102 = getelementptr inbounds ptr, ptr %100, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = load i64, ptr %11, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  store double 1.000000e+00, ptr %105, align 8, !tbaa !11
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::xbfgshessian", ptr %106, i32 0, i32 45
  %108 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %107, i32 0, i32 6
  %109 = load ptr, ptr %108, align 8, !tbaa !33
  %110 = load i64, ptr %11, align 8, !tbaa !9
  %111 = getelementptr inbounds ptr, ptr %109, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load i64, ptr %11, align 8, !tbaa !9
  %114 = getelementptr inbounds double, ptr %112, i64 %113
  store double 1.000000e+00, ptr %114, align 8, !tbaa !11
  br label %115

115:                                              ; preds = %96
  %116 = load i64, ptr %11, align 8, !tbaa !9
  %117 = add nsw i64 %116, 1
  store i64 %117, ptr %11, align 8, !tbaa !9
  br label %91, !llvm.loop !34

118:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret void
}

declare void @_ZN11alglib_impl10rsetallocmElldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef) #1

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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN11alglib_impl12xbfgshessianE", !10, i64 0, !15, i64 8, !15, i64 72, !10, i64 136, !10, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !10, i64 208, !12, i64 216, !12, i64 224, !18, i64 232, !10, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !10, i64 344, !12, i64 352, !18, i64 360, !18, i64 440, !18, i64 520, !18, i64 600, !16, i64 680, !10, i64 688, !18, i64 696, !18, i64 776, !16, i64 856, !15, i64 864, !16, i64 928, !10, i64 936, !18, i64 944, !15, i64 1024, !15, i64 1088, !18, i64 1152, !15, i64 1232, !15, i64 1296, !16, i64 1360, !15, i64 1368, !12, i64 1432, !12, i64 1440, !10, i64 1448, !18, i64 1456, !15, i64 1536, !15, i64 1600, !15, i64 1664, !15, i64 1728, !15, i64 1792, !15, i64 1856, !18, i64 1920, !18, i64 2000, !18, i64 2080, !18, i64 2160, !18, i64 2240, !18, i64 2320, !18, i64 2400, !18, i64 2480, !15, i64 2560, !15, i64 2624, !18, i64 2688, !15, i64 2768, !18, i64 2832, !18, i64 2912, !18, i64 2992, !18, i64 3072, !18, i64 3152, !15, i64 3232, !15, i64 3296}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !16, i64 16, !17, i64 24, !7, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !16, i64 32, !17, i64 40, !7, i64 72}
!19 = !{!14, !10, i64 136}
!20 = !{!14, !10, i64 144}
!21 = !{!14, !12, i64 152}
!22 = !{!14, !10, i64 312}
!23 = !{!14, !12, i64 160}
!24 = !{!14, !12, i64 168}
!25 = !{!14, !12, i64 176}
!26 = !{!14, !12, i64 184}
!27 = !{!14, !12, i64 192}
!28 = !{!14, !12, i64 200}
!29 = !{!14, !12, i64 336}
!30 = !{!14, !12, i64 320}
!31 = !{!14, !12, i64 328}
!32 = !{!14, !10, i64 1448}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"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.256 = external hidden unnamed_addr constant [25 x i8], align 1

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double 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 noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15hessianinitbfgsEPNS_12xbfgshessianElldPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, double noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = icmp sgt i64 %2, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %6, ptr noundef nonnull @.str.256, ptr noundef %4)
  %7 = tail call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %2, i64 noundef %1, ptr noundef %4)
  store i64 0, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 136
  store i64 %1, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %0, i64 144
  store i64 %7, ptr %9, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %0, i64 152
  store double %3, ptr %10, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %0, i64 312
  store i64 0, ptr %11, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %0, i64 160
  store double 0x3EB0C6F7A0B5ED8D, ptr %12, align 8, !tbaa !20
  %13 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %4)
  %14 = fmul double %13, 1.000000e+02
  %15 = getelementptr inbounds i8, ptr %0, i64 168
  store double %14, ptr %15, align 8, !tbaa !21
  %16 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %4)
  %17 = fmul double %16, 1.000000e-02
  %18 = getelementptr inbounds i8, ptr %0, i64 176
  store double %17, ptr %18, align 8, !tbaa !22
  %19 = sitofp i64 %1 to double
  %20 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %19, ptr noundef %4)
  %21 = fadd double %20, 1.000000e+03
  %22 = fmul double %21, 5.000000e-16
  %23 = getelementptr inbounds i8, ptr %0, i64 184
  store double %22, ptr %23, align 8, !tbaa !23
  %24 = getelementptr inbounds i8, ptr %0, i64 192
  store <2 x double> <double 1.000000e-03, double 1.000000e+08>, ptr %24, align 8, !tbaa !24
  %25 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef 5.000000e-16, ptr noundef %4)
  %26 = getelementptr inbounds i8, ptr %0, i64 336
  store double %25, ptr %26, align 8, !tbaa !25
  %27 = load double, ptr %12, align 8, !tbaa !20
  %28 = fmul double %25, %27
  %29 = getelementptr inbounds i8, ptr %0, i64 320
  store double %28, ptr %29, align 8, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %0, i64 328
  store double 0.000000e+00, ptr %30, align 8, !tbaa !27
  %31 = getelementptr inbounds i8, ptr %0, i64 1448
  store i64 0, ptr %31, align 8, !tbaa !28
  %32 = getelementptr inbounds i8, ptr %0, i64 1536
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %32, i64 noundef %1, ptr noundef %4)
  %33 = getelementptr inbounds i8, ptr %0, i64 1600
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %33, i64 noundef %1, ptr noundef %4)
  %34 = getelementptr inbounds i8, ptr %0, i64 232
  tail call void @_ZN11alglib_impl10rsetallocmElldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %1, i64 noundef %1, double noundef 0.000000e+00, ptr noundef nonnull %34, ptr noundef %4)
  %35 = getelementptr inbounds i8, ptr %0, i64 1456
  tail call void @_ZN11alglib_impl10rsetallocmElldPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %1, i64 noundef %1, double noundef 0.000000e+00, ptr noundef nonnull %35, ptr noundef %4)
  %.not.not52 = icmp sgt i64 %1, 0
  br i1 %.not.not52, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %36 = getelementptr inbounds i8, ptr %0, i64 304
  %37 = getelementptr inbounds i8, ptr %0, i64 1528
  %xtraiter = and i64 %1, 1
  %38 = icmp eq i64 %1, 1
  br i1 %38, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %1, 9223372036854775806
  br label %39

39:                                               ; preds = %39, %.lr.ph.new
  %.053 = phi i64 [ 0, %.lr.ph.new ], [ %57, %39 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %39 ]
  %40 = load ptr, ptr %36, align 8, !tbaa !29
  %41 = getelementptr inbounds ptr, ptr %40, i64 %.053
  %42 = load ptr, ptr %41, align 8, !tbaa !30
  %43 = getelementptr inbounds double, ptr %42, i64 %.053
  store double 1.000000e+00, ptr %43, align 8, !tbaa !24
  %44 = load ptr, ptr %37, align 8, !tbaa !29
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.053
  %46 = load ptr, ptr %45, align 8, !tbaa !30
  %47 = getelementptr inbounds double, ptr %46, i64 %.053
  store double 1.000000e+00, ptr %47, align 8, !tbaa !24
  %48 = or disjoint i64 %.053, 1
  %49 = load ptr, ptr %36, align 8, !tbaa !29
  %50 = getelementptr inbounds ptr, ptr %49, i64 %48
  %51 = load ptr, ptr %50, align 8, !tbaa !30
  %52 = getelementptr inbounds double, ptr %51, i64 %48
  store double 1.000000e+00, ptr %52, align 8, !tbaa !24
  %53 = load ptr, ptr %37, align 8, !tbaa !29
  %54 = getelementptr inbounds ptr, ptr %53, i64 %48
  %55 = load ptr, ptr %54, align 8, !tbaa !30
  %56 = getelementptr inbounds double, ptr %55, i64 %48
  store double 1.000000e+00, ptr %56, align 8, !tbaa !24
  %57 = add nuw nsw i64 %.053, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %39, !llvm.loop !31

._crit_edge.loopexit.unr-lcssa:                   ; preds = %39, %.lr.ph
  %.053.unr = phi i64 [ 0, %.lr.ph ], [ %57, %39 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %58 = load ptr, ptr %36, align 8, !tbaa !29
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.053.unr
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = getelementptr inbounds double, ptr %60, i64 %.053.unr
  store double 1.000000e+00, ptr %61, align 8, !tbaa !24
  %62 = load ptr, ptr %37, align 8, !tbaa !29
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.053.unr
  %64 = load ptr, ptr %63, align 8, !tbaa !30
  %65 = getelementptr inbounds double, ptr %64, i64 %.053.unr
  store double 1.000000e+00, ptr %65, align 8, !tbaa !24
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %5
  ret void
}

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

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_impl12xbfgshessianE", !7, i64 0, !10, i64 8, !10, i64 72, !7, i64 136, !7, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !7, i64 208, !14, i64 216, !14, i64 224, !15, i64 232, !7, i64 312, !14, i64 320, !14, i64 328, !14, i64 336, !7, i64 344, !14, i64 352, !15, i64 360, !15, i64 440, !15, i64 520, !15, i64 600, !11, i64 680, !7, i64 688, !15, i64 696, !15, i64 776, !11, i64 856, !10, i64 864, !11, i64 928, !7, i64 936, !15, i64 944, !10, i64 1024, !10, i64 1088, !15, i64 1152, !10, i64 1232, !10, i64 1296, !11, i64 1360, !10, i64 1368, !14, i64 1432, !14, i64 1440, !7, i64 1448, !15, i64 1456, !10, i64 1536, !10, i64 1600, !10, i64 1664, !10, i64 1728, !10, i64 1792, !10, i64 1856, !15, i64 1920, !15, i64 2000, !15, i64 2080, !15, i64 2160, !15, i64 2240, !15, i64 2320, !15, i64 2400, !15, i64 2480, !10, i64 2560, !10, i64 2624, !15, i64 2688, !10, i64 2768, !15, i64 2832, !15, i64 2912, !15, i64 2992, !15, i64 3072, !15, i64 3152, !10, i64 3232, !10, i64 3296}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!16 = !{!6, !7, i64 136}
!17 = !{!6, !7, i64 144}
!18 = !{!6, !14, i64 152}
!19 = !{!6, !7, i64 312}
!20 = !{!6, !14, i64 160}
!21 = !{!6, !14, i64 168}
!22 = !{!6, !14, i64 176}
!23 = !{!6, !14, i64 184}
!24 = !{!14, !14, i64 0}
!25 = !{!6, !14, i64 336}
!26 = !{!6, !14, i64 320}
!27 = !{!6, !14, i64 328}
!28 = !{!6, !7, i64 1448}
!29 = !{!8, !8, i64 0}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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