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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24rmatrixhessenbergunpackqEPNS_9ae_matrixElPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, 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 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #4
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 64, i1 false)
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %18)
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %20, i1 noundef zeroext true)
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %25

23:                                               ; preds = %5
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %24)
  store i32 1, ptr %16, align 4
  br label %141

25:                                               ; preds = %5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load i64, ptr %7, align 8, !tbaa !9
  %28 = sub nsw i64 %27, 1
  %29 = add nsw i64 %28, 1
  %30 = load i64, ptr %7, align 8, !tbaa !9
  %31 = sub nsw i64 %30, 1
  %32 = add nsw i64 %31, 1
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %26, i64 noundef %29, i64 noundef %32, ptr noundef %33)
  %34 = load i64, ptr %7, align 8, !tbaa !9
  %35 = sub nsw i64 %34, 1
  %36 = add nsw i64 %35, 1
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %36, ptr noundef %37)
  %38 = load i64, ptr %7, align 8, !tbaa !9
  %39 = sub nsw i64 %38, 1
  %40 = add nsw i64 %39, 1
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %40, ptr noundef %41)
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %80, %25
  %43 = load i64, ptr %12, align 8, !tbaa !9
  %44 = load i64, ptr %7, align 8, !tbaa !9
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %43, %45
  br i1 %46, label %47, label %83

47:                                               ; preds = %42
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %76, %47
  %49 = load i64, ptr %13, align 8, !tbaa !9
  %50 = load i64, ptr %7, align 8, !tbaa !9
  %51 = sub nsw i64 %50, 1
  %52 = icmp sle i64 %49, %51
  br i1 %52, label %53, label %79

53:                                               ; preds = %48
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = load i64, ptr %13, align 8, !tbaa !9
  %56 = icmp eq i64 %54, %55
  br i1 %56, label %57, label %66

57:                                               ; preds = %53
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %58, i32 0, i32 6
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = load i64, ptr %12, align 8, !tbaa !9
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  store double 1.000000e+00, ptr %65, align 8, !tbaa !12
  br label %75

66:                                               ; preds = %53
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %67, i32 0, i32 6
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = load i64, ptr %12, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %69, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = load i64, ptr %13, align 8, !tbaa !9
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  store double 0.000000e+00, ptr %74, align 8, !tbaa !12
  br label %75

75:                                               ; preds = %66, %57
  br label %76

76:                                               ; preds = %75
  %77 = load i64, ptr %13, align 8, !tbaa !9
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %13, align 8, !tbaa !9
  br label %48, !llvm.loop !14

79:                                               ; preds = %48
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %12, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %12, align 8, !tbaa !9
  br label %42, !llvm.loop !16

83:                                               ; preds = %42
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i64, ptr %7, align 8, !tbaa !9
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call noundef zeroext i1 @_ZN11alglib_impl27rmatrixhessenbergunpackqmklEPNS_9ae_matrixElPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %84, i64 noundef %85, ptr noundef %86, ptr noundef %87, ptr noundef %88)
  br i1 %89, label %90, label %92

90:                                               ; preds = %83
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %91)
  store i32 1, ptr %16, align 4
  br label %141

92:                                               ; preds = %83
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %136, %92
  %94 = load i64, ptr %12, align 8, !tbaa !9
  %95 = load i64, ptr %7, align 8, !tbaa !9
  %96 = sub nsw i64 %95, 2
  %97 = icmp sle i64 %94, %96
  br i1 %97, label %98, label %139

98:                                               ; preds = %93
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds double, ptr %100, i64 1
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %102, i32 0, i32 6
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = load i64, ptr %12, align 8, !tbaa !9
  %106 = add nsw i64 %105, 1
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %111, i32 0, i32 2
  %113 = load i64, ptr %112, align 8, !tbaa !17
  %114 = load i64, ptr %7, align 8, !tbaa !9
  %115 = load i64, ptr %12, align 8, !tbaa !9
  %116 = sub nsw i64 %114, %115
  %117 = sub nsw i64 %116, 1
  %118 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %117)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %101, i64 noundef 1, ptr noundef %110, i64 noundef %113, i64 noundef %118)
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !11
  %121 = getelementptr inbounds double, ptr %120, i64 1
  store double 1.000000e+00, ptr %121, align 8, !tbaa !12
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %8, 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 !11
  %126 = load i64, ptr %12, align 8, !tbaa !9
  %127 = getelementptr inbounds double, ptr %125, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !12
  %129 = load i64, ptr %7, align 8, !tbaa !9
  %130 = sub nsw i64 %129, 1
  %131 = load i64, ptr %12, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  %133 = load i64, ptr %7, align 8, !tbaa !9
  %134 = sub nsw i64 %133, 1
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %122, double noundef %128, ptr noundef %14, i64 noundef 0, i64 noundef %130, i64 noundef %132, i64 noundef %134, ptr noundef %15, ptr noundef %135)
  br label %136

136:                                              ; preds = %98
  %137 = load i64, ptr %12, align 8, !tbaa !9
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %12, align 8, !tbaa !9
  br label %93, !llvm.loop !21

139:                                              ; preds = %93
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %140)
  store i32 0, ptr %16, align 4
  br label %141

141:                                              ; preds = %139, %90, %23
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, 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 32, ptr %11) #4
  %142 = load i32, ptr %16, align 4
  switch i32 %142, label %144 [
    i32 0, label %143
    i32 1, label %143
  ]

143:                                              ; preds = %141, %141
  ret void

144:                                              ; preds = %141
  unreachable
}

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, 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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

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

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !10, i64 16}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !19, i64 32, !20, i64 40, !7, i64 72}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = distinct !{!21, !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 }

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

; 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 uwtable
define dso_local void @_ZN11alglib_impl24rmatrixhessenbergunpackqEPNS_9ae_matrixElPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %9 = icmp eq i64 %1, 0
  br i1 %9, label %._crit_edge, label %10

10:                                               ; preds = %5
  %11 = add i64 %1, -1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %3, i64 noundef %1, i64 noundef %1, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %1, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %4)
  %.not.not58 = icmp sgt i64 %1, 0
  br i1 %.not.not58, label %.preheader55.lr.ph, label %._crit_edge60

.preheader55.lr.ph:                               ; preds = %10
  %12 = getelementptr inbounds i8, ptr %3, i64 72
  %xtraiter = and i64 %1, 1
  %13 = icmp eq i64 %1, 1
  %unroll_iter = and i64 %1, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader55.us

.preheader55.us:                                  ; preds = %._crit_edge.us, %.preheader55.lr.ph
  %.05059.us = phi i64 [ 0, %.preheader55.lr.ph ], [ %31, %._crit_edge.us ]
  br i1 %13, label %._crit_edge.us.unr-lcssa, label %.preheader55.us.new

.preheader55.us.new:                              ; preds = %.preheader55.us, %.preheader55.us.new
  %.057.us = phi i64 [ %25, %.preheader55.us.new ], [ 0, %.preheader55.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader55.us.new ], [ 0, %.preheader55.us ]
  %14 = icmp eq i64 %.05059.us, %.057.us
  %15 = load ptr, ptr %12, align 8, !tbaa !5
  %16 = getelementptr inbounds ptr, ptr %15, i64 %.05059.us
  %17 = load ptr, ptr %16, align 8, !tbaa !8
  %. = select i1 %14, double 1.000000e+00, double 0.000000e+00
  %18 = getelementptr inbounds double, ptr %17, i64 %.057.us
  store double %., ptr %18, align 8, !tbaa !10
  %19 = or disjoint i64 %.057.us, 1
  %20 = icmp eq i64 %.05059.us, %19
  %21 = load ptr, ptr %12, align 8, !tbaa !5
  %22 = getelementptr inbounds ptr, ptr %21, i64 %.05059.us
  %23 = load ptr, ptr %22, align 8, !tbaa !8
  %..1 = select i1 %20, double 1.000000e+00, double 0.000000e+00
  %24 = getelementptr inbounds double, ptr %23, i64 %19
  store double %..1, ptr %24, align 8, !tbaa !10
  %25 = add nuw nsw i64 %.057.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader55.us.new, !llvm.loop !12

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader55.us.new, %.preheader55.us
  %.057.us.unr = phi i64 [ 0, %.preheader55.us ], [ %25, %.preheader55.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %26 = icmp eq i64 %.05059.us, %.057.us.unr
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = getelementptr inbounds ptr, ptr %27, i64 %.05059.us
  %29 = load ptr, ptr %28, align 8, !tbaa !8
  %..epil = select i1 %26, double 1.000000e+00, double 0.000000e+00
  %30 = getelementptr inbounds double, ptr %29, i64 %.057.us.unr
  store double %..epil, ptr %30, align 8, !tbaa !10
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %31 = add nuw nsw i64 %.05059.us, 1
  %exitcond63.not = icmp eq i64 %31, %1
  br i1 %exitcond63.not, label %._crit_edge60, label %.preheader55.us, !llvm.loop !14

._crit_edge60:                                    ; preds = %._crit_edge.us, %10
  %32 = call noundef zeroext i1 @_ZN11alglib_impl27rmatrixhessenbergunpackqmklEPNS_9ae_matrixElPNS_9ae_vectorES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  %.not61 = icmp slt i64 %1, 2
  %or.cond = or i1 %32, %.not61
  br i1 %or.cond, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge60
  %33 = getelementptr inbounds i8, ptr %7, i64 56
  %34 = getelementptr inbounds i8, ptr %0, i64 72
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = getelementptr inbounds i8, ptr %2, i64 56
  br label %37

37:                                               ; preds = %.lr.ph, %37
  %.162 = phi i64 [ 0, %.lr.ph ], [ %41, %37 ]
  %38 = load ptr, ptr %33, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %34, align 8, !tbaa !5
  %41 = add nuw nsw i64 %.162, 1
  %42 = getelementptr inbounds ptr, ptr %40, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !8
  %44 = getelementptr inbounds double, ptr %43, i64 %.162
  %45 = load i64, ptr %35, align 8, !tbaa !15
  %46 = xor i64 %.162, -1
  %47 = add nsw i64 %46, %1
  %48 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %47)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %39, i64 noundef 1, ptr noundef %44, i64 noundef %45, i64 noundef %48)
  %49 = load ptr, ptr %33, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  store double 1.000000e+00, ptr %50, align 8, !tbaa !10
  %51 = load ptr, ptr %36, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 %.162
  %53 = load double, ptr %52, align 8, !tbaa !10
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %3, double noundef %53, ptr noundef nonnull %7, i64 noundef 0, i64 noundef %11, i64 noundef %41, i64 noundef %11, ptr noundef nonnull %8, ptr noundef %4)
  %exitcond64.not = icmp eq i64 %41, %11
  br i1 %exitcond64.not, label %._crit_edge, label %37, !llvm.loop !20

._crit_edge:                                      ; preds = %37, %._crit_edge60, %5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

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

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, 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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef, double noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !17, i64 16}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !18, i64 32, !19, i64 40, !6, i64 72}
!17 = !{!"long", !6, i64 0}
!18 = !{!"bool", !6, i64 0}
!19 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!20 = distinct !{!20, !13}


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