; LLVM IR from sp-nitech/SPTK :: src/math/matrix.ll (ZNK4sptk6MatrixmlERKS0_)

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

%"class.sptk::Matrix" = type { ptr, i32, i32, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN12_GLOBAL__N_126kErrorMessageForLogicErrorE = external hidden global ptr, align 8
@_ZTISt11logic_error = external constant ptr

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare void @_ZNSt11logic_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZNSt11logic_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4sptk6MatrixmlERKS0_(ptr dead_on_unwind noalias writable sret(%"class.sptk::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(64) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i1, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  %15 = getelementptr inbounds %"class.sptk::Matrix", ptr %14, i32 0, i32 2
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.sptk::Matrix", ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !20
  %20 = icmp ne i32 %16, %19
  br i1 %20, label %21, label %29

21:                                               ; preds = %3
  %22 = call ptr @__cxa_allocate_exception(i64 16) #6
  %23 = load ptr, ptr @_ZN12_GLOBAL__N_126kErrorMessageForLogicErrorE, align 8, !tbaa !5
  invoke void @_ZNSt11logic_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef %23)
          to label %24 unwind label %25

24:                                               ; preds = %21
  call void @__cxa_throw(ptr %22, ptr @_ZTISt11logic_error, ptr @_ZNSt11logic_errorD1Ev) #7
  unreachable

25:                                               ; preds = %21
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %7, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %8, align 4
  call void @__cxa_free_exception(ptr %22) #6
  br label %101

29:                                               ; preds = %3
  store i1 false, ptr %9, align 1
  %30 = getelementptr inbounds %"class.sptk::Matrix", ptr %14, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !20
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.sptk::Matrix", ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !9
  call void @_ZN4sptk6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %31, i32 noundef %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !21
  br label %35

35:                                               ; preds = %94, %29
  %36 = load i32, ptr %10, align 4, !tbaa !21
  %37 = getelementptr inbounds %"class.sptk::Matrix", ptr %14, i32 0, i32 1
  %38 = load i32, ptr %37, align 8, !tbaa !20
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %97

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !21
  br label %42

42:                                               ; preds = %90, %41
  %43 = load i32, ptr %12, align 4, !tbaa !21
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.sptk::Matrix", ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = icmp slt i32 %43, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %42
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %93

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !21
  br label %50

50:                                               ; preds = %86, %49
  %51 = load i32, ptr %13, align 4, !tbaa !21
  %52 = getelementptr inbounds %"class.sptk::Matrix", ptr %14, i32 0, i32 2
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp slt i32 %51, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %50
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %89

56:                                               ; preds = %50
  %57 = getelementptr inbounds %"class.sptk::Matrix", ptr %14, i32 0, i32 4
  %58 = load i32, ptr %10, align 4, !tbaa !21
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #6
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = load i32, ptr %13, align 4, !tbaa !21
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %61, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !22
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.sptk::Matrix", ptr %66, i32 0, i32 4
  %68 = load i32, ptr %13, align 4, !tbaa !21
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #6
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = load i32, ptr %12, align 4, !tbaa !21
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !22
  %76 = getelementptr inbounds %"class.sptk::Matrix", ptr %0, i32 0, i32 4
  %77 = load i32, ptr %10, align 4, !tbaa !21
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #6
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = load i32, ptr %12, align 4, !tbaa !21
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !22
  %85 = call double @llvm.fmuladd.f64(double %65, double %75, double %84)
  store double %85, ptr %83, align 8, !tbaa !22
  br label %86

86:                                               ; preds = %56
  %87 = load i32, ptr %13, align 4, !tbaa !21
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %13, align 4, !tbaa !21
  br label %50, !llvm.loop !24

89:                                               ; preds = %55
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %12, align 4, !tbaa !21
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %12, align 4, !tbaa !21
  br label %42, !llvm.loop !26

93:                                               ; preds = %48
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !21
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !21
  br label %35, !llvm.loop !27

97:                                               ; preds = %40
  store i1 true, ptr %9, align 1
  store i32 1, ptr %11, align 4
  %98 = load i1, ptr %9, align 1
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  call void @_ZN4sptk6MatrixD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0) #6
  br label %100

100:                                              ; preds = %99, %97
  ret void

101:                                              ; preds = %25
  %102 = load ptr, ptr %7, align 8
  %103 = load i32, ptr %8, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk6MatrixD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #1 align 2

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

declare void @_ZN4sptk6MatrixC1Eii(ptr, i32, i32)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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 12}
!10 = !{!"_ZTSN4sptk6MatrixE", !11, i64 8, !11, i64 12, !12, i64 16, !16, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!10, !11, i64 8}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !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"

%"class.sptk::Matrix" = type { ptr, i32, i32, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl" = type { %"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double *, std::allocator<double *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN12_GLOBAL__N_126kErrorMessageForLogicErrorE = external hidden local_unnamed_addr global ptr, align 8
@_ZTISt11logic_error = external constant ptr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare void @_ZNSt11logic_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZNSt11logic_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4sptk6MatrixmlERKS0_(ptr dead_on_unwind noalias writable sret(%"class.sptk::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(64) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = getelementptr inbounds i8, ptr %1, i64 12
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %2, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !19
  %.not = icmp eq i32 %5, %7
  br i1 %.not, label %14, label %8

8:                                                ; preds = %3
  %9 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  %10 = load ptr, ptr @_ZN12_GLOBAL__N_126kErrorMessageForLogicErrorE, align 8, !tbaa !20
  invoke void @_ZNSt11logic_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %10)
          to label %11 unwind label %12

11:                                               ; preds = %8
  tail call void @__cxa_throw(ptr nonnull %9, ptr nonnull @_ZTISt11logic_error, ptr nonnull @_ZNSt11logic_errorD1Ev) #6
  unreachable

12:                                               ; preds = %8
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %9) #5
  resume { ptr, i32 } %13

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %2, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !5
  tail call void @_ZN4sptk6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %16, i32 noundef %18)
  %19 = load i32, ptr %15, align 8, !tbaa !19
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.preheader21.lr.ph, label %._crit_edge26

.preheader21.lr.ph:                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %1, i64 40
  %22 = getelementptr inbounds i8, ptr %2, i64 40
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = load i32, ptr %17, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.preheader21, label %._crit_edge26

.preheader21:                                     ; preds = %.preheader21.lr.ph, %._crit_edge24
  %26 = phi i32 [ %35, %._crit_edge24 ], [ %19, %.preheader21.lr.ph ]
  %27 = phi i32 [ %36, %._crit_edge24 ], [ %24, %.preheader21.lr.ph ]
  %28 = phi i32 [ %37, %._crit_edge24 ], [ %24, %.preheader21.lr.ph ]
  %indvars.iv33 = phi i64 [ %indvars.iv.next34, %._crit_edge24 ], [ 0, %.preheader21.lr.ph ]
  %29 = icmp sgt i32 %28, 0
  %30 = load i32, ptr %4, align 4
  %31 = icmp sgt i32 %30, 0
  %or.cond = select i1 %29, i1 %31, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge24

.preheader:                                       ; preds = %.preheader21, %._crit_edge
  %32 = phi i32 [ %40, %._crit_edge ], [ %27, %.preheader21 ]
  %33 = phi i32 [ %41, %._crit_edge ], [ %30, %.preheader21 ]
  %indvars.iv30 = phi i64 [ %indvars.iv.next31, %._crit_edge ], [ 0, %.preheader21 ]
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge24.loopexit:                           ; preds = %._crit_edge
  %.pre36 = load i32, ptr %15, align 8, !tbaa !19
  br label %._crit_edge24

._crit_edge24:                                    ; preds = %._crit_edge24.loopexit, %.preheader21
  %35 = phi i32 [ %.pre36, %._crit_edge24.loopexit ], [ %26, %.preheader21 ]
  %36 = phi i32 [ %40, %._crit_edge24.loopexit ], [ %27, %.preheader21 ]
  %37 = phi i32 [ %40, %._crit_edge24.loopexit ], [ %28, %.preheader21 ]
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %38 = sext i32 %35 to i64
  %39 = icmp slt i64 %indvars.iv.next34, %38
  br i1 %39, label %.preheader21, label %._crit_edge26, !llvm.loop !21

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %17, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %40 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %32, %.preheader ]
  %41 = phi i32 [ %57, %._crit_edge.loopexit ], [ %33, %.preheader ]
  %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1
  %42 = sext i32 %40 to i64
  %43 = icmp slt i64 %indvars.iv.next31, %42
  br i1 %43, label %.preheader, label %._crit_edge24.loopexit, !llvm.loop !24

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv33) #5
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds double, ptr %45, i64 %indvars.iv
  %47 = load double, ptr %46, align 8, !tbaa !25
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv) #5
  %49 = load ptr, ptr %48, align 8, !tbaa !20
  %50 = getelementptr inbounds double, ptr %49, i64 %indvars.iv30
  %51 = load double, ptr %50, align 8, !tbaa !25
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPdSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv33) #5
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = getelementptr inbounds double, ptr %53, i64 %indvars.iv30
  %55 = load double, ptr %54, align 8, !tbaa !25
  %56 = tail call double @llvm.fmuladd.f64(double %47, double %51, double %55)
  store double %56, ptr %54, align 8, !tbaa !25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next, %58
  br i1 %59, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !27

._crit_edge26:                                    ; preds = %._crit_edge24, %.preheader21.lr.ph, %14
  ret void
}

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

declare void @_ZN4sptk6MatrixC1Eii(ptr, i32, i32) local_unnamed_addr

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

!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 12}
!6 = !{!"_ZTSN4sptk6MatrixE", !7, i64 8, !7, i64 12, !10, i64 16, !15, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIdSaIdEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIPdSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPdSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPdSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!6, !7, i64 8}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22, !23}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.unswitch.partial.disable"}
!24 = distinct !{!24, !22, !23}
!25 = !{!26, !26, i64 0}
!26 = !{!"double", !8, i64 0}
!27 = distinct !{!27, !22}


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