; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (linalg)

; 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_matrix" = type { i64, i64, 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::sparsematrix" = type { %"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, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

@.str.98 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [57 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl27sparsecreatecrsfromdensebufEPKNS_9ae_matrixEllPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = 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 ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %15 = load i64, ptr %7, align 8, !tbaa !9
  %16 = icmp sgt i64 %15, 0
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef @.str.98, ptr noundef %17)
  %18 = load i64, ptr %8, align 8, !tbaa !9
  %19 = icmp sgt i64 %18, 0
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.99, ptr noundef %20)
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = load i64, ptr %7, align 8, !tbaa !9
  %25 = icmp sge i64 %23, %24
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.100, ptr noundef %26)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %27, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.101, ptr noundef %32)
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load i64, ptr %7, align 8, !tbaa !9
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %33, i64 noundef %34, i64 noundef %35, ptr noundef %36)
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.102, ptr noundef %38)
  store i64 0, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %69, %5
  %40 = load i64, ptr %11, align 8, !tbaa !9
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = sub nsw i64 %41, 1
  %43 = icmp sle i64 %40, %42
  br i1 %43, label %44, label %72

44:                                               ; preds = %39
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %65, %44
  %46 = load i64, ptr %12, align 8, !tbaa !9
  %47 = load i64, ptr %8, align 8, !tbaa !9
  %48 = sub nsw i64 %47, 1
  %49 = icmp sle i64 %46, %48
  br i1 %49, label %50, label %68

50:                                               ; preds = %45
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %51, i32 0, i32 6
  %53 = load ptr, ptr %52, align 8, !tbaa !16
  %54 = load i64, ptr %11, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %53, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %56, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !17
  %60 = fcmp une double %59, 0.000000e+00
  br i1 %60, label %61, label %64

61:                                               ; preds = %50
  %62 = load i64, ptr %13, align 8, !tbaa !9
  %63 = add nsw i64 %62, 1
  store i64 %63, ptr %13, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %61, %50
  br label %65

65:                                               ; preds = %64
  %66 = load i64, ptr %12, align 8, !tbaa !9
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %12, align 8, !tbaa !9
  br label %45, !llvm.loop !19

68:                                               ; preds = %45
  br label %69

69:                                               ; preds = %68
  %70 = load i64, ptr %11, align 8, !tbaa !9
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %11, align 8, !tbaa !9
  br label %39, !llvm.loop !21

72:                                               ; preds = %39
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %73, i32 0, i32 5
  store i64 1, ptr %74, align 8, !tbaa !22
  %75 = load i64, ptr %13, align 8, !tbaa !9
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %76, i32 0, i32 9
  store i64 %75, ptr %77, align 8, !tbaa !25
  %78 = load i64, ptr %7, align 8, !tbaa !9
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %79, i32 0, i32 6
  store i64 %78, ptr %80, align 8, !tbaa !26
  %81 = load i64, ptr %8, align 8, !tbaa !9
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %82, i32 0, i32 7
  store i64 %81, ptr %83, align 8, !tbaa !27
  %84 = load i64, ptr %7, align 8, !tbaa !9
  %85 = add nsw i64 %84, 1
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %85, ptr noundef %87, ptr noundef %88)
  %89 = load i64, ptr %13, align 8, !tbaa !9
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %89, ptr noundef %91, ptr noundef %92)
  %93 = load i64, ptr %13, align 8, !tbaa !9
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %93, ptr noundef %95, ptr noundef %96)
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  %101 = getelementptr inbounds i64, ptr %100, i64 0
  store i64 0, ptr %101, align 8, !tbaa !9
  store i64 0, ptr %14, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %162, %72
  %103 = load i64, ptr %11, align 8, !tbaa !9
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = sub nsw i64 %104, 1
  %106 = icmp sle i64 %103, %105
  br i1 %106, label %107, label %165

107:                                              ; preds = %102
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %150, %107
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = load i64, ptr %8, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = icmp sle i64 %109, %111
  br i1 %112, label %113, label %153

113:                                              ; preds = %108
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = load i64, ptr %11, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %12, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %119, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !17
  %123 = fcmp une double %122, 0.000000e+00
  br i1 %123, label %124, label %149

124:                                              ; preds = %113
  %125 = load i64, ptr %12, align 8, !tbaa !9
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %126, i32 0, i32 1
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !16
  %130 = load i64, ptr %14, align 8, !tbaa !9
  %131 = getelementptr inbounds i64, ptr %129, i64 %130
  store i64 %125, ptr %131, align 8, !tbaa !9
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %132, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !16
  %135 = load i64, ptr %11, align 8, !tbaa !9
  %136 = getelementptr inbounds ptr, ptr %134, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = load i64, ptr %12, align 8, !tbaa !9
  %139 = getelementptr inbounds double, ptr %137, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !17
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %141, i32 0, i32 0
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !16
  %145 = load i64, ptr %14, align 8, !tbaa !9
  %146 = getelementptr inbounds double, ptr %144, i64 %145
  store double %140, ptr %146, align 8, !tbaa !17
  %147 = load i64, ptr %14, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %14, align 8, !tbaa !9
  br label %149

149:                                              ; preds = %124, %113
  br label %150

150:                                              ; preds = %149
  %151 = load i64, ptr %12, align 8, !tbaa !9
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %12, align 8, !tbaa !9
  br label %108, !llvm.loop !28

153:                                              ; preds = %108
  %154 = load i64, ptr %14, align 8, !tbaa !9
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %155, i32 0, i32 2
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !16
  %159 = load i64, ptr %11, align 8, !tbaa !9
  %160 = add nsw i64 %159, 1
  %161 = getelementptr inbounds i64, ptr %158, i64 %160
  store i64 %154, ptr %161, align 8, !tbaa !9
  br label %162

162:                                              ; preds = %153
  %163 = load i64, ptr %11, align 8, !tbaa !9
  %164 = add nsw i64 %163, 1
  store i64 %164, ptr %11, align 8, !tbaa !9
  br label %102, !llvm.loop !29

165:                                              ; preds = %102
  %166 = load i64, ptr %14, align 8, !tbaa !9
  %167 = load i64, ptr %13, align 8, !tbaa !9
  %168 = icmp eq i64 %166, %167
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %168, ptr noundef @.str.103, ptr noundef %169)
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %170, ptr noundef %171)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret void
}

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

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

declare void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !10, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !10, i64 320}
!23 = !{!"_ZTSN11alglib_impl12sparsematrixE", !24, i64 0, !24, i64 64, !24, i64 128, !24, i64 192, !24, i64 256, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360}
!24 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!25 = !{!23, !10, i64 352}
!26 = !{!23, !10, i64 328}
!27 = !{!23, !10, i64 336}
!28 = distinct !{!28, !20}
!29 = distinct !{!29, !20}


; 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.98 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [57 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl27sparsecreatecrsfromdensebufEPKNS_9ae_matrixEllPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = icmp sgt i64 %1, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %6, ptr noundef nonnull @.str.98, ptr noundef %4)
  %7 = icmp sgt i64 %2, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.99, ptr noundef %4)
  %8 = load i64, ptr %0, align 8, !tbaa !5
  %9 = icmp sge i64 %8, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.100, ptr noundef %4)
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !13
  %12 = icmp sge i64 %11, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.101, ptr noundef %4)
  %13 = tail call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, i64 noundef %2, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.102, ptr noundef %4)
  %brmerge.demorgan = and i1 %6, %7
  br i1 %brmerge.demorgan, label %.preheader78.lr.ph.split.us, label %._crit_edge85

.preheader78.lr.ph.split.us:                      ; preds = %5
  %14 = getelementptr inbounds i8, ptr %0, i64 72
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %min.iters.check = icmp ult i64 %2, 4
  %n.vec = and i64 %2, 9223372036854775804
  %cmp.n = icmp eq i64 %n.vec, %2
  br label %.preheader78.us

.preheader78.us:                                  ; preds = %._crit_edge.us, %.preheader78.lr.ph.split.us
  %.06784.us = phi i64 [ 0, %.preheader78.lr.ph.split.us ], [ %.269.us.lcssa, %._crit_edge.us ]
  %.07283.us = phi i64 [ 0, %.preheader78.lr.ph.split.us ], [ %34, %._crit_edge.us ]
  %16 = getelementptr inbounds ptr, ptr %15, i64 %.07283.us
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader78.us
  %18 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.06784.us, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %18, %vector.ph ], [ %25, %vector.body ]
  %vec.phi107 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %19 = getelementptr inbounds double, ptr %17, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %wide.load = load <2 x double>, ptr %19, align 8, !tbaa !16
  %wide.load108 = load <2 x double>, ptr %20, align 8, !tbaa !16
  %21 = fcmp une <2 x double> %wide.load, zeroinitializer
  %22 = fcmp une <2 x double> %wide.load108, zeroinitializer
  %23 = zext <2 x i1> %21 to <2 x i64>
  %24 = zext <2 x i1> %22 to <2 x i64>
  %25 = add <2 x i64> %vec.phi, %23
  %26 = add <2 x i64> %vec.phi107, %24
  %index.next = add nuw i64 %index, 4
  %27 = icmp eq i64 %index.next, %n.vec
  br i1 %27, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %26, %25
  %28 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader78.us
  %.16881.us.ph = phi i64 [ %.06784.us, %.preheader78.us ], [ %28, %middle.block ]
  %.07080.us.ph = phi i64 [ 0, %.preheader78.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.16881.us = phi i64 [ %.269.us, %scalar.ph ], [ %.16881.us.ph, %scalar.ph.preheader ]
  %.07080.us = phi i64 [ %33, %scalar.ph ], [ %.07080.us.ph, %scalar.ph.preheader ]
  %29 = getelementptr inbounds double, ptr %17, i64 %.07080.us
  %30 = load double, ptr %29, align 8, !tbaa !16
  %31 = fcmp une double %30, 0.000000e+00
  %32 = zext i1 %31 to i64
  %.269.us = add nsw i64 %.16881.us, %32
  %33 = add nuw nsw i64 %.07080.us, 1
  %exitcond.not = icmp eq i64 %33, %2
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !22

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %.269.us.lcssa = phi i64 [ %28, %middle.block ], [ %.269.us, %scalar.ph ]
  %34 = add nuw nsw i64 %.07283.us, 1
  %exitcond100.not = icmp eq i64 %34, %1
  br i1 %exitcond100.not, label %._crit_edge85, label %.preheader78.us, !llvm.loop !23

._crit_edge85:                                    ; preds = %._crit_edge.us, %5
  %.067.lcssa = phi i64 [ 0, %5 ], [ %.269.us.lcssa, %._crit_edge.us ]
  %35 = getelementptr inbounds i8, ptr %3, i64 320
  store i64 1, ptr %35, align 8, !tbaa !24
  %36 = getelementptr inbounds i8, ptr %3, i64 352
  store i64 %.067.lcssa, ptr %36, align 8, !tbaa !27
  %37 = getelementptr inbounds i8, ptr %3, i64 328
  store i64 %1, ptr %37, align 8, !tbaa !28
  %38 = getelementptr inbounds i8, ptr %3, i64 336
  store i64 %2, ptr %38, align 8, !tbaa !29
  %39 = add nsw i64 %1, 1
  %40 = getelementptr inbounds i8, ptr %3, i64 128
  tail call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %39, ptr noundef nonnull %40, ptr noundef %4)
  %41 = getelementptr inbounds i8, ptr %3, i64 64
  tail call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %.067.lcssa, ptr noundef nonnull %41, ptr noundef %4)
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %.067.lcssa, ptr noundef %3, ptr noundef %4)
  %42 = getelementptr inbounds i8, ptr %3, i64 184
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  store i64 0, ptr %43, align 8, !tbaa !30
  br i1 %6, label %.preheader.lr.ph, label %._crit_edge93

.preheader.lr.ph:                                 ; preds = %._crit_edge85
  %44 = getelementptr inbounds i8, ptr %0, i64 72
  %45 = getelementptr inbounds i8, ptr %3, i64 120
  %46 = getelementptr inbounds i8, ptr %3, i64 56
  br i1 %7, label %.preheader.us, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %xtraiter = and i64 %1, 3
  %47 = icmp ult i64 %1, 4
  br i1 %47, label %._crit_edge93.loopexit109.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %.preheader

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us95
  %.092.us = phi i64 [ %.2.us, %._crit_edge.us95 ], [ 0, %.preheader.lr.ph ]
  %.17391.us = phi i64 [ %69, %._crit_edge.us95 ], [ 0, %.preheader.lr.ph ]
  br label %48

48:                                               ; preds = %.preheader.us, %66
  %.189.us = phi i64 [ %.092.us, %.preheader.us ], [ %.2.us, %66 ]
  %.17188.us = phi i64 [ 0, %.preheader.us ], [ %67, %66 ]
  %49 = load ptr, ptr %44, align 8, !tbaa !14
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.17391.us
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = getelementptr inbounds double, ptr %51, i64 %.17188.us
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = fcmp une double %53, 0.000000e+00
  br i1 %54, label %55, label %66

55:                                               ; preds = %48
  %56 = load ptr, ptr %45, align 8, !tbaa !14
  %57 = getelementptr inbounds i64, ptr %56, i64 %.189.us
  store i64 %.17188.us, ptr %57, align 8, !tbaa !30
  %58 = load ptr, ptr %44, align 8, !tbaa !14
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.17391.us
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = getelementptr inbounds double, ptr %60, i64 %.17188.us
  %62 = load double, ptr %61, align 8, !tbaa !16
  %63 = load ptr, ptr %46, align 8, !tbaa !14
  %64 = getelementptr inbounds double, ptr %63, i64 %.189.us
  store double %62, ptr %64, align 8, !tbaa !16
  %65 = add nsw i64 %.189.us, 1
  br label %66

66:                                               ; preds = %55, %48
  %.2.us = phi i64 [ %65, %55 ], [ %.189.us, %48 ]
  %67 = add nuw nsw i64 %.17188.us, 1
  %exitcond102.not = icmp eq i64 %67, %2
  br i1 %exitcond102.not, label %._crit_edge.us95, label %48, !llvm.loop !31

._crit_edge.us95:                                 ; preds = %66
  %68 = load ptr, ptr %42, align 8, !tbaa !14
  %69 = add nuw nsw i64 %.17391.us, 1
  %70 = getelementptr inbounds i64, ptr %68, i64 %69
  store i64 %.2.us, ptr %70, align 8, !tbaa !30
  %exitcond103.not = icmp eq i64 %69, %1
  br i1 %exitcond103.not, label %._crit_edge93, label %.preheader.us, !llvm.loop !32

.preheader:                                       ; preds = %.preheader, %.preheader.preheader.new
  %.17391 = phi i64 [ 0, %.preheader.preheader.new ], [ %81, %.preheader ]
  %niter = phi i64 [ 0, %.preheader.preheader.new ], [ %niter.next.3, %.preheader ]
  %71 = load ptr, ptr %42, align 8, !tbaa !14
  %72 = or disjoint i64 %.17391, 1
  %73 = getelementptr inbounds i64, ptr %71, i64 %72
  store i64 0, ptr %73, align 8, !tbaa !30
  %74 = load ptr, ptr %42, align 8, !tbaa !14
  %75 = or disjoint i64 %.17391, 2
  %76 = getelementptr inbounds i64, ptr %74, i64 %75
  store i64 0, ptr %76, align 8, !tbaa !30
  %77 = load ptr, ptr %42, align 8, !tbaa !14
  %78 = or disjoint i64 %.17391, 3
  %79 = getelementptr inbounds i64, ptr %77, i64 %78
  store i64 0, ptr %79, align 8, !tbaa !30
  %80 = load ptr, ptr %42, align 8, !tbaa !14
  %81 = add nuw nsw i64 %.17391, 4
  %82 = getelementptr inbounds i64, ptr %80, i64 %81
  store i64 0, ptr %82, align 8, !tbaa !30
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge93.loopexit109.unr-lcssa, label %.preheader, !llvm.loop !32

._crit_edge93.loopexit109.unr-lcssa:              ; preds = %.preheader, %.preheader.preheader
  %.17391.unr = phi i64 [ 0, %.preheader.preheader ], [ %81, %.preheader ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge93, label %.preheader.epil

.preheader.epil:                                  ; preds = %._crit_edge93.loopexit109.unr-lcssa, %.preheader.epil
  %.17391.epil = phi i64 [ %84, %.preheader.epil ], [ %.17391.unr, %._crit_edge93.loopexit109.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.epil ], [ 0, %._crit_edge93.loopexit109.unr-lcssa ]
  %83 = load ptr, ptr %42, align 8, !tbaa !14
  %84 = add nuw nsw i64 %.17391.epil, 1
  %85 = getelementptr inbounds i64, ptr %83, i64 %84
  store i64 0, ptr %85, align 8, !tbaa !30
  %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 %._crit_edge93, label %.preheader.epil, !llvm.loop !33

._crit_edge93:                                    ; preds = %._crit_edge93.loopexit109.unr-lcssa, %.preheader.epil, %._crit_edge.us95, %._crit_edge85
  %.0.lcssa = phi i64 [ 0, %._crit_edge85 ], [ %.2.us, %._crit_edge.us95 ], [ 0, %.preheader.epil ], [ 0, %._crit_edge93.loopexit109.unr-lcssa ]
  %86 = icmp eq i64 %.0.lcssa, %.067.lcssa
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %86, ptr noundef nonnull @.str.103, ptr noundef %4)
  tail call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %3, ptr noundef %4)
  ret void
}

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

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

declare void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #2

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" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!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 = !{!6, !7, i64 8}
!14 = !{!8, !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !21, !20}
!23 = distinct !{!23, !19}
!24 = !{!25, !7, i64 320}
!25 = !{!"_ZTSN11alglib_impl12sparsematrixE", !26, i64 0, !26, i64 64, !26, i64 128, !26, i64 192, !26, i64 256, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360}
!26 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!27 = !{!25, !7, i64 352}
!28 = !{!25, !7, i64 328}
!29 = !{!25, !7, i64 336}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !19}
!32 = distinct !{!32, !19}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.unroll.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass