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

@.str.142 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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

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

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

34:                                               ; preds = %7
  %35 = load i64, ptr %12, align 8, !tbaa !9
  %36 = icmp eq i64 %35, 0
  br label %37

37:                                               ; preds = %34, %7
  %38 = phi i1 [ true, %7 ], [ %36, %34 ]
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.146, ptr noundef %39)
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %40, i32 0, i32 1
  %42 = load i64, ptr %41, align 8, !tbaa !15
  %43 = load i64, ptr %12, align 8, !tbaa !9
  %44 = icmp sge i64 %42, %43
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.147, ptr noundef %45)
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 8, !tbaa !16
  %49 = load i64, ptr %13, align 8, !tbaa !9
  %50 = icmp sge i64 %48, %49
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.148, ptr noundef %51)
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %52, i64 noundef %53, i64 noundef %54, ptr noundef %55)
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.149, ptr noundef %57)
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load i64, ptr %13, align 8, !tbaa !9
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %58, i64 noundef %59, ptr noundef %60)
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %61, ptr noundef @.str.150, ptr noundef %62)
  %63 = load i64, ptr %11, align 8, !tbaa !9
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %64, i32 0, i32 0
  store i64 %63, ptr %65, align 8, !tbaa !18
  %66 = load i64, ptr %12, align 8, !tbaa !9
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %67, i32 0, i32 1
  store i64 %66, ptr %68, align 8, !tbaa !21
  %69 = load i64, ptr %13, align 8, !tbaa !9
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %70, i32 0, i32 2
  store i64 %69, ptr %71, align 8, !tbaa !22
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = icmp sgt i64 %72, 0
  br i1 %73, label %74, label %108

74:                                               ; preds = %37
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %75, i32 0, i32 3
  %77 = load i64, ptr %13, align 8, !tbaa !9
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %76, i64 noundef %77, i64 noundef %78, ptr noundef %79)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %104, %74
  %81 = load i64, ptr %15, align 8, !tbaa !9
  %82 = load i64, ptr %13, align 8, !tbaa !9
  %83 = sub nsw i64 %82, 1
  %84 = icmp sle i64 %81, %83
  br i1 %84, label %85, label %107

85:                                               ; preds = %80
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %86, i32 0, i32 3
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %87, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = load i64, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds ptr, ptr %89, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %92, i64 0
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  %97 = load i64, ptr %15, align 8, !tbaa !9
  %98 = getelementptr inbounds ptr, ptr %96, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds double, ptr %99, i64 0
  %101 = load i64, ptr %12, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %102)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %93, i64 noundef 1, ptr noundef %100, i64 noundef 1, i64 noundef %103)
  br label %104

104:                                              ; preds = %85
  %105 = load i64, ptr %15, align 8, !tbaa !9
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %15, align 8, !tbaa !9
  br label %80, !llvm.loop !24

107:                                              ; preds = %80
  br label %108

108:                                              ; preds = %107, %37
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %109, i32 0, i32 4
  %111 = load i64, ptr %13, align 8, !tbaa !9
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %110, i64 noundef %111, ptr noundef %112)
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %113, i32 0, i32 4
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = getelementptr inbounds double, ptr %116, i64 0
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !23
  %121 = getelementptr inbounds double, ptr %120, i64 0
  %122 = load i64, ptr %13, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %123)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %117, i64 noundef 1, ptr noundef %121, i64 noundef 1, i64 noundef %124)
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %125, i32 0, i32 5
  %127 = load i64, ptr %11, align 8, !tbaa !9
  %128 = load i64, ptr %12, align 8, !tbaa !9
  %129 = add nsw i64 %127, %128
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl23bvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %126, i64 noundef %129, ptr noundef %130)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %131

131:                                              ; preds = %145, %108
  %132 = load i64, ptr %15, align 8, !tbaa !9
  %133 = load i64, ptr %11, align 8, !tbaa !9
  %134 = load i64, ptr %12, align 8, !tbaa !9
  %135 = add nsw i64 %133, %134
  %136 = sub nsw i64 %135, 1
  %137 = icmp sle i64 %132, %136
  br i1 %137, label %138, label %148

138:                                              ; preds = %131
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::snnlssolver", ptr %139, i32 0, i32 5
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !23
  %143 = load i64, ptr %15, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %142, i64 %143
  store i8 1, ptr %144, align 1, !tbaa !26
  br label %145

145:                                              ; preds = %138
  %146 = load i64, ptr %15, align 8, !tbaa !9
  %147 = add nsw i64 %146, 1
  store i64 %147, ptr %15, align 8, !tbaa !9
  br label %131, !llvm.loop !27

148:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #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_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 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN11alglib_impl11snnlssolverE", !10, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !17, i64 104, !17, i64 168, !20, i64 232, !10, i64 240, !17, i64 248, !17, i64 312, !12, i64 376, !12, i64 456, !12, i64 536, !17, i64 616, !17, i64 680, !17, i64 744, !17, i64 808, !17, i64 872, !17, i64 936, !17, i64 1000, !17, i64 1064, !17, i64 1128, !17, i64 1192, !17, i64 1256, !17, i64 1320, !17, i64 1384, !17, i64 1448, !17, i64 1512, !17, i64 1576}
!20 = !{!"double", !7, i64 0}
!21 = !{!19, !10, i64 8}
!22 = !{!19, !10, i64 16}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!13, !13, i64 0}
!27 = distinct !{!27, !25}


; 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.142 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15snnlssetproblemEPNS_11snnlssolverEPNS_9ae_matrixEPNS_9ae_vectorElllPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = icmp sgt i64 %4, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.142, ptr noundef %6)
  %9 = icmp sgt i64 %3, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.143, ptr noundef %6)
  %10 = icmp sgt i64 %5, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.144, ptr noundef %6)
  %11 = icmp sle i64 %3, %5
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.145, ptr noundef %6)
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = icmp sge i64 %12, %5
  %14 = icmp eq i64 %4, 0
  %15 = or i1 %14, %13
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.146, ptr noundef %6)
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = icmp sge i64 %17, %4
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.147, ptr noundef %6)
  %19 = load i64, ptr %2, align 8, !tbaa !14
  %20 = icmp sge i64 %19, %5
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.148, ptr noundef %6)
  %21 = tail call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %5, i64 noundef %4, ptr noundef %6)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.149, ptr noundef %6)
  %22 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %5, ptr noundef %6)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.150, ptr noundef %6)
  store i64 %3, ptr %0, align 8, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %4, ptr %23, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %5, ptr %24, align 8, !tbaa !20
  %25 = icmp sgt i64 %4, 0
  br i1 %25, label %26, label %.loopexit

26:                                               ; preds = %7
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %27, i64 noundef %5, i64 noundef %4, ptr noundef %6)
  br i1 %10, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %26
  %28 = getelementptr inbounds i8, ptr %0, i64 96
  %29 = getelementptr inbounds i8, ptr %1, i64 72
  %30 = add nsw i64 %4, -1
  br label %31

31:                                               ; preds = %.lr.ph, %31
  %.065 = phi i64 [ 0, %.lr.ph ], [ %39, %31 ]
  %32 = load ptr, ptr %28, align 8, !tbaa !21
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.065
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = load ptr, ptr %29, align 8, !tbaa !21
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.065
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %30)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %34, i64 noundef 1, ptr noundef %37, i64 noundef 1, i64 noundef %38)
  %39 = add nuw nsw i64 %.065, 1
  %exitcond.not = icmp eq i64 %39, %5
  br i1 %exitcond.not, label %.loopexit, label %31, !llvm.loop !23

.loopexit:                                        ; preds = %31, %26, %7
  %40 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %40, i64 noundef %5, ptr noundef %6)
  %41 = getelementptr inbounds i8, ptr %0, i64 160
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %2, i64 56
  %44 = load ptr, ptr %43, align 8, !tbaa !21
  %45 = add nsw i64 %5, -1
  %46 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %45)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %42, i64 noundef 1, ptr noundef %44, i64 noundef 1, i64 noundef %46)
  %47 = getelementptr inbounds i8, ptr %0, i64 168
  %48 = add nsw i64 %4, %3
  tail call void @_ZN11alglib_impl23bvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %47, i64 noundef %48, ptr noundef %6)
  %.not.not6366 = icmp sgt i64 %48, 0
  br i1 %.not.not6366, label %.lr.ph68, label %._crit_edge

.lr.ph68:                                         ; preds = %.loopexit
  %49 = getelementptr inbounds i8, ptr %0, i64 224
  %50 = add i64 %4, %3
  %51 = add i64 %50, -1
  %xtraiter = and i64 %48, 3
  %52 = icmp ult i64 %51, 3
  br i1 %52, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph68.new

.lr.ph68.new:                                     ; preds = %.lr.ph68
  %unroll_iter = and i64 %48, 9223372036854775804
  br label %53

53:                                               ; preds = %53, %.lr.ph68.new
  %.167 = phi i64 [ 0, %.lr.ph68.new ], [ %65, %53 ]
  %niter = phi i64 [ 0, %.lr.ph68.new ], [ %niter.next.3, %53 ]
  %54 = load ptr, ptr %49, align 8, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %54, i64 %.167
  store i8 1, ptr %55, align 1, !tbaa !25
  %56 = or disjoint i64 %.167, 1
  %57 = load ptr, ptr %49, align 8, !tbaa !21
  %58 = getelementptr inbounds i8, ptr %57, i64 %56
  store i8 1, ptr %58, align 1, !tbaa !25
  %59 = or disjoint i64 %.167, 2
  %60 = load ptr, ptr %49, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %60, i64 %59
  store i8 1, ptr %61, align 1, !tbaa !25
  %62 = or disjoint i64 %.167, 3
  %63 = load ptr, ptr %49, align 8, !tbaa !21
  %64 = getelementptr inbounds i8, ptr %63, i64 %62
  store i8 1, ptr %64, align 1, !tbaa !25
  %65 = add nuw nsw i64 %.167, 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 %._crit_edge.loopexit.unr-lcssa, label %53, !llvm.loop !26

._crit_edge.loopexit.unr-lcssa:                   ; preds = %53, %.lr.ph68
  %.167.unr = phi i64 [ 0, %.lr.ph68 ], [ %65, %53 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.167.epil = phi i64 [ %68, %.epil.preheader ], [ %.167.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %66 = load ptr, ptr %49, align 8, !tbaa !21
  %67 = getelementptr inbounds i8, ptr %66, i64 %.167.epil
  store i8 1, ptr %67, align 1, !tbaa !25
  %68 = add nuw nsw i64 %.167.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 %._crit_edge, label %.epil.preheader, !llvm.loop !27

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.loopexit
  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_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 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl11snnlssolverE", !7, i64 0, !7, i64 8, !7, i64 16, !6, i64 24, !15, i64 104, !15, i64 168, !18, i64 232, !7, i64 240, !15, i64 248, !15, i64 312, !6, i64 376, !6, i64 456, !6, i64 536, !15, i64 616, !15, i64 680, !15, i64 744, !15, i64 808, !15, i64 872, !15, i64 936, !15, i64 1000, !15, i64 1064, !15, i64 1128, !15, i64 1192, !15, i64 1256, !15, i64 1320, !15, i64 1384, !15, i64 1448, !15, i64 1512, !15, i64 1576}
!18 = !{!"double", !8, i64 0}
!19 = !{!17, !7, i64 8}
!20 = !{!17, !7, i64 16}
!21 = !{!8, !8, i64 0}
!22 = !{!12, !12, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}


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