; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/matrix (manip)

; 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.Matrix = type { ptr, ptr, i32, i32 }

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Matrix10insertColsEiid(ptr dead_on_unwind noalias writable sret(%class.Matrix) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3, double noundef %4) #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store double %4, ptr %10, align 8, !tbaa !11
  %16 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i1 false, ptr %13, align 1
  %17 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %19 = load i32, ptr %9, align 4, !tbaa !9
  %20 = add nsw i32 %18, %19
  call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %17, i32 noundef %20)
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %97, %5
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %24 unwind label %46

24:                                               ; preds = %21
  %25 = icmp sle i32 %22, %23
  br i1 %25, label %26, label %100

26:                                               ; preds = %24
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %43, %26
  %28 = load i32, ptr %12, align 4, !tbaa !9
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %31, label %50

31:                                               ; preds = %27
  %32 = load i32, ptr %11, align 4, !tbaa !9
  %33 = load i32, ptr %12, align 4, !tbaa !9
  %34 = load ptr, ptr %16, align 8, !tbaa !13
  %35 = getelementptr inbounds ptr, ptr %34, i64 5
  %36 = load ptr, ptr %35, align 8
  %37 = invoke noundef double %36(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %32, i32 noundef %33)
          to label %38 unwind label %46

38:                                               ; preds = %31
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %39, i32 noundef %40)
          to label %42 unwind label %46

42:                                               ; preds = %38
  store double %37, ptr %41, align 8, !tbaa !11
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %12, align 4, !tbaa !9
  br label %27, !llvm.loop !15

46:                                               ; preds = %88, %76, %71, %58, %38, %31, %21
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %14, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %15, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %104

50:                                               ; preds = %27
  %51 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %51, ptr %12, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %64, %50
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = add nsw i32 %54, %55
  %57 = icmp slt i32 %53, %56
  br i1 %57, label %58, label %67

58:                                               ; preds = %52
  %59 = load double, ptr %10, align 8, !tbaa !11
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %60, i32 noundef %61)
          to label %63 unwind label %46

63:                                               ; preds = %58
  store double %59, ptr %62, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %12, align 4, !tbaa !9
  br label %52, !llvm.loop !17

67:                                               ; preds = %52
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = add nsw i32 %68, %69
  store i32 %70, ptr %12, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %93, %67
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %74 unwind label %46

74:                                               ; preds = %71
  %75 = icmp sle i32 %72, %73
  br i1 %75, label %76, label %96

76:                                               ; preds = %74
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = add nsw i32 %78, %79
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = add nsw i32 %80, %81
  %83 = sub nsw i32 %82, 1
  %84 = load ptr, ptr %16, align 8, !tbaa !13
  %85 = getelementptr inbounds ptr, ptr %84, i64 5
  %86 = load ptr, ptr %85, align 8
  %87 = invoke noundef double %86(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %77, i32 noundef %83)
          to label %88 unwind label %46

88:                                               ; preds = %76
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %89, i32 noundef %90)
          to label %92 unwind label %46

92:                                               ; preds = %88
  store double %87, ptr %91, align 8, !tbaa !11
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %12, align 4, !tbaa !9
  br label %71, !llvm.loop !18

96:                                               ; preds = %74
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %11, align 4, !tbaa !9
  br label %21, !llvm.loop !19

100:                                              ; preds = %24
  store i1 true, ptr %13, align 1
  %101 = load i1, ptr %13, align 1
  br i1 %101, label %103, label %102

102:                                              ; preds = %100
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %103

103:                                              ; preds = %102, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void

104:                                              ; preds = %46
  %105 = load ptr, ptr %14, align 8
  %106 = load i32, ptr %15, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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.Matrix = type { ptr, ptr, i32, i32 }

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Matrix10insertColsEiid(ptr dead_on_unwind noalias writable sret(%class.Matrix) align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3, double noundef %4) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %7 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %8 = add nsw i32 %7, %3
  tail call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %6, i32 noundef %8)
  %9 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not43 = icmp slt i32 %9, 1
  br i1 %.not43, label %._crit_edge45, label %.preheader36.lr.ph

.preheader36.lr.ph:                               ; preds = %5
  %10 = icmp sgt i32 %2, 1
  %11 = add i32 %3, %2
  %12 = icmp sgt i32 %3, 0
  %13 = add i32 %11, -1
  br i1 %10, label %.preheader36.lr.ph.split.us, label %.preheader36.lr.ph.split

.preheader36.lr.ph.split.us:                      ; preds = %.preheader36.lr.ph
  br i1 %12, label %.preheader36.us.us, label %.preheader36.us

.preheader36.us.us:                               ; preds = %.preheader36.lr.ph.split.us, %._crit_edge.us.us
  %.044.us.us = phi i32 [ %23, %._crit_edge.us.us ], [ 1, %.preheader36.lr.ph.split.us ]
  br label %28

