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

; 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: mustprogress uwtable
define dso_local void @_ZNK6Matrix2qlERS_S0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca %class.Matrix, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %13)
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %62, %3
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %17 unwind label %57

17:                                               ; preds = %14
  %18 = sdiv i32 %16, 2
  %19 = icmp sle i32 %15, %18
  br i1 %19, label %20, label %65

20:                                               ; preds = %17
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %54, %20
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %24 unwind label %57

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

26:                                               ; preds = %24
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %27, i32 noundef %28)
          to label %30 unwind label %57

30:                                               ; preds = %26
  %31 = load double, ptr %29, align 8, !tbaa !11
  store double %31, ptr %9, align 8, !tbaa !11
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %34 unwind label %57

34:                                               ; preds = %30
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = sub nsw i32 %33, %35
  %37 = add nsw i32 %36, 1
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %32, i32 noundef %37)
          to label %39 unwind label %57

39:                                               ; preds = %34
  %40 = load double, ptr %38, align 8, !tbaa !11
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %41, i32 noundef %42)
          to label %44 unwind label %57

44:                                               ; preds = %39
  store double %40, ptr %43, align 8, !tbaa !11
  %45 = load double, ptr %9, align 8, !tbaa !11
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %48 unwind label %57

48:                                               ; preds = %44
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sub nsw i32 %47, %49
  %51 = add nsw i32 %50, 1
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %46, i32 noundef %51)
          to label %53 unwind label %57

53:                                               ; preds = %48
  store double %45, ptr %52, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !9
  br label %21, !llvm.loop !13

57:                                               ; preds = %329, %322, %316, %302, %295, %289, %283, %278, %266, %260, %255, %246, %238, %232, %227, %219, %212, %195, %189, %184, %175, %167, %161, %156, %148, %137, %120, %114, %105, %97, %91, %83, %77, %69, %65, %48, %44, %39, %34, %30, %26, %21, %14
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %11, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %12, align 4
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %344

61:                                               ; preds = %24
  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 %14, !llvm.loop !15

65:                                               ; preds = %17
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK6Matrix2qrERS_S0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(24) %67)
          to label %68 unwind label %57

68:                                               ; preds = %65
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %133, %68
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %71)
          to label %73 unwind label %57

73:                                               ; preds = %69
  %74 = sdiv i32 %72, 2
  %75 = icmp sle i32 %70, %74
  br i1 %75, label %76, label %136

76:                                               ; preds = %73
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %77

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

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

83:                                               ; preds = %81
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load i32, ptr %7, align 4, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = load ptr, ptr %84, align 8, !tbaa !16
  %88 = getelementptr inbounds ptr, ptr %87, i64 6
  %89 = load ptr, ptr %88, align 8
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr %89(ptr noundef nonnull align 8 dereferenceable(24) %84, i32 noundef %85, i32 noundef %86)
          to label %91 unwind label %57

91:                                               ; preds = %83
  %92 = load double, ptr %90, align 8, !tbaa !11
  store double %92, ptr %9, align 8, !tbaa !11
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %95)
          to label %97 unwind label %57

97:                                               ; preds = %91
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sub nsw i32 %96, %98
  %100 = add nsw i32 %99, 1
  %101 = load ptr, ptr %93, align 8, !tbaa !16
  %102 = getelementptr inbounds ptr, ptr %101, i64 6
  %103 = load ptr, ptr %102, align 8
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr %103(ptr noundef nonnull align 8 dereferenceable(24) %93, i32 noundef %94, i32 noundef %100)
          to label %105 unwind label %57

105:                                              ; preds = %97
  %106 = load double, ptr %104, align 8, !tbaa !11
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load i32, ptr %7, align 4, !tbaa !9
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = load ptr, ptr %107, align 8, !tbaa !16
  %111 = getelementptr inbounds ptr, ptr %110, i64 6
  %112 = load ptr, ptr %111, align 8
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr %112(ptr noundef nonnull align 8 dereferenceable(24) %107, i32 noundef %108, i32 noundef %109)
          to label %114 unwind label %57

114:                                              ; preds = %105
  store double %106, ptr %113, align 8, !tbaa !11
  %115 = load double, ptr %9, align 8, !tbaa !11
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %118)
          to label %120 unwind label %57

120:                                              ; preds = %114
  %121 = load i32, ptr %8, align 4, !tbaa !9
  %122 = sub nsw i32 %119, %121
  %123 = add nsw i32 %122, 1
  %124 = load ptr, ptr %116, align 8, !tbaa !16
  %125 = getelementptr inbounds ptr, ptr %124, i64 6
  %126 = load ptr, ptr %125, align 8
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr %126(ptr noundef nonnull align 8 dereferenceable(24) %116, i32 noundef %117, i32 noundef %123)
          to label %128 unwind label %57

128:                                              ; preds = %120
  store double %115, ptr %127, align 8, !tbaa !11
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %7, align 4, !tbaa !9
  br label %77, !llvm.loop !18

132:                                              ; preds = %81
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %8, align 4, !tbaa !9
  br label %69, !llvm.loop !19

136:                                              ; preds = %73
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %208, %136
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %139)
          to label %141 unwind label %57

141:                                              ; preds = %137
  %142 = icmp sle i32 %138, %140
  br i1 %142, label %143, label %211

143:                                              ; preds = %141
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %204, %143
  %145 = load i32, ptr %8, align 4, !tbaa !9
  %146 = load i32, ptr %7, align 4, !tbaa !9
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %148, label %207

148:                                              ; preds = %144
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = load ptr, ptr %149, align 8, !tbaa !16
  %153 = getelementptr inbounds ptr, ptr %152, i64 6
  %154 = load ptr, ptr %153, align 8
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr %154(ptr noundef nonnull align 8 dereferenceable(24) %149, i32 noundef %150, i32 noundef %151)
          to label %156 unwind label %57

156:                                              ; preds = %148
  %157 = load double, ptr %155, align 8, !tbaa !11
  store double %157, ptr %9, align 8, !tbaa !11
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %159)
          to label %161 unwind label %57

161:                                              ; preds = %156
  %162 = load i32, ptr %7, align 4, !tbaa !9
  %163 = sub nsw i32 %160, %162
  %164 = add nsw i32 %163, 1
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %165)
          to label %167 unwind label %57

167:                                              ; preds = %161
  %168 = load i32, ptr %8, align 4, !tbaa !9
  %169 = sub nsw i32 %166, %168
  %170 = add nsw i32 %169, 1
  %171 = load ptr, ptr %158, align 8, !tbaa !16
  %172 = getelementptr inbounds ptr, ptr %171, i64 6
  %173 = load ptr, ptr %172, align 8
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr %173(ptr noundef nonnull align 8 dereferenceable(24) %158, i32 noundef %164, i32 noundef %170)
          to label %175 unwind label %57

175:                                              ; preds = %167
  %176 = load double, ptr %174, align 8, !tbaa !11
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = load i32, ptr %7, align 4, !tbaa !9
  %179 = load i32, ptr %8, align 4, !tbaa !9
  %180 = load ptr, ptr %177, align 8, !tbaa !16
  %181 = getelementptr inbounds ptr, ptr %180, i64 6
  %182 = load ptr, ptr %181, align 8
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr %182(ptr noundef nonnull align 8 dereferenceable(24) %177, i32 noundef %178, i32 noundef %179)
          to label %184 unwind label %57

184:                                              ; preds = %175
  store double %176, ptr %183, align 8, !tbaa !11
  %185 = load double, ptr %9, align 8, !tbaa !11
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %187)
          to label %189 unwind label %57

189:                                              ; preds = %184
  %190 = load i32, ptr %7, align 4, !tbaa !9
  %191 = sub nsw i32 %188, %190
  %192 = add nsw i32 %191, 1
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  %194 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %193)
          to label %195 unwind label %57

