; 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.295 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.298 = external hidden unnamed_addr constant [56 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_impl17sparseunserializeEPNS_13ae_serializerEPNS_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
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl19_sparsematrix_clearEPv(ptr noundef %15)
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %16, ptr noundef %13, ptr noundef %17)
  %18 = load i64, ptr %13, align 8, !tbaa !9
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = call noundef i64 @_ZN11alglib_impl32getsparsematrixserializationcodeEPNS_8ae_stateE(ptr noundef %19)
  %21 = icmp eq i64 %18, %20
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef @.str.295, ptr noundef %22)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %24, i32 0, i32 5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %23, ptr noundef %25, ptr noundef %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %27, i32 0, i32 5
  %29 = load i64, ptr %28, align 8, !tbaa !11
  %30 = icmp eq i64 %29, 0
  br i1 %30, label %41, label %31

31:                                               ; preds = %3
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %32, i32 0, i32 5
  %34 = load i64, ptr %33, align 8, !tbaa !11
  %35 = icmp eq i64 %34, 1
  br i1 %35, label %41, label %36

36:                                               ; preds = %31
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %37, i32 0, i32 5
  %39 = load i64, ptr %38, align 8, !tbaa !11
  %40 = icmp eq i64 %39, 2
  br label %41

41:                                               ; preds = %36, %31, %3
  %42 = phi i1 [ true, %31 ], [ true, %3 ], [ %40, %36 ]
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.296, ptr noundef %43)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %44, ptr noundef %13, ptr noundef %45)
  %46 = load i64, ptr %13, align 8, !tbaa !9
  %47 = icmp eq i64 %46, 0
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.295, ptr noundef %48)
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %49, i32 0, i32 5
  %51 = load i64, ptr %50, align 8, !tbaa !11
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %86

53:                                               ; preds = %41
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %54, ptr noundef %10, ptr noundef %55)
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %56, ptr noundef %11, ptr noundef %57)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %58, ptr noundef %12, ptr noundef %59)
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = load i64, ptr %11, align 8, !tbaa !9
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %60, i64 noundef %61, i64 noundef %62, ptr noundef %63, ptr noundef %64)
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %82, %53
  %66 = load i64, ptr %7, align 8, !tbaa !9
  %67 = load i64, ptr %12, align 8, !tbaa !9
  %68 = sub nsw i64 %67, 1
  %69 = icmp sle i64 %66, %68
  br i1 %69, label %70, label %85

70:                                               ; preds = %65
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %71, ptr noundef %8, ptr noundef %72)
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %73, ptr noundef %9, ptr noundef %74)
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %75, ptr noundef %14, ptr noundef %76)
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load i64, ptr %8, align 8, !tbaa !9
  %79 = load i64, ptr %9, align 8, !tbaa !9
  %80 = load double, ptr %14, align 8, !tbaa !16
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef %77, i64 noundef %78, i64 noundef %79, double noundef %80, ptr noundef %81)
  br label %82

82:                                               ; preds = %70
  %83 = load i64, ptr %7, align 8, !tbaa !9
  %84 = add nsw i64 %83, 1
  store i64 %84, ptr %7, align 8, !tbaa !9
  br label %65, !llvm.loop !18

85:                                               ; preds = %65
  br label %86

86:                                               ; preds = %85, %41
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %87, i32 0, i32 5
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = icmp eq i64 %89, 1
  br i1 %90, label %91, label %118

91:                                               ; preds = %86
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %93, i32 0, i32 6
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %92, ptr noundef %94, ptr noundef %95)
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %97, i32 0, i32 7
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %96, ptr noundef %98, ptr noundef %99)
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %101, i32 0, i32 9
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %100, ptr noundef %102, ptr noundef %103)
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %104, ptr noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %108, ptr noundef %110, ptr noundef %111)
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %112, ptr noundef %114, ptr noundef %115)
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %116, ptr noundef %117)
  br label %118

118:                                              ; preds = %91, %86
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %119, i32 0, i32 5
  %121 = load i64, ptr %120, align 8, !tbaa !11
  %122 = icmp eq i64 %121, 2
  br i1 %122, label %123, label %156

123:                                              ; preds = %118
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %125, i32 0, i32 6
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %124, ptr noundef %126, ptr noundef %127)
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %129, i32 0, i32 7
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %128, ptr noundef %130, ptr noundef %131)
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %132, i32 0, i32 6
  %134 = load i64, ptr %133, align 8, !tbaa !20
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %135, i32 0, i32 7
  %137 = load i64, ptr %136, align 8, !tbaa !21
  %138 = icmp eq i64 %134, %137
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %138, ptr noundef @.str.297, ptr noundef %139)
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %140, ptr noundef %142, ptr noundef %143)
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %145, i32 0, i32 3
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %144, ptr noundef %146, ptr noundef %147)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %148, ptr noundef %150, ptr noundef %151)
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %152, ptr noundef %154, ptr noundef %155)
  br label %156

156:                                              ; preds = %123, %118
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %157, ptr noundef %13, ptr noundef %158)
  %159 = load i64, ptr %13, align 8, !tbaa !9
  %160 = icmp eq i64 %159, 117
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %160, ptr noundef @.str.298, ptr noundef %161)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  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
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef) #2

declare void @_ZN11alglib_impl19_sparsematrix_clearEPv(ptr noundef) #1

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

declare noundef i64 @_ZN11alglib_impl32getsparsematrixserializationcodeEPNS_8ae_stateE(ptr noundef) #1

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

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

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

declare void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 320}
!12 = !{!"_ZTSN11alglib_impl12sparsematrixE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !13, i64 256, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !10, i64 328}
!21 = !{!12, !10, 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.295 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.298 = external hidden unnamed_addr constant [56 x i8], align 1

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

; Function Attrs: mustprogress 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) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17sparseunserializeEPNS_13ae_serializerEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
switch.edge:
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  tail call void @_ZN11alglib_impl19_sparsematrix_clearEPv(ptr noundef %1)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef %2)
  %10 = load i64, ptr %8, align 8, !tbaa !5
  %11 = call noundef i64 @_ZN11alglib_impl32getsparsematrixserializationcodeEPNS_8ae_stateE(ptr noundef %2)
  %12 = icmp eq i64 %10, %11
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.295, ptr noundef %2)
  %13 = getelementptr inbounds i8, ptr %1, i64 320
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %13, ptr noundef %2)
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %switch = icmp ult i64 %14, 3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %switch, ptr noundef nonnull @.str.296, ptr noundef %2)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef %2)
  %15 = load i64, ptr %8, align 8, !tbaa !5
  %16 = icmp eq i64 %15, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.295, ptr noundef %2)
  %17 = load i64, ptr %13, align 8, !tbaa !9
  %18 = icmp eq i64 %17, 0
  br i1 %18, label %19, label %29

19:                                               ; preds = %switch.edge
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %5, ptr noundef %2)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %6, ptr noundef %2)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %7, ptr noundef %2)
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = load i64, ptr %6, align 8, !tbaa !5
  %22 = load i64, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef %20, i64 noundef %21, i64 noundef %22, ptr noundef nonnull %1, ptr noundef %2)
  %23 = load i64, ptr %7, align 8, !tbaa !5
  %.not.not80 = icmp sgt i64 %23, 0
  br i1 %.not.not80, label %.lr.ph, label %thread-pre-split

.lr.ph:                                           ; preds = %19, %.lr.ph
  %.081 = phi i64 [ %27, %.lr.ph ], [ 0, %19 ]
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %3, ptr noundef %2)
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %4, ptr noundef %2)
  call void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %9, ptr noundef %2)
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = load i64, ptr %4, align 8, !tbaa !5
  %26 = load double, ptr %9, align 8, !tbaa !15
  call void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef %1, i64 noundef %24, i64 noundef %25, double noundef %26, ptr noundef %2)
  %27 = add nuw nsw i64 %.081, 1
  %28 = load i64, ptr %7, align 8, !tbaa !5
  %.not.not = icmp slt i64 %27, %28
  br i1 %.not.not, label %.lr.ph, label %thread-pre-split, !llvm.loop !17

thread-pre-split:                                 ; preds = %.lr.ph, %19
  %.pr = load i64, ptr %13, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %thread-pre-split, %switch.edge
  %30 = phi i64 [ %.pr, %thread-pre-split ], [ %17, %switch.edge ]
  %31 = icmp eq i64 %30, 1
  br i1 %31, label %32, label %38

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %1, i64 328
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %33, ptr noundef %2)
  %34 = getelementptr inbounds i8, ptr %1, i64 336
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %34, ptr noundef %2)
  %35 = getelementptr inbounds i8, ptr %1, i64 352
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %35, ptr noundef %2)
  %36 = getelementptr inbounds i8, ptr %1, i64 128
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %36, ptr noundef %2)
  %37 = getelementptr inbounds i8, ptr %1, i64 64
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %37, ptr noundef %2)
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2)
  call void @_ZN11alglib_impl15sparseinitduidxEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %1, ptr noundef %2)
  %.pre = load i64, ptr %13, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %32, %29
  %39 = phi i64 [ %.pre, %32 ], [ %30, %29 ]
  %40 = icmp eq i64 %39, 2
  br i1 %40, label %41, label %50

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %1, i64 328
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %42, ptr noundef %2)
  %43 = getelementptr inbounds i8, ptr %1, i64 336
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %43, ptr noundef %2)
  %44 = load i64, ptr %42, align 8, !tbaa !19
  %45 = load i64, ptr %43, align 8, !tbaa !20
  %46 = icmp eq i64 %44, %45
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef nonnull @.str.297, ptr noundef %2)
  %47 = getelementptr inbounds i8, ptr %1, i64 128
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %47, ptr noundef %2)
  %48 = getelementptr inbounds i8, ptr %1, i64 192
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %48, ptr noundef %2)
  %49 = getelementptr inbounds i8, ptr %1, i64 256
  call void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %49, ptr noundef %2)
  call void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2)
  br label %50

50:                                               ; preds = %41, %38
  call void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef %2)
  %51 = load i64, ptr %8, align 8, !tbaa !5
  %52 = icmp eq i64 %51, 117
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef nonnull @.str.298, ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl12sparsecreateElllPNS_12sparsematrixEPNS_8ae_stateE(i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl9sparsesetEPNS_12sparsematrixElldPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl19_sparsematrix_clearEPv(ptr noundef) local_unnamed_addr #1

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

declare noundef i64 @_ZN11alglib_impl32getsparsematrixserializationcodeEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl29ae_serializer_unserialize_intEPNS_13ae_serializerEPlPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl32ae_serializer_unserialize_doubleEPNS_13ae_serializerEPdPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl23unserializeintegerarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl20unserializerealarrayEPNS_13ae_serializerEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 320}
!10 = !{!"_ZTSN11alglib_impl12sparsematrixE", !11, i64 0, !11, i64 64, !11, i64 128, !11, i64 192, !11, i64 256, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!10, !6, i64 328}
!20 = !{!10, !6, i64 336}


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