; LLVM IR from eyangch/competitive-programming :: USACOtraining/3.3 (range)

; 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_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = load i32, ptr %2, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %3, align 8
  %32 = alloca %"class.std::__cxx11::basic_string", i64 %30, align 16
  store i64 %30, ptr %4, align 8
  %33 = icmp eq i64 %30, 0
  br i1 %33, label %40, label %34

34:                                               ; preds = %0
  %35 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %30
  br label %36

36:                                               ; preds = %36, %34
  %37 = phi ptr [ %32, %34 ], [ %38, %36 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #7
  %38 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %37, i64 1
  %39 = icmp eq ptr %38, %35
  br i1 %39, label %40, label %36

40:                                               ; preds = %36, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %52, %40
  %42 = load i32, ptr %5, align 4, !tbaa !11
  %43 = load i32, ptr %2, align 4, !tbaa !11
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %59

46:                                               ; preds = %41
  %47 = load i32, ptr %5, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %48
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %49)
          to label %51 unwind label %55

51:                                               ; preds = %46
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %5, align 4, !tbaa !11
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %5, align 4, !tbaa !11
  br label %41, !llvm.loop !13

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %6, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %315

59:                                               ; preds = %45
  %60 = load i32, ptr %2, align 4, !tbaa !11
  %61 = zext i32 %60 to i64
  %62 = load i32, ptr %2, align 4, !tbaa !11
  %63 = zext i32 %62 to i64
  %64 = mul nuw i64 %61, %63
  %65 = alloca i32, i64 %64, align 16
  store i64 %61, ptr %8, align 8
  store i64 %63, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %173, %59
  %67 = load i32, ptr %10, align 4, !tbaa !11
  %68 = load i32, ptr %2, align 4, !tbaa !11
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %176

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %72

72:                                               ; preds = %169, %71
  %73 = load i32, ptr %12, align 4, !tbaa !11
  %74 = load i32, ptr %2, align 4, !tbaa !11
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %172

77:                                               ; preds = %72
  %78 = load i32, ptr %10, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %79
  %81 = load i32, ptr %12, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %82)
          to label %84 unwind label %116

84:                                               ; preds = %77
  %85 = load i8, ptr %83, align 1, !tbaa !15
  %86 = sext i8 %85 to i32
  %87 = sub nsw i32 %86, 48
  %88 = load i32, ptr %10, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = mul nsw i64 %89, %63
  %91 = getelementptr inbounds i32, ptr %65, i64 %90
  %92 = load i32, ptr %12, align 4, !tbaa !11
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  store i32 %87, ptr %94, align 4, !tbaa !11
  %95 = load i32, ptr %10, align 4, !tbaa !11
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %120

97:                                               ; preds = %84
  %98 = load i32, ptr %10, align 4, !tbaa !11
  %99 = sub nsw i32 %98, 1
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %100, %63
  %102 = getelementptr inbounds i32, ptr %65, i64 %101
  %103 = load i32, ptr %12, align 4, !tbaa !11
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %102, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !11
  %107 = load i32, ptr %10, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %108, %63
  %110 = getelementptr inbounds i32, ptr %65, i64 %109
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !11
  %115 = add nsw i32 %114, %106
  store i32 %115, ptr %113, align 4, !tbaa !11
  br label %120

116:                                              ; preds = %77
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %6, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %315

120:                                              ; preds = %97, %84
  %121 = load i32, ptr %12, align 4, !tbaa !11
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %123, label %142

123:                                              ; preds = %120
  %124 = load i32, ptr %10, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = mul nsw i64 %125, %63
  %127 = getelementptr inbounds i32, ptr %65, i64 %126
  %128 = load i32, ptr %12, align 4, !tbaa !11
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %127, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = load i32, ptr %10, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = mul nsw i64 %134, %63
  %136 = getelementptr inbounds i32, ptr %65, i64 %135
  %137 = load i32, ptr %12, align 4, !tbaa !11
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !11
  %141 = add nsw i32 %140, %132
  store i32 %141, ptr %139, align 4, !tbaa !11
  br label %142

142:                                              ; preds = %123, %120
  %143 = load i32, ptr %10, align 4, !tbaa !11
  %144 = icmp sgt i32 %143, 0
  br i1 %144, label %145, label %168

145:                                              ; preds = %142
  %146 = load i32, ptr %12, align 4, !tbaa !11
  %147 = icmp sgt i32 %146, 0
  br i1 %147, label %148, label %168

148:                                              ; preds = %145
  %149 = load i32, ptr %10, align 4, !tbaa !11
  %150 = sub nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = mul nsw i64 %151, %63
  %153 = getelementptr inbounds i32, ptr %65, i64 %152
  %154 = load i32, ptr %12, align 4, !tbaa !11
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %153, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !11
  %159 = load i32, ptr %10, align 4, !tbaa !11
  %160 = sext i32 %159 to i64
  %161 = mul nsw i64 %160, %63
  %162 = getelementptr inbounds i32, ptr %65, i64 %161
  %163 = load i32, ptr %12, align 4, !tbaa !11
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i32, ptr %162, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !11
  %167 = sub nsw i32 %166, %158
  store i32 %167, ptr %165, align 4, !tbaa !11
  br label %168

168:                                              ; preds = %148, %145, %142
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %12, align 4, !tbaa !11
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %12, align 4, !tbaa !11
  br label %72, !llvm.loop !16

172:                                              ; preds = %76
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %10, align 4, !tbaa !11
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %10, align 4, !tbaa !11
  br label %66, !llvm.loop !17

176:                                              ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %177

177:                                              ; preds = %302, %176
  %178 = load i32, ptr %13, align 4, !tbaa !11
  %179 = load i32, ptr %2, align 4, !tbaa !11
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %177
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %305

182:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %183

183:                                              ; preds = %279, %182
  %184 = load i32, ptr %15, align 4, !tbaa !11
  %185 = load i32, ptr %13, align 4, !tbaa !11
  %186 = add nsw i32 %184, %185
  %187 = load i32, ptr %2, align 4, !tbaa !11
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %183
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %282

190:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %191

191:                                              ; preds = %275, %190
  %192 = load i32, ptr %16, align 4, !tbaa !11
  %193 = load i32, ptr %13, align 4, !tbaa !11
  %194 = add nsw i32 %192, %193
  %195 = load i32, ptr %2, align 4, !tbaa !11
  %196 = icmp slt i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %191
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %278

198:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %199 = load i32, ptr %15, align 4, !tbaa !11
  %200 = load i32, ptr %13, align 4, !tbaa !11
  %201 = add nsw i32 %199, %200
  %202 = sext i32 %201 to i64
  %203 = mul nsw i64 %202, %63
  %204 = getelementptr inbounds i32, ptr %65, i64 %203
  %205 = load i32, ptr %16, align 4, !tbaa !11
  %206 = load i32, ptr %13, align 4, !tbaa !11
  %207 = add nsw i32 %205, %206
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds i32, ptr %204, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !11
  store i32 %210, ptr %17, align 4, !tbaa !11
  %211 = load i32, ptr %15, align 4, !tbaa !11
  %212 = icmp sgt i32 %211, 0
  br i1 %212, label %213, label %227

213:                                              ; preds = %198
  %214 = load i32, ptr %15, align 4, !tbaa !11
  %215 = sub nsw i32 %214, 1
  %216 = sext i32 %215 to i64
  %217 = mul nsw i64 %216, %63
  %218 = getelementptr inbounds i32, ptr %65, i64 %217
  %219 = load i32, ptr %16, align 4, !tbaa !11
  %220 = load i32, ptr %13, align 4, !tbaa !11
  %221 = add nsw i32 %219, %220
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i32, ptr %218, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !11
  %225 = load i32, ptr %17, align 4, !tbaa !11
  %226 = sub nsw i32 %225, %224
  store i32 %226, ptr %17, align 4, !tbaa !11
  br label %227

227:                                              ; preds = %213, %198
  %228 = load i32, ptr %16, align 4, !tbaa !11
  %229 = icmp sgt i32 %228, 0
  br i1 %229, label %230, label %244

230:                                              ; preds = %227
  %231 = load i32, ptr %15, align 4, !tbaa !11
  %232 = load i32, ptr %13, align 4, !tbaa !11
  %233 = add nsw i32 %231, %232
  %234 = sext i32 %233 to i64
  %235 = mul nsw i64 %234, %63
  %236 = getelementptr inbounds i32, ptr %65, i64 %235
  %237 = load i32, ptr %16, align 4, !tbaa !11
  %238 = sub nsw i32 %237, 1
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i32, ptr %236, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !11
  %242 = load i32, ptr %17, align 4, !tbaa !11
  %243 = sub nsw i32 %242, %241
  store i32 %243, ptr %17, align 4, !tbaa !11
  br label %244

