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

@.str.291 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [60 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_impl11sparseallocEPNS_13ae_serializerEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %9, i32 0, i32 5
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = icmp eq i64 %11, 0
  br i1 %12, label %23, label %13

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %14, i32 0, i32 5
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = icmp eq i64 %16, 1
  br i1 %17, label %23, label %18

18:                                               ; preds = %13
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %19, i32 0, i32 5
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 2
  br label %23

23:                                               ; preds = %18, %13, %3
  %24 = phi i1 [ true, %13 ], [ true, %3 ], [ %22, %18 ]
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef @.str.291, ptr noundef %25)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %26)
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %27)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %28)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %29, i32 0, i32 5
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %33, label %90

33:                                               ; preds = %23
  store i64 0, ptr %8, align 8, !tbaa !15
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %34

34:                                               ; preds = %56, %33
  %35 = load i64, ptr %7, align 8, !tbaa !15
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %36, i32 0, i32 10
  %38 = load i64, ptr %37, align 8, !tbaa !16
  %39 = sub nsw i64 %38, 1
  %40 = icmp sle i64 %35, %39
  br i1 %40, label %41, label %59

41:                                               ; preds = %34
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = load i64, ptr %7, align 8, !tbaa !15
  %47 = mul nsw i64 2, %46
  %48 = add nsw i64 %47, 0
  %49 = getelementptr inbounds i64, ptr %45, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !15
  %51 = icmp sge i64 %50, 0
  br i1 %51, label %52, label %55

52:                                               ; preds = %41
  %53 = load i64, ptr %8, align 8, !tbaa !15
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %8, align 8, !tbaa !15
  br label %55

55:                                               ; preds = %52, %41
  br label %56

56:                                               ; preds = %55
  %57 = load i64, ptr %7, align 8, !tbaa !15
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %7, align 8, !tbaa !15
  br label %34, !llvm.loop !18

59:                                               ; preds = %34
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %60)
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %61)
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %62)
  store i64 0, ptr %7, align 8, !tbaa !15
  br label %63

63:                                               ; preds = %86, %59
  %64 = load i64, ptr %7, align 8, !tbaa !15
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %65, i32 0, i32 10
  %67 = load i64, ptr %66, align 8, !tbaa !16
  %68 = sub nsw i64 %67, 1
  %69 = icmp sle i64 %64, %68
  br i1 %69, label %70, label %89

70:                                               ; preds = %63
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = load i64, ptr %7, align 8, !tbaa !15
  %76 = mul nsw i64 2, %75
  %77 = add nsw i64 %76, 0
  %78 = getelementptr inbounds i64, ptr %74, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !15
  %80 = icmp sge i64 %79, 0
  br i1 %80, label %81, label %85

81:                                               ; preds = %70
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %82)
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %83)
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %84)
  br label %85

85:                                               ; preds = %81, %70
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %7, align 8, !tbaa !15
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %7, align 8, !tbaa !15
  br label %63, !llvm.loop !20

89:                                               ; preds = %63
  br label %90

90:                                               ; preds = %89, %23
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %91, i32 0, i32 5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp eq i64 %93, 1
  br i1 %94, label %95, label %133

95:                                               ; preds = %90
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %96)
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %97)
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %98)
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %102, i32 0, i32 6
  %104 = load i64, ptr %103, align 8, !tbaa !21
  %105 = add nsw i64 %104, 1
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %99, ptr noundef %101, i64 noundef %105, ptr noundef %106)
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %108, i32 0, i32 1
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %110, i32 0, i32 2
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %111, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %114, i32 0, i32 6
  %116 = load i64, ptr %115, align 8, !tbaa !21
  %117 = getelementptr inbounds i64, ptr %113, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !15
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %107, ptr noundef %109, i64 noundef %118, ptr noundef %119)
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %123, i32 0, i32 2
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %124, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !17
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %127, i32 0, i32 6
  %129 = load i64, ptr %128, align 8, !tbaa !21
  %130 = getelementptr inbounds i64, ptr %126, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !15
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %120, ptr noundef %122, i64 noundef %131, ptr noundef %132)
  br label %133

133:                                              ; preds = %95, %90
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %134, i32 0, i32 5
  %136 = load i64, ptr %135, align 8, !tbaa !9
  %137 = icmp eq i64 %136, 2
  br i1 %137, label %138, label %186

138:                                              ; preds = %133
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %139, i32 0, i32 6
  %141 = load i64, ptr %140, align 8, !tbaa !21
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %142, i32 0, i32 7
  %144 = load i64, ptr %143, align 8, !tbaa !22
  %145 = icmp eq i64 %141, %144
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %145, ptr noundef @.str.292, ptr noundef %146)
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %147)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %148)
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %150, i32 0, i32 2
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %152, i32 0, i32 6
  %154 = load i64, ptr %153, align 8, !tbaa !21
  %155 = add nsw i64 %154, 1
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %149, ptr noundef %151, i64 noundef %155, ptr noundef %156)
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %158, i32 0, i32 3
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %160, i32 0, i32 7
  %162 = load i64, ptr %161, align 8, !tbaa !22
  %163 = add nsw i64 %162, 1
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %157, ptr noundef %159, i64 noundef %163, ptr noundef %164)
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %166, i32 0, i32 4
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %168, i32 0, i32 7
  %170 = load i64, ptr %169, align 8, !tbaa !22
  %171 = add nsw i64 %170, 1
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %165, ptr noundef %167, i64 noundef %171, ptr noundef %172)
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %176, i32 0, i32 2
  %178 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !17
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %180, i32 0, i32 6
  %182 = load i64, ptr %181, align 8, !tbaa !21
  %183 = getelementptr inbounds i64, ptr %179, i64 %182
  %184 = load i64, ptr %183, align 8, !tbaa !15
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %173, ptr noundef %175, i64 noundef %184, ptr noundef %185)
  br label %186

186:                                              ; preds = %138, %133
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %187)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

declare void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef) #1

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

declare void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, ptr 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, !12, i64 320}
!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 360}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!10, !12, i64 328}
!22 = !{!10, !12, i64 336}


; 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.291 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [60 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_impl11sparseallocEPNS_13ae_serializerEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
switch.edge:
  %3 = getelementptr inbounds i8, ptr %1, i64 320
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %switch = icmp ult i64 %4, 3
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %switch, ptr noundef nonnull @.str.291, ptr noundef %2)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %5 = load i64, ptr %3, align 8, !tbaa !5
  %6 = icmp eq i64 %5, 0
  br i1 %6, label %.preheader, label %20

.preheader:                                       ; preds = %switch.edge
  %7 = getelementptr inbounds i8, ptr %1, i64 360
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %8 = load i64, ptr %7, align 8, !tbaa !14
  %.not.not6972 = icmp sgt i64 %8, 0
  br i1 %.not.not6972, label %.lr.ph, label %thread-pre-split

.lr.ph:                                           ; preds = %.preheader
  %9 = getelementptr inbounds i8, ptr %1, i64 120
  br label %10

10:                                               ; preds = %.lr.ph, %17
  %11 = phi i64 [ %8, %.lr.ph ], [ %18, %17 ]
  %.16773 = phi i64 [ 0, %.lr.ph ], [ %19, %17 ]
  %12 = load ptr, ptr %9, align 8, !tbaa !15
  %.idx = shl nsw i64 %.16773, 4
  %13 = getelementptr inbounds i8, ptr %12, i64 %.idx
  %14 = load i64, ptr %13, align 8, !tbaa !16
  %15 = icmp sgt i64 %14, -1
  br i1 %15, label %16, label %17

16:                                               ; preds = %10
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %.pre = load i64, ptr %7, align 8, !tbaa !14
  br label %17

17:                                               ; preds = %10, %16
  %18 = phi i64 [ %11, %10 ], [ %.pre, %16 ]
  %19 = add nuw nsw i64 %.16773, 1
  %.not.not69 = icmp slt i64 %19, %18
  br i1 %.not.not69, label %10, label %thread-pre-split, !llvm.loop !17

thread-pre-split:                                 ; preds = %17, %.preheader
  %.pr = load i64, ptr %3, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %thread-pre-split, %switch.edge
  %21 = phi i64 [ %.pr, %thread-pre-split ], [ %5, %switch.edge ]
  %22 = icmp eq i64 %21, 1
  br i1 %22, label %23, label %38

23:                                               ; preds = %20
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %24 = getelementptr inbounds i8, ptr %1, i64 128
  %25 = getelementptr inbounds i8, ptr %1, i64 328
  %26 = load i64, ptr %25, align 8, !tbaa !19
  %27 = add nsw i64 %26, 1
  tail call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %24, i64 noundef %27, ptr noundef %2)
  %28 = getelementptr inbounds i8, ptr %1, i64 64
  %29 = getelementptr inbounds i8, ptr %1, i64 184
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = load i64, ptr %25, align 8, !tbaa !19
  %32 = getelementptr inbounds i64, ptr %30, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !16
  tail call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %28, i64 noundef %33, ptr noundef %2)
  %34 = load ptr, ptr %29, align 8, !tbaa !15
  %35 = load i64, ptr %25, align 8, !tbaa !19
  %36 = getelementptr inbounds i64, ptr %34, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !16
  tail call void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %37, ptr noundef %2)
  %.pre74 = load i64, ptr %3, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %23, %20
  %39 = phi i64 [ %.pre74, %23 ], [ %21, %20 ]
  %40 = icmp eq i64 %39, 2
  br i1 %40, label %41, label %61

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %1, i64 328
  %43 = load i64, ptr %42, align 8, !tbaa !19
  %44 = getelementptr inbounds i8, ptr %1, i64 336
  %45 = load i64, ptr %44, align 8, !tbaa !20
  %46 = icmp eq i64 %43, %45
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef nonnull @.str.292, ptr noundef %2)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  %47 = getelementptr inbounds i8, ptr %1, i64 128
  %48 = load i64, ptr %42, align 8, !tbaa !19
  %49 = add nsw i64 %48, 1
  tail call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %47, i64 noundef %49, ptr noundef %2)
  %50 = getelementptr inbounds i8, ptr %1, i64 192
  %51 = load i64, ptr %44, align 8, !tbaa !20
  %52 = add nsw i64 %51, 1
  tail call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %50, i64 noundef %52, ptr noundef %2)
  %53 = getelementptr inbounds i8, ptr %1, i64 256
  %54 = load i64, ptr %44, align 8, !tbaa !20
  %55 = add nsw i64 %54, 1
  tail call void @_ZN11alglib_impl17allocintegerarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %53, i64 noundef %55, ptr noundef %2)
  %56 = getelementptr inbounds i8, ptr %1, i64 184
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load i64, ptr %42, align 8, !tbaa !19
  %59 = getelementptr inbounds i64, ptr %57, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !16
  tail call void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %60, ptr noundef %2)
  br label %61

61:                                               ; preds = %41, %38
  tail call void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef %0)
  ret void
}

declare void @_ZN11alglib_impl25ae_serializer_alloc_entryEPNS_13ae_serializerE(ptr noundef) local_unnamed_addr #0

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

declare void @_ZN11alglib_impl14allocrealarrayEPNS_13ae_serializerEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, ptr noundef, i64 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, !8, i64 320}
!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 360}
!15 = !{!9, !9, i64 0}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !8, i64 328}
!20 = !{!6, !8, i64 336}


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