; LLVM IR from venumb/ZSPACE :: cpp/depends/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::minlbfgsstate" = type { i64, i64, double, double, double, i64, i8, double, %"struct.alglib_impl::ae_vector", double, i64, i64, i64, i64, i64, %"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", double, %"struct.alglib_impl::ae_vector", double, double, %"struct.alglib_impl::ae_vector", i64, double, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", i64, %"struct.alglib_impl::precbuflbfgs", %"struct.alglib_impl::precbuflowrank", double, double, double, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", i8, i8, i8, i8, double, %"struct.alglib_impl::rcommstate", i64, i64, i64, %"struct.alglib_impl::linminstate", i64, %"struct.alglib_impl::smoothnessmonitor", %"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::precbuflbfgs" = type { %"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", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::precbuflowrank" = type { i64, i64, %"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_vector" }
%"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::linminstate" = type { i8, i8, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
%"struct.alglib_impl::smoothnessmonitor" = type { i64, i64, i8, %"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, i8, i8, double, double, i8, %"struct.alglib_impl::optguardreport", 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::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 }
%"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 }
%"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

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
define dso_local void @_ZN11alglib_impl29minlbfgssetprecrankklbfgsfastEPNS_13minlbfgsstateEPNS_9ae_vectorES3_PNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %16, i32 0, i32 0
  %18 = load i64, ptr %17, align 8, !tbaa !11
  store i64 %18, ptr %15, align 8, !tbaa !9
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %19, i32 0, i32 26
  store i64 4, ptr %20, align 8, !tbaa !27
  %21 = load i64, ptr %11, align 8, !tbaa !9
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %22, i32 0, i32 33
  store i64 %21, ptr %23, align 8, !tbaa !28
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %24, i32 0, i32 30
  %26 = load i64, ptr %11, align 8, !tbaa !9
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %26, ptr noundef %27)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %28, i32 0, i32 31
  %30 = load i64, ptr %15, align 8, !tbaa !9
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %30, ptr noundef %31)
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %32, i32 0, i32 32
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = load i64, ptr %15, align 8, !tbaa !9
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %33, i64 noundef %34, i64 noundef %35, ptr noundef %36)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %55, %6
  %38 = load i64, ptr %13, align 8, !tbaa !9
  %39 = load i64, ptr %15, align 8, !tbaa !9
  %40 = sub nsw i64 %39, 1
  %41 = icmp sle i64 %38, %40
  br i1 %41, label %42, label %58

42:                                               ; preds = %37
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !29
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %45, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !30
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %49, i32 0, i32 31
  %51 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !29
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %52, i64 %53
  store double %48, ptr %54, align 8, !tbaa !30
  br label %55

55:                                               ; preds = %42
  %56 = load i64, ptr %13, align 8, !tbaa !9
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %13, align 8, !tbaa !9
  br label %37, !llvm.loop !31

58:                                               ; preds = %37
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %105, %58
  %60 = load i64, ptr %13, align 8, !tbaa !9
  %61 = load i64, ptr %11, align 8, !tbaa !9
  %62 = sub nsw i64 %61, 1
  %63 = icmp sle i64 %60, %62
  br i1 %63, label %64, label %108

64:                                               ; preds = %59
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !29
  %68 = load i64, ptr %13, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !30
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %71, i32 0, i32 30
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  %75 = load i64, ptr %13, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %74, i64 %75
  store double %70, ptr %76, align 8, !tbaa !30
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %101, %64
  %78 = load i64, ptr %14, align 8, !tbaa !9
  %79 = load i64, ptr %15, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  %81 = icmp sle i64 %78, %80
  br i1 %81, label %82, label %104

82:                                               ; preds = %77
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !29
  %86 = load i64, ptr %13, align 8, !tbaa !9
  %87 = getelementptr inbounds ptr, ptr %85, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = load i64, ptr %14, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !30
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::minlbfgsstate", ptr %92, i32 0, i32 32
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %93, i32 0, i32 6
  %95 = load ptr, ptr %94, align 8, !tbaa !29
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = getelementptr inbounds ptr, ptr %95, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  store double %91, ptr %100, align 8, !tbaa !30
  br label %101

101:                                              ; preds = %82
  %102 = load i64, ptr %14, align 8, !tbaa !9
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %14, align 8, !tbaa !9
  br label %77, !llvm.loop !33

104:                                              ; preds = %77
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %13, align 8, !tbaa !9
  br label %59, !llvm.loop !34

108:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret void
}

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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl13minlbfgsstateE", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !10, i64 40, !14, i64 48, !13, i64 56, !15, i64 64, !13, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !15, i64 176, !17, i64 240, !17, i64 320, !15, i64 400, !15, i64 464, !15, i64 528, !13, i64 592, !15, i64 600, !13, i64 664, !13, i64 672, !15, i64 680, !10, i64 744, !13, i64 752, !17, i64 760, !15, i64 840, !15, i64 904, !15, i64 968, !17, i64 1032, !10, i64 1112, !18, i64 1120, !19, i64 1584, !13, i64 2032, !13, i64 2040, !13, i64 2048, !13, i64 2056, !13, i64 2064, !15, i64 2072, !15, i64 2136, !15, i64 2200, !13, i64 2264, !15, i64 2272, !14, i64 2336, !14, i64 2337, !14, i64 2338, !14, i64 2339, !13, i64 2344, !20, i64 2352, !10, i64 2616, !10, i64 2624, !10, i64 2632, !22, i64 2640, !10, i64 2832, !23, i64 2840, !15, i64 6808}
!13 = !{!"double", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, 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, !14, i64 32, !16, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl12precbuflbfgsE", !15, i64 0, !15, i64 64, !15, i64 128, !17, i64 192, !15, i64 272, !15, i64 336, !15, i64 400}
!19 = !{!"_ZTSN11alglib_impl14precbuflowrankE", !10, i64 0, !10, i64 8, !15, i64 16, !17, i64 80, !15, i64 160, !17, i64 224, !17, i64 304, !15, i64 384}
!20 = !{!"_ZTSN11alglib_impl10rcommstateE", !21, i64 0, !15, i64 8, !15, i64 72, !15, i64 136, !15, i64 200}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSN11alglib_impl11linminstateE", !14, i64 0, !14, i64 1, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184}
!23 = !{!"_ZTSN11alglib_impl17smoothnessmonitorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !10, i64 88, !15, i64 96, !15, i64 160, !15, i64 224, !17, i64 288, !15, i64 368, !15, i64 432, !10, i64 496, !14, i64 504, !14, i64 505, !13, i64 512, !13, i64 520, !14, i64 528, !24, i64 536, !13, i64 832, !13, i64 840, !25, i64 848, !25, i64 1152, !13, i64 1456, !13, i64 1464, !26, i64 1472, !26, i64 1784, !14, i64 2096, !15, i64 2104, !15, i64 2168, !17, i64 2232, !20, i64 2312, !15, i64 2576, !15, i64 2640, !15, i64 2704, !15, i64 2768, !15, i64 2832, !15, i64 2896, !15, i64 2960, !15, i64 3024, !17, i64 3088, !17, i64 3168, !15, i64 3248, !15, i64 3312, !15, i64 3376, !15, i64 3440, !15, i64 3504, !15, i64 3568, !15, i64 3632, !15, i64 3696, !15, i64 3760, !15, i64 3824, !17, i64 3888}
!24 = !{!"_ZTSN11alglib_impl14optguardreportE", !14, i64 0, !14, i64 1, !10, i64 8, !13, i64 16, !14, i64 24, !14, i64 25, !14, i64 26, !10, i64 32, !13, i64 40, !14, i64 48, !10, i64 56, !10, i64 64, !15, i64 72, !17, i64 136, !17, i64 216}
!25 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !14, 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}
!26 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !14, 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}
!27 = !{!12, !10, i64 744}
!28 = !{!12, !10, i64 1112}
!29 = !{!7, !7, i64 0}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}


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

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
define dso_local void @_ZN11alglib_impl29minlbfgssetprecrankklbfgsfastEPNS_13minlbfgsstateEPNS_9ae_vectorES3_PNS_9ae_matrixElPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = load i64, ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 744
  store i64 4, ptr %8, align 8, !tbaa !25
  %9 = getelementptr inbounds i8, ptr %0, i64 1112
  store i64 %4, ptr %9, align 8, !tbaa !26
  %10 = getelementptr inbounds i8, ptr %0, i64 904
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %4, ptr noundef %5)
  %11 = getelementptr inbounds i8, ptr %0, i64 968
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %7, ptr noundef %5)
  %12 = getelementptr inbounds i8, ptr %0, i64 1032
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %4, i64 noundef %7, ptr noundef %5)
  %.not.not40 = icmp sgt i64 %7, 0
  br i1 %.not.not40, label %.lr.ph, label %.preheader.thread

.lr.ph:                                           ; preds = %6
  %13 = getelementptr inbounds i8, ptr %1, i64 56
  %14 = getelementptr inbounds i8, ptr %0, i64 1024
  %xtraiter = and i64 %7, 3
  %15 = icmp ult i64 %7, 4
  br i1 %15, label %.preheader.unr-lcssa, label %.lr.ph.new

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

.preheader.unr-lcssa:                             ; preds = %68, %.lr.ph
  %.041.unr = phi i64 [ 0, %.lr.ph ], [ %92, %68 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.unr-lcssa, %.epil.preheader
  %.041.epil = phi i64 [ %21, %.epil.preheader ], [ %.041.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader.unr-lcssa ]
  %16 = load ptr, ptr %13, align 8, !tbaa !27
  %17 = getelementptr inbounds double, ptr %16, i64 %.041.epil
  %18 = load double, ptr %17, align 8, !tbaa !28
  %19 = load ptr, ptr %14, align 8, !tbaa !27
  %20 = getelementptr inbounds double, ptr %19, i64 %.041.epil
  store double %18, ptr %20, align 8, !tbaa !28
  %21 = add nuw nsw i64 %.041.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 %.preheader, label %.epil.preheader, !llvm.loop !29

.preheader:                                       ; preds = %.epil.preheader, %.preheader.unr-lcssa
  %.not.not3845 = icmp sgt i64 %4, 0
  br i1 %.not.not3845, label %.lr.ph47, label %._crit_edge48

.preheader.thread:                                ; preds = %6
  %.not.not384553 = icmp sgt i64 %4, 0
  br i1 %.not.not384553, label %.lr.ph47.thread, label %._crit_edge48

.lr.ph47.thread:                                  ; preds = %.preheader.thread
  %22 = getelementptr inbounds i8, ptr %2, i64 56
  %23 = getelementptr inbounds i8, ptr %0, i64 960
  br label %.lr.ph47.split.preheader

.lr.ph47:                                         ; preds = %.preheader
  %24 = getelementptr inbounds i8, ptr %2, i64 56
  %25 = getelementptr inbounds i8, ptr %0, i64 960
  %26 = getelementptr inbounds i8, ptr %3, i64 72
  %27 = getelementptr inbounds i8, ptr %0, i64 1104
  br i1 %.not.not40, label %.lr.ph44.us.preheader, label %.lr.ph47.split.preheader

.lr.ph44.us.preheader:                            ; preds = %.lr.ph47
  %xtraiter63 = and i64 %7, 1
  %28 = icmp eq i64 %7, 1
  %unroll_iter66 = and i64 %7, 9223372036854775806
  %lcmp.mod65.not = icmp eq i64 %xtraiter63, 0
  br label %.lr.ph44.us

.lr.ph47.split.preheader:                         ; preds = %.lr.ph47.thread, %.lr.ph47
  %29 = phi ptr [ %23, %.lr.ph47.thread ], [ %25, %.lr.ph47 ]
  %30 = phi ptr [ %22, %.lr.ph47.thread ], [ %24, %.lr.ph47 ]
  %31 = add i64 %4, -1
  %xtraiter57 = and i64 %4, 3
  %32 = icmp ult i64 %31, 3
  br i1 %32, label %._crit_edge48.loopexit56.unr-lcssa, label %.lr.ph47.split.preheader.new

.lr.ph47.split.preheader.new:                     ; preds = %.lr.ph47.split.preheader
  %unroll_iter60 = and i64 %4, -4
  br label %.lr.ph47.split

.lr.ph44.us:                                      ; preds = %.lr.ph44.us.preheader, %._crit_edge.us
  %.146.us = phi i64 [ %67, %._crit_edge.us ], [ 0, %.lr.ph44.us.preheader ]
  %33 = load ptr, ptr %24, align 8, !tbaa !27
  %34 = getelementptr inbounds double, ptr %33, i64 %.146.us
  %35 = load double, ptr %34, align 8, !tbaa !28
  %36 = load ptr, ptr %25, align 8, !tbaa !27
  %37 = getelementptr inbounds double, ptr %36, i64 %.146.us
  store double %35, ptr %37, align 8, !tbaa !28
  br i1 %28, label %._crit_edge.us.unr-lcssa, label %.lr.ph44.us.new

.lr.ph44.us.new:                                  ; preds = %.lr.ph44.us, %.lr.ph44.us.new
  %.03643.us = phi i64 [ %57, %.lr.ph44.us.new ], [ 0, %.lr.ph44.us ]
  %niter67 = phi i64 [ %niter67.next.1, %.lr.ph44.us.new ], [ 0, %.lr.ph44.us ]
  %38 = load ptr, ptr %26, align 8, !tbaa !27
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.146.us
  %40 = load ptr, ptr %39, align 8, !tbaa !31
  %41 = getelementptr inbounds double, ptr %40, i64 %.03643.us
  %42 = load double, ptr %41, align 8, !tbaa !28
  %43 = load ptr, ptr %27, align 8, !tbaa !27
  %44 = getelementptr inbounds ptr, ptr %43, i64 %.146.us
  %45 = load ptr, ptr %44, align 8, !tbaa !31
  %46 = getelementptr inbounds double, ptr %45, i64 %.03643.us
  store double %42, ptr %46, align 8, !tbaa !28
  %47 = or disjoint i64 %.03643.us, 1
  %48 = load ptr, ptr %26, align 8, !tbaa !27
  %49 = getelementptr inbounds ptr, ptr %48, i64 %.146.us
  %50 = load ptr, ptr %49, align 8, !tbaa !31
  %51 = getelementptr inbounds double, ptr %50, i64 %47
  %52 = load double, ptr %51, align 8, !tbaa !28
  %53 = load ptr, ptr %27, align 8, !tbaa !27
  %54 = getelementptr inbounds ptr, ptr %53, i64 %.146.us
  %55 = load ptr, ptr %54, align 8, !tbaa !31
  %56 = getelementptr inbounds double, ptr %55, i64 %47
  store double %52, ptr %56, align 8, !tbaa !28
  %57 = add nuw nsw i64 %.03643.us, 2
  %niter67.next.1 = add i64 %niter67, 2
  %niter67.ncmp.1 = icmp eq i64 %niter67.next.1, %unroll_iter66
  br i1 %niter67.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.lr.ph44.us.new, !llvm.loop !32

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph44.us.new, %.lr.ph44.us
  %.03643.us.unr = phi i64 [ 0, %.lr.ph44.us ], [ %57, %.lr.ph44.us.new ]
  br i1 %lcmp.mod65.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %58 = load ptr, ptr %26, align 8, !tbaa !27
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.146.us
  %60 = load ptr, ptr %59, align 8, !tbaa !31
  %61 = getelementptr inbounds double, ptr %60, i64 %.03643.us.unr
  %62 = load double, ptr %61, align 8, !tbaa !28
  %63 = load ptr, ptr %27, align 8, !tbaa !27
  %64 = getelementptr inbounds ptr, ptr %63, i64 %.146.us
  %65 = load ptr, ptr %64, align 8, !tbaa !31
  %66 = getelementptr inbounds double, ptr %65, i64 %.03643.us.unr
  store double %62, ptr %66, align 8, !tbaa !28
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %67 = add nuw nsw i64 %.146.us, 1
  %exitcond52.not = icmp eq i64 %67, %4
  br i1 %exitcond52.not, label %._crit_edge48, label %.lr.ph44.us, !llvm.loop !34

68:                                               ; preds = %68, %.lr.ph.new
  %.041 = phi i64 [ 0, %.lr.ph.new ], [ %92, %68 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %68 ]
  %69 = load ptr, ptr %13, align 8, !tbaa !27
  %70 = getelementptr inbounds double, ptr %69, i64 %.041
  %71 = load double, ptr %70, align 8, !tbaa !28
  %72 = load ptr, ptr %14, align 8, !tbaa !27
  %73 = getelementptr inbounds double, ptr %72, i64 %.041
  store double %71, ptr %73, align 8, !tbaa !28
  %74 = or disjoint i64 %.041, 1
  %75 = load ptr, ptr %13, align 8, !tbaa !27
  %76 = getelementptr inbounds double, ptr %75, i64 %74
  %77 = load double, ptr %76, align 8, !tbaa !28
  %78 = load ptr, ptr %14, align 8, !tbaa !27
  %79 = getelementptr inbounds double, ptr %78, i64 %74
  store double %77, ptr %79, align 8, !tbaa !28
  %80 = or disjoint i64 %.041, 2
  %81 = load ptr, ptr %13, align 8, !tbaa !27
  %82 = getelementptr inbounds double, ptr %81, i64 %80
  %83 = load double, ptr %82, align 8, !tbaa !28
  %84 = load ptr, ptr %14, align 8, !tbaa !27
  %85 = getelementptr inbounds double, ptr %84, i64 %80
  store double %83, ptr %85, align 8, !tbaa !28
  %86 = or disjoint i64 %.041, 3
  %87 = load ptr, ptr %13, align 8, !tbaa !27
  %88 = getelementptr inbounds double, ptr %87, i64 %86
  %89 = load double, ptr %88, align 8, !tbaa !28
  %90 = load ptr, ptr %14, align 8, !tbaa !27
  %91 = getelementptr inbounds double, ptr %90, i64 %86
  store double %89, ptr %91, align 8, !tbaa !28
  %92 = add nuw nsw i64 %.041, 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 %.preheader.unr-lcssa, label %68, !llvm.loop !35

.lr.ph47.split:                                   ; preds = %.lr.ph47.split, %.lr.ph47.split.preheader.new
  %.146 = phi i64 [ 0, %.lr.ph47.split.preheader.new ], [ %116, %.lr.ph47.split ]
  %niter61 = phi i64 [ 0, %.lr.ph47.split.preheader.new ], [ %niter61.next.3, %.lr.ph47.split ]
  %93 = load ptr, ptr %30, align 8, !tbaa !27
  %94 = getelementptr inbounds double, ptr %93, i64 %.146
  %95 = load double, ptr %94, align 8, !tbaa !28
  %96 = load ptr, ptr %29, align 8, !tbaa !27
  %97 = getelementptr inbounds double, ptr %96, i64 %.146
  store double %95, ptr %97, align 8, !tbaa !28
  %98 = or disjoint i64 %.146, 1
  %99 = load ptr, ptr %30, align 8, !tbaa !27
  %100 = getelementptr inbounds double, ptr %99, i64 %98
  %101 = load double, ptr %100, align 8, !tbaa !28
  %102 = load ptr, ptr %29, align 8, !tbaa !27
  %103 = getelementptr inbounds double, ptr %102, i64 %98
  store double %101, ptr %103, align 8, !tbaa !28
  %104 = or disjoint i64 %.146, 2
  %105 = load ptr, ptr %30, align 8, !tbaa !27
  %106 = getelementptr inbounds double, ptr %105, i64 %104
  %107 = load double, ptr %106, align 8, !tbaa !28
  %108 = load ptr, ptr %29, align 8, !tbaa !27
  %109 = getelementptr inbounds double, ptr %108, i64 %104
  store double %107, ptr %109, align 8, !tbaa !28
  %110 = or disjoint i64 %.146, 3
  %111 = load ptr, ptr %30, align 8, !tbaa !27
  %112 = getelementptr inbounds double, ptr %111, i64 %110
  %113 = load double, ptr %112, align 8, !tbaa !28
  %114 = load ptr, ptr %29, align 8, !tbaa !27
  %115 = getelementptr inbounds double, ptr %114, i64 %110
  store double %113, ptr %115, align 8, !tbaa !28
  %116 = add nuw nsw i64 %.146, 4
  %niter61.next.3 = add i64 %niter61, 4
  %niter61.ncmp.3 = icmp eq i64 %niter61.next.3, %unroll_iter60
  br i1 %niter61.ncmp.3, label %._crit_edge48.loopexit56.unr-lcssa, label %.lr.ph47.split, !llvm.loop !34

._crit_edge48.loopexit56.unr-lcssa:               ; preds = %.lr.ph47.split, %.lr.ph47.split.preheader
  %.146.unr = phi i64 [ 0, %.lr.ph47.split.preheader ], [ %116, %.lr.ph47.split ]
  %lcmp.mod59.not = icmp eq i64 %xtraiter57, 0
  br i1 %lcmp.mod59.not, label %._crit_edge48, label %.lr.ph47.split.epil

.lr.ph47.split.epil:                              ; preds = %._crit_edge48.loopexit56.unr-lcssa, %.lr.ph47.split.epil
  %.146.epil = phi i64 [ %122, %.lr.ph47.split.epil ], [ %.146.unr, %._crit_edge48.loopexit56.unr-lcssa ]
  %epil.iter58 = phi i64 [ %epil.iter58.next, %.lr.ph47.split.epil ], [ 0, %._crit_edge48.loopexit56.unr-lcssa ]
  %117 = load ptr, ptr %30, align 8, !tbaa !27
  %118 = getelementptr inbounds double, ptr %117, i64 %.146.epil
  %119 = load double, ptr %118, align 8, !tbaa !28
  %120 = load ptr, ptr %29, align 8, !tbaa !27
  %121 = getelementptr inbounds double, ptr %120, i64 %.146.epil
  store double %119, ptr %121, align 8, !tbaa !28
  %122 = add nuw nsw i64 %.146.epil, 1
  %epil.iter58.next = add i64 %epil.iter58, 1
  %epil.iter58.cmp.not = icmp eq i64 %epil.iter58.next, %xtraiter57
  br i1 %epil.iter58.cmp.not, label %._crit_edge48, label %.lr.ph47.split.epil, !llvm.loop !36

._crit_edge48:                                    ; preds = %._crit_edge48.loopexit56.unr-lcssa, %.lr.ph47.split.epil, %._crit_edge.us, %.preheader.thread, %.preheader
  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_impl13minlbfgsstateE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !11, i64 48, !10, i64 56, !12, i64 64, !10, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !12, i64 176, !15, i64 240, !15, i64 320, !12, i64 400, !12, i64 464, !12, i64 528, !10, i64 592, !12, i64 600, !10, i64 664, !10, i64 672, !12, i64 680, !7, i64 744, !10, i64 752, !15, i64 760, !12, i64 840, !12, i64 904, !12, i64 968, !15, i64 1032, !7, i64 1112, !16, i64 1120, !17, i64 1584, !10, i64 2032, !10, i64 2040, !10, i64 2048, !10, i64 2056, !10, i64 2064, !12, i64 2072, !12, i64 2136, !12, i64 2200, !10, i64 2264, !12, i64 2272, !11, i64 2336, !11, i64 2337, !11, i64 2338, !11, i64 2339, !10, i64 2344, !18, i64 2352, !7, i64 2616, !7, i64 2624, !7, i64 2632, !20, i64 2640, !7, i64 2832, !21, i64 2840, !12, i64 6808}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !13, i64 24, !8, i64 56}
!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_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !13, i64 40, !8, i64 72}
!16 = !{!"_ZTSN11alglib_impl12precbuflbfgsE", !12, i64 0, !12, i64 64, !12, i64 128, !15, i64 192, !12, i64 272, !12, i64 336, !12, i64 400}
!17 = !{!"_ZTSN11alglib_impl14precbuflowrankE", !7, i64 0, !7, i64 8, !12, i64 16, !15, i64 80, !12, i64 160, !15, i64 224, !15, i64 304, !12, i64 384}
!18 = !{!"_ZTSN11alglib_impl10rcommstateE", !19, i64 0, !12, i64 8, !12, i64 72, !12, i64 136, !12, i64 200}
!19 = !{!"int", !8, i64 0}
!20 = !{!"_ZTSN11alglib_impl11linminstateE", !11, i64 0, !11, i64 1, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184}
!21 = !{!"_ZTSN11alglib_impl17smoothnessmonitorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !7, i64 88, !12, i64 96, !12, i64 160, !12, i64 224, !15, i64 288, !12, i64 368, !12, i64 432, !7, i64 496, !11, i64 504, !11, i64 505, !10, i64 512, !10, i64 520, !11, i64 528, !22, i64 536, !10, i64 832, !10, i64 840, !23, i64 848, !23, i64 1152, !10, i64 1456, !10, i64 1464, !24, i64 1472, !24, i64 1784, !11, i64 2096, !12, i64 2104, !12, i64 2168, !15, i64 2232, !18, i64 2312, !12, i64 2576, !12, i64 2640, !12, i64 2704, !12, i64 2768, !12, i64 2832, !12, i64 2896, !12, i64 2960, !12, i64 3024, !15, i64 3088, !15, i64 3168, !12, i64 3248, !12, i64 3312, !12, i64 3376, !12, i64 3440, !12, i64 3504, !12, i64 3568, !12, i64 3632, !12, i64 3696, !12, i64 3760, !12, i64 3824, !15, i64 3888}
!22 = !{!"_ZTSN11alglib_impl14optguardreportE", !11, i64 0, !11, i64 1, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 25, !11, i64 26, !7, i64 32, !10, i64 40, !11, i64 48, !7, i64 56, !7, i64 64, !12, i64 72, !15, i64 136, !15, i64 216}
!23 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !11, i64 0, !7, i64 8, !12, i64 16, !12, i64 80, !7, i64 144, !12, i64 152, !12, i64 216, !7, i64 280, !7, i64 288, !7, i64 296}
!24 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !11, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !12, i64 88, !7, i64 152, !12, i64 160, !12, i64 224, !7, i64 288, !7, i64 296, !7, i64 304}
!25 = !{!6, !7, i64 744}
!26 = !{!6, !7, i64 1112}
!27 = !{!8, !8, i64 0}
!28 = !{!10, !10, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = !{!14, !14, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !30}


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