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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::sactiveset" = type { i64, i64, %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i64, %"struct.alglib_impl::ae_vector", i64, i64, i8, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", 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", %"struct.alglib_impl::snnlssolver", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"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", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::snnlssolver" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"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", %"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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.182 = external hidden unnamed_addr constant [39 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

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 double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #1

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 void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl24sasscaledconstrainednormEPNS_10sactivesetEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  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
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %13, i32 0, i32 1
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = icmp eq i64 %15, 1
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef @.str.182, ptr noundef %17)
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %18, i32 0, i32 0
  %20 = load i64, ptr %19, align 8, !tbaa !18
  store i64 %20, ptr %9, align 8, !tbaa !19
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %21, i32 0, i32 31
  %23 = load i64, ptr %9, align 8, !tbaa !19
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %22, i64 noundef %23, ptr noundef %24)
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sasrebuildbasisEPNS_10sactivesetEPNS_8ae_stateE(ptr noundef %25, ptr noundef %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %27, i32 0, i32 13
  %29 = load i64, ptr %28, align 8, !tbaa !20
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %30, i32 0, i32 11
  %32 = load i64, ptr %31, align 8, !tbaa !21
  %33 = add nsw i64 %29, %32
  %34 = load i64, ptr %9, align 8, !tbaa !19
  %35 = icmp sge i64 %33, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %3
  store double 0.000000e+00, ptr %11, align 8, !tbaa !22
  %37 = load double, ptr %11, align 8, !tbaa !22
  store double %37, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %166

38:                                               ; preds = %3
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %39

39:                                               ; preds = %57, %38
  %40 = load i64, ptr %8, align 8, !tbaa !19
  %41 = load i64, ptr %9, align 8, !tbaa !19
  %42 = sub nsw i64 %41, 1
  %43 = icmp sle i64 %40, %42
  br i1 %43, label %44, label %60

44:                                               ; preds = %39
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  %48 = load i64, ptr %8, align 8, !tbaa !19
  %49 = getelementptr inbounds double, ptr %47, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !22
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %51, i32 0, i32 31
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %52, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = load i64, ptr %8, align 8, !tbaa !19
  %56 = getelementptr inbounds double, ptr %54, i64 %55
  store double %50, ptr %56, align 8, !tbaa !22
  br label %57

57:                                               ; preds = %44
  %58 = load i64, ptr %8, align 8, !tbaa !19
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %8, align 8, !tbaa !19
  br label %39, !llvm.loop !24

60:                                               ; preds = %39
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %61

61:                                               ; preds = %103, %60
  %62 = load i64, ptr %8, align 8, !tbaa !19
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %63, i32 0, i32 11
  %65 = load i64, ptr %64, align 8, !tbaa !21
  %66 = sub nsw i64 %65, 1
  %67 = icmp sle i64 %62, %66
  br i1 %67, label %68, label %106

68:                                               ; preds = %61
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %69, i32 0, i32 10
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  %73 = load i64, ptr %8, align 8, !tbaa !19
  %74 = getelementptr inbounds ptr, ptr %72, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 0
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %77, i32 0, i32 31
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !23
  %81 = getelementptr inbounds double, ptr %80, i64 0
  %82 = load i64, ptr %9, align 8, !tbaa !19
  %83 = sub nsw i64 %82, 1
  %84 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %83)
  %85 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %76, i64 noundef 1, ptr noundef %81, i64 noundef 1, i64 noundef %84)
  store double %85, ptr %10, align 8, !tbaa !22
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %86, i32 0, i32 31
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = getelementptr inbounds double, ptr %89, i64 0
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %91, i32 0, i32 10
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !23
  %95 = load i64, ptr %8, align 8, !tbaa !19
  %96 = getelementptr inbounds ptr, ptr %94, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 0
  %99 = load i64, ptr %9, align 8, !tbaa !19
  %100 = sub nsw i64 %99, 1
  %101 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %100)
  %102 = load double, ptr %10, align 8, !tbaa !22
  call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef %90, i64 noundef 1, ptr noundef %98, i64 noundef 1, i64 noundef %101, double noundef %102)
  br label %103

103:                                              ; preds = %68
  %104 = load i64, ptr %8, align 8, !tbaa !19
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %8, align 8, !tbaa !19
  br label %61, !llvm.loop !26

106:                                              ; preds = %61
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %107

107:                                              ; preds = %129, %106
  %108 = load i64, ptr %8, align 8, !tbaa !19
  %109 = load i64, ptr %9, align 8, !tbaa !19
  %110 = sub nsw i64 %109, 1
  %111 = icmp sle i64 %108, %110
  br i1 %111, label %112, label %132

112:                                              ; preds = %107
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %113, i32 0, i32 6
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = load i64, ptr %8, align 8, !tbaa !19
  %118 = getelementptr inbounds i64, ptr %116, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !19
  %120 = icmp sgt i64 %119, 0
  br i1 %120, label %121, label %128

121:                                              ; preds = %112
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %122, i32 0, i32 31
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !23
  %126 = load i64, ptr %8, align 8, !tbaa !19
  %127 = getelementptr inbounds double, ptr %125, i64 %126
  store double 0.000000e+00, ptr %127, align 8, !tbaa !22
  br label %128

128:                                              ; preds = %121, %112
  br label %129

129:                                              ; preds = %128
  %130 = load i64, ptr %8, align 8, !tbaa !19
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %8, align 8, !tbaa !19
  br label %107, !llvm.loop !27

132:                                              ; preds = %107
  store double 0.000000e+00, ptr %10, align 8, !tbaa !22
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %133

133:                                              ; preds = %158, %132
  %134 = load i64, ptr %8, align 8, !tbaa !19
  %135 = load i64, ptr %9, align 8, !tbaa !19
  %136 = sub nsw i64 %135, 1
  %137 = icmp sle i64 %134, %136
  br i1 %137, label %138, label %161

138:                                              ; preds = %133
  %139 = load double, ptr %10, align 8, !tbaa !22
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %140, i32 0, i32 4
  %142 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %141, i32 0, i32 4
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %144 = load i64, ptr %8, align 8, !tbaa !19
  %145 = getelementptr inbounds double, ptr %143, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !22
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %147, i32 0, i32 31
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %148, i32 0, i32 4
  %150 = load ptr, ptr %149, align 8, !tbaa !23
  %151 = load i64, ptr %8, align 8, !tbaa !19
  %152 = getelementptr inbounds double, ptr %150, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !22
  %154 = fmul double %146, %153
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %154, ptr noundef %155)
  %157 = fadd double %139, %156
  store double %157, ptr %10, align 8, !tbaa !22
  br label %158

158:                                              ; preds = %138
  %159 = load i64, ptr %8, align 8, !tbaa !19
  %160 = add nsw i64 %159, 1
  store i64 %160, ptr %8, align 8, !tbaa !19
  br label %133, !llvm.loop !28

161:                                              ; preds = %133
  %162 = load double, ptr %10, align 8, !tbaa !22
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %162, ptr noundef %163)
  store double %164, ptr %11, align 8, !tbaa !22
  %165 = load double, ptr %11, align 8, !tbaa !22
  store double %165, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %166

166:                                              ; preds = %161, %36
  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
  %167 = load double, ptr %4, align 8
  ret double %167
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN11alglib_impl10sactivesetE", !11, i64 0, !11, i64 8, !12, i64 16, !13, i64 80, !12, i64 88, !12, i64 152, !12, i64 216, !13, i64 280, !15, i64 288, !15, i64 368, !15, i64 448, !11, i64 528, !12, i64 536, !11, i64 600, !11, i64 608, !13, i64 616, !13, i64 617, !12, i64 624, !12, i64 688, !12, i64 752, !12, i64 816, !15, i64 880, !11, i64 960, !11, i64 968, !12, i64 976, !12, i64 1040, !12, i64 1104, !12, i64 1168, !12, i64 1232, !12, i64 1296, !16, i64 1360, !12, i64 3000, !12, i64 3064, !12, i64 3128, !15, i64 3192, !12, i64 3272, !12, i64 3336, !12, i64 3400, !15, i64 3464, !15, i64 3544, !12, i64 3624, !12, i64 3688, !12, i64 3752, !15, i64 3816, !12, i64 3896, !12, i64 3960, !12, i64 4024, !12, i64 4088, !12, i64 4152, !12, i64 4216, !12, i64 4280}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!16 = !{!"_ZTSN11alglib_impl11snnlssolverE", !11, i64 0, !11, i64 8, !11, i64 16, !15, i64 24, !12, i64 104, !12, i64 168, !17, i64 232, !11, i64 240, !12, i64 248, !12, i64 312, !15, i64 376, !15, i64 456, !15, i64 536, !12, i64 616, !12, i64 680, !12, i64 744, !12, i64 808, !12, i64 872, !12, i64 936, !12, i64 1000, !12, i64 1064, !12, i64 1128, !12, i64 1192, !12, i64 1256, !12, i64 1320, !12, i64 1384, !12, i64 1448, !12, i64 1512, !12, i64 1576}
!17 = !{!"double", !7, i64 0}
!18 = !{!10, !11, i64 0}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !11, i64 600}
!21 = !{!10, !11, i64 528}
!22 = !{!17, !17, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !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.182 = external hidden unnamed_addr constant [39 x i8], align 1

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr 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 double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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 void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl24sasscaledconstrainednormEPNS_10sactivesetEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i64 %5, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %6, ptr noundef nonnull @.str.182, ptr noundef %2)
  %7 = load i64, ptr %0, align 8, !tbaa !17
  %8 = getelementptr inbounds i8, ptr %0, i64 3000
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %7, ptr noundef %2)
  tail call void @_ZN11alglib_impl15sasrebuildbasisEPNS_10sactivesetEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %2)
  %9 = getelementptr inbounds i8, ptr %0, i64 600
  %10 = load i64, ptr %9, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %0, i64 528
  %12 = load i64, ptr %11, align 8, !tbaa !19
  %13 = add nsw i64 %12, %10
  %.not = icmp slt i64 %13, %7
  br i1 %.not, label %.preheader60, label %108

.preheader60:                                     ; preds = %3
  %.not54.not61 = icmp sgt i64 %7, 0
  br i1 %.not54.not61, label %.lr.ph, label %.preheader59

.lr.ph:                                           ; preds = %.preheader60
  %14 = getelementptr inbounds i8, ptr %1, i64 56
  %15 = getelementptr inbounds i8, ptr %0, i64 3056
  %xtraiter = and i64 %7, 3
  %16 = icmp ult i64 %7, 4
  br i1 %16, label %.preheader59.loopexit.unr-lcssa, label %.lr.ph.new

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

.preheader59.loopexit.unr-lcssa:                  ; preds = %26, %.lr.ph
  %.05162.unr = phi i64 [ 0, %.lr.ph ], [ %50, %26 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader59, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader59.loopexit.unr-lcssa, %.epil.preheader
  %.05162.epil = phi i64 [ %22, %.epil.preheader ], [ %.05162.unr, %.preheader59.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader59.loopexit.unr-lcssa ]
  %17 = load ptr, ptr %14, align 8, !tbaa !20
  %18 = getelementptr inbounds double, ptr %17, i64 %.05162.epil
  %19 = load double, ptr %18, align 8, !tbaa !21
  %20 = load ptr, ptr %15, align 8, !tbaa !20
  %21 = getelementptr inbounds double, ptr %20, i64 %.05162.epil
  store double %19, ptr %21, align 8, !tbaa !21
  %22 = add nuw nsw i64 %.05162.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 %.preheader59, label %.epil.preheader, !llvm.loop !22

.preheader59:                                     ; preds = %.preheader59.loopexit.unr-lcssa, %.epil.preheader, %.preheader60
  %23 = add nsw i64 %7, -1
  %.not55.not63 = icmp sgt i64 %12, 0
  br i1 %.not55.not63, label %.lr.ph65, label %.preheader58

.lr.ph65:                                         ; preds = %.preheader59
  %24 = getelementptr inbounds i8, ptr %0, i64 520
  %25 = getelementptr inbounds i8, ptr %0, i64 3056
  br label %54

26:                                               ; preds = %26, %.lr.ph.new
  %.05162 = phi i64 [ 0, %.lr.ph.new ], [ %50, %26 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %26 ]
  %27 = load ptr, ptr %14, align 8, !tbaa !20
  %28 = getelementptr inbounds double, ptr %27, i64 %.05162
  %29 = load double, ptr %28, align 8, !tbaa !21
  %30 = load ptr, ptr %15, align 8, !tbaa !20
  %31 = getelementptr inbounds double, ptr %30, i64 %.05162
  store double %29, ptr %31, align 8, !tbaa !21
  %32 = or disjoint i64 %.05162, 1
  %33 = load ptr, ptr %14, align 8, !tbaa !20
  %34 = getelementptr inbounds double, ptr %33, i64 %32
  %35 = load double, ptr %34, align 8, !tbaa !21
  %36 = load ptr, ptr %15, align 8, !tbaa !20
  %37 = getelementptr inbounds double, ptr %36, i64 %32
  store double %35, ptr %37, align 8, !tbaa !21
  %38 = or disjoint i64 %.05162, 2
  %39 = load ptr, ptr %14, align 8, !tbaa !20
  %40 = getelementptr inbounds double, ptr %39, i64 %38
  %41 = load double, ptr %40, align 8, !tbaa !21
  %42 = load ptr, ptr %15, align 8, !tbaa !20
  %43 = getelementptr inbounds double, ptr %42, i64 %38
  store double %41, ptr %43, align 8, !tbaa !21
  %44 = or disjoint i64 %.05162, 3
  %45 = load ptr, ptr %14, align 8, !tbaa !20
  %46 = getelementptr inbounds double, ptr %45, i64 %44
  %47 = load double, ptr %46, align 8, !tbaa !21
  %48 = load ptr, ptr %15, align 8, !tbaa !20
  %49 = getelementptr inbounds double, ptr %48, i64 %44
  store double %47, ptr %49, align 8, !tbaa !21
  %50 = add nuw nsw i64 %.05162, 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 %.preheader59.loopexit.unr-lcssa, label %26, !llvm.loop !24

.preheader58:                                     ; preds = %54, %.preheader59
  br i1 %.not54.not61, label %.lr.ph68, label %._crit_edge

.lr.ph68:                                         ; preds = %.preheader58
  %51 = getelementptr inbounds i8, ptr %0, i64 272
  %52 = getelementptr inbounds i8, ptr %0, i64 3056
  %xtraiter76 = and i64 %7, 1
  %53 = icmp eq i64 %7, 1
  br i1 %53, label %.preheader.unr-lcssa, label %.lr.ph68.new

.lr.ph68.new:                                     ; preds = %.lr.ph68
  %unroll_iter79 = and i64 %7, 9223372036854775806
  br label %77

54:                                               ; preds = %.lr.ph65, %54
  %.164 = phi i64 [ 0, %.lr.ph65 ], [ %66, %54 ]
  %55 = load ptr, ptr %24, align 8, !tbaa !20
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.164
  %57 = load ptr, ptr %56, align 8, !tbaa !26
  %58 = load ptr, ptr %25, align 8, !tbaa !20
  %59 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %23)
  %60 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %57, i64 noundef 1, ptr noundef %58, i64 noundef 1, i64 noundef %59)
  %61 = load ptr, ptr %25, align 8, !tbaa !20
  %62 = load ptr, ptr %24, align 8, !tbaa !20
  %63 = getelementptr inbounds ptr, ptr %62, i64 %.164
  %64 = load ptr, ptr %63, align 8, !tbaa !26
  %65 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %23)
  tail call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef %61, i64 noundef 1, ptr noundef %64, i64 noundef 1, i64 noundef %65, double noundef %60)
  %66 = add nuw nsw i64 %.164, 1
  %67 = load i64, ptr %11, align 8, !tbaa !19
  %.not55.not = icmp slt i64 %66, %67
  br i1 %.not55.not, label %54, label %.preheader58, !llvm.loop !27

.preheader.unr-lcssa:                             ; preds = %94, %.lr.ph68
  %.267.unr = phi i64 [ 0, %.lr.ph68 ], [ %95, %94 ]
  %lcmp.mod78.not = icmp eq i64 %xtraiter76, 0
  br i1 %lcmp.mod78.not, label %.preheader, label %.epil.preheader75

.epil.preheader75:                                ; preds = %.preheader.unr-lcssa
  %68 = load ptr, ptr %51, align 8, !tbaa !20
  %69 = getelementptr inbounds i64, ptr %68, i64 %.267.unr
  %70 = load i64, ptr %69, align 8, !tbaa !28
  %71 = icmp sgt i64 %70, 0
  br i1 %71, label %72, label %.preheader

72:                                               ; preds = %.epil.preheader75
  %73 = load ptr, ptr %52, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %73, i64 %.267.unr
  store double 0.000000e+00, ptr %74, align 8, !tbaa !21
  br label %.preheader

.preheader:                                       ; preds = %.epil.preheader75, %72, %.preheader.unr-lcssa
  br i1 %.not54.not61, label %.lr.ph72, label %._crit_edge

.lr.ph72:                                         ; preds = %.preheader
  %75 = getelementptr inbounds i8, ptr %0, i64 144
  %76 = getelementptr inbounds i8, ptr %0, i64 3056
  br label %96

77:                                               ; preds = %94, %.lr.ph68.new
  %.267 = phi i64 [ 0, %.lr.ph68.new ], [ %95, %94 ]
  %niter80 = phi i64 [ 0, %.lr.ph68.new ], [ %niter80.next.1, %94 ]
  %78 = load ptr, ptr %51, align 8, !tbaa !20
  %79 = getelementptr inbounds i64, ptr %78, i64 %.267
  %80 = load i64, ptr %79, align 8, !tbaa !28
  %81 = icmp sgt i64 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %77
  %83 = load ptr, ptr %52, align 8, !tbaa !20
  %84 = getelementptr inbounds double, ptr %83, i64 %.267
  store double 0.000000e+00, ptr %84, align 8, !tbaa !21
  br label %85

85:                                               ; preds = %77, %82
  %86 = or disjoint i64 %.267, 1
  %87 = load ptr, ptr %51, align 8, !tbaa !20
  %88 = getelementptr inbounds i64, ptr %87, i64 %86
  %89 = load i64, ptr %88, align 8, !tbaa !28
  %90 = icmp sgt i64 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %85
  %92 = load ptr, ptr %52, align 8, !tbaa !20
  %93 = getelementptr inbounds double, ptr %92, i64 %86
  store double 0.000000e+00, ptr %93, align 8, !tbaa !21
  br label %94

94:                                               ; preds = %91, %85
  %95 = add nuw nsw i64 %.267, 2
  %niter80.next.1 = add i64 %niter80, 2
  %niter80.ncmp.1 = icmp eq i64 %niter80.next.1, %unroll_iter79
  br i1 %niter80.ncmp.1, label %.preheader.unr-lcssa, label %77, !llvm.loop !29

96:                                               ; preds = %.lr.ph72, %96
  %.071 = phi double [ 0.000000e+00, %.lr.ph72 ], [ %105, %96 ]
  %.370 = phi i64 [ 0, %.lr.ph72 ], [ %106, %96 ]
  %97 = load ptr, ptr %75, align 8, !tbaa !20
  %98 = getelementptr inbounds double, ptr %97, i64 %.370
  %99 = load double, ptr %98, align 8, !tbaa !21
  %100 = load ptr, ptr %76, align 8, !tbaa !20
  %101 = getelementptr inbounds double, ptr %100, i64 %.370
  %102 = load double, ptr %101, align 8, !tbaa !21
  %103 = fmul double %99, %102
  %104 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %103, ptr noundef %2)
  %105 = fadd double %.071, %104
  %106 = add nuw nsw i64 %.370, 1
  %exitcond74.not = icmp eq i64 %106, %7
  br i1 %exitcond74.not, label %._crit_edge, label %96, !llvm.loop !30

._crit_edge:                                      ; preds = %96, %.preheader58, %.preheader
  %.0.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader58 ], [ %105, %96 ]
  %107 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %.0.lcssa, ptr noundef %2)
  br label %108

108:                                              ; preds = %3, %._crit_edge
  %.050 = phi double [ %107, %._crit_edge ], [ 0.000000e+00, %3 ]
  ret double %.050
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN11alglib_impl10sactivesetE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 80, !10, i64 88, !10, i64 152, !10, i64 216, !11, i64 280, !14, i64 288, !14, i64 368, !14, i64 448, !7, i64 528, !10, i64 536, !7, i64 600, !7, i64 608, !11, i64 616, !11, i64 617, !10, i64 624, !10, i64 688, !10, i64 752, !10, i64 816, !14, i64 880, !7, i64 960, !7, i64 968, !10, i64 976, !10, i64 1040, !10, i64 1104, !10, i64 1168, !10, i64 1232, !10, i64 1296, !15, i64 1360, !10, i64 3000, !10, i64 3064, !10, i64 3128, !14, i64 3192, !10, i64 3272, !10, i64 3336, !10, i64 3400, !14, i64 3464, !14, i64 3544, !10, i64 3624, !10, i64 3688, !10, i64 3752, !14, i64 3816, !10, i64 3896, !10, i64 3960, !10, i64 4024, !10, i64 4088, !10, i64 4152, !10, i64 4216, !10, i64 4280}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!15 = !{!"_ZTSN11alglib_impl11snnlssolverE", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24, !10, i64 104, !10, i64 168, !16, i64 232, !7, i64 240, !10, i64 248, !10, i64 312, !14, i64 376, !14, i64 456, !14, i64 536, !10, i64 616, !10, i64 680, !10, i64 744, !10, i64 808, !10, i64 872, !10, i64 936, !10, i64 1000, !10, i64 1064, !10, i64 1128, !10, i64 1192, !10, i64 1256, !10, i64 1320, !10, i64 1384, !10, i64 1448, !10, i64 1512, !10, i64 1576}
!16 = !{!"double", !8, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{!6, !7, i64 600}
!19 = !{!6, !7, i64 528}
!20 = !{!8, !8, i64 0}
!21 = !{!16, !16, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!13, !13, i64 0}
!27 = distinct !{!27, !25}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}


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