244:                                              ; preds = %230, %227
  %245 = load i32, ptr %15, align 4, !tbaa !11
  %246 = icmp sgt i32 %245, 0
  br i1 %246, label %247, label %263

247:                                              ; preds = %244
  %248 = load i32, ptr %16, align 4, !tbaa !11
  %249 = icmp sgt i32 %248, 0
  br i1 %249, label %250, label %263

250:                                              ; preds = %247
  %251 = load i32, ptr %15, align 4, !tbaa !11
  %252 = sub nsw i32 %251, 1
  %253 = sext i32 %252 to i64
  %254 = mul nsw i64 %253, %63
  %255 = getelementptr inbounds i32, ptr %65, i64 %254
  %256 = load i32, ptr %16, align 4, !tbaa !11
  %257 = sub nsw i32 %256, 1
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds i32, ptr %255, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !11
  %261 = load i32, ptr %17, align 4, !tbaa !11
  %262 = add nsw i32 %261, %260
  store i32 %262, ptr %17, align 4, !tbaa !11
  br label %263

263:                                              ; preds = %250, %247, %244
  %264 = load i32, ptr %17, align 4, !tbaa !11
  %265 = load i32, ptr %13, align 4, !tbaa !11
  %266 = add nsw i32 %265, 1
  %267 = load i32, ptr %13, align 4, !tbaa !11
  %268 = add nsw i32 %267, 1
  %269 = mul nsw i32 %266, %268
  %270 = icmp eq i32 %264, %269
  br i1 %270, label %271, label %274

271:                                              ; preds = %263
  %272 = load i32, ptr %14, align 4, !tbaa !11
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %14, align 4, !tbaa !11
  br label %274

274:                                              ; preds = %271, %263
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %275

275:                                              ; preds = %274
  %276 = load i32, ptr %16, align 4, !tbaa !11
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %16, align 4, !tbaa !11
  br label %191, !llvm.loop !18

278:                                              ; preds = %197
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %15, align 4, !tbaa !11
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %15, align 4, !tbaa !11
  br label %183, !llvm.loop !19

282:                                              ; preds = %189
  %283 = load i32, ptr %14, align 4, !tbaa !11
  %284 = icmp sgt i32 %283, 0
  br i1 %284, label %285, label %301

285:                                              ; preds = %282
  %286 = load i32, ptr %13, align 4, !tbaa !11
  %287 = add nsw i32 %286, 1
  %288 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %287)
          to label %289 unwind label %297

289:                                              ; preds = %285
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %288, ptr noundef @.str.4)
          to label %291 unwind label %297

291:                                              ; preds = %289
  %292 = load i32, ptr %14, align 4, !tbaa !11
  %293 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %290, i32 noundef %292)
          to label %294 unwind label %297

294:                                              ; preds = %291
  %295 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %293, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %296 unwind label %297

296:                                              ; preds = %294
  br label %301

297:                                              ; preds = %294, %291, %289, %285
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %6, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %315

301:                                              ; preds = %296, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %13, align 4, !tbaa !11
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %13, align 4, !tbaa !11
  br label %177, !llvm.loop !20

305:                                              ; preds = %181
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  %306 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %30
  %307 = icmp eq ptr %32, %306
  br i1 %307, label %312, label %308

308:                                              ; preds = %308, %305
  %309 = phi ptr [ %306, %305 ], [ %310, %308 ]
  %310 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %309, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %310) #7
  %311 = icmp eq ptr %310, %32
  br i1 %311, label %312, label %308

312:                                              ; preds = %308, %305
  %313 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %313)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %314 = load i32, ptr %1, align 4
  ret i32 %314

315:                                              ; preds = %297, %116, %55
  %316 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %30
  %317 = icmp eq ptr %32, %316
  br i1 %317, label %322, label %318

318:                                              ; preds = %318, %315
  %319 = phi ptr [ %316, %315 ], [ %320, %318 ]
  %320 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %319, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %320) #7
  %321 = icmp eq ptr %320, %32
  br i1 %321, label %322, label %318

322:                                              ; preds = %318, %315
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %323

323:                                              ; preds = %322
  %324 = load ptr, ptr %6, align 8
  %325 = load i32, ptr %7, align 4
  %326 = insertvalue { ptr, i32 } poison, ptr %324, 0
  %327 = insertvalue { ptr, i32 } %326, i32 %325, 1
  resume { ptr, i32 } %327
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

