; LLVM IR from HarshCasper/NeoAlgo :: C-Plus-Plus/dp/avg_submatrix_k.ll (Z17successful_submatxxx)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17successful_submatxxx(i64 noundef %0, i64 noundef %1, i64 noundef %2) #0 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store i64 %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  %29 = load i64, ptr %4, align 8, !tbaa !5
  %30 = add nsw i64 %29, 1
  %31 = load i64, ptr %5, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  %33 = call ptr @llvm.stacksave.p0()
  store ptr %33, ptr %8, align 8
  %34 = mul nuw i64 %30, %32
  %35 = alloca i64, i64 %34, align 16
  store i64 %30, ptr %9, align 8
  store i64 %32, ptr %10, align 8
  %36 = load i64, ptr %4, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  %38 = load i64, ptr %5, align 8, !tbaa !5
  %39 = add nsw i64 %38, 1
  %40 = mul nuw i64 %37, %39
  %41 = alloca i64, i64 %40, align 16
  store i64 %37, ptr %11, align 8
  store i64 %39, ptr %12, align 8
  %42 = load i64, ptr %4, align 8, !tbaa !5
  %43 = alloca i64, i64 %42, align 16
  store i64 %42, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %54, %3
  %45 = load i64, ptr %14, align 8, !tbaa !5
  %46 = load i64, ptr %4, align 8, !tbaa !5
  %47 = icmp sle i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %57

49:                                               ; preds = %44
  %50 = load i64, ptr %14, align 8, !tbaa !5
  %51 = mul nsw i64 %50, %32
  %52 = getelementptr inbounds i64, ptr %35, i64 %51
  %53 = getelementptr inbounds i64, ptr %52, i64 0
  store i64 0, ptr %53, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %49
  %55 = load i64, ptr %14, align 8, !tbaa !5
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %14, align 8, !tbaa !5
  br label %44, !llvm.loop !9

57:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %68, %57
  %59 = load i64, ptr %15, align 8, !tbaa !5
  %60 = load i64, ptr %5, align 8, !tbaa !5
  %61 = icmp sle i64 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %71

63:                                               ; preds = %58
  %64 = mul nsw i64 0, %32
  %65 = getelementptr inbounds i64, ptr %35, i64 %64
  %66 = load i64, ptr %15, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %65, i64 %66
  store i64 0, ptr %67, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %63
  %69 = load i64, ptr %15, align 8, !tbaa !5
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %15, align 8, !tbaa !5
  br label %58, !llvm.loop !11

71:                                               ; preds = %62
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %73 = load i64, ptr %4, align 8, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %72, i64 noundef %73)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str.1)
  %76 = load i64, ptr %5, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %75, i64 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i64 1, ptr %16, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %101, %71
  %80 = load i64, ptr %16, align 8, !tbaa !5
  %81 = load i64, ptr %4, align 8, !tbaa !5
  %82 = icmp sle i64 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %104

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 1, ptr %18, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %97, %84
  %86 = load i64, ptr %18, align 8, !tbaa !5
  %87 = load i64, ptr %5, align 8, !tbaa !5
  %88 = icmp sle i64 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %100

90:                                               ; preds = %85
  %91 = load i64, ptr %16, align 8, !tbaa !5
  %92 = mul nsw i64 %91, %32
  %93 = getelementptr inbounds i64, ptr %35, i64 %92
  %94 = load i64, ptr %18, align 8, !tbaa !5
  %95 = getelementptr inbounds i64, ptr %93, i64 %94
  %96 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %95)
  br label %97

97:                                               ; preds = %90
  %98 = load i64, ptr %18, align 8, !tbaa !5
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %18, align 8, !tbaa !5
  br label %85, !llvm.loop !12

100:                                              ; preds = %89
  br label %101

101:                                              ; preds = %100
  %102 = load i64, ptr %16, align 8, !tbaa !5
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %16, align 8, !tbaa !5
  br label %79, !llvm.loop !13

104:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %120, %104
  %106 = load i64, ptr %19, align 8, !tbaa !5
  %107 = load i64, ptr %5, align 8, !tbaa !5
  %108 = icmp sle i64 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 14, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %123

110:                                              ; preds = %105
  %111 = mul nsw i64 0, %32
  %112 = getelementptr inbounds i64, ptr %35, i64 %111
  %113 = load i64, ptr %19, align 8, !tbaa !5
  %114 = getelementptr inbounds i64, ptr %112, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = mul nsw i64 0, %39
  %117 = getelementptr inbounds i64, ptr %41, i64 %116
  %118 = load i64, ptr %19, align 8, !tbaa !5
  %119 = getelementptr inbounds i64, ptr %117, i64 %118
  store i64 %115, ptr %119, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %110
  %121 = load i64, ptr %19, align 8, !tbaa !5
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %19, align 8, !tbaa !5
  br label %105, !llvm.loop !14

123:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store i64 1, ptr %20, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %159, %123
  %125 = load i64, ptr %20, align 8, !tbaa !5
  %126 = load i64, ptr %4, align 8, !tbaa !5
  %127 = icmp sle i64 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 17, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %162

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store i64 0, ptr %21, align 8, !tbaa !5
  br label %130

130:                                              ; preds = %155, %129
  %131 = load i64, ptr %21, align 8, !tbaa !5
  %132 = load i64, ptr %5, align 8, !tbaa !5
  %133 = icmp sle i64 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 20, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %158

135:                                              ; preds = %130
  %136 = load i64, ptr %20, align 8, !tbaa !5
  %137 = mul nsw i64 %136, %32
  %138 = getelementptr inbounds i64, ptr %35, i64 %137
  %139 = load i64, ptr %21, align 8, !tbaa !5
  %140 = getelementptr inbounds i64, ptr %138, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = load i64, ptr %20, align 8, !tbaa !5
  %143 = sub nsw i64 %142, 1
  %144 = mul nsw i64 %143, %39
  %145 = getelementptr inbounds i64, ptr %41, i64 %144
  %146 = load i64, ptr %21, align 8, !tbaa !5
  %147 = getelementptr inbounds i64, ptr %145, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !5
  %149 = add nsw i64 %141, %148
  %150 = load i64, ptr %20, align 8, !tbaa !5
  %151 = mul nsw i64 %150, %39
  %152 = getelementptr inbounds i64, ptr %41, i64 %151
  %153 = load i64, ptr %21, align 8, !tbaa !5
  %154 = getelementptr inbounds i64, ptr %152, i64 %153
  store i64 %149, ptr %154, align 8, !tbaa !5
  br label %155

155:                                              ; preds = %135
  %156 = load i64, ptr %21, align 8, !tbaa !5
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %21, align 8, !tbaa !5
  br label %130, !llvm.loop !15

158:                                              ; preds = %134
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %20, align 8, !tbaa !5
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %20, align 8, !tbaa !5
  br label %124, !llvm.loop !16

162:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %163

163:                                              ; preds = %193, %162
  %164 = load i64, ptr %22, align 8, !tbaa !5
  %165 = load i64, ptr %4, align 8, !tbaa !5
  %166 = icmp sle i64 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  store i32 23, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %196

168:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  store i64 1, ptr %23, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %189, %168
  %170 = load i64, ptr %23, align 8, !tbaa !5
  %171 = load i64, ptr %5, align 8, !tbaa !5
  %172 = icmp sle i64 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  store i32 26, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %192

174:                                              ; preds = %169
  %175 = load i64, ptr %22, align 8, !tbaa !5
  %176 = mul nsw i64 %175, %39
  %177 = getelementptr inbounds i64, ptr %41, i64 %176
  %178 = load i64, ptr %23, align 8, !tbaa !5
  %179 = sub nsw i64 %178, 1
  %180 = getelementptr inbounds i64, ptr %177, i64 %179
  %181 = load i64, ptr %180, align 8, !tbaa !5
  %182 = load i64, ptr %22, align 8, !tbaa !5
  %183 = mul nsw i64 %182, %39
  %184 = getelementptr inbounds i64, ptr %41, i64 %183
  %185 = load i64, ptr %23, align 8, !tbaa !5
  %186 = getelementptr inbounds i64, ptr %184, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !5
  %188 = add nsw i64 %187, %181
  store i64 %188, ptr %186, align 8, !tbaa !5
  br label %189

189:                                              ; preds = %174
  %190 = load i64, ptr %23, align 8, !tbaa !5
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %23, align 8, !tbaa !5
  br label %169, !llvm.loop !17

192:                                              ; preds = %173
  br label %193

193:                                              ; preds = %192
  %194 = load i64, ptr %22, align 8, !tbaa !5
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %22, align 8, !tbaa !5
  br label %163, !llvm.loop !18

196:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  store i64 1, ptr %24, align 8, !tbaa !5
  br label %197

197:                                              ; preds = %294, %196
  %198 = load i64, ptr %24, align 8, !tbaa !5
  %199 = load i64, ptr %4, align 8, !tbaa !5
  %200 = icmp sle i64 %198, %199
  br i1 %200, label %202, label %201

201:                                              ; preds = %197
  store i32 29, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %297

202:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %203 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %203, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %204 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %204, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %205 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %205, ptr %27, align 8, !tbaa !5
  br label %206

206:                                              ; preds = %290, %202
  %207 = load i64, ptr %27, align 8, !tbaa !5
  %208 = load i64, ptr %25, align 8, !tbaa !5
  %209 = icmp sle i64 %207, %208
  br i1 %209, label %210, label %213

210:                                              ; preds = %206
  %211 = load i64, ptr %25, align 8, !tbaa !5
  %212 = icmp ne i64 %211, 0
  br label %213

213:                                              ; preds = %210, %206
  %214 = phi i1 [ false, %206 ], [ %212, %210 ]
  br i1 %214, label %216, label %215

215:                                              ; preds = %213
  store i32 32, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %293

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %217 = load i64, ptr %24, align 8, !tbaa !5
  store i64 %217, ptr %28, align 8, !tbaa !5
  br label %218

218:                                              ; preds = %285, %216
  %219 = load i64, ptr %28, align 8, !tbaa !5
  %220 = load i64, ptr %26, align 8, !tbaa !5
  %221 = icmp sle i64 %219, %220
  br i1 %221, label %222, label %225

222:                                              ; preds = %218
  %223 = load i64, ptr %26, align 8, !tbaa !5
  %224 = icmp ne i64 %223, 0
  br label %225

225:                                              ; preds = %222, %218
  %226 = phi i1 [ false, %218 ], [ %224, %222 ]
  br i1 %226, label %228, label %227

227:                                              ; preds = %225
  store i32 35, ptr %17, align 4
  br label %288

228:                                              ; preds = %225
  %229 = load i64, ptr %27, align 8, !tbaa !5
  %230 = mul nsw i64 %229, %39
  %231 = getelementptr inbounds i64, ptr %41, i64 %230
  %232 = load i64, ptr %28, align 8, !tbaa !5
  %233 = getelementptr inbounds i64, ptr %231, i64 %232
  %234 = load i64, ptr %233, align 8, !tbaa !5
  %235 = load i64, ptr %27, align 8, !tbaa !5
  %236 = mul nsw i64 %235, %39
  %237 = getelementptr inbounds i64, ptr %41, i64 %236
  %238 = load i64, ptr %28, align 8, !tbaa !5
  %239 = load i64, ptr %24, align 8, !tbaa !5
  %240 = sub nsw i64 %238, %239
  %241 = getelementptr inbounds i64, ptr %237, i64 %240
  %242 = load i64, ptr %241, align 8, !tbaa !5
  %243 = sub nsw i64 %234, %242
  %244 = load i64, ptr %27, align 8, !tbaa !5
  %245 = load i64, ptr %24, align 8, !tbaa !5
  %246 = sub nsw i64 %244, %245
  %247 = mul nsw i64 %246, %39
  %248 = getelementptr inbounds i64, ptr %41, i64 %247
  %249 = load i64, ptr %28, align 8, !tbaa !5
  %250 = getelementptr inbounds i64, ptr %248, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !5
  %252 = sub nsw i64 %243, %251
  %253 = load i64, ptr %27, align 8, !tbaa !5
  %254 = load i64, ptr %24, align 8, !tbaa !5
  %255 = sub nsw i64 %253, %254
  %256 = mul nsw i64 %255, %39
  %257 = getelementptr inbounds i64, ptr %41, i64 %256
  %258 = load i64, ptr %28, align 8, !tbaa !5
  %259 = load i64, ptr %24, align 8, !tbaa !5
  %260 = sub nsw i64 %258, %259
  %261 = getelementptr inbounds i64, ptr %257, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !5
  %263 = add nsw i64 %252, %262
  %264 = load i64, ptr %24, align 8, !tbaa !5
  %265 = load i64, ptr %24, align 8, !tbaa !5
  %266 = mul nsw i64 %264, %265
  %267 = load i64, ptr %6, align 8, !tbaa !5
  %268 = mul nsw i64 %266, %267
  %269 = icmp sge i64 %263, %268
  br i1 %269, label %270, label %284

270:                                              ; preds = %228
  %271 = load i64, ptr %25, align 8, !tbaa !5
  %272 = add nsw i64 %271, 1
  %273 = load i64, ptr %27, align 8, !tbaa !5
  %274 = sub nsw i64 %272, %273
  %275 = load i64, ptr %26, align 8, !tbaa !5
  %276 = add nsw i64 %275, 1
  %277 = load i64, ptr %28, align 8, !tbaa !5
  %278 = sub nsw i64 %276, %277
  %279 = mul nsw i64 %274, %278
  %280 = load i64, ptr %7, align 8, !tbaa !5
  %281 = add nsw i64 %280, %279
  store i64 %281, ptr %7, align 8, !tbaa !5
  %282 = load i64, ptr %28, align 8, !tbaa !5
  %283 = sub nsw i64 %282, 1
  store i64 %283, ptr %26, align 8, !tbaa !5
  store i32 35, ptr %17, align 4
  br label %288

284:                                              ; preds = %228
  br label %285

285:                                              ; preds = %284
  %286 = load i64, ptr %28, align 8, !tbaa !5
  %287 = add nsw i64 %286, 1
  store i64 %287, ptr %28, align 8, !tbaa !5
  br label %218, !llvm.loop !19

288:                                              ; preds = %270, %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %289

289:                                              ; preds = %288
  br label %290

290:                                              ; preds = %289
  %291 = load i64, ptr %27, align 8, !tbaa !5
  %292 = add nsw i64 %291, 1
  store i64 %292, ptr %27, align 8, !tbaa !5
  br label %206, !llvm.loop !20

293:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %294

294:                                              ; preds = %293
  %295 = load i64, ptr %24, align 8, !tbaa !5
  %296 = add nsw i64 %295, 1
  store i64 %296, ptr %24, align 8, !tbaa !5
  br label %197, !llvm.loop !21

297:                                              ; preds = %201
  %298 = load i64, ptr %7, align 8, !tbaa !5
  %299 = trunc i64 %298 to i32
  store i32 1, ptr %17, align 4
  %300 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %300)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret i32 %299
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !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}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17successful_submatxxx(i64 noundef %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = add i64 %0, 1
  %5 = add i64 %1, 1
  %6 = mul nuw i64 %5, %4
  %7 = alloca i64, i64 %6, align 16
  %8 = alloca i64, i64 %6, align 16
  %.not127 = icmp slt i64 %0, 0
  br i1 %.not127, label %.preheader125, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %3
  %9 = add nuw i64 %0, 1
  %xtraiter = and i64 %9, 3
  %10 = icmp ult i64 %0, 3
  br i1 %10, label %.preheader125.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %9, -4
  br label %.lr.ph

.preheader125.loopexit.unr-lcssa:                 ; preds = %.lr.ph, %.lr.ph.preheader
  %.0100128.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %27, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader125, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader125.loopexit.unr-lcssa, %.lr.ph.epil
  %.0100128.epil = phi i64 [ %13, %.lr.ph.epil ], [ %.0100128.unr, %.preheader125.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader125.loopexit.unr-lcssa ]
  %11 = mul nsw i64 %.0100128.epil, %5
  %12 = getelementptr inbounds i64, ptr %7, i64 %11
  store i64 0, ptr %12, align 8, !tbaa !5
  %13 = add nuw i64 %.0100128.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader125, label %.lr.ph.epil, !llvm.loop !9

.preheader125:                                    ; preds = %.preheader125.loopexit.unr-lcssa, %.lr.ph.epil, %3
  %.not103129 = icmp slt i64 %1, 0
  br i1 %.not103129, label %._crit_edge, label %.lr.ph131.preheader

.lr.ph131.preheader:                              ; preds = %.preheader125
  %14 = shl i64 %1, 3
  %15 = add i64 %14, 8
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %7, i8 0, i64 %15, i1 false), !tbaa !5
  br label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.0100128 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %27, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %16 = mul nsw i64 %.0100128, %5
  %17 = getelementptr inbounds i64, ptr %7, i64 %16
  store i64 0, ptr %17, align 16, !tbaa !5
  %18 = or disjoint i64 %.0100128, 1
  %19 = mul nsw i64 %18, %5
  %20 = getelementptr inbounds i64, ptr %7, i64 %19
  store i64 0, ptr %20, align 8, !tbaa !5
  %21 = or disjoint i64 %.0100128, 2
  %22 = mul nsw i64 %21, %5
  %23 = getelementptr inbounds i64, ptr %7, i64 %22
  store i64 0, ptr %23, align 16, !tbaa !5
  %24 = or disjoint i64 %.0100128, 3
  %25 = mul nsw i64 %24, %5
  %26 = getelementptr inbounds i64, ptr %7, i64 %25
  store i64 0, ptr %26, align 8, !tbaa !5
  %27 = add nuw i64 %.0100128, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader125.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph131.preheader, %.preheader125
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %0)
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @.str.1)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %30, i64 noundef %1)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.not104136 = icmp slt i64 %0, 1
  br i1 %.not104136, label %.preheader123.thread177, label %.preheader124.lr.ph

.preheader124.lr.ph:                              ; preds = %._crit_edge
  %.not114132 = icmp slt i64 %1, 1
  br i1 %.not114132, label %.preheader123.thread, label %.preheader124

.preheader124:                                    ; preds = %.preheader124.lr.ph, %._crit_edge135
  %.098137 = phi i64 [ %39, %._crit_edge135 ], [ 1, %.preheader124.lr.ph ]
  %33 = mul nuw nsw i64 %.098137, %5
  %34 = getelementptr inbounds i64, ptr %7, i64 %33
  br label %40

.preheader123:                                    ; preds = %._crit_edge135
  br i1 %.not103129, label %.preheader120, label %.preheader122.thread

.preheader123.thread177:                          ; preds = %._crit_edge
  br i1 %.not103129, label %.preheader120, label %.preheader122.thread.thread

.preheader122.thread.thread:                      ; preds = %.preheader123.thread177
  %35 = shl i64 %1, 3
  %36 = add i64 %35, 8
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %8, ptr nonnull align 16 %7, i64 %36, i1 false), !tbaa !5
  br label %.preheader120

.preheader123.thread:                             ; preds = %.preheader124.lr.ph
  br i1 %.not103129, label %.preheader117.preheader, label %.preheader122.thread.thread179

.preheader122.thread.thread179:                   ; preds = %.preheader123.thread
  %37 = shl nuw nsw i64 %1, 3
  %38 = add nuw nsw i64 %37, 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %8, ptr noundef nonnull align 16 dereferenceable(1) %7, i64 %38, i1 false), !tbaa !5
  br label %.preheader121.preheader

._crit_edge135:                                   ; preds = %40
  %39 = add nuw i64 %.098137, 1
  %exitcond170.not = icmp eq i64 %.098137, %0
  br i1 %exitcond170.not, label %.preheader123, label %.preheader124, !llvm.loop !13

40:                                               ; preds = %.preheader124, %40
  %.097133 = phi i64 [ 1, %.preheader124 ], [ %43, %40 ]
  %41 = getelementptr inbounds i64, ptr %34, i64 %.097133
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %41)
  %43 = add nuw i64 %.097133, 1
  %exitcond169.not = icmp eq i64 %.097133, %1
  br i1 %exitcond169.not, label %._crit_edge135, label %40, !llvm.loop !14

.preheader122.thread:                             ; preds = %.preheader123
  %44 = shl i64 %1, 3
  %45 = add i64 %44, 8
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %8, ptr nonnull align 16 %7, i64 %45, i1 false), !tbaa !5
  br i1 %.not104136, label %.preheader120, label %.preheader121.preheader

.preheader121.preheader:                          ; preds = %.preheader122.thread.thread179, %.preheader122.thread
  %min.iters.check = icmp ult i64 %5, 4
  %n.vec = and i64 %5, -4
  %cmp.n = icmp eq i64 %5, %n.vec
  br label %.preheader121

.preheader121:                                    ; preds = %.preheader121.preheader, %._crit_edge144
  %.095146 = phi i64 [ %64, %._crit_edge144 ], [ 1, %.preheader121.preheader ]
  %46 = mul nuw nsw i64 %.095146, %5
  %47 = getelementptr inbounds i64, ptr %7, i64 %46
  %48 = add nsw i64 %.095146, -1
  %49 = mul nsw i64 %48, %5
  %50 = getelementptr inbounds i64, ptr %8, i64 %49
  %51 = getelementptr inbounds i64, ptr %8, i64 %46
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader121
  %.094142.ph = phi i64 [ 0, %.preheader121 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %.preheader121, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader121 ]
  %52 = getelementptr inbounds i64, ptr %47, i64 %index
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %wide.load = load <2 x i64>, ptr %52, align 8, !tbaa !5
  %wide.load184 = load <2 x i64>, ptr %53, align 8, !tbaa !5
  %54 = getelementptr inbounds i64, ptr %50, i64 %index
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load185 = load <2 x i64>, ptr %54, align 8, !tbaa !5
  %wide.load186 = load <2 x i64>, ptr %55, align 8, !tbaa !5
  %56 = add nsw <2 x i64> %wide.load185, %wide.load
  %57 = add nsw <2 x i64> %wide.load186, %wide.load184
  %58 = getelementptr inbounds i64, ptr %51, i64 %index
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  store <2 x i64> %56, ptr %58, align 8, !tbaa !5
  store <2 x i64> %57, ptr %59, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %60 = icmp eq i64 %index.next, %n.vec
  br i1 %60, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge144, label %scalar.ph.preheader

.preheader120:                                    ; preds = %._crit_edge144, %.preheader123, %.preheader123.thread177, %.preheader122.thread.thread, %.preheader122.thread
  br i1 %.not127, label %._crit_edge164, label %.preheader119.lr.ph

.preheader119.lr.ph:                              ; preds = %.preheader120
  %.not112147 = icmp slt i64 %1, 1
  br i1 %.not112147, label %.preheader118, label %.preheader119.preheader

.preheader119.preheader:                          ; preds = %.preheader119.lr.ph
  %61 = shl i64 %1, 3
  %62 = add i64 %61, 8
  %xtraiter188 = and i64 %1, 3
  %63 = icmp ult i64 %1, 4
  %unroll_iter191 = and i64 %1, 9223372036854775804
  %lcmp.mod190.not = icmp eq i64 %xtraiter188, 0
  br label %.preheader119

._crit_edge144:                                   ; preds = %scalar.ph, %middle.block
  %64 = add nuw i64 %.095146, 1
  %exitcond172.not = icmp eq i64 %.095146, %0
  br i1 %exitcond172.not, label %.preheader120, label %.preheader121, !llvm.loop !18

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.094142 = phi i64 [ %71, %scalar.ph ], [ %.094142.ph, %scalar.ph.preheader ]
  %65 = getelementptr inbounds i64, ptr %47, i64 %.094142
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %50, i64 %.094142
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = add nsw i64 %68, %66
  %70 = getelementptr inbounds i64, ptr %51, i64 %.094142
  store i64 %69, ptr %70, align 8, !tbaa !5
  %71 = add nuw i64 %.094142, 1
  %exitcond171.not = icmp eq i64 %.094142, %1
  br i1 %exitcond171.not, label %._crit_edge144, label %scalar.ph, !llvm.loop !19

.preheader119:                                    ; preds = %.preheader119.preheader, %._crit_edge150
  %.093152 = phi i64 [ %79, %._crit_edge150 ], [ 0, %.preheader119.preheader ]
  %72 = mul i64 %62, %.093152
  %scevgep = getelementptr i8, ptr %8, i64 %72
  %73 = mul nuw nsw i64 %.093152, %5
  %74 = getelementptr inbounds i64, ptr %8, i64 %73
  %load_initial = load i64, ptr %scevgep, align 8
  br i1 %63, label %._crit_edge150.unr-lcssa, label %.preheader119.new

.preheader119.new:                                ; preds = %.preheader119
  %invariant.gep = getelementptr i8, ptr %74, i64 8
  %invariant.gep196 = getelementptr i8, ptr %74, i64 16
  %invariant.gep198 = getelementptr i8, ptr %74, i64 24
  br label %80

.preheader118:                                    ; preds = %._crit_edge150, %.preheader119.lr.ph
  br i1 %.not104136, label %._crit_edge164, label %.preheader117.preheader

.preheader117.preheader:                          ; preds = %.preheader123.thread, %.preheader118
  br label %.preheader117

._crit_edge150.unr-lcssa:                         ; preds = %80, %.preheader119
  %store_forwarded.unr = phi i64 [ %load_initial, %.preheader119 ], [ %89, %80 ]
  %.092148.unr = phi i64 [ 1, %.preheader119 ], [ %90, %80 ]
  br i1 %lcmp.mod190.not, label %._crit_edge150, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge150.unr-lcssa, %.epil.preheader
  %store_forwarded.epil = phi i64 [ %77, %.epil.preheader ], [ %store_forwarded.unr, %._crit_edge150.unr-lcssa ]
  %.092148.epil = phi i64 [ %78, %.epil.preheader ], [ %.092148.unr, %._crit_edge150.unr-lcssa ]
  %epil.iter189 = phi i64 [ %epil.iter189.next, %.epil.preheader ], [ 0, %._crit_edge150.unr-lcssa ]
  %75 = getelementptr i64, ptr %74, i64 %.092148.epil
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = add nsw i64 %76, %store_forwarded.epil
  store i64 %77, ptr %75, align 8, !tbaa !5
  %78 = add nuw i64 %.092148.epil, 1
  %epil.iter189.next = add i64 %epil.iter189, 1
  %epil.iter189.cmp.not = icmp eq i64 %epil.iter189.next, %xtraiter188
  br i1 %epil.iter189.cmp.not, label %._crit_edge150, label %.epil.preheader, !llvm.loop !20

._crit_edge150:                                   ; preds = %.epil.preheader, %._crit_edge150.unr-lcssa
  %79 = add nuw i64 %.093152, 1
  %exitcond174.not = icmp eq i64 %.093152, %0
  br i1 %exitcond174.not, label %.preheader118, label %.preheader119, !llvm.loop !21

80:                                               ; preds = %80, %.preheader119.new
  %store_forwarded = phi i64 [ %load_initial, %.preheader119.new ], [ %89, %80 ]
  %.092148 = phi i64 [ 1, %.preheader119.new ], [ %90, %80 ]
  %niter192 = phi i64 [ 0, %.preheader119.new ], [ %niter192.next.3, %80 ]
  %81 = getelementptr i64, ptr %74, i64 %.092148
  %82 = load i64, ptr %81, align 8, !tbaa !5
  %83 = add nsw i64 %82, %store_forwarded
  store i64 %83, ptr %81, align 8, !tbaa !5
  %gep = getelementptr i64, ptr %invariant.gep, i64 %.092148
  %84 = load i64, ptr %gep, align 8, !tbaa !5
  %85 = add nsw i64 %84, %83
  store i64 %85, ptr %gep, align 8, !tbaa !5
  %gep197 = getelementptr i64, ptr %invariant.gep196, i64 %.092148
  %86 = load i64, ptr %gep197, align 8, !tbaa !5
  %87 = add nsw i64 %86, %85
  store i64 %87, ptr %gep197, align 8, !tbaa !5
  %gep199 = getelementptr i64, ptr %invariant.gep198, i64 %.092148
  %88 = load i64, ptr %gep199, align 8, !tbaa !5
  %89 = add nsw i64 %88, %87
  store i64 %89, ptr %gep199, align 8, !tbaa !5
  %90 = add nuw i64 %.092148, 4
  %niter192.next.3 = add i64 %niter192, 4
  %niter192.ncmp.3 = icmp eq i64 %niter192.next.3, %unroll_iter191
  br i1 %niter192.ncmp.3, label %._crit_edge150.unr-lcssa, label %80, !llvm.loop !22

.preheader117:                                    ; preds = %.preheader117.preheader, %97
  %.089163 = phi i64 [ %.2, %97 ], [ 0, %.preheader117.preheader ]
  %.091162 = phi i64 [ %98, %97 ], [ 1, %.preheader117.preheader ]
  %factor.op.mul156 = mul i64 %.091162, %2
  %factor.op.mul.reass = mul i64 %factor.op.mul156, %.091162
  br label %.preheader

._crit_edge164.loopexit:                          ; preds = %97
  %91 = trunc i64 %.2 to i32
  br label %._crit_edge164

._crit_edge164:                                   ; preds = %.preheader120, %._crit_edge164.loopexit, %.preheader118
  %.089.lcssa = phi i32 [ 0, %.preheader118 ], [ %91, %._crit_edge164.loopexit ], [ 0, %.preheader120 ]
  ret i32 %.089.lcssa

.preheader:                                       ; preds = %.preheader117, %.loopexit
  %.087159 = phi i64 [ %.091162, %.preheader117 ], [ %121, %.loopexit ]
  %.088158 = phi i64 [ %1, %.preheader117 ], [ %.1, %.loopexit ]
  %.190157 = phi i64 [ %.089163, %.preheader117 ], [ %.2, %.loopexit ]
  %.not110153 = icmp sgt i64 %.091162, %.088158
  br i1 %.not110153, label %.loopexit, label %.lr.ph155

.lr.ph155:                                        ; preds = %.preheader
  %92 = mul nsw i64 %.087159, %5
  %93 = getelementptr inbounds i64, ptr %8, i64 %92
  %94 = sub nuw nsw i64 %.087159, %.091162
  %95 = mul nsw i64 %94, %5
  %96 = getelementptr inbounds i64, ptr %8, i64 %95
  br label %99

97:                                               ; preds = %.loopexit
  %98 = add nuw i64 %.091162, 1
  %exitcond175.not = icmp eq i64 %.091162, %0
  br i1 %exitcond175.not, label %._crit_edge164.loopexit, label %.preheader117, !llvm.loop !23

99:                                               ; preds = %.lr.ph155, %119
  %.0154 = phi i64 [ %.091162, %.lr.ph155 ], [ %120, %119 ]
  %100 = getelementptr inbounds i64, ptr %93, i64 %.0154
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = sub nuw nsw i64 %.0154, %.091162
  %103 = getelementptr inbounds i64, ptr %93, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds i64, ptr %96, i64 %.0154
  %106 = load i64, ptr %105, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %96, i64 %102
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = add i64 %104, %106
  %110 = sub i64 %101, %109
  %111 = add nsw i64 %110, %108
  %.not111 = icmp slt i64 %111, %factor.op.mul.reass
  br i1 %.not111, label %119, label %112

112:                                              ; preds = %99
  %113 = sub nsw i64 %4, %.087159
  %114 = add nuw nsw i64 %.088158, 1
  %115 = sub i64 %114, %.0154
  %116 = mul nsw i64 %115, %113
  %117 = add nsw i64 %116, %.190157
  %118 = add nsw i64 %.0154, -1
  br label %.loopexit

119:                                              ; preds = %99
  %120 = add nuw nsw i64 %.0154, 1
  %.not110.not = icmp slt i64 %.0154, %.088158
  br i1 %.not110.not, label %99, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %119, %.preheader, %112
  %.2 = phi i64 [ %117, %112 ], [ %.190157, %.preheader ], [ %.190157, %119 ]
  %.1 = phi i64 [ %118, %112 ], [ %.088158, %.preheader ], [ %.088158, %119 ]
  %121 = add nuw nsw i64 %.087159, 1
  %.not109.not = icmp slt i64 %.087159, %0
  br i1 %.not109.not, label %.preheader, label %97, !llvm.loop !25
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !17, !16}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass