; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (solvers)

; 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::lincgstate" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, double, double, double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", double, i64, i64, i64, i8, i8, i8, i8, i8, i8, i8, i64, i64, i64, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::rcommstate" }
%"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 }
%"struct.alglib_impl::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.82 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [46 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_impl16lincgsolvesparseEPNS_10lincgstateEPNS_12sparsematrixEbPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %15 = zext i1 %2 to i8
  store i8 %15, ptr %8, align 1, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  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
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %16, i32 0, i32 2
  %18 = load i64, ptr %17, align 8, !tbaa !11
  store i64 %18, ptr %11, align 8, !tbaa !19
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !20
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %22, i32 0, i32 2
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = icmp sge i64 %21, %24
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef @.str.82, ptr noundef %26)
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %28, i32 0, i32 2
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %27, i64 noundef %30, ptr noundef %31)
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.83, ptr noundef %33)
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %34, i32 0, i32 34
  %36 = load i64, ptr %11, align 8, !tbaa !19
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %35, i64 noundef %36, ptr noundef %37)
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %38, i32 0, i32 3
  %40 = load i64, ptr %39, align 8, !tbaa !21
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %42, label %78

42:                                               ; preds = %5
  store i64 0, ptr %12, align 8, !tbaa !19
  br label %43

43:                                               ; preds = %74, %42
  %44 = load i64, ptr %12, align 8, !tbaa !19
  %45 = load i64, ptr %11, align 8, !tbaa !19
  %46 = sub nsw i64 %45, 1
  %47 = icmp sle i64 %44, %46
  br i1 %47, label %48, label %77

48:                                               ; preds = %43
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i64, ptr %12, align 8, !tbaa !19
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef %49, i64 noundef %50, ptr noundef %51)
  store double %52, ptr %13, align 8, !tbaa !22
  %53 = load double, ptr %13, align 8, !tbaa !22
  %54 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %53, double noundef 0.000000e+00)
  br i1 %54, label %55, label %66

55:                                               ; preds = %48
  %56 = load double, ptr %13, align 8, !tbaa !22
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %56, ptr noundef %57)
  %59 = fdiv double 1.000000e+00, %58
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %60, i32 0, i32 34
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = load i64, ptr %12, align 8, !tbaa !19
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  store double %59, ptr %65, align 8, !tbaa !22
  br label %73

66:                                               ; preds = %48
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %67, i32 0, i32 34
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %68, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = load i64, ptr %12, align 8, !tbaa !19
  %72 = getelementptr inbounds double, ptr %70, i64 %71
  store double 1.000000e+00, ptr %72, align 8, !tbaa !22
  br label %73

73:                                               ; preds = %66, %55
  br label %74

74:                                               ; preds = %73
  %75 = load i64, ptr %12, align 8, !tbaa !19
  %76 = add nsw i64 %75, 1
  store i64 %76, ptr %12, align 8, !tbaa !19
  br label %43, !llvm.loop !24

77:                                               ; preds = %43
  br label %95

78:                                               ; preds = %5
  store i64 0, ptr %12, align 8, !tbaa !19
  br label %79

79:                                               ; preds = %91, %78
  %80 = load i64, ptr %12, align 8, !tbaa !19
  %81 = load i64, ptr %11, align 8, !tbaa !19
  %82 = sub nsw i64 %81, 1
  %83 = icmp sle i64 %80, %82
  br i1 %83, label %84, label %94

84:                                               ; preds = %79
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %85, i32 0, i32 34
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !23
  %89 = load i64, ptr %12, align 8, !tbaa !19
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  store double 1.000000e+00, ptr %90, align 8, !tbaa !22
  br label %91

91:                                               ; preds = %84
  %92 = load i64, ptr %12, align 8, !tbaa !19
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %12, align 8, !tbaa !19
  br label %79, !llvm.loop !26

94:                                               ; preds = %79
  br label %95

95:                                               ; preds = %94, %77
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl12lincgrestartEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef %96, ptr noundef %97)
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9lincgsetbEPNS_10lincgstateEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  br label %101

101:                                              ; preds = %191, %95
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = call noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef %102, ptr noundef %103)
  br i1 %104, label %105, label %192

105:                                              ; preds = %101
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %106, i32 0, i32 25
  %108 = load i8, ptr %107, align 2, !tbaa !27, !range !28, !noundef !29
  %109 = trunc i8 %108 to i1
  br i1 %109, label %110, label %119

110:                                              ; preds = %105
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load i8, ptr %8, align 1, !tbaa !9, !range !28, !noundef !29
  %113 = trunc i8 %112 to i1
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %114, i32 0, i32 14
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %116, i32 0, i32 15
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %111, i1 noundef zeroext %113, ptr noundef %115, ptr noundef %117, ptr noundef %118)
  br label %119

119:                                              ; preds = %110, %105
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %120, i32 0, i32 28
  %122 = load i8, ptr %121, align 1, !tbaa !30, !range !28, !noundef !29
  %123 = trunc i8 %122 to i1
  br i1 %123, label %124, label %152

124:                                              ; preds = %119
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = load i8, ptr %8, align 1, !tbaa !9, !range !28, !noundef !29
  %127 = trunc i8 %126 to i1
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %128, i32 0, i32 14
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %130, i32 0, i32 15
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %125, i1 noundef zeroext %127, ptr noundef %129, ptr noundef %131, ptr noundef %132)
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %133, i32 0, i32 14
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !23
  %137 = getelementptr inbounds double, ptr %136, i64 0
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %138, i32 0, i32 15
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !23
  %142 = getelementptr inbounds double, ptr %141, i64 0
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %143, i32 0, i32 2
  %145 = load i64, ptr %144, align 8, !tbaa !11
  %146 = sub nsw i64 %145, 1
  %147 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %146)
  %148 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %137, i64 noundef 1, ptr noundef %142, i64 noundef 1, i64 noundef %147)
  store double %148, ptr %14, align 8, !tbaa !22
  %149 = load double, ptr %14, align 8, !tbaa !22
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %150, i32 0, i32 17
  store double %149, ptr %151, align 8, !tbaa !31
  br label %152

152:                                              ; preds = %124, %119
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %153, i32 0, i32 29
  %155 = load i8, ptr %154, align 2, !tbaa !32, !range !28, !noundef !29
  %156 = trunc i8 %155 to i1
  br i1 %156, label %157, label %191

157:                                              ; preds = %152
  store i64 0, ptr %12, align 8, !tbaa !19
  br label %158

158:                                              ; preds = %187, %157
  %159 = load i64, ptr %12, align 8, !tbaa !19
  %160 = load i64, ptr %11, align 8, !tbaa !19
  %161 = sub nsw i64 %160, 1
  %162 = icmp sle i64 %159, %161
  br i1 %162, label %163, label %190

163:                                              ; preds = %158
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %164, i32 0, i32 14
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !23
  %168 = load i64, ptr %12, align 8, !tbaa !19
  %169 = getelementptr inbounds double, ptr %167, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !22
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %171, i32 0, i32 34
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !23
  %175 = load i64, ptr %12, align 8, !tbaa !19
  %176 = getelementptr inbounds double, ptr %174, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !22
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %177, ptr noundef %178)
  %180 = fmul double %170, %179
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::lincgstate", ptr %181, i32 0, i32 16
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !23
  %185 = load i64, ptr %12, align 8, !tbaa !19
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  store double %180, ptr %186, align 8, !tbaa !22
  br label %187

187:                                              ; preds = %163
  %188 = load i64, ptr %12, align 8, !tbaa !19
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %12, align 8, !tbaa !19
  br label %158, !llvm.loop !33

190:                                              ; preds = %158
  br label %191

191:                                              ; preds = %190, %152
  br label %101, !llvm.loop !34

192:                                              ; preds = %101
  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
  ret void
}

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

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

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

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 128}
!12 = !{!"_ZTSN11alglib_impl10lincgstateE", !13, i64 0, !13, i64 64, !14, i64 128, !14, i64 136, !13, i64 144, !13, i64 208, !13, i64 272, !13, i64 336, !13, i64 400, !13, i64 464, !16, i64 528, !16, i64 536, !16, i64 544, !16, i64 552, !13, i64 560, !13, i64 624, !13, i64 688, !16, i64 752, !13, i64 760, !16, i64 824, !14, i64 832, !14, i64 840, !14, i64 848, !10, i64 856, !10, i64 857, !10, i64 858, !10, i64 859, !10, i64 860, !10, i64 861, !10, i64 862, !14, i64 864, !14, i64 872, !14, i64 880, !10, i64 888, !13, i64 896, !17, i64 960}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !14, i64 0, !14, i64 8, !10, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl10rcommstateE", !18, i64 0, !13, i64 8, !13, i64 72, !13, i64 136, !13, i64 200}
!18 = !{!"int", !7, i64 0}
!19 = !{!14, !14, i64 0}
!20 = !{!13, !14, i64 0}
!21 = !{!12, !14, i64 136}
!22 = !{!16, !16, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!12, !10, i64 858}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!12, !10, i64 861}
!31 = !{!12, !16, i64 752}
!32 = !{!12, !10, i64 862}
!33 = distinct !{!33, !25}
!34 = distinct !{!34, !25}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.82 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [46 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_impl16lincgsolvesparseEPNS_10lincgstateEPNS_12sparsematrixEbPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = getelementptr inbounds i8, ptr %0, i64 128
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %.fr = freeze i64 %7
  %8 = load i64, ptr %3, align 8, !tbaa !17
  %9 = icmp sge i64 %8, %.fr
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.82, ptr noundef %4)
  %10 = load i64, ptr %6, align 8, !tbaa !5
  %11 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %10, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.83, ptr noundef %4)
  %12 = getelementptr inbounds i8, ptr %0, i64 896
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %.fr, ptr noundef %4)
  %13 = getelementptr inbounds i8, ptr %0, i64 136
  %14 = load i64, ptr %13, align 8, !tbaa !18
  %15 = icmp eq i64 %14, 0
  %.not.not6472 = icmp sgt i64 %.fr, 0
  br i1 %15, label %.preheader66, label %.preheader68

.preheader68:                                     ; preds = %5
  br i1 %.not.not6472, label %.lr.ph, label %.loopexit67

.lr.ph:                                           ; preds = %.preheader68
  %16 = getelementptr inbounds i8, ptr %0, i64 952
  %xtraiter = and i64 %.fr, 3
  %17 = icmp ult i64 %.fr, 4
  br i1 %17, label %.loopexit67.loopexit90.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %.fr, 9223372036854775804
  br label %29

.preheader66:                                     ; preds = %5
  br i1 %.not.not6472, label %.lr.ph74, label %.loopexit67

.lr.ph74:                                         ; preds = %.preheader66
  %18 = getelementptr inbounds i8, ptr %0, i64 952
  br label %19

19:                                               ; preds = %.lr.ph74, %25
  %.073 = phi i64 [ 0, %.lr.ph74 ], [ %28, %25 ]
  %20 = tail call noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef %1, i64 noundef %.073, ptr noundef %4)
  %21 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %20, double noundef 0.000000e+00)
  br i1 %21, label %22, label %25

22:                                               ; preds = %19
  %23 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %20, ptr noundef %4)
  %24 = fdiv double 1.000000e+00, %23
  br label %25

25:                                               ; preds = %19, %22
  %.sink = phi double [ %24, %22 ], [ 1.000000e+00, %19 ]
  %26 = load ptr, ptr %18, align 8, !tbaa !19
  %27 = getelementptr inbounds double, ptr %26, i64 %.073
  store double %.sink, ptr %27, align 8, !tbaa !20
  %28 = add nuw nsw i64 %.073, 1
  %exitcond81.not = icmp eq i64 %28, %.fr
  br i1 %exitcond81.not, label %.loopexit67, label %19, !llvm.loop !21

29:                                               ; preds = %29, %.lr.ph.new
  %.171 = phi i64 [ 0, %.lr.ph.new ], [ %41, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %29 ]
  %30 = load ptr, ptr %16, align 8, !tbaa !19
  %31 = getelementptr inbounds double, ptr %30, i64 %.171
  store double 1.000000e+00, ptr %31, align 8, !tbaa !20
  %32 = or disjoint i64 %.171, 1
  %33 = load ptr, ptr %16, align 8, !tbaa !19
  %34 = getelementptr inbounds double, ptr %33, i64 %32
  store double 1.000000e+00, ptr %34, align 8, !tbaa !20
  %35 = or disjoint i64 %.171, 2
  %36 = load ptr, ptr %16, align 8, !tbaa !19
  %37 = getelementptr inbounds double, ptr %36, i64 %35
  store double 1.000000e+00, ptr %37, align 8, !tbaa !20
  %38 = or disjoint i64 %.171, 3
  %39 = load ptr, ptr %16, align 8, !tbaa !19
  %40 = getelementptr inbounds double, ptr %39, i64 %38
  store double 1.000000e+00, ptr %40, align 8, !tbaa !20
  %41 = add nuw nsw i64 %.171, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit67.loopexit90.unr-lcssa, label %29, !llvm.loop !23

.loopexit67.loopexit90.unr-lcssa:                 ; preds = %29, %.lr.ph
  %.171.unr = phi i64 [ 0, %.lr.ph ], [ %41, %29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit67, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit67.loopexit90.unr-lcssa, %.epil.preheader
  %.171.epil = phi i64 [ %44, %.epil.preheader ], [ %.171.unr, %.loopexit67.loopexit90.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit67.loopexit90.unr-lcssa ]
  %42 = load ptr, ptr %16, align 8, !tbaa !19
  %43 = getelementptr inbounds double, ptr %42, i64 %.171.epil
  store double 1.000000e+00, ptr %43, align 8, !tbaa !20
  %44 = add nuw nsw i64 %.171.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit67, label %.epil.preheader, !llvm.loop !24

.loopexit67:                                      ; preds = %.loopexit67.loopexit90.unr-lcssa, %.epil.preheader, %25, %.preheader68, %.preheader66
  tail call void @_ZN11alglib_impl12lincgrestartEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  tail call void @_ZN11alglib_impl9lincgsetbEPNS_10lincgstateEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef %4)
  %45 = tail call noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  br i1 %45, label %.lr.ph78, label %._crit_edge

.lr.ph78:                                         ; preds = %.loopexit67
  %46 = getelementptr inbounds i8, ptr %0, i64 858
  %47 = getelementptr inbounds i8, ptr %0, i64 560
  %48 = getelementptr inbounds i8, ptr %0, i64 624
  %49 = getelementptr inbounds i8, ptr %0, i64 861
  %50 = getelementptr inbounds i8, ptr %0, i64 616
  %51 = getelementptr inbounds i8, ptr %0, i64 680
  %52 = getelementptr inbounds i8, ptr %0, i64 752
  %53 = getelementptr inbounds i8, ptr %0, i64 862
  %.not.not6575 = icmp sgt i64 %.fr, 0
  %54 = getelementptr inbounds i8, ptr %0, i64 952
  %55 = getelementptr inbounds i8, ptr %0, i64 744
  br i1 %.not.not6575, label %.lr.ph78.split.us, label %.lr.ph78.split

.lr.ph78.split.us:                                ; preds = %.lr.ph78, %..loopexit_crit_edge.us
  %56 = load i8, ptr %46, align 2, !tbaa !26, !range !27, !noundef !28
  %57 = trunc nuw i8 %56 to i1
  br i1 %57, label %58, label %59

58:                                               ; preds = %.lr.ph78.split.us
  tail call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef %4)
  br label %59

59:                                               ; preds = %58, %.lr.ph78.split.us
  %60 = load i8, ptr %49, align 1, !tbaa !29, !range !27, !noundef !28
  %61 = trunc nuw i8 %60 to i1
  br i1 %61, label %62, label %69

62:                                               ; preds = %59
  tail call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef %4)
  %63 = load ptr, ptr %50, align 8, !tbaa !19
  %64 = load ptr, ptr %51, align 8, !tbaa !19
  %65 = load i64, ptr %6, align 8, !tbaa !5
  %66 = add nsw i64 %65, -1
  %67 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %66)
  %68 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %63, i64 noundef 1, ptr noundef %64, i64 noundef 1, i64 noundef %67)
  store double %68, ptr %52, align 8, !tbaa !30
  br label %69

69:                                               ; preds = %62, %59
  %70 = load i8, ptr %53, align 2, !tbaa !31, !range !27, !noundef !28
  %71 = trunc nuw i8 %70 to i1
  br i1 %71, label %.preheader.us, label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %.preheader.us, %69
  %72 = tail call noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  br i1 %72, label %.lr.ph78.split.us, label %._crit_edge, !llvm.loop !32

.preheader.us:                                    ; preds = %69, %.preheader.us
  %.276.us = phi i64 [ %83, %.preheader.us ], [ 0, %69 ]
  %73 = load ptr, ptr %50, align 8, !tbaa !19
  %74 = getelementptr inbounds double, ptr %73, i64 %.276.us
  %75 = load double, ptr %74, align 8, !tbaa !20
  %76 = load ptr, ptr %54, align 8, !tbaa !19
  %77 = getelementptr inbounds double, ptr %76, i64 %.276.us
  %78 = load double, ptr %77, align 8, !tbaa !20
  %79 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %78, ptr noundef %4)
  %80 = fmul double %75, %79
  %81 = load ptr, ptr %55, align 8, !tbaa !19
  %82 = getelementptr inbounds double, ptr %81, i64 %.276.us
  store double %80, ptr %82, align 8, !tbaa !20
  %83 = add nuw nsw i64 %.276.us, 1
  %exitcond82.not = icmp eq i64 %83, %.fr
  br i1 %exitcond82.not, label %..loopexit_crit_edge.us, label %.preheader.us, !llvm.loop !33

.lr.ph78.split:                                   ; preds = %.lr.ph78, %.preheader
  %84 = load i8, ptr %46, align 2, !tbaa !26, !range !27, !noundef !28
  %85 = trunc nuw i8 %84 to i1
  br i1 %85, label %86, label %87

86:                                               ; preds = %.lr.ph78.split
  tail call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef %4)
  br label %87

87:                                               ; preds = %86, %.lr.ph78.split
  %88 = load i8, ptr %49, align 1, !tbaa !29, !range !27, !noundef !28
  %89 = trunc nuw i8 %88 to i1
  br i1 %89, label %90, label %.preheader

90:                                               ; preds = %87
  tail call void @_ZN11alglib_impl9sparsesmvEPNS_12sparsematrixEbPNS_9ae_vectorES3_PNS_8ae_stateE(ptr noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef %4)
  %91 = load ptr, ptr %50, align 8, !tbaa !19
  %92 = load ptr, ptr %51, align 8, !tbaa !19
  %93 = load i64, ptr %6, align 8, !tbaa !5
  %94 = add nsw i64 %93, -1
  %95 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %94)
  %96 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %91, i64 noundef 1, ptr noundef %92, i64 noundef 1, i64 noundef %95)
  store double %96, ptr %52, align 8, !tbaa !30
  br label %.preheader

.preheader:                                       ; preds = %90, %87
  %97 = tail call noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  br i1 %97, label %.lr.ph78.split, label %._crit_edge, !llvm.loop !32

._crit_edge:                                      ; preds = %.preheader, %..loopexit_crit_edge.us, %.loopexit67
  ret void
}

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

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

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

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl9lincgsetbEPNS_10lincgstateEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl14lincgiterationEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl17sparsegetdiagonalEPNS_12sparsematrixElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl12lincgrestartEPNS_10lincgstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 128}
!6 = !{!"_ZTSN11alglib_impl10lincgstateE", !7, i64 0, !7, i64 64, !8, i64 128, !8, i64 136, !7, i64 144, !7, i64 208, !7, i64 272, !7, i64 336, !7, i64 400, !7, i64 464, !14, i64 528, !14, i64 536, !14, i64 544, !14, i64 552, !7, i64 560, !7, i64 624, !7, i64 688, !14, i64 752, !7, i64 760, !14, i64 824, !8, i64 832, !8, i64 840, !8, i64 848, !11, i64 856, !11, i64 857, !11, i64 858, !11, i64 859, !11, i64 860, !11, i64 861, !11, i64 862, !8, i64 864, !8, i64 872, !8, i64 880, !11, i64 888, !7, i64 896, !15, i64 960}
!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 = !{!"double", !9, i64 0}
!15 = !{!"_ZTSN11alglib_impl10rcommstateE", !16, i64 0, !7, i64 8, !7, i64 72, !7, i64 136, !7, i64 200}
!16 = !{!"int", !9, i64 0}
!17 = !{!7, !8, i64 0}
!18 = !{!6, !8, i64 136}
!19 = !{!9, !9, i64 0}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = !{!6, !11, i64 858}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!6, !11, i64 861}
!30 = !{!6, !14, i64 752}
!31 = !{!6, !11, i64 862}
!32 = distinct !{!32, !22}
!33 = distinct !{!33, !22}


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