; 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 @_ZNK6Matrix7extractEii(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) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i1 false, ptr %11, align 1
  %15 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %16 = sub nsw i32 %15, 1
  %17 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %18 = sub nsw i32 %17, 1
  call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %16, i32 noundef %18)
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %73, %4
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = sub nsw i32 %21, 1
  %23 = icmp sle i32 %20, %22
  br i1 %23, label %24, label %76

24:                                               ; preds = %19
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %42, %24
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = sub nsw i32 %27, 1
  %29 = icmp sle i32 %26, %28
  br i1 %29, label %30, label %49

30:                                               ; preds = %25
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = load i32, ptr %10, align 4, !tbaa !9
  %33 = load ptr, ptr %14, align 8, !tbaa !11
  %34 = getelementptr inbounds ptr, ptr %33, i64 5
  %35 = load ptr, ptr %34, align 8
  %36 = invoke noundef double %35(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %31, i32 noundef %32)
          to label %37 unwind label %45

37:                                               ; preds = %30
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %38, i32 noundef %39)
          to label %41 unwind label %45

41:                                               ; preds = %37
  store double %36, ptr %40, align 8, !tbaa !13
  br label %42

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

45:                                               ; preds = %121, %112, %107, %97, %89, %78, %64, %56, %51, %37, %30
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %12, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %13, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %137

49:                                               ; preds = %25
  %50 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %50, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %69, %49
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %54 unwind label %45

54:                                               ; preds = %51
  %55 = icmp sle i32 %52, %53
  br i1 %55, label %56, label %72

56:                                               ; preds = %54
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  %60 = load ptr, ptr %14, align 8, !tbaa !11
  %61 = getelementptr inbounds ptr, ptr %60, i64 5
  %62 = load ptr, ptr %61, align 8
  %63 = invoke noundef double %62(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %57, i32 noundef %59)
          to label %64 unwind label %45

64:                                               ; preds = %56
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %65, i32 noundef %66)
          to label %68 unwind label %45

68:                                               ; preds = %64
  store double %63, ptr %67, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %10, align 4, !tbaa !9
  br label %51, !llvm.loop !17

72:                                               ; preds = %54
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %9, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %9, align 4, !tbaa !9
  br label %19, !llvm.loop !18

76:                                               ; preds = %19
  %77 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %77, ptr %9, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %130, %76
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %81 unwind label %45

81:                                               ; preds = %78
  %82 = icmp sle i32 %79, %80
  br i1 %82, label %83, label %133

83:                                               ; preds = %81
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %102, %83
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = sub nsw i32 %86, 1
  %88 = icmp sle i32 %85, %87
  br i1 %88, label %89, label %105

89:                                               ; preds = %84
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = load ptr, ptr %14, align 8, !tbaa !11
  %94 = getelementptr inbounds ptr, ptr %93, i64 5
  %95 = load ptr, ptr %94, align 8
  %96 = invoke noundef double %95(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %91, i32 noundef %92)
          to label %97 unwind label %45

97:                                               ; preds = %89
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %98, i32 noundef %99)
          to label %101 unwind label %45

101:                                              ; preds = %97
  store double %96, ptr %100, align 8, !tbaa !13
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %10, align 4, !tbaa !9
  br label %84, !llvm.loop !19

105:                                              ; preds = %84
  %106 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %106, ptr %10, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %126, %105
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %110 unwind label %45

110:                                              ; preds = %107
  %111 = icmp sle i32 %108, %109
  br i1 %111, label %112, label %129

112:                                              ; preds = %110
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  %117 = load ptr, ptr %14, align 8, !tbaa !11
  %118 = getelementptr inbounds ptr, ptr %117, i64 5
  %119 = load ptr, ptr %118, align 8
  %120 = invoke noundef double %119(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %114, i32 noundef %116)
          to label %121 unwind label %45

121:                                              ; preds = %112
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %122, i32 noundef %123)
          to label %125 unwind label %45

125:                                              ; preds = %121
  store double %120, ptr %124, align 8, !tbaa !13
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %10, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %10, align 4, !tbaa !9
  br label %107, !llvm.loop !20

129:                                              ; preds = %110
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !9
  br label %78, !llvm.loop !21

133:                                              ; preds = %81
  store i1 true, ptr %11, align 1
  %134 = load i1, ptr %11, align 1
  br i1 %134, label %136, label %135

135:                                              ; preds = %133
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %136

136:                                              ; preds = %135, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void

137:                                              ; preds = %45
  %138 = load ptr, ptr %12, align 8
  %139 = load i32, ptr %13, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !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 @_ZNK6Matrix7extractEii(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) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %6 = add nsw i32 %5, -1
  %7 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %8 = add nsw i32 %7, -1
  tail call void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %6, i32 noundef %8)
  %.not.not57 = icmp sgt i32 %2, 1
  br i1 %.not.not57, label %.preheader51.lr.ph, label %.preheader47

.preheader51.lr.ph:                               ; preds = %4
  %.not41.not52 = icmp sgt i32 %3, 1
  br i1 %.not41.not52, label %.preheader51.us, label %.preheader51

.preheader51.us:                                  ; preds = %.preheader51.lr.ph, %._crit_edge.us
  %.058.us = phi i32 [ %17, %._crit_edge.us ], [ 1, %.preheader51.lr.ph ]
  br label %18

.lr.ph56.us:                                      ; preds = %..preheader48_crit_edge.us, %14
  %.13855.us = phi i32 [ %9, %14 ], [ %3, %..preheader48_crit_edge.us ]
  %9 = add nuw nsw i32 %.13855.us, 1
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 40
  %12 = load ptr, ptr %11, align 8
  %13 = invoke noundef double %12(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.058.us, i32 noundef %9)
          to label %14 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split.us

14:                                               ; preds = %.lr.ph56.us
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.058.us, i32 noundef %.13855.us)
  store double %13, ptr %15, align 8, !tbaa !8
  %16 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not42.us.not = icmp slt i32 %.13855.us, %16
  br i1 %.not42.us.not, label %.lr.ph56.us, label %._crit_edge.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %14, %..preheader48_crit_edge.us
  %17 = add nuw nsw i32 %.058.us, 1
  %exitcond75.not = icmp eq i32 %17, %2
  br i1 %exitcond75.not, label %.preheader47, label %.preheader51.us, !llvm.loop !13

18:                                               ; preds = %.preheader51.us, %23
  %.03753.us = phi i32 [ 1, %.preheader51.us ], [ %25, %23 ]
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 40
  %21 = load ptr, ptr %20, align 8
  %22 = invoke noundef double %21(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.058.us, i32 noundef %.03753.us)
          to label %23 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.split.us

23:                                               ; preds = %18
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.058.us, i32 noundef %.03753.us)
  store double %22, ptr %24, align 8, !tbaa !8
  %25 = add nuw nsw i32 %.03753.us, 1
  %exitcond74.not = icmp eq i32 %25, %3
  br i1 %exitcond74.not, label %..preheader48_crit_edge.us, label %18, !llvm.loop !14

..preheader48_crit_edge.us:                       ; preds = %23
  %26 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not4254.us = icmp slt i32 %26, %3
  br i1 %.not4254.us, label %._crit_edge.us, label %.lr.ph56.us

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

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

.preheader51:                                     ; preds = %.preheader51.lr.ph, %._crit_edge
  %.058 = phi i32 [ %56, %._crit_edge ], [ 1, %.preheader51.lr.ph ]
  %27 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not4254 = icmp slt i32 %27, %3
  br i1 %.not4254, label %._crit_edge, label %.lr.ph56

.preheader47:                                     ; preds = %._crit_edge, %._crit_edge.us, %4
  %28 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not66 = icmp slt i32 %28, %2
  br i1 %.not66, label %._crit_edge68, label %.preheader43.lr.ph

.preheader43.lr.ph:                               ; preds = %.preheader47
  %.not39.not60 = icmp sgt i32 %3, 1
  br i1 %.not39.not60, label %.preheader43.us, label %.preheader43

.preheader43.us:                                  ; preds = %.preheader43.lr.ph, %._crit_edge65.us
  %.167.us = phi i32 [ %29, %._crit_edge65.us ], [ %2, %.preheader43.lr.ph ]
  %29 = add nsw i32 %.167.us, 1
  br label %39

.lr.ph64.us:                                      ; preds = %..preheader_crit_edge.us, %35
  %.363.us = phi i32 [ %30, %35 ], [ %3, %..preheader_crit_edge.us ]
  %30 = add nuw nsw i32 %.363.us, 1
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 40
  %33 = load ptr, ptr %32, align 8
  %34 = invoke noundef double %33(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %29, i32 noundef %30)
          to label %35 unwind label %.loopexit.split.us

35:                                               ; preds = %.lr.ph64.us
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.167.us, i32 noundef %.363.us)
  store double %34, ptr %36, align 8, !tbaa !8
  %37 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not40.us.not = icmp slt i32 %.363.us, %37
  br i1 %.not40.us.not, label %.lr.ph64.us, label %._crit_edge65.us, !llvm.loop !15

._crit_edge65.us:                                 ; preds = %35, %..preheader_crit_edge.us
  %38 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not.us.not = icmp slt i32 %.167.us, %38
  br i1 %.not.us.not, label %.preheader43.us, label %._crit_edge68, !llvm.loop !16

39:                                               ; preds = %.preheader43.us, %44
  %.261.us = phi i32 [ 1, %.preheader43.us ], [ %46, %44 ]
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 40
  %42 = load ptr, ptr %41, align 8
  %43 = invoke noundef double %42(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %29, i32 noundef %.261.us)
          to label %44 unwind label %.loopexit.split-lp.loopexit.split.us

44:                                               ; preds = %39
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.167.us, i32 noundef %.261.us)
  store double %43, ptr %45, align 8, !tbaa !8
  %46 = add nuw nsw i32 %.261.us, 1
  %exitcond76.not = icmp eq i32 %46, %3
  br i1 %exitcond76.not, label %..preheader_crit_edge.us, label %39, !llvm.loop !17

..preheader_crit_edge.us:                         ; preds = %44
  %47 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not4062.us = icmp slt i32 %47, %3
  br i1 %.not4062.us, label %._crit_edge65.us, label %.lr.ph64.us

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

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

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

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

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

.lr.ph56:                                         ; preds = %.preheader51, %53
  %.13855 = phi i32 [ %48, %53 ], [ %3, %.preheader51 ]
  %48 = add nsw i32 %.13855, 1
  %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 %.058, i32 noundef %48)
          to label %53 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split

53:                                               ; preds = %.lr.ph56
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.058, i32 noundef %.13855)
  store double %52, ptr %54, align 8, !tbaa !8
  %55 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not42.not = icmp slt i32 %.13855, %55
  br i1 %.not42.not, label %.lr.ph56, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %53, %.preheader51
  %56 = add nuw nsw i32 %.058, 1
  %exitcond.not = icmp eq i32 %56, %2
  br i1 %exitcond.not, label %.preheader47, label %.preheader51, !llvm.loop !13

.preheader43:                                     ; preds = %.preheader43.lr.ph, %._crit_edge65
  %.167 = phi i32 [ %.pre, %._crit_edge65 ], [ %2, %.preheader43.lr.ph ]
  %57 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not4062 = icmp slt i32 %57, %3
  %.pre = add nsw i32 %.167, 1
  br i1 %.not4062, label %._crit_edge65, label %.lr.ph64

.lr.ph64:                                         ; preds = %.preheader43, %63
  %.363 = phi i32 [ %58, %63 ], [ %3, %.preheader43 ]
  %58 = add nsw i32 %.363, 1
  %59 = load ptr, ptr %1, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 40
  %61 = load ptr, ptr %60, align 8
  %62 = invoke noundef double %61(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.pre, i32 noundef %58)
          to label %63 unwind label %.loopexit.split

63:                                               ; preds = %.lr.ph64
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.167, i32 noundef %.363)
  store double %62, ptr %64, align 8, !tbaa !8
  %65 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not40.not = icmp slt i32 %.363, %65
  br i1 %.not40.not, label %.lr.ph64, label %._crit_edge65, !llvm.loop !15

._crit_edge65:                                    ; preds = %63, %.preheader43
  %66 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.not.not71 = icmp slt i32 %.167, %66
  br i1 %.not.not71, label %.preheader43, label %._crit_edge68, !llvm.loop !16

._crit_edge68:                                    ; preds = %._crit_edge65, %._crit_edge65.us, %.preheader47
  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}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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