; LLVM IR from JoshuaSBrown/QC_Tools :: src/libcatnip/matrix.ll (ZN6catnip23Matrix_concatenate_rowsENS_6MatrixERKS0_)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.catnip::Matrix" = type { i32, i32, i32, ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24), double noundef, i32 noundef, i32 noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip23Matrix_concatenate_rowsENS_6MatrixERKS0_(ptr dead_on_unwind noalias writable sret(%"class.catnip::Matrix") align 8 %0, ptr noundef byval(%"class.catnip::Matrix") align 8 %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  store ptr %2, ptr %4, align 8, !tbaa !5
  %11 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = icmp ne i32 %11, %13
  br i1 %14, label %15, label %18

15:                                               ; preds = %3
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
  call void @_ZN6catnip6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %111

18:                                               ; preds = %3
  %19 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = icmp ne i32 %19, %21
  br i1 %22, label %23, label %26

23:                                               ; preds = %18
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
  call void @_ZN6catnip6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %111

26:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %27 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i32 %27, ptr %6, align 4, !tbaa !9
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  %31 = add nsw i32 %28, %30
  store i32 %31, ptr %5, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %34 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN6catnip6MatrixC1Eiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %32, i32 noundef %33, i32 noundef %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %66, %26
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %39, label %69

39:                                               ; preds = %35
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %62, %39
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %44, label %65

44:                                               ; preds = %40
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %58, %44
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %49, label %61

49:                                               ; preds = %45
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = call noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %50, i32 noundef %51, i32 noundef %52)
  store double %53, ptr %10, align 8, !tbaa !11
  %54 = load double, ptr %10, align 8, !tbaa !11
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %54, i32 noundef %55, i32 noundef %56, i32 noundef %57)
  br label %58

58:                                               ; preds = %49
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %9, align 4, !tbaa !9
  br label %45, !llvm.loop !13

61:                                               ; preds = %45
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %8, align 4, !tbaa !9
  br label %40, !llvm.loop !15

65:                                               ; preds = %40
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %7, align 4, !tbaa !9
  br label %35, !llvm.loop !16

69:                                               ; preds = %35
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %107, %69
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %72)
  %74 = icmp sle i32 %71, %73
  br i1 %74, label %75, label %110

75:                                               ; preds = %70
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %103, %75
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %78)
  %80 = icmp sle i32 %77, %79
  br i1 %80, label %81, label %106

81:                                               ; preds = %76
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %99, %81
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %84)
  %86 = icmp sle i32 %83, %85
  br i1 %86, label %87, label %102

87:                                               ; preds = %82
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = load i32, ptr %8, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = call noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24) %88, i32 noundef %89, i32 noundef %90, i32 noundef %91)
  store double %92, ptr %10, align 8, !tbaa !11
  %93 = load double, ptr %10, align 8, !tbaa !11
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = add nsw i32 %94, %95
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %93, i32 noundef %96, i32 noundef %97, i32 noundef %98)
  br label %99

99:                                               ; preds = %87
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %9, align 4, !tbaa !9
  br label %82, !llvm.loop !17

102:                                              ; preds = %82
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %8, align 4, !tbaa !9
  br label %76, !llvm.loop !18

106:                                              ; preds = %76
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %7, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %7, align 4, !tbaa !9
  br label %70, !llvm.loop !19

110:                                              ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %111

111:                                              ; preds = %110, %23, %15
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare void @_ZN6catnip6MatrixC1Ev(ptr)

declare void @_ZN6catnip6MatrixC1Eiii(ptr, i32, i32, i32)

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 = !{!"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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.catnip::Matrix" = type { i32, i32, i32, ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24), double noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip23Matrix_concatenate_rowsENS_6MatrixERKS0_(ptr dead_on_unwind noalias writable sret(%"class.catnip::Matrix") align 8 %0, ptr noundef nonnull byval(%"class.catnip::Matrix") align 8 %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 {
  %4 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %5 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not = icmp eq i32 %4, %5
  br i1 %.not, label %6, label %.loopexit.sink.split

6:                                                ; preds = %3
  %7 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %8 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not39 = icmp eq i32 %7, %8
  br i1 %.not39, label %9, label %.loopexit.sink.split

9:                                                ; preds = %6
  %10 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %11 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %12 = add nsw i32 %11, %10
  %13 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %14 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @_ZN6catnip6MatrixC1Eiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %12, i32 noundef %13, i32 noundef %14)
  %15 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not4055 = icmp slt i32 %15, 1
  br i1 %.not4055, label %.preheader47, label %.preheader49

.preheader49:                                     ; preds = %9, %._crit_edge54
  %.03756 = phi i32 [ %24, %._crit_edge54 ], [ 1, %9 ]
  %16 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not4452 = icmp slt i32 %16, 1
  br i1 %.not4452, label %._crit_edge54, label %.preheader48

.preheader47:                                     ; preds = %._crit_edge54, %9
  %17 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not4164 = icmp slt i32 %17, 1
  br i1 %.not4164, label %.loopexit, label %.preheader46

.preheader48:                                     ; preds = %.preheader49, %._crit_edge
  %.03553 = phi i32 [ %22, %._crit_edge ], [ 1, %.preheader49 ]
  %18 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not4550 = icmp slt i32 %18, 1
  br i1 %.not4550, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader48, %.lr.ph
  %.051 = phi i32 [ %20, %.lr.ph ], [ 1, %.preheader48 ]
  %19 = call noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.03756, i32 noundef %.03553, i32 noundef %.051)
  call void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %19, i32 noundef %.03756, i32 noundef %.03553, i32 noundef %.051)
  %20 = add nuw nsw i32 %.051, 1
  %21 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not45.not = icmp slt i32 %.051, %21
  br i1 %.not45.not, label %.lr.ph, label %._crit_edge, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %.preheader48
  %22 = add nuw nsw i32 %.03553, 1
  %23 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not44.not = icmp slt i32 %.03553, %23
  br i1 %.not44.not, label %.preheader48, label %._crit_edge54, !llvm.loop !7

._crit_edge54:                                    ; preds = %._crit_edge, %.preheader49
  %24 = add nuw nsw i32 %.03756, 1
  %25 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not40.not = icmp slt i32 %.03756, %25
  br i1 %.not40.not, label %.preheader49, label %.preheader47, !llvm.loop !8

.preheader46:                                     ; preds = %.preheader47, %._crit_edge63
  %.13865 = phi i32 [ %34, %._crit_edge63 ], [ 1, %.preheader47 ]
  %26 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not4261 = icmp slt i32 %26, 1
  br i1 %.not4261, label %._crit_edge63, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader46
  %27 = add nsw i32 %.13865, %10
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge60
  %.13662 = phi i32 [ 1, %.preheader.lr.ph ], [ %32, %._crit_edge60 ]
  %28 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not4357 = icmp slt i32 %28, 1
  br i1 %.not4357, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %.preheader, %.lr.ph59
  %.158 = phi i32 [ %30, %.lr.ph59 ], [ 1, %.preheader ]
  %29 = call noundef double @_ZNK6catnip6Matrix8get_elemEiii(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.13865, i32 noundef %.13662, i32 noundef %.158)
  call void @_ZN6catnip6Matrix8set_elemEdiii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %29, i32 noundef %27, i32 noundef %.13662, i32 noundef %.158)
  %30 = add nuw nsw i32 %.158, 1
  %31 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not43.not = icmp slt i32 %.158, %31
  br i1 %.not43.not, label %.lr.ph59, label %._crit_edge60, !llvm.loop !9

._crit_edge60:                                    ; preds = %.lr.ph59, %.preheader
  %32 = add nuw nsw i32 %.13662, 1
  %33 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not42.not = icmp slt i32 %.13662, %33
  br i1 %.not42.not, label %.preheader, label %._crit_edge63, !llvm.loop !10

._crit_edge63:                                    ; preds = %._crit_edge60, %.preheader46
  %34 = add nuw nsw i32 %.13865, 1
  %35 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not41.not = icmp slt i32 %.13865, %35
  br i1 %.not41.not, label %.preheader46, label %.loopexit, !llvm.loop !11

.loopexit.sink.split:                             ; preds = %6, %3
  %.str.4.sink = phi ptr [ @.str.3, %3 ], [ @.str.4, %6 ]
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull %.str.4.sink)
  call void @_ZN6catnip6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge63, %.loopexit.sink.split, %.preheader47
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare void @_ZN6catnip6MatrixC1Ev(ptr) local_unnamed_addr

declare void @_ZN6catnip6MatrixC1Eiii(ptr, i32, 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 = { 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 #2 = { inlinehint 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass