; 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::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::minnsstate" = type { i64, i64, double, i64, i8, double, %"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", i64, i64, %"struct.alglib_impl::ae_matrix", i64, i64, %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", i8, i8, i8, %"struct.alglib_impl::rcommstate", %"struct.alglib_impl::rcommstate", %"struct.alglib_impl::hqrndstate", double, i64, double, double, double, double, double, double, double, double, i64, double, i64, i64, i64, i64, double, double, %"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", i8, %"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_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::minnsqp", %"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::ae_vector", i64, i64, i64, i64, i64, i64, double, double, 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::hqrndstate" = type { i64, i64, i64 }
%"struct.alglib_impl::minnsqp" = type { double, double, %"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_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_vector", %"struct.alglib_impl::snnlssolver" }
%"struct.alglib_impl::snnlssolver" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, i64, %"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_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_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" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::minnsreport" = type { i64, i64, double, double, double, i64, i64, i64 }
%"struct.alglib_impl::ae_state" = type { i64, double, double, double, ptr, %"struct.alglib_impl::ae_dyn_block", ptr, i32, ptr, i64, ptr, ptr, ptr }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15minnsresultsbufEPNS_10minnsstateEPNS_9ae_vectorEPNS_11minnsreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 0
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %13, i32 0, i32 1
  %15 = load i64, ptr %14, align 8, !tbaa !14
  %16 = icmp slt i64 %12, %15
  br i1 %16, label %17, label %23

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %19, i32 0, i32 1
  %21 = load i64, ptr %20, align 8, !tbaa !14
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %21, ptr noundef %22)
  br label %23

23:                                               ; preds = %17, %4
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %24, i32 0, i32 71
  %26 = load i64, ptr %25, align 8, !tbaa !23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %27, i32 0, i32 0
  store i64 %26, ptr %28, align 8, !tbaa !24
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %29, i32 0, i32 73
  %31 = load i64, ptr %30, align 8, !tbaa !26
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %32, i32 0, i32 1
  store i64 %31, ptr %33, align 8, !tbaa !27
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %34, i32 0, i32 74
  %36 = load i64, ptr %35, align 8, !tbaa !28
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %37, i32 0, i32 6
  store i64 %36, ptr %38, align 8, !tbaa !29
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %39, i32 0, i32 75
  %41 = load i64, ptr %40, align 8, !tbaa !30
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %42, i32 0, i32 7
  store i64 %41, ptr %43, align 8, !tbaa !31
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %44, i32 0, i32 76
  %46 = load i64, ptr %45, align 8, !tbaa !32
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %47, i32 0, i32 5
  store i64 %46, ptr %48, align 8, !tbaa !33
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %49, i32 0, i32 77
  %51 = load double, ptr %50, align 8, !tbaa !34
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %52, i32 0, i32 78
  %54 = load double, ptr %53, align 8, !tbaa !35
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %51, double noundef %54, ptr noundef %55)
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %57, i32 0, i32 2
  store double %56, ptr %58, align 8, !tbaa !36
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %59, i32 0, i32 77
  %61 = load double, ptr %60, align 8, !tbaa !34
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %62, i32 0, i32 3
  store double %61, ptr %63, align 8, !tbaa !37
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %64, i32 0, i32 78
  %66 = load double, ptr %65, align 8, !tbaa !35
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::minnsreport", ptr %67, i32 0, i32 4
  store double %66, ptr %68, align 8, !tbaa !38
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %69, i32 0, i32 76
  %71 = load i64, ptr %70, align 8, !tbaa !32
  %72 = icmp sgt i64 %71, 0
  br i1 %72, label %73, label %88

73:                                               ; preds = %23
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !39
  %77 = getelementptr inbounds double, ptr %76, i64 0
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %78, i32 0, i32 45
  %80 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %79, i32 0, i32 4
  %81 = load ptr, ptr %80, align 8, !tbaa !39
  %82 = getelementptr inbounds double, ptr %81, i64 0
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %83, i32 0, i32 1
  %85 = load i64, ptr %84, align 8, !tbaa !14
  %86 = sub nsw i64 %85, 1
  %87 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %86)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %77, i64 noundef 1, ptr noundef %82, i64 noundef 1, i64 noundef %87)
  br label %109

88:                                               ; preds = %23
  store i64 0, ptr %9, align 8, !tbaa !40
  br label %89

89:                                               ; preds = %105, %88
  %90 = load i64, ptr %9, align 8, !tbaa !40
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::minnsstate", ptr %91, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !14
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %90, %94
  br i1 %95, label %96, label %108

96:                                               ; preds = %89
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_state", ptr %97, i32 0, i32 1
  %99 = load double, ptr %98, align 8, !tbaa !41
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !39
  %103 = load i64, ptr %9, align 8, !tbaa !40
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  store double %99, ptr %104, align 8, !tbaa !45
  br label %105

105:                                              ; preds = %96
  %106 = load i64, ptr %9, align 8, !tbaa !40
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %9, align 8, !tbaa !40
  br label %89, !llvm.loop !46

108:                                              ; preds = %89
  br label %109

109:                                              ; preds = %108, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!15, !11, i64 8}
!15 = !{!"_ZTSN11alglib_impl10minnsstateE", !11, i64 0, !11, i64 8, !16, i64 16, !11, i64 24, !12, i64 32, !16, i64 40, !10, i64 48, !10, i64 112, !10, i64 176, !10, i64 240, !10, i64 304, !11, i64 368, !11, i64 376, !17, i64 384, !11, i64 464, !11, i64 472, !10, i64 480, !16, i64 544, !10, i64 552, !17, i64 616, !12, i64 696, !12, i64 697, !12, i64 698, !18, i64 704, !18, i64 968, !20, i64 1232, !16, i64 1256, !11, i64 1264, !16, i64 1272, !16, i64 1280, !16, i64 1288, !16, i64 1296, !16, i64 1304, !16, i64 1312, !16, i64 1320, !16, i64 1328, !11, i64 1336, !16, i64 1344, !11, i64 1352, !11, i64 1360, !11, i64 1368, !11, i64 1376, !16, i64 1384, !16, i64 1392, !10, i64 1400, !10, i64 1464, !10, i64 1528, !10, i64 1592, !10, i64 1656, !10, i64 1720, !10, i64 1784, !10, i64 1848, !10, i64 1912, !12, i64 1976, !10, i64 1984, !10, i64 2048, !17, i64 2112, !10, i64 2192, !17, i64 2256, !17, i64 2336, !17, i64 2416, !10, i64 2496, !10, i64 2560, !21, i64 2624, !10, i64 5368, !10, i64 5432, !17, i64 5496, !10, i64 5576, !10, i64 5640, !10, i64 5704, !10, i64 5768, !11, i64 5832, !11, i64 5840, !11, i64 5848, !11, i64 5856, !11, i64 5864, !11, i64 5872, !16, i64 5880, !16, i64 5888, !11, i64 5896}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl10rcommstateE", !19, i64 0, !10, i64 8, !10, i64 72, !10, i64 136, !10, i64 200}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN11alglib_impl10hqrndstateE", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"_ZTSN11alglib_impl7minnsqpE", !16, i64 0, !16, i64 8, !10, i64 16, !10, i64 80, !10, i64 144, !10, i64 208, !10, i64 272, !17, i64 336, !17, i64 416, !17, i64 496, !10, i64 576, !10, i64 640, !10, i64 704, !10, i64 768, !10, i64 832, !10, i64 896, !17, i64 960, !10, i64 1040, !22, i64 1104}
!22 = !{!"_ZTSN11alglib_impl11snnlssolverE", !11, i64 0, !11, i64 8, !11, i64 16, !17, i64 24, !10, i64 104, !10, i64 168, !16, i64 232, !11, i64 240, !10, i64 248, !10, i64 312, !17, i64 376, !17, i64 456, !17, i64 536, !10, i64 616, !10, i64 680, !10, i64 744, !10, i64 808, !10, i64 872, !10, i64 936, !10, i64 1000, !10, i64 1064, !10, i64 1128, !10, i64 1192, !10, i64 1256, !10, i64 1320, !10, i64 1384, !10, i64 1448, !10, i64 1512, !10, i64 1576}
!23 = !{!15, !11, i64 5832}
!24 = !{!25, !11, i64 0}
!25 = !{!"_ZTSN11alglib_impl11minnsreportE", !11, i64 0, !11, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!26 = !{!15, !11, i64 5848}
!27 = !{!25, !11, i64 8}
!28 = !{!15, !11, i64 5856}
!29 = !{!25, !11, i64 48}
!30 = !{!15, !11, i64 5864}
!31 = !{!25, !11, i64 56}
!32 = !{!15, !11, i64 5872}
!33 = !{!25, !11, i64 40}
!34 = !{!15, !16, i64 5880}
!35 = !{!15, !16, i64 5888}
!36 = !{!25, !16, i64 16}
!37 = !{!25, !16, i64 24}
!38 = !{!25, !16, i64 32}
!39 = !{!7, !7, i64 0}
!40 = !{!11, !11, i64 0}
!41 = !{!42, !16, i64 8}
!42 = !{!"_ZTSN11alglib_impl8ae_stateE", !11, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !6, i64 32, !13, i64 40, !6, i64 72, !43, i64 80, !6, i64 88, !44, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!43 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !7, i64 0}
!44 = !{!"long long", !7, i64 0}
!45 = !{!16, !16, i64 0}
!46 = distinct !{!46, !47}
!47 = !{!"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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15minnsresultsbufEPNS_10minnsstateEPNS_9ae_vectorEPNS_11minnsreportEPNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !13
  %8 = icmp slt i64 %5, %7
  br i1 %8, label %9, label %10

9:                                                ; preds = %4
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %7, ptr noundef %3)
  br label %10

10:                                               ; preds = %9, %4
  %11 = getelementptr inbounds i8, ptr %0, i64 5832
  %12 = load i64, ptr %11, align 8, !tbaa !22
  store i64 %12, ptr %2, align 8, !tbaa !23
  %13 = getelementptr inbounds i8, ptr %0, i64 5848
  %14 = load i64, ptr %13, align 8, !tbaa !25
  %15 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %14, ptr %15, align 8, !tbaa !26
  %16 = getelementptr inbounds i8, ptr %0, i64 5856
  %17 = getelementptr inbounds i8, ptr %2, i64 48
  %18 = load <2 x i64>, ptr %16, align 8, !tbaa !27
  store <2 x i64> %18, ptr %17, align 8, !tbaa !27
  %19 = getelementptr inbounds i8, ptr %0, i64 5872
  %20 = load i64, ptr %19, align 8, !tbaa !28
  %21 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %20, ptr %21, align 8, !tbaa !29
  %22 = getelementptr inbounds i8, ptr %0, i64 5880
  %23 = load double, ptr %22, align 8, !tbaa !30
  %24 = getelementptr inbounds i8, ptr %0, i64 5888
  %25 = load double, ptr %24, align 8, !tbaa !31
  %26 = tail call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %23, double noundef %25, ptr noundef %3)
  %27 = getelementptr inbounds i8, ptr %2, i64 16
  store double %26, ptr %27, align 8, !tbaa !32
  %28 = getelementptr inbounds i8, ptr %2, i64 24
  %29 = load <2 x double>, ptr %22, align 8, !tbaa !33
  store <2 x double> %29, ptr %28, align 8, !tbaa !33
  %30 = load i64, ptr %19, align 8, !tbaa !28
  %31 = icmp sgt i64 %30, 0
  br i1 %31, label %36, label %.preheader

.preheader:                                       ; preds = %10
  %32 = load i64, ptr %6, align 8, !tbaa !13
  %.not.not33 = icmp sgt i64 %32, 0
  br i1 %.not.not33, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %33 = getelementptr inbounds i8, ptr %3, i64 8
  %34 = getelementptr inbounds i8, ptr %1, i64 56
  %.pre = load double, ptr %33, align 8, !tbaa !34
  %xtraiter = and i64 %32, 3
  %35 = icmp ult i64 %32, 4
  br i1 %35, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.new

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

36:                                               ; preds = %10
  %37 = getelementptr inbounds i8, ptr %1, i64 56
  %38 = load ptr, ptr %37, align 8, !tbaa !38
  %39 = getelementptr inbounds i8, ptr %0, i64 1520
  %40 = load ptr, ptr %39, align 8, !tbaa !38
  %41 = load i64, ptr %6, align 8, !tbaa !13
  %42 = add nsw i64 %41, -1
  %43 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %42)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %38, i64 noundef 1, ptr noundef %40, i64 noundef 1, i64 noundef %43)
  br label %.loopexit

44:                                               ; preds = %44, %.lr.ph.new
  %.034 = phi i64 [ 0, %.lr.ph.new ], [ %56, %44 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %44 ]
  %45 = load ptr, ptr %34, align 8, !tbaa !38
  %46 = getelementptr inbounds double, ptr %45, i64 %.034
  store double %.pre, ptr %46, align 8, !tbaa !33
  %47 = or disjoint i64 %.034, 1
  %48 = load ptr, ptr %34, align 8, !tbaa !38
  %49 = getelementptr inbounds double, ptr %48, i64 %47
  store double %.pre, ptr %49, align 8, !tbaa !33
  %50 = or disjoint i64 %.034, 2
  %51 = load ptr, ptr %34, align 8, !tbaa !38
  %52 = getelementptr inbounds double, ptr %51, i64 %50
  store double %.pre, ptr %52, align 8, !tbaa !33
  %53 = or disjoint i64 %.034, 3
  %54 = load ptr, ptr %34, align 8, !tbaa !38
  %55 = getelementptr inbounds double, ptr %54, i64 %53
  store double %.pre, ptr %55, align 8, !tbaa !33
  %56 = add nuw nsw i64 %.034, 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 %.loopexit.loopexit.unr-lcssa, label %44, !llvm.loop !39

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

.epil.preheader:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader
  %.034.epil = phi i64 [ %59, %.epil.preheader ], [ %.034.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %57 = load ptr, ptr %34, align 8, !tbaa !38
  %58 = getelementptr inbounds double, ptr %57, i64 %.034.epil
  store double %.pre, ptr %58, align 8, !tbaa !33
  %59 = add nuw nsw i64 %.034.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 %.loopexit, label %.epil.preheader, !llvm.loop !41

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader, %.preheader, %36
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"_ZTSN11alglib_impl10minnsstateE", !7, i64 0, !7, i64 8, !15, i64 16, !7, i64 24, !10, i64 32, !15, i64 40, !6, i64 48, !6, i64 112, !6, i64 176, !6, i64 240, !6, i64 304, !7, i64 368, !7, i64 376, !16, i64 384, !7, i64 464, !7, i64 472, !6, i64 480, !15, i64 544, !6, i64 552, !16, i64 616, !10, i64 696, !10, i64 697, !10, i64 698, !17, i64 704, !17, i64 968, !19, i64 1232, !15, i64 1256, !7, i64 1264, !15, i64 1272, !15, i64 1280, !15, i64 1288, !15, i64 1296, !15, i64 1304, !15, i64 1312, !15, i64 1320, !15, i64 1328, !7, i64 1336, !15, i64 1344, !7, i64 1352, !7, i64 1360, !7, i64 1368, !7, i64 1376, !15, i64 1384, !15, i64 1392, !6, i64 1400, !6, i64 1464, !6, i64 1528, !6, i64 1592, !6, i64 1656, !6, i64 1720, !6, i64 1784, !6, i64 1848, !6, i64 1912, !10, i64 1976, !6, i64 1984, !6, i64 2048, !16, i64 2112, !6, i64 2192, !16, i64 2256, !16, i64 2336, !16, i64 2416, !6, i64 2496, !6, i64 2560, !20, i64 2624, !6, i64 5368, !6, i64 5432, !16, i64 5496, !6, i64 5576, !6, i64 5640, !6, i64 5704, !6, i64 5768, !7, i64 5832, !7, i64 5840, !7, i64 5848, !7, i64 5856, !7, i64 5864, !7, i64 5872, !15, i64 5880, !15, i64 5888, !7, i64 5896}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!17 = !{!"_ZTSN11alglib_impl10rcommstateE", !18, i64 0, !6, i64 8, !6, i64 72, !6, i64 136, !6, i64 200}
!18 = !{!"int", !8, i64 0}
!19 = !{!"_ZTSN11alglib_impl10hqrndstateE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"_ZTSN11alglib_impl7minnsqpE", !15, i64 0, !15, i64 8, !6, i64 16, !6, i64 80, !6, i64 144, !6, i64 208, !6, i64 272, !16, i64 336, !16, i64 416, !16, i64 496, !6, i64 576, !6, i64 640, !6, i64 704, !6, i64 768, !6, i64 832, !6, i64 896, !16, i64 960, !6, i64 1040, !21, i64 1104}
!21 = !{!"_ZTSN11alglib_impl11snnlssolverE", !7, i64 0, !7, i64 8, !7, i64 16, !16, i64 24, !6, i64 104, !6, i64 168, !15, i64 232, !7, i64 240, !6, i64 248, !6, i64 312, !16, i64 376, !16, i64 456, !16, i64 536, !6, i64 616, !6, i64 680, !6, i64 744, !6, i64 808, !6, i64 872, !6, i64 936, !6, i64 1000, !6, i64 1064, !6, i64 1128, !6, i64 1192, !6, i64 1256, !6, i64 1320, !6, i64 1384, !6, i64 1448, !6, i64 1512, !6, i64 1576}
!22 = !{!14, !7, i64 5832}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTSN11alglib_impl11minnsreportE", !7, i64 0, !7, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!25 = !{!14, !7, i64 5848}
!26 = !{!24, !7, i64 8}
!27 = !{!7, !7, i64 0}
!28 = !{!14, !7, i64 5872}
!29 = !{!24, !7, i64 40}
!30 = !{!14, !15, i64 5880}
!31 = !{!14, !15, i64 5888}
!32 = !{!24, !15, i64 16}
!33 = !{!15, !15, i64 0}
!34 = !{!35, !15, i64 8}
!35 = !{!"_ZTSN11alglib_impl8ae_stateE", !7, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !12, i64 32, !11, i64 40, !12, i64 72, !36, i64 80, !12, i64 88, !37, i64 96, !12, i64 104, !12, i64 112, !12, i64 120}
!36 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !8, i64 0}
!37 = !{!"long long", !8, i64 0}
!38 = !{!8, !8, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.unroll.disable"}


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