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

; 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_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = 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: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13gqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, double noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #1 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store double %2, ptr %11, align 8, !tbaa !9
  store i64 %3, ptr %12, align 8, !tbaa !11
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #4
  %23 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %23, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 80, i1 false)
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %24, align 8, !tbaa !11
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %25)
  %26 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %26)
  %27 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 3, ptr noundef %27, i1 noundef zeroext true)
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 3, ptr noundef %28, i1 noundef zeroext true)
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %29, i1 noundef zeroext true)
  %30 = load i64, ptr %12, align 8, !tbaa !11
  %31 = icmp slt i64 %30, 1
  br i1 %31, label %32, label %35

32:                                               ; preds = %8
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -1, ptr %33, align 8, !tbaa !11
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %34)
  store i32 1, ptr %22, align 4
  br label %152

35:                                               ; preds = %8
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 1, ptr %36, align 8, !tbaa !11
  %37 = load i64, ptr %12, align 8, !tbaa !11
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %19, i64 noundef %37, ptr noundef %38)
  %39 = load i64, ptr %12, align 8, !tbaa !11
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %39, ptr noundef %40)
  store i64 1, ptr %18, align 8, !tbaa !11
  br label %41

41:                                               ; preds = %83, %35
  %42 = load i64, ptr %18, align 8, !tbaa !11
  %43 = load i64, ptr %12, align 8, !tbaa !11
  %44 = sub nsw i64 %43, 1
  %45 = icmp sle i64 %42, %44
  br i1 %45, label %46, label %86

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = load i64, ptr %18, align 8, !tbaa !11
  %51 = sub nsw i64 %50, 1
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load i64, ptr %18, align 8, !tbaa !11
  %57 = sub nsw i64 %56, 1
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  store double %53, ptr %58, align 8, !tbaa !9
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !13
  %62 = load i64, ptr %18, align 8, !tbaa !11
  %63 = getelementptr inbounds double, ptr %61, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %64, double noundef 0.000000e+00)
  br i1 %65, label %66, label %69

66:                                               ; preds = %46
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -2, ptr %67, align 8, !tbaa !11
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %68)
  store i32 1, ptr %22, align 4
  br label %152

69:                                               ; preds = %46
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load i64, ptr %18, align 8, !tbaa !11
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %75, ptr noundef %76)
  %78 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = load i64, ptr %18, align 8, !tbaa !11
  %81 = sub nsw i64 %80, 1
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  store double %77, ptr %82, align 8, !tbaa !9
  br label %83

83:                                               ; preds = %69
  %84 = load i64, ptr %18, align 8, !tbaa !11
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %18, align 8, !tbaa !11
  br label %41, !llvm.loop !14

86:                                               ; preds = %41
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i64, ptr %12, align 8, !tbaa !11
  %91 = sub nsw i64 %90, 1
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !9
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  %96 = load i64, ptr %12, align 8, !tbaa !11
  %97 = sub nsw i64 %96, 1
  %98 = getelementptr inbounds double, ptr %95, i64 %97
  store double %93, ptr %98, align 8, !tbaa !9
  %99 = load i64, ptr %12, align 8, !tbaa !11
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = call noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorES1_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %19, ptr noundef %20, i64 noundef %99, i64 noundef 3, ptr noundef %21, ptr noundef %100)
  br i1 %101, label %105, label %102

102:                                              ; preds = %86
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 -3, ptr %103, align 8, !tbaa !11
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %104)
  store i32 1, ptr %22, align 4
  br label %152

105:                                              ; preds = %86
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = load i64, ptr %12, align 8, !tbaa !11
  %108 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %106, i64 noundef %107, ptr noundef %108)
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = load i64, ptr %12, align 8, !tbaa !11
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %109, i64 noundef %110, ptr noundef %111)
  store i64 1, ptr %18, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %147, %105
  %113 = load i64, ptr %18, align 8, !tbaa !11
  %114 = load i64, ptr %12, align 8, !tbaa !11
  %115 = icmp sle i64 %113, %114
  br i1 %115, label %116, label %150

116:                                              ; preds = %112
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = load i64, ptr %18, align 8, !tbaa !11
  %120 = sub nsw i64 %119, 1
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !9
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !13
  %126 = load i64, ptr %18, align 8, !tbaa !11
  %127 = sub nsw i64 %126, 1
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %122, ptr %128, align 8, !tbaa !9
  %129 = load double, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %21, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !13
  %132 = getelementptr inbounds ptr, ptr %131, i64 0
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = load i64, ptr %18, align 8, !tbaa !11
  %135 = sub nsw i64 %134, 1
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !9
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %137, ptr noundef %138)
  %140 = fmul double %129, %139
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %141, i32 0, i32 4
  %143 = load ptr, ptr %142, align 8, !tbaa !13
  %144 = load i64, ptr %18, align 8, !tbaa !11
  %145 = sub nsw i64 %144, 1
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  store double %140, ptr %146, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %116
  %148 = load i64, ptr %18, align 8, !tbaa !11
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %18, align 8, !tbaa !11
  br label %112, !llvm.loop !16

150:                                              ; preds = %112
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %151)
  store i32 0, ptr %22, align 4
  br label %152

152:                                              ; preds = %150, %102, %66, %32
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  %153 = load i32, ptr %22, align 4
  switch i32 %153, label %155 [
    i32 0, label %154
    i32 1, label %154
  ]

154:                                              ; preds = %152, %152
  ret void

155:                                              ; preds = %152
  unreachable
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorES1_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13gqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_PNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, double noundef %2, i64 noundef %3, ptr nocapture noundef writeonly %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #1 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %12, i8 0, i64 80, i1 false)
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %6)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  %13 = icmp slt i64 %3, 1
  br i1 %13, label %._crit_edge61.sink.split, label %14

14:                                               ; preds = %8
  store i64 1, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %3, ptr noundef %7)
  %.not.not55.not = icmp eq i64 %3, 1
  br i1 %.not.not55.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %14
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = getelementptr inbounds i8, ptr %10, i64 56
  %17 = getelementptr inbounds i8, ptr %1, i64 56
  %18 = getelementptr inbounds i8, ptr %11, i64 56
  br label %19

19:                                               ; preds = %.lr.ph, %30
  %.056 = phi i64 [ 1, %.lr.ph ], [ %37, %30 ]
  %20 = load ptr, ptr %15, align 8, !tbaa !9
  %21 = add nsw i64 %.056, -1
  %22 = getelementptr inbounds double, ptr %20, i64 %21
  %23 = load double, ptr %22, align 8, !tbaa !10
  %24 = load ptr, ptr %16, align 8, !tbaa !9
  %25 = getelementptr inbounds double, ptr %24, i64 %21
  store double %23, ptr %25, align 8, !tbaa !10
  %26 = load ptr, ptr %17, align 8, !tbaa !9
  %27 = getelementptr inbounds double, ptr %26, i64 %.056
  %28 = load double, ptr %27, align 8, !tbaa !10
  %29 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %28, double noundef 0.000000e+00)
  br i1 %29, label %._crit_edge61.sink.split, label %30

30:                                               ; preds = %19
  %31 = load ptr, ptr %17, align 8, !tbaa !9
  %32 = getelementptr inbounds double, ptr %31, i64 %.056
  %33 = load double, ptr %32, align 8, !tbaa !10
  %34 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %33, ptr noundef %7)
  %35 = load ptr, ptr %18, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %35, i64 %21
  store double %34, ptr %36, align 8, !tbaa !10
  %37 = add nuw nsw i64 %.056, 1
  %exitcond.not = icmp eq i64 %37, %3
  br i1 %exitcond.not, label %._crit_edge, label %19, !llvm.loop !12

._crit_edge:                                      ; preds = %30, %14
  %38 = add nsw i64 %3, -1
  %39 = getelementptr inbounds i8, ptr %0, i64 56
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds double, ptr %40, i64 %38
  %42 = load double, ptr %41, align 8, !tbaa !10
  %43 = getelementptr inbounds i8, ptr %10, i64 56
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds double, ptr %44, i64 %38
  store double %42, ptr %45, align 8, !tbaa !10
  %46 = call noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorES1_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, i64 noundef %3, i64 noundef 3, ptr noundef nonnull %12, ptr noundef %7)
  br i1 %46, label %.lr.ph60, label %._crit_edge61.sink.split

.lr.ph60:                                         ; preds = %._crit_edge
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %3, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %6, i64 noundef %3, ptr noundef %7)
  %47 = getelementptr inbounds i8, ptr %5, i64 56
  %48 = getelementptr inbounds i8, ptr %12, i64 72
  %49 = getelementptr inbounds i8, ptr %6, i64 56
  %smax = call i64 @llvm.smax.i64(i64 %3, i64 1)
  br label %50

50:                                               ; preds = %.lr.ph60, %50
  %.158 = phi i64 [ 1, %.lr.ph60 ], [ %65, %50 ]
  %51 = load ptr, ptr %43, align 8, !tbaa !9
  %52 = add nsw i64 %.158, -1
  %53 = getelementptr inbounds double, ptr %51, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !10
  %55 = load ptr, ptr %47, align 8, !tbaa !9
  %56 = getelementptr inbounds double, ptr %55, i64 %52
  store double %54, ptr %56, align 8, !tbaa !10
  %57 = load ptr, ptr %48, align 8, !tbaa !9
  %58 = load ptr, ptr %57, align 8, !tbaa !14
  %59 = getelementptr inbounds double, ptr %58, i64 %52
  %60 = load double, ptr %59, align 8, !tbaa !10
  %61 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %60, ptr noundef %7)
  %62 = fmul double %61, %2
  %63 = load ptr, ptr %49, align 8, !tbaa !9
  %64 = getelementptr inbounds double, ptr %63, i64 %52
  store double %62, ptr %64, align 8, !tbaa !10
  %65 = add nuw i64 %.158, 1
  %exitcond63.not = icmp eq i64 %.158, %smax
  br i1 %exitcond63.not, label %._crit_edge61, label %50, !llvm.loop !16

._crit_edge61.sink.split:                         ; preds = %19, %._crit_edge, %8
  %.sink = phi i64 [ -1, %8 ], [ -3, %._crit_edge ], [ -2, %19 ]
  store i64 %.sink, ptr %4, align 8, !tbaa !5
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %50, %._crit_edge61.sink.split
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN11alglib_impl12smatrixtdevdEPNS_9ae_vectorES1_llPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !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}


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