195:                                              ; preds = %189
  %196 = load i32, ptr %8, align 4, !tbaa !9
  %197 = sub nsw i32 %194, %196
  %198 = add nsw i32 %197, 1
  %199 = load ptr, ptr %186, align 8, !tbaa !16
  %200 = getelementptr inbounds ptr, ptr %199, i64 6
  %201 = load ptr, ptr %200, align 8
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr %201(ptr noundef nonnull align 8 dereferenceable(24) %186, i32 noundef %192, i32 noundef %198)
          to label %203 unwind label %57

203:                                              ; preds = %195
  store double %185, ptr %202, align 8, !tbaa !11
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %8, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %8, align 4, !tbaa !9
  br label %144, !llvm.loop !20

207:                                              ; preds = %144
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %7, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %7, align 4, !tbaa !9
  br label %137, !llvm.loop !21

211:                                              ; preds = %141
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %275, %211
  %213 = load i32, ptr %7, align 4, !tbaa !9
  %214 = load ptr, ptr %6, align 8, !tbaa !5
  %215 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %214)
          to label %216 unwind label %57

216:                                              ; preds = %212
  %217 = sdiv i32 %215, 2
  %218 = icmp sle i32 %213, %217
  br i1 %218, label %219, label %278

219:                                              ; preds = %216
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = load i32, ptr %7, align 4, !tbaa !9
  %222 = load i32, ptr %7, align 4, !tbaa !9
  %223 = load ptr, ptr %220, align 8, !tbaa !16
  %224 = getelementptr inbounds ptr, ptr %223, i64 6
  %225 = load ptr, ptr %224, align 8
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr %225(ptr noundef nonnull align 8 dereferenceable(24) %220, i32 noundef %221, i32 noundef %222)
          to label %227 unwind label %57

227:                                              ; preds = %219
  %228 = load double, ptr %226, align 8, !tbaa !11
  store double %228, ptr %9, align 8, !tbaa !11
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %230)
          to label %232 unwind label %57

232:                                              ; preds = %227
  %233 = load i32, ptr %7, align 4, !tbaa !9
  %234 = sub nsw i32 %231, %233
  %235 = add nsw i32 %234, 1
  %236 = load ptr, ptr %6, align 8, !tbaa !5
  %237 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %236)
          to label %238 unwind label %57

238:                                              ; preds = %232
  %239 = load i32, ptr %7, align 4, !tbaa !9
  %240 = sub nsw i32 %237, %239
  %241 = add nsw i32 %240, 1
  %242 = load ptr, ptr %229, align 8, !tbaa !16
  %243 = getelementptr inbounds ptr, ptr %242, i64 6
  %244 = load ptr, ptr %243, align 8
  %245 = invoke noundef nonnull align 8 dereferenceable(8) ptr %244(ptr noundef nonnull align 8 dereferenceable(24) %229, i32 noundef %235, i32 noundef %241)
          to label %246 unwind label %57

246:                                              ; preds = %238
  %247 = load double, ptr %245, align 8, !tbaa !11
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = load i32, ptr %7, align 4, !tbaa !9
  %250 = load i32, ptr %7, align 4, !tbaa !9
  %251 = load ptr, ptr %248, align 8, !tbaa !16
  %252 = getelementptr inbounds ptr, ptr %251, i64 6
  %253 = load ptr, ptr %252, align 8
  %254 = invoke noundef nonnull align 8 dereferenceable(8) ptr %253(ptr noundef nonnull align 8 dereferenceable(24) %248, i32 noundef %249, i32 noundef %250)
          to label %255 unwind label %57

255:                                              ; preds = %246
  store double %247, ptr %254, align 8, !tbaa !11
  %256 = load double, ptr %9, align 8, !tbaa !11
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %258)
          to label %260 unwind label %57

260:                                              ; preds = %255
  %261 = load i32, ptr %7, align 4, !tbaa !9
  %262 = sub nsw i32 %259, %261
  %263 = add nsw i32 %262, 1
  %264 = load ptr, ptr %6, align 8, !tbaa !5
  %265 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %264)
          to label %266 unwind label %57

266:                                              ; preds = %260
  %267 = load i32, ptr %7, align 4, !tbaa !9
  %268 = sub nsw i32 %265, %267
  %269 = add nsw i32 %268, 1
  %270 = load ptr, ptr %257, align 8, !tbaa !16
  %271 = getelementptr inbounds ptr, ptr %270, i64 6
  %272 = load ptr, ptr %271, align 8
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr %272(ptr noundef nonnull align 8 dereferenceable(24) %257, i32 noundef %263, i32 noundef %269)
          to label %274 unwind label %57

274:                                              ; preds = %266
  store double %256, ptr %273, align 8, !tbaa !11
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %7, align 4, !tbaa !9
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %7, align 4, !tbaa !9
  br label %212, !llvm.loop !22

278:                                              ; preds = %216
  %279 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %280 unwind label %57

280:                                              ; preds = %278
  %281 = srem i32 %279, 4
  %282 = icmp eq i32 %281, 2
  br i1 %282, label %288, label %283

283:                                              ; preds = %280
  %284 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %285 unwind label %57

285:                                              ; preds = %283
  %286 = srem i32 %284, 4
  %287 = icmp eq i32 %286, 3
  br i1 %287, label %288, label %343

288:                                              ; preds = %285, %280
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %289

289:                                              ; preds = %312, %288
  %290 = load i32, ptr %7, align 4, !tbaa !9
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = invoke noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %291)
          to label %293 unwind label %57

293:                                              ; preds = %289
  %294 = icmp sle i32 %290, %292
  br i1 %294, label %295, label %315

295:                                              ; preds = %293
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = load i32, ptr %7, align 4, !tbaa !9
  %298 = load ptr, ptr %296, align 8, !tbaa !16
  %299 = getelementptr inbounds ptr, ptr %298, i64 6
  %300 = load ptr, ptr %299, align 8
  %301 = invoke noundef nonnull align 8 dereferenceable(8) ptr %300(ptr noundef nonnull align 8 dereferenceable(24) %296, i32 noundef %297, i32 noundef 1)
          to label %302 unwind label %57

302:                                              ; preds = %295
  %303 = load double, ptr %301, align 8, !tbaa !11
  %304 = fneg double %303
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  %306 = load i32, ptr %7, align 4, !tbaa !9
  %307 = load ptr, ptr %305, align 8, !tbaa !16
  %308 = getelementptr inbounds ptr, ptr %307, i64 6
  %309 = load ptr, ptr %308, align 8
  %310 = invoke noundef nonnull align 8 dereferenceable(8) ptr %309(ptr noundef nonnull align 8 dereferenceable(24) %305, i32 noundef %306, i32 noundef 1)
          to label %311 unwind label %57

311:                                              ; preds = %302
  store double %304, ptr %310, align 8, !tbaa !11
  br label %312

312:                                              ; preds = %311
  %313 = load i32, ptr %7, align 4, !tbaa !9
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %7, align 4, !tbaa !9
  br label %289, !llvm.loop !23

315:                                              ; preds = %293
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %316

316:                                              ; preds = %339, %315
  %317 = load i32, ptr %8, align 4, !tbaa !9
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = invoke noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %318)
          to label %320 unwind label %57

320:                                              ; preds = %316
  %321 = icmp sle i32 %317, %319
  br i1 %321, label %322, label %342

322:                                              ; preds = %320
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = load i32, ptr %8, align 4, !tbaa !9
  %325 = load ptr, ptr %323, align 8, !tbaa !16
  %326 = getelementptr inbounds ptr, ptr %325, i64 6
  %327 = load ptr, ptr %326, align 8
  %328 = invoke noundef nonnull align 8 dereferenceable(8) ptr %327(ptr noundef nonnull align 8 dereferenceable(24) %323, i32 noundef 1, i32 noundef %324)
          to label %329 unwind label %57

