; LLVM IR from sp-nitech/SPTK :: src/math (statistics_accumulation)

; 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::SymmetricMatrix::Row" = type <{ ptr, ptr, i32, [4 x i8] }>
%"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.sptk::StatisticsAccumulation" = type <{ ptr, i32, i32, i8, i8, i8, [5 x i8] }>

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation20GetStandardDeviationERKNS0_6BufferEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(19), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation17GetFullCovarianceERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind noalias writable sret(%"class.sptk::SymmetricMatrix::Row") align 8, ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation14GetCorrelationERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.sptk::SymmetricMatrix::Row", align 8
  %16 = alloca %"class.sptk::SymmetricMatrix::Row", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  %18 = getelementptr inbounds %"class.sptk::StatisticsAccumulation", ptr %17, i32 0, i32 5
  %19 = load i8, ptr %18, align 2, !tbaa !9, !range !13, !noundef !14
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %32

21:                                               ; preds = %3
  %22 = getelementptr inbounds %"class.sptk::StatisticsAccumulation", ptr %17, i32 0, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !15
  %24 = icmp slt i32 %23, 2
  br i1 %24, label %32, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds %"class.sptk::StatisticsAccumulation", ptr %17, i32 0, i32 3
  %27 = load i8, ptr %26, align 8, !tbaa !16, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  br i1 %28, label %32, label %29

29:                                               ; preds = %25
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = icmp eq ptr null, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %29, %25, %21, %3
  store i1 false, ptr %4, align 1
  br label %117

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = invoke noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation20GetStandardDeviationERKNS0_6BufferEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(19) %17, ptr noundef nonnull align 8 dereferenceable(128) %34, ptr noundef %8)
          to label %36 unwind label %38

36:                                               ; preds = %33
  br i1 %35, label %42, label %37

37:                                               ; preds = %36
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %115

38:                                               ; preds = %42, %33
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %116

42:                                               ; preds = %36
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = invoke noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation17GetFullCovarianceERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19) %17, ptr noundef nonnull align 8 dereferenceable(128) %43, ptr noundef %44)
          to label %46 unwind label %38

46:                                               ; preds = %42
  br i1 %45, label %48, label %47

47:                                               ; preds = %46
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %115

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #4
  store ptr %49, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !17
  br label %50

50:                                               ; preds = %111, %48
  %51 = load i32, ptr %13, align 4, !tbaa !17
  %52 = getelementptr inbounds %"class.sptk::StatisticsAccumulation", ptr %17, i32 0, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !18
  %54 = icmp sle i32 %51, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !17
  br label %57

57:                                               ; preds = %88, %56
  %58 = load i32, ptr %14, align 4, !tbaa !17
  %59 = load i32, ptr %13, align 4, !tbaa !17
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %110

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load i32, ptr %13, align 4, !tbaa !17
  invoke void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind writable sret(%"class.sptk::SymmetricMatrix::Row") align 8 %15, ptr noundef nonnull align 8 dereferenceable(64) %63, i32 noundef %64)
          to label %65 unwind label %91

65:                                               ; preds = %62
  %66 = load i32, ptr %14, align 4, !tbaa !17
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20) %15, i32 noundef %66)
          to label %68 unwind label %95

68:                                               ; preds = %65
  %69 = load double, ptr %67, align 8, !tbaa !19
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = load i32, ptr %13, align 4, !tbaa !17
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %70, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !19
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = load i32, ptr %14, align 4, !tbaa !17
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !19
  %80 = fmul double %74, %79
  %81 = fdiv double %69, %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %13, align 4, !tbaa !17
  invoke void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind writable sret(%"class.sptk::SymmetricMatrix::Row") align 8 %16, ptr noundef nonnull align 8 dereferenceable(64) %82, i32 noundef %83)
          to label %84 unwind label %99

84:                                               ; preds = %68
  %85 = load i32, ptr %14, align 4, !tbaa !17
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20) %16, i32 noundef %85)
          to label %87 unwind label %103

87:                                               ; preds = %84
  store double %81, ptr %86, align 8, !tbaa !19
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %14, align 4, !tbaa !17
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %14, align 4, !tbaa !17
  br label %57, !llvm.loop !21

91:                                               ; preds = %62
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %109

95:                                               ; preds = %65
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  br label %108

99:                                               ; preds = %68
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %9, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %10, align 4
  br label %107

103:                                              ; preds = %84
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %9, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %10, align 4
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %16) #4
  br label %107

107:                                              ; preds = %103, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  br label %108

108:                                              ; preds = %107, %95
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %15) #4
  br label %109

109:                                              ; preds = %108, %91
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %116

110:                                              ; preds = %61
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %13, align 4, !tbaa !17
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %13, align 4, !tbaa !17
  br label %50, !llvm.loop !23

114:                                              ; preds = %55
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %115

115:                                              ; preds = %114, %47, %37
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %117

116:                                              ; preds = %109, %38
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %119

117:                                              ; preds = %115, %32
  %118 = load i1, ptr %4, align 1
  ret i1 %118

119:                                              ; preds = %116
  %120 = load ptr, ptr %9, align 8
  %121 = load i32, ptr %10, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

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 = { 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, !12, i64 18}
!10 = !{!"_ZTSN4sptk22StatisticsAccumulationE", !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 17, !12, i64 18}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !12, i64 16}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !11, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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::SymmetricMatrix::Row" = type <{ ptr, ptr, i32, [4 x i8] }>
%"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 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation20GetStandardDeviationERKNS0_6BufferEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(19), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation17GetFullCovarianceERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind noalias writable sret(%"class.sptk::SymmetricMatrix::Row") align 8, ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation14GetCorrelationERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.sptk::SymmetricMatrix::Row", align 8
  %6 = alloca %"class.sptk::SymmetricMatrix::Row", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 18
  %8 = load i8, ptr %7, align 2, !tbaa !5, !range !11, !noundef !12
  %9 = trunc nuw i8 %8 to i1
  %10 = getelementptr inbounds i8, ptr %0, i64 12
  %11 = load i32, ptr %10, align 4
  %12 = icmp sgt i32 %11, 1
  %or.cond40.not = select i1 %9, i1 %12, i1 false
  br i1 %or.cond40.not, label %13, label %61

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = load i8, ptr %14, align 8, !tbaa !13, !range !11, !noundef !12
  %16 = trunc nuw i8 %15 to i1
  %17 = icmp eq ptr %2, null
  %or.cond = or i1 %17, %16
  br i1 %or.cond, label %61, label %18

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %19 = invoke noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation20GetStandardDeviationERKNS0_6BufferEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(19) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef nonnull %4)
          to label %20 unwind label %21

20:                                               ; preds = %18
  br i1 %19, label %23, label %.loopexit

21:                                               ; preds = %23, %18
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %60

23:                                               ; preds = %20
  %24 = invoke noundef zeroext i1 @_ZNK4sptk22StatisticsAccumulation17GetFullCovarianceERKNS0_6BufferEPNS_15SymmetricMatrixE(ptr noundef nonnull align 8 dereferenceable(19) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef nonnull %2)
          to label %25 unwind label %21

25:                                               ; preds = %23
  br i1 %24, label %26, label %.loopexit

26:                                               ; preds = %25
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #4
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %.not43 = icmp slt i32 %29, 0
  br i1 %.not43, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %26, %32
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %32 ], [ 0, %26 ]
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %32 ], [ 1, %26 ]
  %30 = getelementptr inbounds double, ptr %27, i64 %indvars.iv50
  %31 = trunc nuw nsw i64 %indvars.iv50 to i32
  br label %35

32:                                               ; preds = %48
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %33 = load i32, ptr %28, align 8, !tbaa !14
  %34 = sext i32 %33 to i64
  %.not.not = icmp slt i64 %indvars.iv50, %34
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  br i1 %.not.not, label %.preheader, label %.loopexit, !llvm.loop !15

35:                                               ; preds = %.preheader, %48
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %48 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  invoke void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind nonnull writable sret(%"class.sptk::SymmetricMatrix::Row") align 8 %5, ptr noundef nonnull align 8 dereferenceable(64) %2, i32 noundef %31)
          to label %36 unwind label %49

36:                                               ; preds = %35
  %37 = trunc nuw nsw i64 %indvars.iv to i32
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20) %5, i32 noundef %37)
          to label %39 unwind label %51

39:                                               ; preds = %36
  %40 = load double, ptr %38, align 8, !tbaa !17
  %41 = load double, ptr %30, align 8, !tbaa !17
  %42 = getelementptr inbounds double, ptr %27, i64 %indvars.iv
  %43 = load double, ptr %42, align 8, !tbaa !17
  %44 = fmul double %41, %43
  %45 = fdiv double %40, %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN4sptk15SymmetricMatrixixEi(ptr dead_on_unwind nonnull writable sret(%"class.sptk::SymmetricMatrix::Row") align 8 %6, ptr noundef nonnull align 8 dereferenceable(64) %2, i32 noundef %31)
          to label %46 unwind label %53

46:                                               ; preds = %39
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4sptk15SymmetricMatrix3RowixEi(ptr noundef nonnull align 8 dereferenceable(20) %6, i32 noundef %37)
          to label %48 unwind label %55

48:                                               ; preds = %46
  store double %45, ptr %47, align 8, !tbaa !17
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv48
  br i1 %exitcond.not, label %32, label %35, !llvm.loop !19

49:                                               ; preds = %35
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %59

51:                                               ; preds = %36
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %58

53:                                               ; preds = %39
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %6) #4
  br label %57

57:                                               ; preds = %55, %53
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %58

58:                                               ; preds = %57, %51
  %.pn.pn = phi { ptr, i32 } [ %.pn, %57 ], [ %52, %51 ]
  call void @_ZN4sptk15SymmetricMatrix3RowD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %5) #4
  br label %59

59:                                               ; preds = %58, %49
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %58 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %60

.loopexit:                                        ; preds = %32, %26, %25, %20
  %.024 = phi i1 [ false, %20 ], [ false, %25 ], [ true, %26 ], [ true, %32 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %61

60:                                               ; preds = %59, %21
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %59 ], [ %22, %21 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn.pn.pn

61:                                               ; preds = %3, %13, %.loopexit
  %.1 = phi i1 [ %.024, %.loopexit ], [ false, %13 ], [ false, %3 ]
  ret i1 %.1
}

attributes #0 = { mustprogress 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 = { 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, !10, i64 18}
!6 = !{!"_ZTSN4sptk22StatisticsAccumulationE", !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 17, !10, i64 18}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!6, !10, i64 16}
!14 = !{!6, !7, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !8, i64 0}
!19 = distinct !{!19, !16}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass