; 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.188 = external hidden unnamed_addr constant [49 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 noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl19sasactivelcpenalty1EPNS_10sactivesetEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %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 double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = 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) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %16, i32 0, i32 1
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = icmp eq i64 %18, 1
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.188, ptr noundef %20)
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sasrebuildbasisEPNS_10sactivesetEPNS_8ae_stateE(ptr noundef %21, ptr noundef %22)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %23, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !18
  store i64 %25, ptr %9, align 8, !tbaa !19
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %26, i32 0, i32 22
  %28 = load i64, ptr %27, align 8, !tbaa !20
  store i64 %28, ptr %10, align 8, !tbaa !19
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %29, i32 0, i32 23
  %31 = load i64, ptr %30, align 8, !tbaa !21
  store i64 %31, ptr %11, align 8, !tbaa !19
  store double 0.000000e+00, ptr %15, align 8, !tbaa !22
  store i64 0, ptr %7, align 8, !tbaa !19
  br label %32

32:                                               ; preds = %119, %3
  %33 = load i64, ptr %7, align 8, !tbaa !19
  %34 = load i64, ptr %10, align 8, !tbaa !19
  %35 = load i64, ptr %11, align 8, !tbaa !19
  %36 = add nsw i64 %34, %35
  %37 = sub nsw i64 %36, 1
  %38 = icmp sle i64 %33, %37
  br i1 %38, label %39, label %122

39:                                               ; preds = %32
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %40, i32 0, i32 6
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %44 = load i64, ptr %9, align 8, !tbaa !19
  %45 = load i64, ptr %7, align 8, !tbaa !19
  %46 = add nsw i64 %44, %45
  %47 = getelementptr inbounds i64, ptr %43, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !19
  %49 = icmp sgt i64 %48, 0
  br i1 %49, label %50, label %118

50:                                               ; preds = %39
  store double 0.000000e+00, ptr %13, align 8, !tbaa !22
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %51, i32 0, i32 21
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %52, i32 0, i32 6
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = load i64, ptr %7, align 8, !tbaa !19
  %56 = getelementptr inbounds ptr, ptr %54, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load i64, ptr %9, align 8, !tbaa !19
  %59 = getelementptr inbounds double, ptr %57, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !22
  %61 = fneg double %60
  store double %61, ptr %14, align 8, !tbaa !22
  store i64 0, ptr %8, align 8, !tbaa !19
  br label %62

62:                                               ; preds = %100, %50
  %63 = load i64, ptr %8, align 8, !tbaa !19
  %64 = load i64, ptr %9, align 8, !tbaa !19
  %65 = sub nsw i64 %64, 1
  %66 = icmp sle i64 %63, %65
  br i1 %66, label %67, label %103

67:                                               ; preds = %62
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %68, i32 0, i32 21
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %69, i32 0, i32 6
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = load i64, ptr %7, align 8, !tbaa !19
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = load i64, ptr %8, align 8, !tbaa !19
  %76 = getelementptr inbounds double, ptr %74, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !22
  store double %77, ptr %12, align 8, !tbaa !22
  %78 = load double, ptr %14, align 8, !tbaa !22
  %79 = load double, ptr %12, align 8, !tbaa !22
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = load i64, ptr %8, align 8, !tbaa !19
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !22
  %86 = call double @llvm.fmuladd.f64(double %79, double %85, double %78)
  store double %86, ptr %14, align 8, !tbaa !22
  %87 = load double, ptr %13, align 8, !tbaa !22
  %88 = load double, ptr %12, align 8, !tbaa !22
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %89, i32 0, i32 4
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !23
  %93 = load i64, ptr %8, align 8, !tbaa !19
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !22
  %96 = fmul double %88, %95
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %96, ptr noundef %97)
  %99 = fadd double %87, %98
  store double %99, ptr %13, align 8, !tbaa !22
  br label %100

100:                                              ; preds = %67
  %101 = load i64, ptr %8, align 8, !tbaa !19
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %8, align 8, !tbaa !19
  br label %62, !llvm.loop !24

103:                                              ; preds = %62
  %104 = load double, ptr %13, align 8, !tbaa !22
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %104, ptr noundef %105)
  store double %106, ptr %13, align 8, !tbaa !22
  %107 = load double, ptr %13, align 8, !tbaa !22
  %108 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %107, double noundef 0.000000e+00)
  br i1 %108, label %109, label %117

109:                                              ; preds = %103
  %110 = load double, ptr %15, align 8, !tbaa !22
  %111 = load double, ptr %14, align 8, !tbaa !22
  %112 = load double, ptr %13, align 8, !tbaa !22
  %113 = fdiv double %111, %112
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %113, ptr noundef %114)
  %116 = fadd double %110, %115
  store double %116, ptr %15, align 8, !tbaa !22
  br label %117

117:                                              ; preds = %109, %103
  br label %118

118:                                              ; preds = %117, %39
  br label %119

119:                                              ; preds = %118
  %120 = load i64, ptr %7, align 8, !tbaa !19
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %7, align 8, !tbaa !19
  br label %32, !llvm.loop !26

122:                                              ; preds = %32
  %123 = load double, ptr %15, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret double %123
}

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 960}
!21 = !{!10, !11, i64 968}
!22 = !{!17, !17, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !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.188 = external hidden unnamed_addr constant [49 x i8], align 1

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr 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 #2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl19sasactivelcpenalty1EPNS_10sactivesetEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #2 {
  %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.188, ptr noundef %2)
  tail call void @_ZN11alglib_impl15sasrebuildbasisEPNS_10sactivesetEPNS_8ae_stateE(ptr noundef %0, ptr noundef %2)
  %7 = load i64, ptr %0, align 8, !tbaa !17
  %.fr = freeze i64 %7
  %8 = getelementptr inbounds i8, ptr %0, i64 960
  %9 = load i64, ptr %8, align 8, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %0, i64 968
  %11 = load i64, ptr %10, align 8, !tbaa !19
  %12 = add nsw i64 %11, %9
  %.not.not49 = icmp sgt i64 %12, 0
  br i1 %.not.not49, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %3
  %13 = getelementptr inbounds i8, ptr %0, i64 272
  %14 = getelementptr inbounds i8, ptr %0, i64 952
  %.not.not4344 = icmp sgt i64 %.fr, 0
  %15 = getelementptr inbounds i8, ptr %1, i64 56
  %16 = getelementptr inbounds i8, ptr %0, i64 144
  br i1 %.not.not4344, label %.lr.ph54.split.us, label %.lr.ph54.split

.lr.ph54.split.us:                                ; preds = %.lr.ph54, %32
  %.052.us = phi double [ %.1.us, %32 ], [ 0.000000e+00, %.lr.ph54 ]
  %.04150.us = phi i64 [ %33, %32 ], [ 0, %.lr.ph54 ]
  %17 = load ptr, ptr %13, align 8, !tbaa !20
  %18 = getelementptr i64, ptr %17, i64 %.fr
  %19 = getelementptr i64, ptr %18, i64 %.04150.us
  %20 = load i64, ptr %19, align 8, !tbaa !21
  %21 = icmp sgt i64 %20, 0
  br i1 %21, label %.lr.ph.us, label %32

.lr.ph.us:                                        ; preds = %.lr.ph54.split.us
  %22 = load ptr, ptr %14, align 8, !tbaa !20
  %23 = getelementptr inbounds ptr, ptr %22, i64 %.04150.us
  %24 = load ptr, ptr %23, align 8, !tbaa !22
  %25 = getelementptr inbounds double, ptr %24, i64 %.fr
  %26 = load double, ptr %25, align 8, !tbaa !23
  %27 = fneg double %26
  br label %34

28:                                               ; preds = %._crit_edge.us
  %29 = fdiv double %43, %51
  %30 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %29, ptr noundef %2)
  %31 = fadd double %.052.us, %30
  br label %32

32:                                               ; preds = %28, %._crit_edge.us, %.lr.ph54.split.us
  %.1.us = phi double [ %31, %28 ], [ %.052.us, %._crit_edge.us ], [ %.052.us, %.lr.ph54.split.us ]
  %33 = add nuw nsw i64 %.04150.us, 1
  %exitcond60.not = icmp eq i64 %33, %12
  br i1 %exitcond60.not, label %._crit_edge55, label %.lr.ph54.split.us, !llvm.loop !24

34:                                               ; preds = %.lr.ph.us, %34
  %.03947.us = phi double [ %27, %.lr.ph.us ], [ %43, %34 ]
  %.04046.us = phi double [ 0.000000e+00, %.lr.ph.us ], [ %49, %34 ]
  %.04245.us = phi i64 [ 0, %.lr.ph.us ], [ %50, %34 ]
  %35 = load ptr, ptr %14, align 8, !tbaa !20
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.04150.us
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = getelementptr inbounds double, ptr %37, i64 %.04245.us
  %39 = load double, ptr %38, align 8, !tbaa !23
  %40 = load ptr, ptr %15, align 8, !tbaa !20
  %41 = getelementptr inbounds double, ptr %40, i64 %.04245.us
  %42 = load double, ptr %41, align 8, !tbaa !23
  %43 = tail call double @llvm.fmuladd.f64(double %39, double %42, double %.03947.us)
  %44 = load ptr, ptr %16, align 8, !tbaa !20
  %45 = getelementptr inbounds double, ptr %44, i64 %.04245.us
  %46 = load double, ptr %45, align 8, !tbaa !23
  %47 = fmul double %39, %46
  %48 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %47, ptr noundef %2)
  %49 = fadd double %.04046.us, %48
  %50 = add nuw nsw i64 %.04245.us, 1
  %exitcond59.not = icmp eq i64 %50, %.fr
  br i1 %exitcond59.not, label %._crit_edge.us, label %34, !llvm.loop !26

._crit_edge.us:                                   ; preds = %34
  %51 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %49, ptr noundef %2)
  %52 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %51, double noundef 0.000000e+00)
  br i1 %52, label %28, label %32

.lr.ph54.split:                                   ; preds = %.lr.ph54, %71
  %.052 = phi double [ %.1, %71 ], [ 0.000000e+00, %.lr.ph54 ]
  %.04150 = phi i64 [ %72, %71 ], [ 0, %.lr.ph54 ]
  %53 = load ptr, ptr %13, align 8, !tbaa !20
  %54 = getelementptr i64, ptr %53, i64 %.fr
  %55 = getelementptr i64, ptr %54, i64 %.04150
  %56 = load i64, ptr %55, align 8, !tbaa !21
  %57 = icmp sgt i64 %56, 0
  br i1 %57, label %58, label %71

58:                                               ; preds = %.lr.ph54.split
  %59 = load ptr, ptr %14, align 8, !tbaa !20
  %60 = getelementptr inbounds ptr, ptr %59, i64 %.04150
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds double, ptr %61, i64 %.fr
  %63 = load double, ptr %62, align 8, !tbaa !23
  %64 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 0.000000e+00, ptr noundef %2)
  %65 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %64, double noundef 0.000000e+00)
  br i1 %65, label %66, label %71

66:                                               ; preds = %58
  %67 = fneg double %63
  %68 = fdiv double %67, %64
  %69 = tail call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %68, ptr noundef %2)
  %70 = fadd double %.052, %69
  br label %71

71:                                               ; preds = %.lr.ph54.split, %66, %58
  %.1 = phi double [ %70, %66 ], [ %.052, %58 ], [ %.052, %.lr.ph54.split ]
  %72 = add nuw nsw i64 %.04150, 1
  %exitcond.not = icmp eq i64 %72, %12
  br i1 %exitcond.not, label %._crit_edge55, label %.lr.ph54.split, !llvm.loop !24

._crit_edge55:                                    ; preds = %71, %32, %3
  %.0.lcssa = phi double [ 0.000000e+00, %3 ], [ %.1.us, %32 ], [ %.1, %71 ]
  ret double %.0.lcssa
}

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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" }

!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 960}
!19 = !{!6, !7, i64 968}
!20 = !{!8, !8, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!13, !13, i64 0}
!23 = !{!16, !16, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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