; LLVM IR from Dimandragon/non-parametric-dsp :: 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::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 }

; 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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25normalizedensebrlcinplaceEPNS_9ae_matrixEPNS_9ae_vectorES3_llS3_bPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i1 noundef zeroext %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  %21 = zext i1 %6 to i8
  store i8 %21, ptr %15, align 1, !tbaa !11
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %22 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %28

24:                                               ; preds = %8
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  %26 = load i64, ptr %13, align 8, !tbaa !9
  %27 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %25, i64 noundef %26, ptr noundef %27)
  br label %28

28:                                               ; preds = %24, %8
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %142, %28
  %30 = load i64, ptr %17, align 8, !tbaa !9
  %31 = load i64, ptr %13, align 8, !tbaa !9
  %32 = sub nsw i64 %31, 1
  %33 = icmp sle i64 %30, %32
  br i1 %33, label %34, label %145

34:                                               ; preds = %29
  store double 0.000000e+00, ptr %20, align 8, !tbaa !15
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %54, %34
  %36 = load i64, ptr %18, align 8, !tbaa !9
  %37 = load i64, ptr %12, align 8, !tbaa !9
  %38 = sub nsw i64 %37, 1
  %39 = icmp sle i64 %36, %38
  br i1 %39, label %40, label %57

40:                                               ; preds = %35
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %41, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = load i64, ptr %17, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %43, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = load i64, ptr %18, align 8, !tbaa !9
  %48 = getelementptr inbounds double, ptr %46, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !15
  store double %49, ptr %19, align 8, !tbaa !15
  %50 = load double, ptr %20, align 8, !tbaa !15
  %51 = load double, ptr %19, align 8, !tbaa !15
  %52 = load double, ptr %19, align 8, !tbaa !15
  %53 = call double @llvm.fmuladd.f64(double %51, double %52, double %50)
  store double %53, ptr %20, align 8, !tbaa !15
  br label %54

54:                                               ; preds = %40
  %55 = load i64, ptr %18, align 8, !tbaa !9
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %18, align 8, !tbaa !9
  br label %35, !llvm.loop !18

57:                                               ; preds = %35
  %58 = load double, ptr %20, align 8, !tbaa !15
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %58, ptr noundef %59)
  store double %60, ptr %20, align 8, !tbaa !15
  %61 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %70

63:                                               ; preds = %57
  %64 = load double, ptr %20, align 8, !tbaa !15
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %65, i32 0, i32 4
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = load i64, ptr %17, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  store double %64, ptr %69, align 8, !tbaa !15
  br label %70

70:                                               ; preds = %63, %57
  %71 = load double, ptr %20, align 8, !tbaa !15
  %72 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %71, double noundef 0.000000e+00)
  br i1 %72, label %73, label %141

73:                                               ; preds = %70
  %74 = load double, ptr %20, align 8, !tbaa !15
  %75 = fdiv double 1.000000e+00, %74
  store double %75, ptr %20, align 8, !tbaa !15
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %101, %73
  %77 = load i64, ptr %18, align 8, !tbaa !9
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = sub nsw i64 %78, 1
  %80 = icmp sle i64 %77, %79
  br i1 %80, label %81, label %104

81:                                               ; preds = %76
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %82, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !17
  %85 = load i64, ptr %17, align 8, !tbaa !9
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i64, ptr %18, align 8, !tbaa !9
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !15
  %91 = load double, ptr %20, align 8, !tbaa !15
  %92 = fmul double %90, %91
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %93, i32 0, i32 6
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = load i64, ptr %17, align 8, !tbaa !9
  %97 = getelementptr inbounds ptr, ptr %95, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i64, ptr %18, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  store double %92, ptr %100, align 8, !tbaa !15
  br label %101

101:                                              ; preds = %81
  %102 = load i64, ptr %18, align 8, !tbaa !9
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %18, align 8, !tbaa !9
  br label %76, !llvm.loop !20

104:                                              ; preds = %76
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = load i64, ptr %17, align 8, !tbaa !9
  %109 = getelementptr inbounds double, ptr %107, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !15
  %111 = load double, ptr %20, align 8, !tbaa !15
  %112 = fmul double %110, %111
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !17
  %116 = load i64, ptr %17, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %115, i64 %116
  store double %112, ptr %117, align 8, !tbaa !15
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !17
  %121 = load i64, ptr %17, align 8, !tbaa !9
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !15
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %123, ptr noundef %124)
  br i1 %125, label %126, label %140

126:                                              ; preds = %104
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %127, i32 0, i32 4
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = load i64, ptr %17, align 8, !tbaa !9
  %131 = getelementptr inbounds double, ptr %129, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !15
  %133 = load double, ptr %20, align 8, !tbaa !15
  %134 = fmul double %132, %133
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %135, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !17
  %138 = load i64, ptr %17, align 8, !tbaa !9
  %139 = getelementptr inbounds double, ptr %137, i64 %138
  store double %134, ptr %139, align 8, !tbaa !15
  br label %140

140:                                              ; preds = %126, %104
  br label %141

141:                                              ; preds = %140, %70
  br label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %17, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %17, align 8, !tbaa !9
  br label %29, !llvm.loop !21

145:                                              ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "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 = { 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


; 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"

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25normalizedensebrlcinplaceEPNS_9ae_matrixEPNS_9ae_vectorES3_llS3_bPNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, i1 noundef zeroext %6, ptr noundef %7) local_unnamed_addr #2 {
  br i1 %6, label %9, label %10

9:                                                ; preds = %8
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %4, ptr noundef %7)
  br label %10

10:                                               ; preds = %9, %8
  %.not.not59 = icmp sgt i64 %4, 0
  br i1 %.not.not59, label %.preheader.lr.ph, label %._crit_edge61

.preheader.lr.ph:                                 ; preds = %10
  %.not.not4951 = icmp sgt i64 %3, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  %12 = getelementptr inbounds i8, ptr %5, i64 56
  %13 = getelementptr inbounds i8, ptr %1, i64 56
  %14 = getelementptr inbounds i8, ptr %2, i64 56
  br i1 %.not.not4951, label %.lr.ph.us.preheader, label %.preheader.lr.ph.split.split

.lr.ph.us.preheader:                              ; preds = %.preheader.lr.ph
  %xtraiter = and i64 %3, 3
  %15 = icmp ult i64 %3, 4
  %unroll_iter = and i64 %3, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter89 = and i64 %3, 1
  %16 = icmp eq i64 %3, 1
  %unroll_iter92 = and i64 %3, 9223372036854775806
  %lcmp.mod91.not = icmp eq i64 %xtraiter89, 0
  br label %.lr.ph.us

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us.new, %.lr.ph.us
  %.lcssa.ph = phi double [ poison, %.lr.ph.us ], [ %63, %.lr.ph.us.new ]
  %.053.us.unr = phi double [ 0.000000e+00, %.lr.ph.us ], [ %63, %.lr.ph.us.new ]
  %.04752.us.unr = phi i64 [ 0, %.lr.ph.us ], [ %64, %.lr.ph.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.053.us.epil = phi double [ %19, %.epil.preheader ], [ %.053.us.unr, %._crit_edge.us.unr-lcssa ]
  %.04752.us.epil = phi i64 [ %20, %.epil.preheader ], [ %.04752.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %17 = getelementptr inbounds double, ptr %67, i64 %.04752.us.epil
  %18 = load double, ptr %17, align 8, !tbaa !5
  %19 = tail call double @llvm.fmuladd.f64(double %18, double %18, double %.053.us.epil)
  %20 = add nuw nsw i64 %.04752.us.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 %._crit_edge.us, label %.epil.preheader, !llvm.loop !9

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %19, %.epil.preheader ]
  %21 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %.lcssa, ptr noundef %7)
  br i1 %6, label %22, label %25

22:                                               ; preds = %._crit_edge.us
  %23 = load ptr, ptr %12, align 8, !tbaa !11
  %24 = getelementptr inbounds double, ptr %23, i64 %.04660.us
  store double %21, ptr %24, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %22, %._crit_edge.us
  %26 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %21, double noundef 0.000000e+00)
  br i1 %26, label %.lr.ph57.us, label %33

.lr.ph57.us:                                      ; preds = %25
  %27 = fdiv double 1.000000e+00, %21
  br i1 %16, label %._crit_edge58.us.unr-lcssa, label %.lr.ph57.us.new

28:                                               ; preds = %._crit_edge58.us
  %29 = load ptr, ptr %14, align 8, !tbaa !11
  %30 = getelementptr inbounds double, ptr %29, i64 %.04660.us
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fmul double %27, %31
  store double %32, ptr %30, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %28, %._crit_edge58.us, %25
  %34 = add nuw nsw i64 %.04660.us, 1
  %exitcond80.not = icmp eq i64 %34, %4
  br i1 %exitcond80.not, label %._crit_edge61, label %.lr.ph.us, !llvm.loop !12

.lr.ph57.us.new:                                  ; preds = %.lr.ph57.us, %.lr.ph57.us.new
  %.155.us = phi i64 [ %48, %.lr.ph57.us.new ], [ 0, %.lr.ph57.us ]
  %niter93 = phi i64 [ %niter93.next.1, %.lr.ph57.us.new ], [ 0, %.lr.ph57.us ]
  %35 = load ptr, ptr %11, align 8, !tbaa !11
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.04660.us
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds double, ptr %37, i64 %.155.us
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = fmul double %27, %39
  store double %40, ptr %38, align 8, !tbaa !5
  %41 = or disjoint i64 %.155.us, 1
  %42 = load ptr, ptr %11, align 8, !tbaa !11
  %43 = getelementptr inbounds ptr, ptr %42, i64 %.04660.us
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = getelementptr inbounds double, ptr %44, i64 %41
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = fmul double %27, %46
  store double %47, ptr %45, align 8, !tbaa !5
  %48 = add nuw nsw i64 %.155.us, 2
  %niter93.next.1 = add i64 %niter93, 2
  %niter93.ncmp.1 = icmp eq i64 %niter93.next.1, %unroll_iter92
  br i1 %niter93.ncmp.1, label %._crit_edge58.us.unr-lcssa, label %.lr.ph57.us.new, !llvm.loop !16

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %.lr.ph.us.new
  %.053.us = phi double [ %63, %.lr.ph.us.new ], [ 0.000000e+00, %.lr.ph.us ]
  %.04752.us = phi i64 [ %64, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %49 = getelementptr inbounds double, ptr %67, i64 %.04752.us
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = tail call double @llvm.fmuladd.f64(double %50, double %50, double %.053.us)
  %52 = or disjoint i64 %.04752.us, 1
  %53 = getelementptr inbounds double, ptr %67, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !5
  %55 = tail call double @llvm.fmuladd.f64(double %54, double %54, double %51)
  %56 = or disjoint i64 %.04752.us, 2
  %57 = getelementptr inbounds double, ptr %67, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = tail call double @llvm.fmuladd.f64(double %58, double %58, double %55)
  %60 = or disjoint i64 %.04752.us, 3
  %61 = getelementptr inbounds double, ptr %67, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = tail call double @llvm.fmuladd.f64(double %62, double %62, double %59)
  %64 = add nuw nsw i64 %.04752.us, 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 %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !17

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %33
  %.04660.us = phi i64 [ %34, %33 ], [ 0, %.lr.ph.us.preheader ]
  %65 = load ptr, ptr %11, align 8, !tbaa !11
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.04660.us
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  br i1 %15, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

._crit_edge58.us.unr-lcssa:                       ; preds = %.lr.ph57.us.new, %.lr.ph57.us
  %.155.us.unr = phi i64 [ 0, %.lr.ph57.us ], [ %48, %.lr.ph57.us.new ]
  br i1 %lcmp.mod91.not, label %._crit_edge58.us, label %._crit_edge58.us.epilog-lcssa

._crit_edge58.us.epilog-lcssa:                    ; preds = %._crit_edge58.us.unr-lcssa
  %68 = load ptr, ptr %11, align 8, !tbaa !11
  %69 = getelementptr inbounds ptr, ptr %68, i64 %.04660.us
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = getelementptr inbounds double, ptr %70, i64 %.155.us.unr
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = fmul double %27, %72
  store double %73, ptr %71, align 8, !tbaa !5
  br label %._crit_edge58.us

._crit_edge58.us:                                 ; preds = %._crit_edge58.us.unr-lcssa, %._crit_edge58.us.epilog-lcssa
  %74 = load ptr, ptr %13, align 8, !tbaa !11
  %75 = getelementptr inbounds double, ptr %74, i64 %.04660.us
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = fmul double %27, %76
  store double %77, ptr %75, align 8, !tbaa !5
  %78 = load ptr, ptr %14, align 8, !tbaa !11
  %79 = getelementptr inbounds double, ptr %78, i64 %.04660.us
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %80, ptr noundef %7)
  br i1 %81, label %28, label %33

.preheader.lr.ph.split.split:                     ; preds = %.preheader.lr.ph
  br i1 %6, label %.preheader.us72, label %.preheader

.preheader.us72:                                  ; preds = %.preheader.lr.ph.split.split, %101
  %.04660.us73 = phi i64 [ %102, %101 ], [ 0, %.preheader.lr.ph.split.split ]
  %82 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 0.000000e+00, ptr noundef %7)
  %83 = load ptr, ptr %12, align 8, !tbaa !11
  %84 = getelementptr inbounds double, ptr %83, i64 %.04660.us73
  store double %82, ptr %84, align 8, !tbaa !5
  %85 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %82, double noundef 0.000000e+00)
  br i1 %85, label %86, label %101

86:                                               ; preds = %.preheader.us72
  %87 = fdiv double 1.000000e+00, %82
  %88 = load ptr, ptr %13, align 8, !tbaa !11
  %89 = getelementptr inbounds double, ptr %88, i64 %.04660.us73
  %90 = load double, ptr %89, align 8, !tbaa !5
  %91 = fmul double %87, %90
  store double %91, ptr %89, align 8, !tbaa !5
  %92 = load ptr, ptr %14, align 8, !tbaa !11
  %93 = getelementptr inbounds double, ptr %92, i64 %.04660.us73
  %94 = load double, ptr %93, align 8, !tbaa !5
  %95 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %94, ptr noundef %7)
  br i1 %95, label %96, label %101

96:                                               ; preds = %86
  %97 = load ptr, ptr %14, align 8, !tbaa !11
  %98 = getelementptr inbounds double, ptr %97, i64 %.04660.us73
  %99 = load double, ptr %98, align 8, !tbaa !5
  %100 = fmul double %87, %99
  store double %100, ptr %98, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %96, %86, %.preheader.us72
  %102 = add nuw nsw i64 %.04660.us73, 1
  %exitcond77.not = icmp eq i64 %102, %4
  br i1 %exitcond77.not, label %._crit_edge61, label %.preheader.us72, !llvm.loop !12

.preheader:                                       ; preds = %.preheader.lr.ph.split.split, %120
  %.04660 = phi i64 [ %121, %120 ], [ 0, %.preheader.lr.ph.split.split ]
  %103 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef 0.000000e+00, ptr noundef %7)
  %104 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %103, double noundef 0.000000e+00)
  br i1 %104, label %105, label %120

105:                                              ; preds = %.preheader
  %106 = fdiv double 1.000000e+00, %103
  %107 = load ptr, ptr %13, align 8, !tbaa !11
  %108 = getelementptr inbounds double, ptr %107, i64 %.04660
  %109 = load double, ptr %108, align 8, !tbaa !5
  %110 = fmul double %106, %109
  store double %110, ptr %108, align 8, !tbaa !5
  %111 = load ptr, ptr %14, align 8, !tbaa !11
  %112 = getelementptr inbounds double, ptr %111, i64 %.04660
  %113 = load double, ptr %112, align 8, !tbaa !5
  %114 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %113, ptr noundef %7)
  br i1 %114, label %115, label %120

115:                                              ; preds = %105
  %116 = load ptr, ptr %14, align 8, !tbaa !11
  %117 = getelementptr inbounds double, ptr %116, i64 %.04660
  %118 = load double, ptr %117, align 8, !tbaa !5
  %119 = fmul double %106, %118
  store double %119, ptr %117, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %.preheader, %115, %105
  %121 = add nuw nsw i64 %.04660, 1
  %exitcond.not = icmp eq i64 %121, %4
  br i1 %exitcond.not, label %._crit_edge61, label %.preheader, !llvm.loop !12

._crit_edge61:                                    ; preds = %120, %101, %33, %10
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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" }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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