; LLVM IR from Dimandragon/non-parametric-dsp :: 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::xlinearconstraints" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::sparsematrix" }
%"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::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 }

; 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_impl23sparsecreatecrsemptybufElPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

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_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18xlcconverttosparseEPNS_18xlinearconstraintsEPNS_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 i32, align 4
  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
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %7, i32 0, i32 2
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %10, i32 0, i32 1
  %12 = load i64, ptr %11, align 8, !tbaa !17
  %13 = add nsw i64 %9, %12
  %14 = icmp eq i64 %13, 0
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  store i32 1, ptr %6, align 4
  br label %148

16:                                               ; preds = %2
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %17, i32 0, i32 2
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %20, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !17
  %23 = add nsw i64 %19, %22
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %24, i32 0, i32 15
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %23, ptr noundef %25, ptr noundef %26)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %27, i32 0, i32 2
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %30, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !17
  %33 = add nsw i64 %29, %32
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %34, i32 0, i32 16
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %33, ptr noundef %35, ptr noundef %36)
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %37, i32 0, i32 2
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = icmp sgt i64 %39, 0
  br i1 %40, label %41, label %63

41:                                               ; preds = %16
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %42, i32 0, i32 4
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %44, i32 0, i32 14
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %43, ptr noundef %45, ptr noundef %46)
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %47, i32 0, i32 2
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %52, i32 0, i32 15
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %49, ptr noundef %51, i64 noundef 0, ptr noundef %53, i64 noundef 0, ptr noundef %54)
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %55, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %58, i32 0, i32 8
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %60, i32 0, i32 16
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %57, ptr noundef %59, i64 noundef 0, ptr noundef %61, i64 noundef 0, ptr noundef %62)
  br label %70

63:                                               ; preds = %16
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !18
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %67, i32 0, i32 14
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl23sparsecreatecrsemptybufElPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %66, ptr noundef %68, ptr noundef %69)
  br label %70

70:                                               ; preds = %63, %41
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %71, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !17
  %74 = icmp sgt i64 %73, 0
  br i1 %74, label %75, label %114

75:                                               ; preds = %70
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %76, i32 0, i32 3
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %78, i32 0, i32 1
  %80 = load i64, ptr %79, align 8, !tbaa !17
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %81, i32 0, i32 0
  %83 = load i64, ptr %82, align 8, !tbaa !18
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %84, i32 0, i32 17
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl27sparsecreatecrsfromdensebufEPKNS_9ae_matrixEllPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %77, i64 noundef %80, i64 noundef %83, ptr noundef %85, ptr noundef %86)
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %87, i32 0, i32 14
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %89, i32 0, i32 17
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparseappendmatrixEPNS_12sparsematrixEPKS0_PNS_8ae_stateE(ptr noundef %88, ptr noundef %90, ptr noundef %91)
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !17
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %95, i32 0, i32 5
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %97, i32 0, i32 15
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %99, i32 0, i32 2
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %94, ptr noundef %96, i64 noundef 0, ptr noundef %98, i64 noundef %101, ptr noundef %102)
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %103, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !17
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %106, i32 0, i32 6
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %108, i32 0, i32 16
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %110, i32 0, i32 2
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %105, ptr noundef %107, i64 noundef 0, ptr noundef %109, i64 noundef %112, ptr noundef %113)
  br label %114

114:                                              ; preds = %75, %70
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %115, i32 0, i32 2
  %117 = load i64, ptr %116, align 8, !tbaa !9
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %118, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !17
  %121 = add nsw i64 %117, %120
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %122, i32 0, i32 12
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %121, ptr noundef %123, ptr noundef %124)
  store i64 0, ptr %5, align 8, !tbaa !19
  br label %125

125:                                              ; preds = %144, %114
  %126 = load i64, ptr %5, align 8, !tbaa !19
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %127, i32 0, i32 2
  %129 = load i64, ptr %128, align 8, !tbaa !9
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %130, i32 0, i32 1
  %132 = load i64, ptr %131, align 8, !tbaa !17
  %133 = add nsw i64 %129, %132
  %134 = sub nsw i64 %133, 1
  %135 = icmp sle i64 %126, %134
  br i1 %135, label %136, label %147

136:                                              ; preds = %125
  %137 = load i64, ptr %5, align 8, !tbaa !19
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::xlinearconstraints", ptr %138, i32 0, i32 12
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !20
  %142 = load i64, ptr %5, align 8, !tbaa !19
  %143 = getelementptr inbounds i64, ptr %141, i64 %142
  store i64 %137, ptr %143, align 8, !tbaa !19
  br label %144

144:                                              ; preds = %136
  %145 = load i64, ptr %5, align 8, !tbaa !19
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr %5, align 8, !tbaa !19
  br label %125, !llvm.loop !21

147:                                              ; preds = %125
  store i32 0, ptr %6, align 4
  br label %148

148:                                              ; preds = %147, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  %149 = load i32, ptr %6, align 4
  switch i32 %149, label %151 [
    i32 0, label %150
    i32 1, label %150
  ]

150:                                              ; preds = %148, %148
  ret void

151:                                              ; preds = %148
  unreachable
}

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

declare void @_ZN11alglib_impl18sparseappendmatrixEPNS_12sparsematrixEPKS0_PNS_8ae_stateE(ptr noundef, ptr 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, !11, i64 16}
!10 = !{!"_ZTSN11alglib_impl18xlinearconstraintsE", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !15, i64 104, !16, i64 472, !16, i64 536, !16, i64 600, !16, i64 664, !11, i64 728, !11, i64 736, !12, i64 744, !16, i64 824, !16, i64 888, !15, i64 952, !16, i64 1320, !16, i64 1384, !15, i64 1448}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, 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 = !{!"_ZTSN11alglib_impl12sparsematrixE", !16, i64 0, !16, i64 64, !16, i64 128, !16, i64 192, !16, i64 256, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!17 = !{!10, !11, i64 8}
!18 = !{!10, !11, i64 0}
!19 = !{!11, !11, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"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"

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

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_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18xlcconverttosparseEPNS_18xlinearconstraintsEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load i64, ptr %5, align 8, !tbaa !16
  %7 = add nsw i64 %6, %4
  %8 = icmp eq i64 %7, 0
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 1320
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %7, ptr noundef nonnull %10, ptr noundef %1)
  %11 = load i64, ptr %3, align 8, !tbaa !5
  %12 = load i64, ptr %5, align 8, !tbaa !16
  %13 = add nsw i64 %12, %11
  %14 = getelementptr inbounds i8, ptr %0, i64 1384
  tail call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %13, ptr noundef nonnull %14, ptr noundef %1)
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = icmp sgt i64 %15, 0
  %17 = getelementptr inbounds i8, ptr %0, i64 952
  br i1 %16, label %18, label %24

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef nonnull %19, ptr noundef nonnull %17, ptr noundef %1)
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 600
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %20, ptr noundef nonnull %21, i64 noundef 0, ptr noundef nonnull %10, i64 noundef 0, ptr noundef %1)
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %0, i64 664
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %22, ptr noundef nonnull %23, i64 noundef 0, ptr noundef nonnull %14, i64 noundef 0, ptr noundef %1)
  br label %26

24:                                               ; preds = %9
  %25 = load i64, ptr %0, align 8, !tbaa !17
  tail call void @_ZN11alglib_impl23sparsecreatecrsemptybufElPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %25, ptr noundef nonnull %17, ptr noundef %1)
  br label %26

26:                                               ; preds = %24, %18
  %27 = load i64, ptr %5, align 8, !tbaa !16
  %28 = icmp sgt i64 %27, 0
  br i1 %28, label %29, label %40

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  %31 = load i64, ptr %0, align 8, !tbaa !17
  %32 = getelementptr inbounds i8, ptr %0, i64 1448
  tail call void @_ZN11alglib_impl27sparsecreatecrsfromdensebufEPKNS_9ae_matrixEllPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %30, i64 noundef %27, i64 noundef %31, ptr noundef nonnull %32, ptr noundef %1)
  %33 = getelementptr inbounds i8, ptr %0, i64 952
  tail call void @_ZN11alglib_impl18sparseappendmatrixEPNS_12sparsematrixEPKS0_PNS_8ae_stateE(ptr noundef nonnull %33, ptr noundef nonnull %32, ptr noundef %1)
  %34 = load i64, ptr %5, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %0, i64 472
  %36 = load i64, ptr %3, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %34, ptr noundef nonnull %35, i64 noundef 0, ptr noundef nonnull %10, i64 noundef %36, ptr noundef %1)
  %37 = load i64, ptr %5, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %0, i64 536
  %39 = load i64, ptr %3, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %37, ptr noundef nonnull %38, i64 noundef 0, ptr noundef nonnull %14, i64 noundef %39, ptr noundef %1)
  %.pre = load i64, ptr %5, align 8, !tbaa !16
  br label %40

40:                                               ; preds = %29, %26
  %41 = phi i64 [ %.pre, %29 ], [ %27, %26 ]
  %42 = load i64, ptr %3, align 8, !tbaa !5
  %43 = add nsw i64 %41, %42
  %44 = getelementptr inbounds i8, ptr %0, i64 824
  tail call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %43, ptr noundef nonnull %44, ptr noundef %1)
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = load i64, ptr %5, align 8, !tbaa !16
  %47 = add nsw i64 %46, %45
  %.not.not56 = icmp sgt i64 %47, 0
  br i1 %.not.not56, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %40
  %48 = getelementptr inbounds i8, ptr %0, i64 880
  br label %49

49:                                               ; preds = %.lr.ph, %49
  %.057 = phi i64 [ 0, %.lr.ph ], [ %52, %49 ]
  %50 = load ptr, ptr %48, align 8, !tbaa !18
  %51 = getelementptr inbounds i64, ptr %50, i64 %.057
  store i64 %.057, ptr %51, align 8, !tbaa !19
  %52 = add nuw nsw i64 %.057, 1
  %53 = load i64, ptr %3, align 8, !tbaa !5
  %54 = load i64, ptr %5, align 8, !tbaa !16
  %55 = add nsw i64 %54, %53
  %.not.not = icmp slt i64 %52, %55
  br i1 %.not.not, label %49, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %49, %40, %2
  ret void
}

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

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

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 16}
!6 = !{!"_ZTSN11alglib_impl18xlinearconstraintsE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !14, i64 104, !15, i64 472, !15, i64 536, !15, i64 600, !15, i64 664, !7, i64 728, !7, i64 736, !10, i64 744, !15, i64 824, !15, i64 888, !14, i64 952, !15, i64 1320, !15, i64 1384, !14, i64 1448}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl12sparsematrixE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !7, i64 0}
!18 = !{!8, !8, i64 0}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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