329:                                              ; preds = %322
  %330 = load double, ptr %328, align 8, !tbaa !11
  %331 = fneg double %330
  %332 = load ptr, ptr %6, align 8, !tbaa !5
  %333 = load i32, ptr %8, align 4, !tbaa !9
  %334 = load ptr, ptr %332, align 8, !tbaa !16
  %335 = getelementptr inbounds ptr, ptr %334, i64 6
  %336 = load ptr, ptr %335, align 8
  %337 = invoke noundef nonnull align 8 dereferenceable(8) ptr %336(ptr noundef nonnull align 8 dereferenceable(24) %332, i32 noundef 1, i32 noundef %333)
          to label %338 unwind label %57

338:                                              ; preds = %329
  store double %331, ptr %337, align 8, !tbaa !11
  br label %339

339:                                              ; preds = %338
  %340 = load i32, ptr %8, align 4, !tbaa !9
  %341 = add nsw i32 %340, 1
  store i32 %341, ptr %8, align 4, !tbaa !9
  br label %316, !llvm.loop !24

342:                                              ; preds = %320
  br label %343

343:                                              ; preds = %342, %285
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void

344:                                              ; preds = %57
  %345 = load ptr, ptr %11, align 8
  %346 = load i32, ptr %12, align 4
  %347 = insertvalue { ptr, i32 } poison, ptr %345, 0
  %348 = insertvalue { ptr, i32 } %347, i32 %346, 1
  resume { ptr, i32 } %348
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 #3 align 2

declare void @_ZNK6Matrix2qrERS_S0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 = { 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 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !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.Matrix = type { ptr, ptr, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Matrix2qlERS_S0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.Matrix, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN6MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0)
  %5 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not125 = icmp slt i32 %5, 2
  br i1 %.not125, label %._crit_edge128, label %.preheader122

.preheader122:                                    ; preds = %3, %._crit_edge
  %.095.neg127 = phi i32 [ %.095.neg, %._crit_edge ], [ -1, %3 ]
  %.095126 = phi i32 [ %21, %._crit_edge ], [ 1, %3 ]
  %6 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not105123 = icmp slt i32 %6, 1
  br i1 %.not105123, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader122
  %7 = add nsw i32 %.095.neg127, 1
  br label %8

8:                                                ; preds = %.lr.ph, %8
  %.0124 = phi i32 [ 1, %.lr.ph ], [ %19, %8 ]
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.0124, i32 noundef %.095126)
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %12 = add i32 %7, %11
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.0124, i32 noundef %12)
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.0124, i32 noundef %.095126)
  store double %14, ptr %15, align 8, !tbaa !5
  %16 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %17 = add i32 %7, %16
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6MatrixclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %.0124, i32 noundef %17)
  store double %10, ptr %18, align 8, !tbaa !5
  %19 = add nuw nsw i32 %.0124, 1
  %20 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not105.not = icmp slt i32 %.0124, %20
  br i1 %.not105.not, label %8, label %._crit_edge, !llvm.loop !9

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

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

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.lr.ph146, %102, %113, %119
  %lpad.loopexit111 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %85, %79, %68, %63
  %lpad.loopexit114 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

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

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit106
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit106 ], [ %lpad.loopexit107, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit111, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit114, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit119, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %lpad.phi

._crit_edge:                                      ; preds = %8, %.preheader122
  %21 = add nuw nsw i32 %.095126, 1
  %.095.neg = xor i32 %.095126, -1
  %22 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %23 = sdiv i32 %22, 2
  %.not.not = icmp slt i32 %.095126, %23
  br i1 %.not.not, label %.preheader122, label %._crit_edge128, !llvm.loop !11

._crit_edge128:                                   ; preds = %._crit_edge, %3
  invoke void @_ZNK6Matrix2qrERS_S0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %.preheader121 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.preheader121:                                    ; preds = %._crit_edge128
  %24 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not99133 = icmp slt i32 %24, 2
  br i1 %.not99133, label %.preheader117, label %.preheader118

.preheader118:                                    ; preds = %.preheader121, %._crit_edge132
  %.196.neg135 = phi i32 [ %.196.neg, %._crit_edge132 ], [ -1, %.preheader121 ]
  %.196134 = phi i32 [ %57, %._crit_edge132 ], [ 1, %.preheader121 ]
  %25 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not104129 = icmp slt i32 %25, 1
  br i1 %.not104129, label %._crit_edge132, label %.lr.ph131

.lr.ph131:                                        ; preds = %.preheader118
  %26 = add nsw i32 %.196.neg135, 1
  br label %28

.preheader117:                                    ; preds = %._crit_edge132, %.preheader121
  %27 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not100140 = icmp slt i32 %27, 1
  br i1 %.not100140, label %.preheader110, label %.preheader113

28:                                               ; preds = %.lr.ph131, %54
  %.1130 = phi i32 [ 1, %.lr.ph131 ], [ %55, %54 ]
  %29 = load ptr, ptr %1, align 8, !tbaa !12
  %30 = getelementptr inbounds i8, ptr %29, i64 48
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr %31(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.1130, i32 noundef %.196134)
          to label %33 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

33:                                               ; preds = %28
  %34 = load double, ptr %32, align 8, !tbaa !5
  %35 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %36 = add i32 %26, %35
  %37 = load ptr, ptr %1, align 8, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %37, i64 48
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr %39(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.1130, i32 noundef %36)
          to label %41 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

41:                                               ; preds = %33
  %42 = load double, ptr %40, align 8, !tbaa !5
  %43 = load ptr, ptr %1, align 8, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load ptr, ptr %44, align 8
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr %45(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.1130, i32 noundef %.196134)
          to label %47 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

47:                                               ; preds = %41
  store double %42, ptr %46, align 8, !tbaa !5
  %48 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %49 = add i32 %26, %48
  %50 = load ptr, ptr %1, align 8, !tbaa !12
  %51 = getelementptr inbounds i8, ptr %50, i64 48
  %52 = load ptr, ptr %51, align 8
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr %52(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.1130, i32 noundef %49)
          to label %54 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

54:                                               ; preds = %47
  store double %34, ptr %53, align 8, !tbaa !5
  %55 = add nuw nsw i32 %.1130, 1
  %56 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not104.not = icmp slt i32 %.1130, %56
  br i1 %.not104.not, label %28, label %._crit_edge132, !llvm.loop !14

._crit_edge132:                                   ; preds = %54, %.preheader118
  %57 = add nuw nsw i32 %.196134, 1
  %.196.neg = xor i32 %.196134, -1
  %58 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %59 = sdiv i32 %58, 2
  %.not99.not = icmp slt i32 %.196134, %59
  br i1 %.not99.not, label %.preheader118, label %.preheader117, !llvm.loop !15

.preheader113:                                    ; preds = %.preheader117, %._crit_edge139
  %.2.neg142 = phi i32 [ %.2.neg, %._crit_edge139 ], [ -1, %.preheader117 ]
  %.2141 = phi i32 [ %96, %._crit_edge139 ], [ 1, %.preheader117 ]
  %60 = icmp ugt i32 %.2141, 1
  br i1 %60, label %.lr.ph138, label %._crit_edge139

.lr.ph138:                                        ; preds = %.preheader113
  %61 = add nsw i32 %.2.neg142, 1
  br label %63

.preheader110:                                    ; preds = %._crit_edge139, %.preheader117
  %62 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not101143 = icmp slt i32 %62, 2
  br i1 %.not101143, label %._crit_edge147, label %.lr.ph146

63:                                               ; preds = %.lr.ph138, %94
  %.297.neg137 = phi i32 [ -1, %.lr.ph138 ], [ %.297.neg, %94 ]
  %.297136 = phi i32 [ 1, %.lr.ph138 ], [ %95, %94 ]
  %64 = load ptr, ptr %2, align 8, !tbaa !12
  %65 = getelementptr inbounds i8, ptr %64, i64 48
  %66 = load ptr, ptr %65, align 8
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr %66(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.2141, i32 noundef %.297136)
          to label %68 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

68:                                               ; preds = %63
  %69 = load double, ptr %67, align 8, !tbaa !5
  %70 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %71 = add i32 %61, %70
  %72 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %73 = add nsw i32 %.297.neg137, 1
  %74 = add i32 %73, %72
  %75 = load ptr, ptr %2, align 8, !tbaa !12
  %76 = getelementptr inbounds i8, ptr %75, i64 48
  %77 = load ptr, ptr %76, align 8
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr %77(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %71, i32 noundef %74)
          to label %79 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

79:                                               ; preds = %68
  %80 = load double, ptr %78, align 8, !tbaa !5
  %81 = load ptr, ptr %2, align 8, !tbaa !12
  %82 = getelementptr inbounds i8, ptr %81, i64 48
  %83 = load ptr, ptr %82, align 8
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr %83(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.2141, i32 noundef %.297136)
          to label %85 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

85:                                               ; preds = %79
  store double %80, ptr %84, align 8, !tbaa !5
  %86 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %87 = add i32 %61, %86
  %88 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %89 = add i32 %73, %88
  %90 = load ptr, ptr %2, align 8, !tbaa !12
  %91 = getelementptr inbounds i8, ptr %90, i64 48
  %92 = load ptr, ptr %91, align 8
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr %92(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %87, i32 noundef %89)
          to label %94 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

94:                                               ; preds = %85
  store double %69, ptr %93, align 8, !tbaa !5
  %95 = add nuw nsw i32 %.297136, 1
  %.297.neg = xor i32 %.297136, -1
  %exitcond.not = icmp eq i32 %95, %.2141
  br i1 %exitcond.not, label %._crit_edge139, label %63, !llvm.loop !16

._crit_edge139:                                   ; preds = %94, %.preheader113
  %96 = add nuw nsw i32 %.2141, 1
  %.2.neg = xor i32 %.2141, -1
  %97 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not100.not = icmp slt i32 %.2141, %97
  br i1 %.not100.not, label %.preheader113, label %.preheader110, !llvm.loop !17

.lr.ph146:                                        ; preds = %.preheader110, %128
  %.3.neg145 = phi i32 [ %.3.neg, %128 ], [ -1, %.preheader110 ]
  %.3144 = phi i32 [ %129, %128 ], [ 1, %.preheader110 ]
  %98 = load ptr, ptr %2, align 8, !tbaa !12
  %99 = getelementptr inbounds i8, ptr %98, i64 48
  %100 = load ptr, ptr %99, align 8
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr %100(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.3144, i32 noundef %.3144)
          to label %102 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

102:                                              ; preds = %.lr.ph146
  %103 = load double, ptr %101, align 8, !tbaa !5
  %104 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %105 = add nsw i32 %.3.neg145, 1
  %106 = add i32 %105, %104
  %107 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %108 = add i32 %105, %107
  %109 = load ptr, ptr %2, align 8, !tbaa !12
  %110 = getelementptr inbounds i8, ptr %109, i64 48
  %111 = load ptr, ptr %110, align 8
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr %111(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %106, i32 noundef %108)
          to label %113 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

113:                                              ; preds = %102
  %114 = load double, ptr %112, align 8, !tbaa !5
  %115 = load ptr, ptr %2, align 8, !tbaa !12
  %116 = getelementptr inbounds i8, ptr %115, i64 48
  %117 = load ptr, ptr %116, align 8
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr %117(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.3144, i32 noundef %.3144)
          to label %119 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

119:                                              ; preds = %113
  store double %114, ptr %118, align 8, !tbaa !5
  %120 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %121 = add i32 %105, %120
  %122 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %123 = add i32 %105, %122
  %124 = load ptr, ptr %2, align 8, !tbaa !12
  %125 = getelementptr inbounds i8, ptr %124, i64 48
  %126 = load ptr, ptr %125, align 8
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr %126(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %121, i32 noundef %123)
          to label %128 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

128:                                              ; preds = %119
  store double %103, ptr %127, align 8, !tbaa !5
  %129 = add nuw nsw i32 %.3144, 1
  %.3.neg = xor i32 %.3144, -1
  %130 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %131 = sdiv i32 %130, 2
  %.not101.not = icmp slt i32 %.3144, %131
  br i1 %.not101.not, label %.lr.ph146, label %._crit_edge147, !llvm.loop !18

._crit_edge147:                                   ; preds = %128, %.preheader110
  %132 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %133 = and i32 %132, -2147483645
  %134 = icmp eq i32 %133, 2
  br i1 %134, label %139, label %135

135:                                              ; preds = %._crit_edge147
  %136 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %137 = and i32 %136, -2147483645
  %138 = icmp eq i32 %137, 3
  br i1 %138, label %139, label %.loopexit

139:                                              ; preds = %135, %._crit_edge147
  %140 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not102148 = icmp slt i32 %140, 1
  br i1 %.not102148, label %.preheader, label %.lr.ph151

.preheader:                                       ; preds = %152, %139
  %141 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not103152 = icmp slt i32 %141, 1
  br i1 %.not103152, label %.loopexit, label %.lr.ph154

.lr.ph151:                                        ; preds = %139, %152
  %.4149 = phi i32 [ %154, %152 ], [ 1, %139 ]
  %142 = load ptr, ptr %1, align 8, !tbaa !12
  %143 = getelementptr inbounds i8, ptr %142, i64 48
  %144 = load ptr, ptr %143, align 8
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr %144(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.4149, i32 noundef 1)
          to label %146 unwind label %.loopexit.split-lp.loopexit

146:                                              ; preds = %.lr.ph151
  %147 = load double, ptr %145, align 8, !tbaa !5
  %148 = load ptr, ptr %1, align 8, !tbaa !12
  %149 = getelementptr inbounds i8, ptr %148, i64 48
  %150 = load ptr, ptr %149, align 8
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr %150(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.4149, i32 noundef 1)
          to label %152 unwind label %.loopexit.split-lp.loopexit

152:                                              ; preds = %146
  %153 = fneg double %147
  store double %153, ptr %151, align 8, !tbaa !5
  %154 = add nuw nsw i32 %.4149, 1
  %155 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not102.not = icmp slt i32 %.4149, %155
  br i1 %.not102.not, label %.lr.ph151, label %.preheader, !llvm.loop !19

.lr.ph154:                                        ; preds = %.preheader, %166
  %.398153 = phi i32 [ %168, %166 ], [ 1, %.preheader ]
  %156 = load ptr, ptr %2, align 8, !tbaa !12
  %157 = getelementptr inbounds i8, ptr %156, i64 48
  %158 = load ptr, ptr %157, align 8
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr %158(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef %.398153)
          to label %160 unwind label %.loopexit106

160:                                              ; preds = %.lr.ph154
  %161 = load double, ptr %159, align 8, !tbaa !5
  %162 = load ptr, ptr %2, align 8, !tbaa !12
  %163 = getelementptr inbounds i8, ptr %162, i64 48
  %164 = load ptr, ptr %163, align 8
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr %164(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef %.398153)
          to label %166 unwind label %.loopexit106

166:                                              ; preds = %160
  %167 = fneg double %161
  store double %167, ptr %165, align 8, !tbaa !5
  %168 = add nuw nsw i32 %.398153, 1
  %169 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not103.not = icmp slt i32 %.398153, %169
  br i1 %.not103.not, label %.lr.ph154, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %166, %.preheader, %135
  call void @_ZN6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 #3 align 2

declare void @_ZNK6Matrix2qrERS_S0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

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

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

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


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