; 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::minbcstate" = type { i64, double, double, double, i64, i8, double, double, %"struct.alglib_impl::ae_vector", i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", i8, i8, i8, i8, %"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", double, double, double, %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", double, double, double, double, double, double, double, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::linminstate", double, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, i64, %"struct.alglib_impl::smoothnessmonitor", %"struct.alglib_impl::ae_vector", %"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::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::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::minbcreport" = type { i64, 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_impl15minbcresultsbufEPNS_10minbcstateEPNS_9ae_vectorEPNS_11minbcreportEPNS_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::minbcstate", ptr %13, i32 0, i32 0
  %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::minbcstate", ptr %19, i32 0, i32 0
  %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::minbcstate", ptr %24, i32 0, i32 35
  %26 = load i64, ptr %25, align 8, !tbaa !25
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::minbcreport", ptr %27, i32 0, i32 0
  store i64 %26, ptr %28, align 8, !tbaa !26
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %29, i32 0, i32 36
  %31 = load i64, ptr %30, align 8, !tbaa !28
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::minbcreport", ptr %32, i32 0, i32 1
  store i64 %31, ptr %33, align 8, !tbaa !29
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %34, i32 0, i32 37
  %36 = load i64, ptr %35, align 8, !tbaa !30
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::minbcreport", ptr %37, i32 0, i32 2
  store i64 %36, ptr %38, align 8, !tbaa !31
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %39, i32 0, i32 38
  %41 = load i64, ptr %40, align 8, !tbaa !32
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::minbcreport", ptr %42, i32 0, i32 3
  store i64 %41, ptr %43, align 8, !tbaa !33
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %44, i32 0, i32 38
  %46 = load i64, ptr %45, align 8, !tbaa !32
  %47 = icmp sgt i64 %46, 0
  br i1 %47, label %48, label %63

48:                                               ; preds = %23
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !34
  %52 = getelementptr inbounds double, ptr %51, i64 0
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %53, i32 0, i32 19
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %54, i32 0, i32 4
  %56 = load ptr, ptr %55, align 8, !tbaa !34
  %57 = getelementptr inbounds double, ptr %56, i64 0
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 8, !tbaa !14
  %61 = sub nsw i64 %60, 1
  %62 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %61)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %52, i64 noundef 1, ptr noundef %57, i64 noundef 1, i64 noundef %62)
  br label %84

63:                                               ; preds = %23
  store i64 0, ptr %9, align 8, !tbaa !35
  br label %64

64:                                               ; preds = %80, %63
  %65 = load i64, ptr %9, align 8, !tbaa !35
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::minbcstate", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !14
  %69 = sub nsw i64 %68, 1
  %70 = icmp sle i64 %65, %69
  br i1 %70, label %71, label %83

71:                                               ; preds = %64
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_state", ptr %72, i32 0, i32 1
  %74 = load double, ptr %73, align 8, !tbaa !36
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !34
  %78 = load i64, ptr %9, align 8, !tbaa !35
  %79 = getelementptr inbounds double, ptr %77, i64 %78
  store double %74, ptr %79, align 8, !tbaa !40
  br label %80

80:                                               ; preds = %71
  %81 = load i64, ptr %9, align 8, !tbaa !35
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %9, align 8, !tbaa !35
  br label %64, !llvm.loop !41

83:                                               ; preds = %64
  br label %84

84:                                               ; preds = %83, %48
  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 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 0}
!15 = !{!"_ZTSN11alglib_impl10minbcstateE", !11, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !11, i64 32, !12, i64 40, !16, i64 48, !16, i64 56, !10, i64 64, !11, i64 128, !10, i64 136, !10, i64 200, !16, i64 264, !10, i64 272, !12, i64 336, !12, i64 337, !12, i64 338, !12, i64 339, !17, i64 344, !10, i64 608, !10, i64 672, !10, i64 736, !10, i64 800, !10, i64 864, !10, i64 928, !10, i64 992, !16, i64 1056, !16, i64 1064, !16, i64 1072, !10, i64 1080, !16, i64 1144, !10, i64 1152, !10, i64 1216, !10, i64 1280, !10, i64 1344, !11, i64 1408, !11, i64 1416, !11, i64 1424, !11, i64 1432, !10, i64 1440, !16, i64 1504, !16, i64 1512, !16, i64 1520, !16, i64 1528, !16, i64 1536, !16, i64 1544, !16, i64 1552, !16, i64 1560, !16, i64 1568, !10, i64 1576, !10, i64 1640, !11, i64 1704, !11, i64 1712, !16, i64 1720, !16, i64 1728, !10, i64 1736, !19, i64 1800, !16, i64 1992, !11, i64 2000, !20, i64 2008, !20, i64 2088, !10, i64 2168, !10, i64 2232, !11, i64 2296, !16, i64 2304, !11, i64 2312, !21, i64 2320, !10, i64 6288, !10, i64 6352}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl10rcommstateE", !18, i64 0, !10, i64 8, !10, i64 72, !10, i64 136, !10, i64 200}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN11alglib_impl11linminstateE", !12, i64 0, !12, i64 1, !11, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184}
!20 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !7, i64 72}
!21 = !{!"_ZTSN11alglib_impl17smoothnessmonitorE", !11, i64 0, !11, i64 8, !12, i64 16, !10, i64 24, !11, i64 88, !10, i64 96, !10, i64 160, !10, i64 224, !20, i64 288, !10, i64 368, !10, i64 432, !11, i64 496, !12, i64 504, !12, i64 505, !16, i64 512, !16, i64 520, !12, i64 528, !22, i64 536, !16, i64 832, !16, i64 840, !23, i64 848, !23, i64 1152, !16, i64 1456, !16, i64 1464, !24, i64 1472, !24, i64 1784, !12, i64 2096, !10, i64 2104, !10, i64 2168, !20, i64 2232, !17, i64 2312, !10, i64 2576, !10, i64 2640, !10, i64 2704, !10, i64 2768, !10, i64 2832, !10, i64 2896, !10, i64 2960, !10, i64 3024, !20, i64 3088, !20, i64 3168, !10, i64 3248, !10, i64 3312, !10, i64 3376, !10, i64 3440, !10, i64 3504, !10, i64 3568, !10, i64 3632, !10, i64 3696, !10, i64 3760, !10, i64 3824, !20, i64 3888}
!22 = !{!"_ZTSN11alglib_impl14optguardreportE", !12, i64 0, !12, i64 1, !11, i64 8, !16, i64 16, !12, i64 24, !12, i64 25, !12, i64 26, !11, i64 32, !16, i64 40, !12, i64 48, !11, i64 56, !11, i64 64, !10, i64 72, !20, i64 136, !20, i64 216}
!23 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !12, i64 0, !11, i64 8, !10, i64 16, !10, i64 80, !11, i64 144, !10, i64 152, !10, i64 216, !11, i64 280, !11, i64 288, !11, i64 296}
!24 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !12, i64 0, !11, i64 8, !11, i64 16, !10, i64 24, !10, i64 88, !11, i64 152, !10, i64 160, !10, i64 224, !11, i64 288, !11, i64 296, !11, i64 304}
!25 = !{!15, !11, i64 1408}
!26 = !{!27, !11, i64 0}
!27 = !{!"_ZTSN11alglib_impl11minbcreportE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!28 = !{!15, !11, i64 1416}
!29 = !{!27, !11, i64 8}
!30 = !{!15, !11, i64 1424}
!31 = !{!27, !11, i64 16}
!32 = !{!15, !11, i64 1432}
!33 = !{!27, !11, i64 24}
!34 = !{!7, !7, i64 0}
!35 = !{!11, !11, i64 0}
!36 = !{!37, !16, i64 8}
!37 = !{!"_ZTSN11alglib_impl8ae_stateE", !11, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !6, i64 32, !13, i64 40, !6, i64 72, !38, i64 80, !6, i64 88, !39, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!38 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !7, i64 0}
!39 = !{!"long long", !7, i64 0}
!40 = !{!16, !16, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"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_impl15minbcresultsbufEPNS_10minbcstateEPNS_9ae_vectorEPNS_11minbcreportEPNS_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 = load i64, ptr %0, align 8, !tbaa !13
  %7 = icmp slt i64 %5, %6
  br i1 %7, label %8, label %9

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

9:                                                ; preds = %8, %4
  %10 = getelementptr inbounds i8, ptr %0, i64 1408
  %11 = load <2 x i64>, ptr %10, align 8, !tbaa !24
  store <2 x i64> %11, ptr %2, align 8, !tbaa !24
  %12 = getelementptr inbounds i8, ptr %0, i64 1424
  %13 = load i64, ptr %12, align 8, !tbaa !25
  %14 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %13, ptr %14, align 8, !tbaa !26
  %15 = getelementptr inbounds i8, ptr %0, i64 1432
  %16 = load i64, ptr %15, align 8, !tbaa !28
  %17 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 %16, ptr %17, align 8, !tbaa !29
  %18 = icmp sgt i64 %16, 0
  br i1 %18, label %23, label %.preheader

.preheader:                                       ; preds = %9
  %19 = load i64, ptr %0, align 8, !tbaa !13
  %.not.not23 = icmp sgt i64 %19, 0
  br i1 %.not.not23, label %.lr.ph, label %.loopexit

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

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

23:                                               ; preds = %9
  %24 = getelementptr inbounds i8, ptr %1, i64 56
  %25 = load ptr, ptr %24, align 8, !tbaa !34
  %26 = getelementptr inbounds i8, ptr %0, i64 664
  %27 = load ptr, ptr %26, align 8, !tbaa !34
  %28 = load i64, ptr %0, align 8, !tbaa !13
  %29 = add nsw i64 %28, -1
  %30 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %29)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %25, i64 noundef 1, ptr noundef %27, i64 noundef 1, i64 noundef %30)
  br label %.loopexit

31:                                               ; preds = %31, %.lr.ph.new
  %.024 = phi i64 [ 0, %.lr.ph.new ], [ %43, %31 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %31 ]
  %32 = load ptr, ptr %21, align 8, !tbaa !34
  %33 = getelementptr inbounds double, ptr %32, i64 %.024
  store double %.pre, ptr %33, align 8, !tbaa !35
  %34 = or disjoint i64 %.024, 1
  %35 = load ptr, ptr %21, align 8, !tbaa !34
  %36 = getelementptr inbounds double, ptr %35, i64 %34
  store double %.pre, ptr %36, align 8, !tbaa !35
  %37 = or disjoint i64 %.024, 2
  %38 = load ptr, ptr %21, align 8, !tbaa !34
  %39 = getelementptr inbounds double, ptr %38, i64 %37
  store double %.pre, ptr %39, align 8, !tbaa !35
  %40 = or disjoint i64 %.024, 3
  %41 = load ptr, ptr %21, align 8, !tbaa !34
  %42 = getelementptr inbounds double, ptr %41, i64 %40
  store double %.pre, ptr %42, align 8, !tbaa !35
  %43 = add nuw nsw i64 %.024, 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 %31, !llvm.loop !36

.loopexit.loopexit.unr-lcssa:                     ; preds = %31, %.lr.ph
  %.024.unr = phi i64 [ 0, %.lr.ph ], [ %43, %31 ]
  %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
  %.024.epil = phi i64 [ %46, %.epil.preheader ], [ %.024.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %44 = load ptr, ptr %21, align 8, !tbaa !34
  %45 = getelementptr inbounds double, ptr %44, i64 %.024.epil
  store double %.pre, ptr %45, align 8, !tbaa !35
  %46 = add nuw nsw i64 %.024.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 !38

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 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 0}
!14 = !{!"_ZTSN11alglib_impl10minbcstateE", !7, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !7, i64 32, !10, i64 40, !15, i64 48, !15, i64 56, !6, i64 64, !7, i64 128, !6, i64 136, !6, i64 200, !15, i64 264, !6, i64 272, !10, i64 336, !10, i64 337, !10, i64 338, !10, i64 339, !16, i64 344, !6, i64 608, !6, i64 672, !6, i64 736, !6, i64 800, !6, i64 864, !6, i64 928, !6, i64 992, !15, i64 1056, !15, i64 1064, !15, i64 1072, !6, i64 1080, !15, i64 1144, !6, i64 1152, !6, i64 1216, !6, i64 1280, !6, i64 1344, !7, i64 1408, !7, i64 1416, !7, i64 1424, !7, i64 1432, !6, i64 1440, !15, i64 1504, !15, i64 1512, !15, i64 1520, !15, i64 1528, !15, i64 1536, !15, i64 1544, !15, i64 1552, !15, i64 1560, !15, i64 1568, !6, i64 1576, !6, i64 1640, !7, i64 1704, !7, i64 1712, !15, i64 1720, !15, i64 1728, !6, i64 1736, !18, i64 1800, !15, i64 1992, !7, i64 2000, !19, i64 2008, !19, i64 2088, !6, i64 2168, !6, i64 2232, !7, i64 2296, !15, i64 2304, !7, i64 2312, !20, i64 2320, !6, i64 6288, !6, i64 6352}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl10rcommstateE", !17, i64 0, !6, i64 8, !6, i64 72, !6, i64 136, !6, i64 200}
!17 = !{!"int", !8, i64 0}
!18 = !{!"_ZTSN11alglib_impl11linminstateE", !10, i64 0, !10, i64 1, !7, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184}
!19 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!20 = !{!"_ZTSN11alglib_impl17smoothnessmonitorE", !7, i64 0, !7, i64 8, !10, i64 16, !6, i64 24, !7, i64 88, !6, i64 96, !6, i64 160, !6, i64 224, !19, i64 288, !6, i64 368, !6, i64 432, !7, i64 496, !10, i64 504, !10, i64 505, !15, i64 512, !15, i64 520, !10, i64 528, !21, i64 536, !15, i64 832, !15, i64 840, !22, i64 848, !22, i64 1152, !15, i64 1456, !15, i64 1464, !23, i64 1472, !23, i64 1784, !10, i64 2096, !6, i64 2104, !6, i64 2168, !19, i64 2232, !16, i64 2312, !6, i64 2576, !6, i64 2640, !6, i64 2704, !6, i64 2768, !6, i64 2832, !6, i64 2896, !6, i64 2960, !6, i64 3024, !19, i64 3088, !19, i64 3168, !6, i64 3248, !6, i64 3312, !6, i64 3376, !6, i64 3440, !6, i64 3504, !6, i64 3568, !6, i64 3632, !6, i64 3696, !6, i64 3760, !6, i64 3824, !19, i64 3888}
!21 = !{!"_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, !6, i64 72, !19, i64 136, !19, i64 216}
!22 = !{!"_ZTSN11alglib_impl24optguardnonc1test0reportE", !10, i64 0, !7, i64 8, !6, i64 16, !6, i64 80, !7, i64 144, !6, i64 152, !6, i64 216, !7, i64 280, !7, i64 288, !7, i64 296}
!23 = !{!"_ZTSN11alglib_impl24optguardnonc1test1reportE", !10, i64 0, !7, i64 8, !7, i64 16, !6, i64 24, !6, i64 88, !7, i64 152, !6, i64 160, !6, i64 224, !7, i64 288, !7, i64 296, !7, i64 304}
!24 = !{!7, !7, i64 0}
!25 = !{!14, !7, i64 1424}
!26 = !{!27, !7, i64 16}
!27 = !{!"_ZTSN11alglib_impl11minbcreportE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!28 = !{!14, !7, i64 1432}
!29 = !{!27, !7, i64 24}
!30 = !{!31, !15, i64 8}
!31 = !{!"_ZTSN11alglib_impl8ae_stateE", !7, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !12, i64 32, !11, i64 40, !12, i64 72, !32, i64 80, !12, i64 88, !33, i64 96, !12, i64 104, !12, i64 112, !12, i64 120}
!32 = !{!"_ZTSN11alglib_impl13ae_error_typeE", !8, i64 0}
!33 = !{!"long long", !8, i64 0}
!34 = !{!8, !8, i64 0}
!35 = !{!15, !15, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !39}
!39 = !{!"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