; LLVM IR from JoshuaSBrown/QC_Tools :: src/libcatnip (qc_functions)

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

%"struct.std::_List_iterator" = type { ptr }

@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.18 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.19 = external hidden unnamed_addr constant [45 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

declare noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

declare noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24)) #1

declare noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #1

; Function Attrs: nounwind
declare noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6catnip19mergeListOfMatricesERNSt7__cxx114listIPNS_6MatrixESaIS3_EEEiiRKNS0_12basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #6 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_List_iterator", align 8
  %14 = alloca %"struct.std::_List_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_List_iterator", align 8
  %22 = alloca %"struct.std::_List_iterator", align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %27 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #8
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %27, i32 noundef %28, i32 noundef %29)
          to label %30 unwind label %44

30:                                               ; preds = %4
  store ptr %27, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.15) #7
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %114

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %37 = getelementptr inbounds %"struct.std::_List_iterator", ptr %13, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %110, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  %41 = getelementptr inbounds %"struct.std::_List_iterator", ptr %14, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br i1 %42, label %48, label %43

43:                                               ; preds = %38
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %113

44:                                               ; preds = %4
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %27, i64 noundef 24) #9
  br label %204

48:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %50, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %61

54:                                               ; preds = %48
  %55 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef @.str.18)
          to label %56 unwind label %57

56:                                               ; preds = %54
  call void @__cxa_throw(ptr %55, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

57:                                               ; preds = %54
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %11, align 4
  call void @__cxa_free_exception(ptr %55) #7
  br label %112

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %102, %61
  %63 = load i32, ptr %18, align 4, !tbaa !9
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %64)
  %66 = icmp sle i32 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %105

68:                                               ; preds = %62
  %69 = load i32, ptr %17, align 4, !tbaa !9
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = icmp sgt i32 %69, %70
  br i1 %71, label %72, label %79

72:                                               ; preds = %68
  %73 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef @.str.18)
          to label %74 unwind label %75

74:                                               ; preds = %72
  call void @__cxa_throw(ptr %73, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

75:                                               ; preds = %72
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  call void @__cxa_free_exception(ptr %73) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %112

79:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 1, ptr %19, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %96, %79
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %82)
  %84 = icmp sle i32 %81, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %80
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %99

86:                                               ; preds = %80
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = load i32, ptr %18, align 4, !tbaa !9
  %90 = load i32, ptr %19, align 4, !tbaa !9
  %91 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %88, i32 noundef %89, i32 noundef %90)
  %92 = load i32, ptr %17, align 4, !tbaa !9
  %93 = load i32, ptr %19, align 4, !tbaa !9
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = add nsw i32 %93, %94
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %87, double noundef %91, i32 noundef %92, i32 noundef %95)
  br label %96

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

99:                                               ; preds = %85
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %17, align 4, !tbaa !9
  br label %102

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

105:                                              ; preds = %67
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %106)
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = add nsw i32 %108, %107
  store i32 %109, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %110

110:                                              ; preds = %105
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %38, !llvm.loop !14

112:                                              ; preds = %75, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %204

113:                                              ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %202

114:                                              ; preds = %30
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = call noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef @.str.16) #7
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %194

118:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #7
  %121 = getelementptr inbounds %"struct.std::_List_iterator", ptr %21, i32 0, i32 0
  store ptr %120, ptr %121, align 8
  br label %122

122:                                              ; preds = %190, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #7
  %125 = getelementptr inbounds %"struct.std::_List_iterator", ptr %22, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br i1 %126, label %128, label %127

127:                                              ; preds = %122
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %193

128:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  store ptr %130, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 1, ptr %24, align 4, !tbaa !9
  %131 = load i32, ptr %20, align 4, !tbaa !9
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = icmp sgt i32 %131, %132
  br i1 %133, label %134, label %141

134:                                              ; preds = %128
  %135 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef @.str.18)
          to label %136 unwind label %137

136:                                              ; preds = %134
  call void @__cxa_throw(ptr %135, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

137:                                              ; preds = %134
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  call void @__cxa_free_exception(ptr %135) #7
  br label %192

141:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 1, ptr %25, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %182, %141
  %143 = load i32, ptr %25, align 4, !tbaa !9
  %144 = load ptr, ptr %23, align 8, !tbaa !5
  %145 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %144)
  %146 = icmp sle i32 %143, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %142
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %185

148:                                              ; preds = %142
  %149 = load i32, ptr %24, align 4, !tbaa !9
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = icmp sgt i32 %149, %150
  br i1 %151, label %152, label %159

152:                                              ; preds = %148
  %153 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %153, ptr noundef @.str.18)
          to label %154 unwind label %155

154:                                              ; preds = %152
  call void @__cxa_throw(ptr %153, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

155:                                              ; preds = %152
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %10, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %11, align 4
  call void @__cxa_free_exception(ptr %153) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %192

159:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %176, %159
  %161 = load i32, ptr %26, align 4, !tbaa !9
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  %163 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %162)
  %164 = icmp sle i32 %161, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %160
  store i32 17, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %179

166:                                              ; preds = %160
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = load ptr, ptr %23, align 8, !tbaa !5
  %169 = load i32, ptr %26, align 4, !tbaa !9
  %170 = load i32, ptr %25, align 4, !tbaa !9
  %171 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %168, i32 noundef %169, i32 noundef %170)
  %172 = load i32, ptr %20, align 4, !tbaa !9
  %173 = load i32, ptr %26, align 4, !tbaa !9
  %174 = add nsw i32 %172, %173
  %175 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %167, double noundef %171, i32 noundef %174, i32 noundef %175)
  br label %176

176:                                              ; preds = %166
  %177 = load i32, ptr %26, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %26, align 4, !tbaa !9
  br label %160, !llvm.loop !15

179:                                              ; preds = %165
  %180 = load i32, ptr %24, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %24, align 4, !tbaa !9
  br label %182

182:                                              ; preds = %179
  %183 = load i32, ptr %25, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %25, align 4, !tbaa !9
  br label %142, !llvm.loop !16

185:                                              ; preds = %147
  %186 = load ptr, ptr %23, align 8, !tbaa !5
  %187 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %186)
  %188 = load i32, ptr %20, align 4, !tbaa !9
  %189 = add nsw i32 %188, %187
  store i32 %189, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %190

190:                                              ; preds = %185
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %122, !llvm.loop !17

192:                                              ; preds = %155, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %204

193:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %201

194:                                              ; preds = %114
  %195 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %195, ptr noundef @.str.19)
          to label %196 unwind label %197

196:                                              ; preds = %194
  call void @__cxa_throw(ptr %195, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #10
  unreachable

197:                                              ; preds = %194
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %10, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %11, align 4
  call void @__cxa_free_exception(ptr %195) #7
  br label %204

201:                                              ; preds = %193
  br label %202

202:                                              ; preds = %201, %113
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret ptr %203

204:                                              ; preds = %197, %192, %112, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %10, align 8
  %207 = load i32, ptr %11, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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}


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

%"struct.std::_List_iterator" = type { ptr }

@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.18 = external hidden unnamed_addr constant [36 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.19 = external hidden unnamed_addr constant [45 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

declare noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

declare noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

declare void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24), double noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN6catnip19mergeListOfMatricesERNSt7__cxx114listIPNS_6MatrixESaIS3_EEEiiRKNS0_12basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca %"struct.std::_List_iterator", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
  invoke void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %1, i32 noundef %2)
          to label %10 unwind label %18

10:                                               ; preds = %4
  %11 = tail call noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.15) #9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %47

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %14 = tail call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %14, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %15 = tail call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %15, ptr %6, align 8
  %16 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br i1 %16, label %.lr.ph93.preheader, label %._crit_edge94

.lr.ph93.preheader:                               ; preds = %13
  %smax95 = call i32 @llvm.smax.i32(i32 %1, i32 0)
  %17 = add nuw i32 %smax95, 1
  br label %.lr.ph93

._crit_edge94:                                    ; preds = %._crit_edge90, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %87

18:                                               ; preds = %4
  %19 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %9, i64 noundef 24) #10
  br label %88

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %._crit_edge90
  %.06091 = phi i32 [ %30, %._crit_edge90 ], [ 0, %.lr.ph93.preheader ]
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = icmp sgt i32 %.06091, %2
  br i1 %22, label %24, label %.preheader68

.preheader68:                                     ; preds = %.lr.ph93
  %23 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %.not6386 = icmp slt i32 %23, 1
  br i1 %.not6386, label %._crit_edge90, label %.lr.ph89

24:                                               ; preds = %.lr.ph93
  %25 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull @.str.18)
          to label %26 unwind label %27

26:                                               ; preds = %24
  call void @__cxa_throw(ptr nonnull %25, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
  unreachable

27:                                               ; preds = %24
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %46

._crit_edge90:                                    ; preds = %._crit_edge85, %.preheader68
  %29 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %30 = add nsw i32 %29, %.06091
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %32 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %32, ptr %6, align 8
  %33 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br i1 %33, label %.lr.ph93, label %._crit_edge94, !llvm.loop !9

.lr.ph89:                                         ; preds = %.preheader68, %._crit_edge85
  %.05588 = phi i32 [ %40, %._crit_edge85 ], [ 1, %.preheader68 ]
  %exitcond96 = icmp eq i32 %.05588, %17
  br i1 %exitcond96, label %35, label %.preheader

.preheader:                                       ; preds = %.lr.ph89
  %34 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %.not6482 = icmp slt i32 %34, 1
  br i1 %.not6482, label %._crit_edge85, label %.lr.ph84

35:                                               ; preds = %.lr.ph89
  %36 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull @.str.18)
          to label %37 unwind label %38

37:                                               ; preds = %35
  call void @__cxa_throw(ptr nonnull %36, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
  unreachable

38:                                               ; preds = %35
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %46

._crit_edge85:                                    ; preds = %.lr.ph84, %.preheader
  %40 = add nuw nsw i32 %.05588, 1
  %41 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %.not63.not = icmp slt i32 %.05588, %41
  br i1 %.not63.not, label %.lr.ph89, label %._crit_edge90, !llvm.loop !11

.lr.ph84:                                         ; preds = %.preheader, %.lr.ph84
  %.05483 = phi i32 [ %44, %.lr.ph84 ], [ 1, %.preheader ]
  %42 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef %.05588, i32 noundef %.05483)
  %43 = add nsw i32 %.05483, %.06091
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef %42, i32 noundef %.05588, i32 noundef %43)
  %44 = add nuw nsw i32 %.05483, 1
  %45 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %.not64.not = icmp slt i32 %.05483, %45
  br i1 %.not64.not, label %.lr.ph84, label %._crit_edge85, !llvm.loop !12

46:                                               ; preds = %38, %27
  %.sink = phi ptr [ %36, %38 ], [ %25, %27 ]
  %.pn65 = phi { ptr, i32 } [ %39, %38 ], [ %28, %27 ]
  call void @__cxa_free_exception(ptr %.sink) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %88

47:                                               ; preds = %10
  %48 = tail call noundef i32 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.16) #9
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %82

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %51 = tail call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %51, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %52 = tail call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %52, ptr %8, align 8
  %53 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br i1 %53, label %.lr.ph80.preheader, label %._crit_edge81

.lr.ph80.preheader:                               ; preds = %50
  %smax = call i32 @llvm.smax.i32(i32 %2, i32 0)
  %54 = add nuw i32 %smax, 1
  br label %.lr.ph80

._crit_edge81:                                    ; preds = %._crit_edge77, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %87

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %._crit_edge77
  %.05378 = phi i32 [ %65, %._crit_edge77 ], [ 0, %.lr.ph80.preheader ]
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIPN6catnip6MatrixEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = icmp sgt i32 %.05378, %1
  br i1 %57, label %59, label %.preheader70

.preheader70:                                     ; preds = %.lr.ph80
  %58 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %.not73 = icmp slt i32 %58, 1
  br i1 %.not73, label %._crit_edge77, label %.lr.ph76

59:                                               ; preds = %.lr.ph80
  %60 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull @.str.18)
          to label %61 unwind label %62

61:                                               ; preds = %59
  call void @__cxa_throw(ptr nonnull %60, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
  unreachable

62:                                               ; preds = %59
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %81

._crit_edge77:                                    ; preds = %._crit_edge, %.preheader70
  %64 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %65 = add nsw i32 %64, %.05378
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %67 = call ptr @_ZNSt7__cxx114listIPN6catnip6MatrixESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %67, ptr %8, align 8
  %68 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br i1 %68, label %.lr.ph80, label %._crit_edge81, !llvm.loop !13

.lr.ph76:                                         ; preds = %.preheader70, %._crit_edge
  %.05075 = phi i32 [ %75, %._crit_edge ], [ 1, %.preheader70 ]
  %exitcond = icmp eq i32 %.05075, %54
  br i1 %exitcond, label %70, label %.preheader69

.preheader69:                                     ; preds = %.lr.ph76
  %69 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %.not6171 = icmp slt i32 %69, 1
  br i1 %.not6171, label %._crit_edge, label %.lr.ph

70:                                               ; preds = %.lr.ph76
  %71 = call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull @.str.18)
          to label %72 unwind label %73

72:                                               ; preds = %70
  call void @__cxa_throw(ptr nonnull %71, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
  unreachable

73:                                               ; preds = %70
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %81

._crit_edge:                                      ; preds = %.lr.ph, %.preheader69
  %75 = add nuw nsw i32 %.05075, 1
  %76 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %.not.not = icmp slt i32 %.05075, %76
  br i1 %.not.not, label %.lr.ph76, label %._crit_edge77, !llvm.loop !14

.lr.ph:                                           ; preds = %.preheader69, %.lr.ph
  %.072 = phi i32 [ %79, %.lr.ph ], [ 1, %.preheader69 ]
  %77 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef %.072, i32 noundef %.05075)
  %78 = add nsw i32 %.072, %.05378
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef %77, i32 noundef %78, i32 noundef %.05075)
  %79 = add nuw nsw i32 %.072, 1
  %80 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %.not61.not = icmp slt i32 %.072, %80
  br i1 %.not61.not, label %.lr.ph, label %._crit_edge, !llvm.loop !15

81:                                               ; preds = %73, %62
  %.sink97 = phi ptr [ %71, %73 ], [ %60, %62 ]
  %.pn = phi { ptr, i32 } [ %74, %73 ], [ %63, %62 ]
  call void @__cxa_free_exception(ptr %.sink97) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %88

82:                                               ; preds = %47
  %83 = tail call ptr @__cxa_allocate_exception(i64 16) #9
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull @.str.19)
          to label %84 unwind label %85

84:                                               ; preds = %82
  tail call void @__cxa_throw(ptr nonnull %83, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #11
  unreachable

85:                                               ; preds = %82
  %86 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %83) #9
  br label %88

87:                                               ; preds = %._crit_edge81, %._crit_edge94
  ret ptr %9

88:                                               ; preds = %85, %81, %46, %18
  %.pn65.pn = phi { ptr, i32 } [ %.pn65, %46 ], [ %.pn, %81 ], [ %86, %85 ], [ %19, %18 ]
  resume { ptr, i32 } %.pn65.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorIPN6catnip6MatrixEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIPN6catnip6MatrixEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { nobuiltin 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 #5 = { 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin nounwind }
attributes #11 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass