; LLVM IR from venumb/ZSPACE :: cpp/depends/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::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.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }

@.str.192 = external hidden unnamed_addr constant [47 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
declare dso_local void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %11, i32 0, i32 6
  %13 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %13, ptr %5, align 8, !tbaa !15
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %14, i32 0, i32 7
  %16 = load i64, ptr %15, align 8, !tbaa !16
  store i64 %16, ptr %6, align 8, !tbaa !15
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %17, i32 0, i32 6
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = icmp sgt i64 %19, 0
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef @.str.192, ptr noundef %21)
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %22, i32 0, i32 7
  %24 = load i64, ptr %23, align 8, !tbaa !16
  %25 = icmp sgt i64 %24, 0
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.192, ptr noundef %26)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %27, i32 0, i32 2
  %29 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !17
  %31 = load i64, ptr %5, align 8, !tbaa !15
  %32 = add nsw i64 %31, 1
  %33 = icmp sge i64 %30, %32
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.192, ptr noundef %34)
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %35

35:                                               ; preds = %69, %2
  %36 = load i64, ptr %7, align 8, !tbaa !15
  %37 = load i64, ptr %5, align 8, !tbaa !15
  %38 = sub nsw i64 %37, 1
  %39 = icmp sle i64 %36, %38
  br i1 %39, label %40, label %72

40:                                               ; preds = %35
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %41, i32 0, i32 2
  %43 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %42, i32 0, i32 4
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %45 = load i64, ptr %7, align 8, !tbaa !15
  %46 = getelementptr inbounds i64, ptr %44, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !15
  %48 = icmp sge i64 %47, 0
  br i1 %48, label %49, label %66

49:                                               ; preds = %40
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load i64, ptr %7, align 8, !tbaa !15
  %55 = getelementptr inbounds i64, ptr %53, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !15
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = load i64, ptr %7, align 8, !tbaa !15
  %62 = add nsw i64 %61, 1
  %63 = getelementptr inbounds i64, ptr %60, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !15
  %65 = icmp sle i64 %56, %64
  br label %66

66:                                               ; preds = %49, %40
  %67 = phi i1 [ false, %40 ], [ %65, %49 ]
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %67, ptr noundef @.str.192, ptr noundef %68)
  br label %69

69:                                               ; preds = %66
  %70 = load i64, ptr %7, align 8, !tbaa !15
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %7, align 8, !tbaa !15
  br label %35, !llvm.loop !19

72:                                               ; preds = %35
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !18
  %77 = load i64, ptr %5, align 8, !tbaa !15
  %78 = getelementptr inbounds i64, ptr %76, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !15
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %80, i32 0, i32 1
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 0
  %83 = load i64, ptr %82, align 8, !tbaa !21
  %84 = icmp sle i64 %79, %83
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %84, ptr noundef @.str.192, ptr noundef %85)
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %86, i32 0, i32 2
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  %90 = load i64, ptr %5, align 8, !tbaa !15
  %91 = getelementptr inbounds i64, ptr %89, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !15
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %94, i32 0, i32 0
  %96 = load i64, ptr %95, align 8, !tbaa !22
  %97 = icmp sle i64 %92, %96
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %97, ptr noundef @.str.192, ptr noundef %98)
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %99

99:                                               ; preds = %152, %72
  %100 = load i64, ptr %7, align 8, !tbaa !15
  %101 = load i64, ptr %5, align 8, !tbaa !15
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %155

104:                                              ; preds = %99
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %105, i32 0, i32 2
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %106, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load i64, ptr %7, align 8, !tbaa !15
  %110 = getelementptr inbounds i64, ptr %108, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !15
  store i64 %111, ptr %9, align 8, !tbaa !15
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !18
  %116 = load i64, ptr %7, align 8, !tbaa !15
  %117 = add nsw i64 %116, 1
  %118 = getelementptr inbounds i64, ptr %115, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !15
  %120 = sub nsw i64 %119, 1
  store i64 %120, ptr %10, align 8, !tbaa !15
  %121 = load i64, ptr %9, align 8, !tbaa !15
  store i64 %121, ptr %8, align 8, !tbaa !15
  br label %122

122:                                              ; preds = %148, %104
  %123 = load i64, ptr %8, align 8, !tbaa !15
  %124 = load i64, ptr %10, align 8, !tbaa !15
  %125 = icmp sle i64 %123, %124
  br i1 %125, label %126, label %151

126:                                              ; preds = %122
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %127, i32 0, i32 1
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !18
  %131 = load i64, ptr %8, align 8, !tbaa !15
  %132 = getelementptr inbounds i64, ptr %130, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !15
  %134 = icmp sge i64 %133, 0
  br i1 %134, label %135, label %145

135:                                              ; preds = %126
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %136, i32 0, i32 1
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %137, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !18
  %140 = load i64, ptr %8, align 8, !tbaa !15
  %141 = getelementptr inbounds i64, ptr %139, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !15
  %143 = load i64, ptr %6, align 8, !tbaa !15
  %144 = icmp slt i64 %142, %143
  br label %145

145:                                              ; preds = %135, %126
  %146 = phi i1 [ false, %126 ], [ %144, %135 ]
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %146, ptr noundef @.str.192, ptr noundef %147)
  br label %148

148:                                              ; preds = %145
  %149 = load i64, ptr %8, align 8, !tbaa !15
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %8, align 8, !tbaa !15
  br label %122, !llvm.loop !23

151:                                              ; preds = %122
  br label %152

152:                                              ; preds = %151
  %153 = load i64, ptr %7, align 8, !tbaa !15
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %7, align 8, !tbaa !15
  br label %99, !llvm.loop !24

155:                                              ; preds = %99
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %156, i32 0, i32 5
  store i64 1, ptr %157, align 8, !tbaa !25
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %158, i32 0, i32 2
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %159, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !18
  %162 = load i64, ptr %5, align 8, !tbaa !15
  %163 = getelementptr inbounds i64, ptr %161, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !15
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %165, i32 0, i32 9
  store i64 %164, ptr %166, align 8, !tbaa !26
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %167

167:                                              ; preds = %201, %155
  %168 = load i64, ptr %7, align 8, !tbaa !15
  %169 = load i64, ptr %5, align 8, !tbaa !15
  %170 = sub nsw i64 %169, 1
  %171 = icmp sle i64 %168, %170
  br i1 %171, label %172, label %204

172:                                              ; preds = %167
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %173, i32 0, i32 1
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %177, i32 0, i32 2
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !18
  %181 = load i64, ptr %7, align 8, !tbaa !15
  %182 = getelementptr inbounds i64, ptr %180, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !15
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %185, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !18
  %188 = load i64, ptr %7, align 8, !tbaa !15
  %189 = add nsw i64 %188, 1
  %190 = getelementptr inbounds i64, ptr %187, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !15
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %192, i32 0, i32 2
  %194 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %193, i32 0, i32 4
  %195 = load ptr, ptr %194, align 8, !tbaa !18
  %196 = load i64, ptr %7, align 8, !tbaa !15
  %197 = getelementptr inbounds i64, ptr %195, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !15
  %199 = sub nsw i64 %191, %198
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl15tagsortmiddleirEPNS_9ae_vectorES1_llPNS_8ae_stateE(ptr noundef %174, ptr noundef %176, i64 noundef %183, i64 noundef %199, ptr noundef %200)
  br label %201

201:                                              ; preds = %172
  %202 = load i64, ptr %7, align 8, !tbaa !15
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %7, align 8, !tbaa !15
  br label %167, !llvm.loop !27

204:                                              ; preds = %167
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %205, ptr noundef %206)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #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, !12, i64 328}
!10 = !{!"_ZTSN11alglib_impl12sparsematrixE", !11, i64 0, !11, i64 64, !11, i64 128, !11, i64 192, !11, i64 256, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!12 = !{!"long", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !12, i64 336}
!17 = !{!10, !12, i64 128}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !12, i64 64}
!22 = !{!10, !12, i64 0}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = !{!10, !12, i64 320}
!26 = !{!10, !12, i64 352}
!27 = distinct !{!27, !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.192 = external hidden unnamed_addr constant [47 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
declare dso_local void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22sparsecreatecrsinplaceEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 328
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 336
  %6 = load i64, ptr %5, align 8, !tbaa !14
  %7 = icmp sgt i64 %4, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.192, ptr noundef %1)
  %8 = load i64, ptr %5, align 8, !tbaa !14
  %9 = icmp sgt i64 %8, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.192, ptr noundef %1)
  %10 = getelementptr inbounds i8, ptr %0, i64 128
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %12 = icmp sgt i64 %11, %4
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.192, ptr noundef %1)
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %13 = getelementptr inbounds i8, ptr %0, i64 184
  br label %14

14:                                               ; preds = %.lr.ph, %23
  %.069 = phi i64 [ 0, %.lr.ph ], [ %25, %23 ]
  %15 = load ptr, ptr %13, align 8, !tbaa !16
  %16 = getelementptr inbounds i64, ptr %15, i64 %.069
  %17 = load i64, ptr %16, align 8, !tbaa !17
  %18 = icmp sgt i64 %17, -1
  br i1 %18, label %19, label %23

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %16, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !17
  %22 = icmp sle i64 %17, %21
  br label %23

23:                                               ; preds = %19, %14
  %24 = phi i1 [ false, %14 ], [ %22, %19 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.192, ptr noundef %1)
  %25 = add nuw nsw i64 %.069, 1
  %exitcond.not = icmp eq i64 %25, %4
  br i1 %exitcond.not, label %._crit_edge, label %14, !llvm.loop !18

._crit_edge:                                      ; preds = %23, %2
  %26 = getelementptr inbounds i8, ptr %0, i64 184
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = getelementptr inbounds i64, ptr %27, i64 %4
  %29 = load i64, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  %31 = load i64, ptr %30, align 8, !tbaa !20
  %32 = icmp sle i64 %29, %31
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef nonnull @.str.192, ptr noundef %1)
  %33 = load ptr, ptr %26, align 8, !tbaa !16
  %34 = getelementptr inbounds i64, ptr %33, i64 %4
  %35 = load i64, ptr %34, align 8, !tbaa !17
  %36 = load i64, ptr %0, align 8, !tbaa !21
  %37 = icmp sle i64 %35, %36
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef nonnull @.str.192, ptr noundef %1)
  br i1 %7, label %.lr.ph77, label %._crit_edge78.thread

._crit_edge78.thread:                             ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %0, i64 320
  store i64 1, ptr %38, align 8, !tbaa !22
  %39 = load ptr, ptr %26, align 8, !tbaa !16
  %40 = getelementptr inbounds i64, ptr %39, i64 %4
  %41 = load i64, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %0, i64 352
  store i64 %41, ptr %42, align 8, !tbaa !23
  br label %._crit_edge83

.lr.ph77:                                         ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %0, i64 120
  br label %44

.loopexit:                                        ; preds = %.lr.ph73, %44
  %exitcond85.not = icmp eq i64 %48, %4
  br i1 %exitcond85.not, label %._crit_edge78, label %44, !llvm.loop !24

44:                                               ; preds = %.lr.ph77, %.loopexit
  %.175 = phi i64 [ 0, %.lr.ph77 ], [ %48, %.loopexit ]
  %45 = load ptr, ptr %26, align 8, !tbaa !16
  %46 = getelementptr inbounds i64, ptr %45, i64 %.175
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = add nuw nsw i64 %.175, 1
  %49 = getelementptr inbounds i64, ptr %45, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !17
  %.not.not6770 = icmp slt i64 %47, %50
  br i1 %.not.not6770, label %.lr.ph73, label %.loopexit

.lr.ph73:                                         ; preds = %44, %.lr.ph73
  %.06171 = phi i64 [ %56, %.lr.ph73 ], [ %47, %44 ]
  %51 = load ptr, ptr %43, align 8, !tbaa !16
  %52 = getelementptr inbounds i64, ptr %51, i64 %.06171
  %53 = load i64, ptr %52, align 8, !tbaa !17
  %54 = icmp sgt i64 %53, -1
  %55 = icmp slt i64 %53, %6
  %spec.select = select i1 %54, i1 %55, i1 false
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.192, ptr noundef %1)
  %56 = add i64 %.06171, 1
  %exitcond84.not = icmp eq i64 %56, %50
  br i1 %exitcond84.not, label %.loopexit, label %.lr.ph73, !llvm.loop !25

._crit_edge78:                                    ; preds = %.loopexit
  %57 = getelementptr inbounds i8, ptr %0, i64 320
  store i64 1, ptr %57, align 8, !tbaa !22
  %58 = load ptr, ptr %26, align 8, !tbaa !16
  %59 = getelementptr inbounds i64, ptr %58, i64 %4
  %60 = load i64, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds i8, ptr %0, i64 352
  store i64 %60, ptr %61, align 8, !tbaa !23
  br i1 %7, label %.lr.ph82, label %._crit_edge83

.lr.ph82:                                         ; preds = %._crit_edge78, %.lr.ph82
  %.280 = phi i64 [ %65, %.lr.ph82 ], [ 0, %._crit_edge78 ]
  %62 = load ptr, ptr %26, align 8, !tbaa !16
  %63 = getelementptr inbounds i64, ptr %62, i64 %.280
  %64 = load i64, ptr %63, align 8, !tbaa !17
  %65 = add nuw nsw i64 %.280, 1
  %66 = getelementptr inbounds i64, ptr %62, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !17
  %68 = sub nsw i64 %67, %64
  tail call void @_ZN11alglib_impl15tagsortmiddleirEPNS_9ae_vectorES1_llPNS_8ae_stateE(ptr noundef nonnull %30, ptr noundef nonnull %0, i64 noundef %64, i64 noundef %68, ptr noundef %1)
  %exitcond86.not = icmp eq i64 %65, %4
  br i1 %exitcond86.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !26

._crit_edge83:                                    ; preds = %.lr.ph82, %._crit_edge78.thread, %._crit_edge78
  tail call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %1)
  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, !8, i64 328}
!6 = !{!"_ZTSN11alglib_impl12sparsematrixE", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 192, !7, i64 256, !8, i64 320, !8, i64 328, !8, i64 336, !8, i64 344, !8, i64 352, !8, i64 360}
!7 = !{!"_ZTSN11alglib_impl9ae_vectorE", !8, i64 0, !8, i64 8, !11, i64 16, !12, i64 24, !9, i64 56}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!6, !8, i64 336}
!15 = !{!6, !8, i64 128}
!16 = !{!9, !9, i64 0}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !8, i64 64}
!21 = !{!6, !8, i64 0}
!22 = !{!6, !8, i64 320}
!23 = !{!6, !8, i64 352}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}


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