.lr.ph42.us.us:                                   ; preds = %..preheader_crit_edge.us.us, %19
  %.241.us.us = phi i32 [ %21, %19 ], [ %11, %..preheader_crit_edge.us.us ]
  %14 = add i32 %13, %.241.us.us
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 40
  %17 = load ptr, ptr %16, align 8
  %18 = invoke noundef double %17(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044.us.us, i32 noundef %14)
          to label %19 unwind label %.loopexit.split.us.split.us

19:                                               ; preds = %.lr.ph42.us.us
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us.us, i32 noundef %.241.us.us)
  store double %18, ptr %20, align 8, !tbaa !8
  %21 = add nuw nsw i32 %.241.us.us, 1
  %22 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not34.us.us.not = icmp slt i32 %.241.us.us, %22
  br i1 %.not34.us.us.not, label %.lr.ph42.us.us, label %._crit_edge.us.us, !llvm.loop !11

._crit_edge.us.us:                                ; preds = %19, %..preheader_crit_edge.us.us
  %23 = add nuw nsw i32 %.044.us.us, 1
  %24 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not.us.us.not = icmp slt i32 %.044.us.us, %24
  br i1 %.not.us.us.not, label %.preheader36.us.us, label %._crit_edge45, !llvm.loop !13

..preheader35_crit_edge.us.us:                    ; preds = %33, %..preheader35_crit_edge.us.us
  %.138.us.us = phi i32 [ %26, %..preheader35_crit_edge.us.us ], [ %2, %33 ]
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us.us, i32 noundef %.138.us.us)
  store double %4, ptr %25, align 8, !tbaa !8
  %26 = add nuw nsw i32 %.138.us.us, 1
  %27 = icmp slt i32 %26, %11
  br i1 %27, label %..preheader35_crit_edge.us.us, label %..preheader_crit_edge.us.us, !llvm.loop !14

28:                                               ; preds = %33, %.preheader36.us.us
  %.03137.us.us = phi i32 [ 1, %.preheader36.us.us ], [ %35, %33 ]
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 40
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef double %31(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044.us.us, i32 noundef %.03137.us.us)
          to label %33 unwind label %.loopexit.split-lp.split.us.split.us

33:                                               ; preds = %28
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us.us, i32 noundef %.03137.us.us)
  store double %32, ptr %34, align 8, !tbaa !8
  %35 = add nuw nsw i32 %.03137.us.us, 1
  %exitcond66.not = icmp eq i32 %35, %2
  br i1 %exitcond66.not, label %..preheader35_crit_edge.us.us, label %28, !llvm.loop !15

..preheader_crit_edge.us.us:                      ; preds = %..preheader35_crit_edge.us.us
  %36 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not3440.us.us = icmp sgt i32 %11, %36
  br i1 %.not3440.us.us, label %._crit_edge.us.us, label %.lr.ph42.us.us

.loopexit.split.us.split.us:                      ; preds = %.lr.ph42.us.us
  %lpad.loopexit.us.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp.split.us.split.us:             ; preds = %28
  %lpad.loopexit.split-lp.us.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader36.us:                                  ; preds = %.preheader36.lr.ph.split.us, %._crit_edge.us
  %.044.us = phi i32 [ %46, %._crit_edge.us ], [ 1, %.preheader36.lr.ph.split.us ]
  br label %48

.lr.ph42.us:                                      ; preds = %..preheader35_crit_edge.us, %42
  %.241.us = phi i32 [ %44, %42 ], [ %11, %..preheader35_crit_edge.us ]
  %37 = add i32 %13, %.241.us
  %38 = load ptr, ptr %1, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 40
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef double %40(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044.us, i32 noundef %37)
          to label %42 unwind label %.loopexit.split.us.split

42:                                               ; preds = %.lr.ph42.us
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us, i32 noundef %.241.us)
  store double %41, ptr %43, align 8, !tbaa !8
  %44 = add nsw i32 %.241.us, 1
  %45 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not34.us.not = icmp slt i32 %.241.us, %45
  br i1 %.not34.us.not, label %.lr.ph42.us, label %._crit_edge.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %42, %..preheader35_crit_edge.us
  %46 = add nuw nsw i32 %.044.us, 1
  %47 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not.us.not = icmp slt i32 %.044.us, %47
  br i1 %.not.us.not, label %.preheader36.us, label %._crit_edge45, !llvm.loop !13

48:                                               ; preds = %.preheader36.us, %53
  %.03137.us = phi i32 [ 1, %.preheader36.us ], [ %55, %53 ]
  %49 = load ptr, ptr %1, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 40
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef double %51(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044.us, i32 noundef %.03137.us)
          to label %53 unwind label %.loopexit.split-lp.split.us.split

53:                                               ; preds = %48
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us, i32 noundef %.03137.us)
  store double %52, ptr %54, align 8, !tbaa !8
  %55 = add nuw nsw i32 %.03137.us, 1
  %exitcond.not = icmp eq i32 %55, %2
  br i1 %exitcond.not, label %..preheader35_crit_edge.us, label %48, !llvm.loop !15

..preheader35_crit_edge.us:                       ; preds = %53
  %56 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not3440.us = icmp sgt i32 %11, %56
  br i1 %.not3440.us, label %._crit_edge.us, label %.lr.ph42.us

.loopexit.split.us.split:                         ; preds = %.lr.ph42.us
  %lpad.loopexit.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp.split.us.split:                ; preds = %48
  %lpad.loopexit.split-lp.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader36.lr.ph.split:                         ; preds = %.preheader36.lr.ph
  br i1 %12, label %.preheader36.us47, label %.preheader36

.preheader36.us47:                                ; preds = %.preheader36.lr.ph.split, %._crit_edge.us58
  %.044.us48 = phi i32 [ %66, %._crit_edge.us58 ], [ 1, %.preheader36.lr.ph.split ]
  br label %68

.lr.ph42.us57:                                    ; preds = %..preheader_crit_edge.us56, %62
  %.241.us49 = phi i32 [ %64, %62 ], [ %11, %..preheader_crit_edge.us56 ]
  %57 = add i32 %13, %.241.us49
  %58 = load ptr, ptr %1, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 40
  %60 = load ptr, ptr %59, align 8
  %61 = invoke noundef double %60(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044.us48, i32 noundef %57)
          to label %62 unwind label %.loopexit.split.split.us

62:                                               ; preds = %.lr.ph42.us57
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us48, i32 noundef %.241.us49)
  store double %61, ptr %63, align 8, !tbaa !8
  %64 = add nsw i32 %.241.us49, 1
  %65 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not34.us50.not = icmp slt i32 %.241.us49, %65
  br i1 %.not34.us50.not, label %.lr.ph42.us57, label %._crit_edge.us58, !llvm.loop !11

._crit_edge.us58:                                 ; preds = %62, %..preheader_crit_edge.us56
  %66 = add nuw nsw i32 %.044.us48, 1
  %67 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not.us51.not = icmp slt i32 %.044.us48, %67
  br i1 %.not.us51.not, label %.preheader36.us47, label %._crit_edge45, !llvm.loop !13

68:                                               ; preds = %.preheader36.us47, %68
  %.138.us52 = phi i32 [ %2, %.preheader36.us47 ], [ %70, %68 ]
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044.us48, i32 noundef %.138.us52)
  store double %4, ptr %69, align 8, !tbaa !8
  %70 = add nsw i32 %.138.us52, 1
  %71 = icmp slt i32 %70, %11
  br i1 %71, label %68, label %..preheader_crit_edge.us56, !llvm.loop !14

..preheader_crit_edge.us56:                       ; preds = %68
  %72 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not3440.us54 = icmp sgt i32 %11, %72
  br i1 %.not3440.us54, label %._crit_edge.us58, label %.lr.ph42.us57

.loopexit.split.split.us:                         ; preds = %.lr.ph42.us57
  %lpad.loopexit.us59 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader36:                                     ; preds = %.preheader36.lr.ph.split, %._crit_edge
  %.044 = phi i32 [ %83, %._crit_edge ], [ 1, %.preheader36.lr.ph.split ]
  %73 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not3440 = icmp sgt i32 %11, %73
  br i1 %.not3440, label %._crit_edge, label %.lr.ph42

.loopexit.split.split:                            ; preds = %.lr.ph42
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.split-lp.split.us.split.us, %.loopexit.split-lp.split.us.split, %.loopexit.split.us.split.us, %.loopexit.split.us.split, %.loopexit.split.split.us, %.loopexit.split.split
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit.us, %.loopexit.split.us.split ], [ %lpad.loopexit.us.us, %.loopexit.split.us.split.us ], [ %lpad.loopexit, %.loopexit.split.split ], [ %lpad.loopexit.us59, %.loopexit.split.split.us ], [ %lpad.loopexit.split-lp.us, %.loopexit.split-lp.split.us.split ], [ %lpad.loopexit.split-lp.us.us, %.loopexit.split-lp.split.us.split.us ]
  tail call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %lpad.phi

.lr.ph42:                                         ; preds = %.preheader36, %79
  %.241 = phi i32 [ %81, %79 ], [ %11, %.preheader36 ]
  %74 = add i32 %13, %.241
  %75 = load ptr, ptr %1, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i64 40
  %77 = load ptr, ptr %76, align 8
  %78 = invoke noundef double %77(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.044, i32 noundef %74)
          to label %79 unwind label %.loopexit.split.split

79:                                               ; preds = %.lr.ph42
  %80 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.044, i32 noundef %.241)
  store double %78, ptr %80, align 8, !tbaa !8
  %81 = add nsw i32 %.241, 1
  %82 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not34.not = icmp slt i32 %.241, %82
  br i1 %.not34.not, label %.lr.ph42, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %79, %.preheader36
  %83 = add nuw nsw i32 %.044, 1
  %84 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not.not = icmp slt i32 %.044, %84
  br i1 %.not.not, label %.preheader36, label %._crit_edge45, !llvm.loop !13

._crit_edge45:                                    ; preds = %._crit_edge, %._crit_edge.us58, %._crit_edge.us, %._crit_edge.us.us, %5
  ret void
}

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


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