; 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) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 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)) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @stdin, align 8, !tbaa !8
  %9 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %8)
  %10 = load ptr, ptr @stdout, align 8, !tbaa !8
  %11 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %13 = load i32, ptr %1, align 4, !tbaa !11
  %14 = zext i32 %13 to i64
  %15 = call ptr @llvm.stacksave.p0()
  %16 = alloca %"class.std::__cxx11::basic_string", i64 %14, align 16
  %17 = icmp eq i32 %13, 0
  br i1 %17, label %.loopexit95, label %18

18:                                               ; preds = %0
  %19 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %16, i64 %14
  br label %20

20:                                               ; preds = %20, %18
  %21 = phi ptr [ %16, %18 ], [ %22, %20 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #8
  %22 = getelementptr inbounds i8, ptr %21, i64 32
  %23 = icmp eq ptr %22, %19
  br i1 %23, label %.loopexit95, label %20

.loopexit95:                                      ; preds = %20, %0
  %24 = load i32, ptr %1, align 4, !tbaa !11
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge126

._crit_edge:                                      ; preds = %32
  %26 = zext i32 %33 to i64
  %27 = mul nuw i64 %26, %26
  %28 = alloca i32, i64 %27, align 16
  %invariant.gep101 = getelementptr i8, ptr %28, i64 -4
  %29 = icmp sgt i32 %33, 0
  br i1 %29, label %.preheader94, label %._crit_edge126

.lr.ph:                                           ; preds = %.loopexit95, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 0, %.loopexit95 ]
  %30 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %16, i64 %indvars.iv
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %32 unwind label %36

32:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr %1, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !13

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %197

.preheader94:                                     ; preds = %._crit_edge, %._crit_edge100
  %38 = phi i32 [ %73, %._crit_edge100 ], [ %33, %._crit_edge ]
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %._crit_edge100 ], [ 0, %._crit_edge ]
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %.preheader94
  %40 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %16, i64 %indvars.iv145
  %41 = mul nuw nsw i64 %indvars.iv145, %26
  %42 = getelementptr inbounds i32, ptr %28, i64 %41
  %.not = icmp eq i64 %indvars.iv145, 0
  %43 = add nsw i64 %indvars.iv145, -1
  %44 = mul nuw nsw i64 %43, %26
  %45 = getelementptr inbounds i32, ptr %28, i64 %44
  %gep = getelementptr i32, ptr %invariant.gep101, i64 %44
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef 0)
  %47 = load i8, ptr %46, align 1, !tbaa !15
  %48 = sext i8 %47 to i32
  %49 = add nsw i32 %48, -48
  store i32 %49, ptr %42, align 4, !tbaa !11
  br i1 %.not, label %.thread.peel, label %.thread.us.peel

.thread.us.peel:                                  ; preds = %.lr.ph99
  %50 = load i32, ptr %45, align 4, !tbaa !11
  %51 = add nsw i32 %50, %49
  store i32 %51, ptr %42, align 4, !tbaa !11
  %52 = load i32, ptr %1, align 4, !tbaa !11
  %53 = icmp sgt i32 %52, 1
  br i1 %53, label %.thread.us, label %._crit_edge100

.thread.peel:                                     ; preds = %.lr.ph99
  %54 = load i32, ptr %1, align 4, !tbaa !11
  %55 = icmp sgt i32 %54, 1
  br i1 %55, label %.thread, label %._crit_edge100

.thread.us:                                       ; preds = %.thread.us.peel, %.thread.us
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %.thread.us ], [ 1, %.thread.us.peel ]
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %indvars.iv137)
  %57 = load i8, ptr %56, align 1, !tbaa !15
  %58 = sext i8 %57 to i32
  %59 = add nsw i32 %58, -48
  %60 = getelementptr inbounds i32, ptr %42, i64 %indvars.iv137
  store i32 %59, ptr %60, align 4, !tbaa !11
  %61 = getelementptr inbounds i32, ptr %45, i64 %indvars.iv137
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = add nsw i32 %62, %59
  %64 = getelementptr i8, ptr %60, i64 -4
  %65 = load i32, ptr %64, align 4, !tbaa !11
  %66 = add nsw i32 %63, %65
  store i32 %66, ptr %60, align 4, !tbaa !11
  %gep.us = getelementptr i32, ptr %gep, i64 %indvars.iv137
  %67 = load i32, ptr %gep.us, align 4, !tbaa !11
  %68 = sub nsw i32 %66, %67
  store i32 %68, ptr %60, align 4, !tbaa !11
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %69 = load i32, ptr %1, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next138, %70
  br i1 %71, label %.thread.us, label %._crit_edge100, !llvm.loop !16

.preheader93:                                     ; preds = %._crit_edge100
  %72 = icmp sgt i32 %73, 1
  br i1 %72, label %.preheader92, label %._crit_edge126

._crit_edge100:                                   ; preds = %.thread.us, %.thread, %.thread.us.peel, %.thread.peel, %.preheader94
  %73 = phi i32 [ %38, %.preheader94 ], [ %54, %.thread.peel ], [ %52, %.thread.us.peel ], [ %84, %.thread ], [ %69, %.thread.us ]
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next146, %74
  br i1 %75, label %.preheader94, label %.preheader93, !llvm.loop !18

.thread:                                          ; preds = %.thread.peel, %.thread
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %.thread ], [ 1, %.thread.peel ]
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %40, i64 noundef %indvars.iv141)
  %77 = load i8, ptr %76, align 1, !tbaa !15
  %78 = sext i8 %77 to i32
  %79 = add nsw i32 %78, -48
  %80 = getelementptr inbounds i32, ptr %42, i64 %indvars.iv141
  %81 = getelementptr i8, ptr %80, i64 -4
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = add nsw i32 %79, %82
  store i32 %83, ptr %80, align 4, !tbaa !11
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %84 = load i32, ptr %1, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next142, %85
  br i1 %86, label %.thread, label %._crit_edge100, !llvm.loop !20

.preheader92:                                     ; preds = %.preheader93, %191
  %indvar = phi i64 [ %indvar.next, %191 ], [ 0, %.preheader93 ]
  %87 = phi i32 [ %192, %191 ], [ %73, %.preheader93 ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %191 ], [ 1, %.preheader93 ]
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %88 = mul nuw nsw i64 %indvars.iv.next162, %indvars.iv.next162
  %sext159 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next162, %sext159
  %90 = icmp slt i64 %indvars.iv.next162, %sext159
  %reass.sub = sub i64 %sext159, %indvar
  %91 = add i64 %reass.sub, -2
  %reass.sub213 = sub i64 %sext159, %indvar
  %92 = add i64 %reass.sub213, -2
  %min.iters.check188 = icmp ult i64 %92, 8
  %n.vec191 = and i64 %92, -8
  %ind.end192 = or disjoint i64 %n.vec191, 1
  %broadcast.splatinsert207 = insertelement <4 x i64> poison, i64 %88, i64 0
  %broadcast.splat208 = shufflevector <4 x i64> %broadcast.splatinsert207, <4 x i64> poison, <4 x i32> zeroinitializer
  %cmp.n211 = icmp eq i64 %92, %n.vec191
  %min.iters.check = icmp ult i64 %91, 8
  %n.vec = and i64 %91, -8
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %88, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %91, %n.vec
  br label %.preheader91.us

.preheader91.us:                                  ; preds = %._crit_edge106.us, %.preheader92
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %._crit_edge106.us ], [ 0, %.preheader92 ]
  %.069113.us = phi i32 [ %.us-phi.us, %._crit_edge106.us ], [ 0, %.preheader92 ]
  %93 = add nuw nsw i64 %indvars.iv157, %indvars.iv161
  %94 = mul nuw nsw i64 %93, %26
  %95 = getelementptr inbounds i32, ptr %28, i64 %94
  %.not129 = icmp eq i64 %indvars.iv157, 0
  %96 = add nsw i64 %indvars.iv157, -1
  %97 = mul nuw nsw i64 %96, %26
  %98 = getelementptr inbounds i32, ptr %28, i64 %97
  %invariant.gep.us = getelementptr i8, ptr %95, i64 -4
  %gep112.us = getelementptr i32, ptr %invariant.gep101, i64 %97
  %99 = getelementptr inbounds i32, ptr %95, i64 %indvars.iv161
  %100 = load i32, ptr %99, align 4, !tbaa !11
  br i1 %.not129, label %.thread86.us118.peel, label %.thread86.us.us.peel

.thread86.us.us.peel:                             ; preds = %.preheader91.us
  %101 = getelementptr inbounds i32, ptr %98, i64 %indvars.iv161
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = sub nsw i32 %100, %102
  %104 = zext i32 %103 to i64
  %105 = icmp eq i64 %88, %104
  %106 = zext i1 %105 to i32
  %spec.select.us.us.peel = add nsw i32 %.069113.us, %106
  br i1 %89, label %.thread86.us.us.preheader, label %._crit_edge106.us

.thread86.us.us.preheader:                        ; preds = %.thread86.us.us.peel
  br i1 %min.iters.check188, label %.thread86.us.us.preheader214, label %vector.ph189

.thread86.us.us.preheader214:                     ; preds = %middle.block186, %.thread86.us.us.preheader
  %indvars.iv148.ph = phi i64 [ 1, %.thread86.us.us.preheader ], [ %ind.end192, %middle.block186 ]
  %.170103.us.us.ph = phi i32 [ %spec.select.us.us.peel, %.thread86.us.us.preheader ], [ %132, %middle.block186 ]
  br label %.thread86.us.us

vector.ph189:                                     ; preds = %.thread86.us.us.preheader
  %107 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %spec.select.us.us.peel, i64 0
  br label %vector.body194

vector.body194:                                   ; preds = %vector.body194, %vector.ph189
  %index195 = phi i64 [ 0, %vector.ph189 ], [ %index.next209, %vector.body194 ]
  %vec.phi196 = phi <4 x i32> [ %107, %vector.ph189 ], [ %129, %vector.body194 ]
  %vec.phi197 = phi <4 x i32> [ zeroinitializer, %vector.ph189 ], [ %130, %vector.body194 ]
  %offset.idx198 = or disjoint i64 %index195, 1
  %108 = getelementptr i32, ptr %gep112.us, i64 %offset.idx198
  %109 = getelementptr i8, ptr %108, i64 16
  %wide.load199 = load <4 x i32>, ptr %108, align 4, !tbaa !11
  %wide.load200 = load <4 x i32>, ptr %109, align 4, !tbaa !11
  %110 = add nuw nsw i64 %offset.idx198, %indvars.iv161
  %111 = getelementptr inbounds i32, ptr %95, i64 %110
  %112 = getelementptr inbounds i8, ptr %111, i64 16
  %wide.load201 = load <4 x i32>, ptr %111, align 4, !tbaa !11
  %wide.load202 = load <4 x i32>, ptr %112, align 4, !tbaa !11
  %113 = getelementptr inbounds i32, ptr %98, i64 %110
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %wide.load203 = load <4 x i32>, ptr %113, align 4, !tbaa !11
  %wide.load204 = load <4 x i32>, ptr %114, align 4, !tbaa !11
  %115 = getelementptr i32, ptr %95, i64 %index195
  %116 = getelementptr i8, ptr %115, i64 16
  %wide.load205 = load <4 x i32>, ptr %115, align 4, !tbaa !11
  %wide.load206 = load <4 x i32>, ptr %116, align 4, !tbaa !11
  %117 = add <4 x i32> %wide.load203, %wide.load205
  %118 = add <4 x i32> %wide.load204, %wide.load206
  %119 = sub <4 x i32> %wide.load201, %117
  %120 = sub <4 x i32> %wide.load202, %118
  %121 = add nsw <4 x i32> %wide.load199, %119
  %122 = add nsw <4 x i32> %wide.load200, %120
  %123 = zext <4 x i32> %121 to <4 x i64>
  %124 = zext <4 x i32> %122 to <4 x i64>
  %125 = icmp eq <4 x i64> %broadcast.splat208, %123
  %126 = icmp eq <4 x i64> %broadcast.splat208, %124
  %127 = zext <4 x i1> %125 to <4 x i32>
  %128 = zext <4 x i1> %126 to <4 x i32>
  %129 = add <4 x i32> %vec.phi196, %127
  %130 = add <4 x i32> %vec.phi197, %128
  %index.next209 = add nuw i64 %index195, 8
  %131 = icmp eq i64 %index.next209, %n.vec191
  br i1 %131, label %middle.block186, label %vector.body194, !llvm.loop !21

middle.block186:                                  ; preds = %vector.body194
  %bin.rdx210 = add <4 x i32> %130, %129
  %132 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx210)
  br i1 %cmp.n211, label %._crit_edge106.us, label %.thread86.us.us.preheader214

.thread86.us118.peel:                             ; preds = %.preheader91.us
  %133 = zext i32 %100 to i64
  %134 = icmp eq i64 %88, %133
  %135 = zext i1 %134 to i32
  %spec.select.us120.peel = add nsw i32 %.069113.us, %135
  br i1 %90, label %.lr.ph105.split.us123.peel.next, label %._crit_edge106.us

.lr.ph105.split.us123.peel.next:                  ; preds = %.thread86.us118.peel
  %invariant.gep = getelementptr inbounds i32, ptr %95, i64 %indvars.iv161
  br i1 %min.iters.check, label %.thread86.us118.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph105.split.us123.peel.next
  %136 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %spec.select.us120.peel, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %136, %vector.ph ], [ %149, %vector.body ]
  %vec.phi182 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %150, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %137 = getelementptr inbounds i32, ptr %invariant.gep, i64 %offset.idx
  %138 = getelementptr inbounds i8, ptr %137, i64 16
  %wide.load = load <4 x i32>, ptr %137, align 4, !tbaa !11
  %wide.load183 = load <4 x i32>, ptr %138, align 4, !tbaa !11
  %139 = getelementptr i32, ptr %95, i64 %index
  %140 = getelementptr i8, ptr %139, i64 16
  %wide.load184 = load <4 x i32>, ptr %139, align 4, !tbaa !11
  %wide.load185 = load <4 x i32>, ptr %140, align 4, !tbaa !11
  %141 = sub nsw <4 x i32> %wide.load, %wide.load184
  %142 = sub nsw <4 x i32> %wide.load183, %wide.load185
  %143 = zext <4 x i32> %141 to <4 x i64>
  %144 = zext <4 x i32> %142 to <4 x i64>
  %145 = icmp eq <4 x i64> %broadcast.splat, %143
  %146 = icmp eq <4 x i64> %broadcast.splat, %144
  %147 = zext <4 x i1> %145 to <4 x i32>
  %148 = zext <4 x i1> %146 to <4 x i32>
  %149 = add <4 x i32> %vec.phi, %147
  %150 = add <4 x i32> %vec.phi182, %148
  %index.next = add nuw i64 %index, 8
  %151 = icmp eq i64 %index.next, %n.vec
  br i1 %151, label %middle.block, label %vector.body, !llvm.loop !24

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %150, %149
  %152 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge106.us, label %.thread86.us118.preheader

.thread86.us118.preheader:                        ; preds = %middle.block, %.lr.ph105.split.us123.peel.next
  %indvars.iv152.ph = phi i64 [ 1, %.lr.ph105.split.us123.peel.next ], [ %ind.end, %middle.block ]
  %.170103.us116.ph = phi i32 [ %spec.select.us120.peel, %.lr.ph105.split.us123.peel.next ], [ %152, %middle.block ]
  br label %.thread86.us118

.thread86.us118:                                  ; preds = %.thread86.us118.preheader, %.thread86.us118
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.thread86.us118 ], [ %indvars.iv152.ph, %.thread86.us118.preheader ]
  %.170103.us116 = phi i32 [ %spec.select.us120, %.thread86.us118 ], [ %.170103.us116.ph, %.thread86.us118.preheader ]
  %gep176 = getelementptr inbounds i32, ptr %invariant.gep, i64 %indvars.iv152
  %153 = load i32, ptr %gep176, align 4, !tbaa !11
  %gep108.us117 = getelementptr i32, ptr %invariant.gep.us, i64 %indvars.iv152
  %154 = load i32, ptr %gep108.us117, align 4, !tbaa !11
  %155 = sub nsw i32 %153, %154
  %156 = zext i32 %155 to i64
  %157 = icmp eq i64 %88, %156
  %158 = zext i1 %157 to i32
  %spec.select.us120 = add nsw i32 %.170103.us116, %158
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %159 = add nuw nsw i64 %indvars.iv.next153, %indvars.iv161
  %160 = icmp slt i64 %159, %sext159
  br i1 %160, label %.thread86.us118, label %._crit_edge106.us, !llvm.loop !25

._crit_edge106.us:                                ; preds = %.thread86.us.us, %.thread86.us118, %middle.block186, %middle.block, %.thread86.us.us.peel, %.thread86.us118.peel
  %.us-phi.us = phi i32 [ %spec.select.us120.peel, %.thread86.us118.peel ], [ %spec.select.us.us.peel, %.thread86.us.us.peel ], [ %152, %middle.block ], [ %132, %middle.block186 ], [ %spec.select.us120, %.thread86.us118 ], [ %spec.select.us.us, %.thread86.us.us ]
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %161 = add nuw nsw i64 %indvars.iv.next158, %indvars.iv161
  %162 = icmp slt i64 %161, %sext159
  br i1 %162, label %.preheader91.us, label %.split.us, !llvm.loop !26

.thread86.us.us:                                  ; preds = %.thread86.us.us.preheader214, %.thread86.us.us
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %.thread86.us.us ], [ %indvars.iv148.ph, %.thread86.us.us.preheader214 ]
  %.170103.us.us = phi i32 [ %spec.select.us.us, %.thread86.us.us ], [ %.170103.us.us.ph, %.thread86.us.us.preheader214 ]
  %gep110.us.us = getelementptr i32, ptr %gep112.us, i64 %indvars.iv148
  %163 = load i32, ptr %gep110.us.us, align 4, !tbaa !11
  %164 = add nuw nsw i64 %indvars.iv148, %indvars.iv161
  %165 = getelementptr inbounds i32, ptr %95, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !11
  %167 = getelementptr inbounds i32, ptr %98, i64 %164
  %168 = load i32, ptr %167, align 4, !tbaa !11
  %gep108.us.us = getelementptr i32, ptr %invariant.gep.us, i64 %indvars.iv148
  %169 = load i32, ptr %gep108.us.us, align 4, !tbaa !11
  %170 = add i32 %168, %169
  %171 = sub i32 %166, %170
  %172 = add nsw i32 %163, %171
  %173 = zext i32 %172 to i64
  %174 = icmp eq i64 %88, %173
  %175 = zext i1 %174 to i32
  %spec.select.us.us = add nsw i32 %.170103.us.us, %175
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %176 = add nuw nsw i64 %indvars.iv.next149, %indvars.iv161
  %177 = icmp slt i64 %176, %sext159
  br i1 %177, label %.thread86.us.us, label %._crit_edge106.us, !llvm.loop !27

.split.us:                                        ; preds = %._crit_edge106.us
  %178 = icmp sgt i32 %.us-phi.us, 0
  br i1 %178, label %180, label %191

._crit_edge126:                                   ; preds = %191, %.loopexit95, %._crit_edge, %.preheader93
  br i1 %17, label %.loopexit90, label %.preheader89.preheader

.preheader89.preheader:                           ; preds = %._crit_edge126
  %179 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %16, i64 %14
  br label %.preheader89

180:                                              ; preds = %.split.us
  %181 = trunc nuw nsw i64 %indvars.iv.next162 to i32
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %181)
          to label %183 unwind label %189

183:                                              ; preds = %180
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef nonnull @.str.4)
          to label %185 unwind label %189

185:                                              ; preds = %183
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %184, i32 noundef %.us-phi.us)
          to label %187 unwind label %189

187:                                              ; preds = %185
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %186, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %._crit_edge164 unwind label %189

._crit_edge164:                                   ; preds = %187
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  %.pre165 = sext i32 %.pre to i64
  br label %191

189:                                              ; preds = %187, %185, %183, %180
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %197

191:                                              ; preds = %._crit_edge164, %.split.us
  %.pre-phi = phi i64 [ %.pre165, %._crit_edge164 ], [ %sext159, %.split.us ]
  %192 = phi i32 [ %.pre, %._crit_edge164 ], [ %87, %.split.us ]
  %193 = icmp slt i64 %indvars.iv.next162, %.pre-phi
  %indvar.next = add i64 %indvar, 1
  br i1 %193, label %.preheader92, label %._crit_edge126, !llvm.loop !28

.preheader89:                                     ; preds = %.preheader89.preheader, %.preheader89
  %194 = phi ptr [ %195, %.preheader89 ], [ %179, %.preheader89.preheader ]
  %195 = getelementptr inbounds i8, ptr %194, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %195) #8
  %196 = icmp eq ptr %195, %16
  br i1 %196, label %.loopexit90, label %.preheader89

.loopexit90:                                      ; preds = %.preheader89, %._crit_edge126
  call void @llvm.stackrestore.p0(ptr %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

197:                                              ; preds = %189, %36
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %190, %189 ]
  br i1 %17, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %197
  %198 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %16, i64 %14
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %199 = phi ptr [ %200, %.preheader ], [ %198, %.preheader.preheader ]
  %200 = getelementptr inbounds i8, ptr %199, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %200) #8
  %201 = icmp eq ptr %200, %16
  br i1 %201, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

; 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 #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; 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 #6 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)) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !14, !17}
!17 = !{!"llvm.loop.peeled.count", i32 1}
!18 = distinct !{!18, !14, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = distinct !{!20, !14, !17}
!21 = distinct !{!21, !14, !17, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !14, !17, !22, !23}
!25 = distinct !{!25, !14, !17, !23, !22}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14, !17, !23, !22}
!28 = distinct !{!28, !14}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass