; LLVM IR from seikhchilli/codeforces-solution :: 1569B (main)

; 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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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 i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i8, align 1
  %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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %24 = 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)
  br label %25

25:                                               ; preds = %288, %286, %0
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %2, align 4, !tbaa !8
  %28 = icmp ne i32 %26, 0
  br i1 %28, label %29, label %292

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  %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) %4)
          to label %32 unwind label %38

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %33

33:                                               ; preds = %58, %32
  %34 = load i32, ptr %8, align 4, !tbaa !8
  %35 = load i32, ptr %3, align 4, !tbaa !8
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %61

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %5, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %6, align 4
  br label %291

42:                                               ; preds = %33
  %43 = load i32, ptr %8, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %44)
          to label %46 unwind label %53

46:                                               ; preds = %42
  %47 = load i8, ptr %45, align 1, !tbaa !11
  %48 = sext i8 %47 to i32
  %49 = icmp eq i32 %48, 50
  br i1 %49, label %50, label %57

50:                                               ; preds = %46
  %51 = load i32, ptr %7, align 4, !tbaa !8
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %7, align 4, !tbaa !8
  br label %57

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

57:                                               ; preds = %50, %46
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %8, align 4, !tbaa !8
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %8, align 4, !tbaa !8
  br label %33, !llvm.loop !12

61:                                               ; preds = %37
  %62 = load i32, ptr %7, align 4, !tbaa !8
  %63 = icmp eq i32 %62, 1
  br i1 %63, label %67, label %64

64:                                               ; preds = %61
  %65 = load i32, ptr %7, align 4, !tbaa !8
  %66 = icmp eq i32 %65, 2
  br i1 %66, label %67, label %76

67:                                               ; preds = %64, %61
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %69 unwind label %72

69:                                               ; preds = %67
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %68, i8 noundef signext 10)
          to label %71 unwind label %72

71:                                               ; preds = %69
  store i32 2, ptr %9, align 4
  br label %286, !llvm.loop !14

72:                                               ; preds = %69, %67
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  br label %290

76:                                               ; preds = %64
  %77 = load i32, ptr %3, align 4, !tbaa !8
  %78 = zext i32 %77 to i64
  %79 = load i32, ptr %3, align 4, !tbaa !8
  %80 = zext i32 %79 to i64
  %81 = call ptr @llvm.stacksave.p0()
  store ptr %81, ptr %10, align 8
  %82 = mul nuw i64 %78, %80
  %83 = alloca i8, i64 %82, align 16
  store i64 %78, ptr %11, align 8
  store i64 %80, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %84

84:                                               ; preds = %232, %76
  %85 = load i32, ptr %14, align 4, !tbaa !8
  %86 = load i32, ptr %3, align 4, !tbaa !8
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %235

89:                                               ; preds = %84
  store i8 1, ptr %13, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %90 = load i32, ptr %14, align 4, !tbaa !8
  store i32 %90, ptr %15, align 4, !tbaa !8
  br label %91

91:                                               ; preds = %228, %89
  %92 = load i32, ptr %15, align 4, !tbaa !8
  %93 = load i32, ptr %3, align 4, !tbaa !8
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %231

96:                                               ; preds = %91
  %97 = load i32, ptr %14, align 4, !tbaa !8
  %98 = load i32, ptr %15, align 4, !tbaa !8
  %99 = icmp eq i32 %97, %98
  br i1 %99, label %100, label %108

100:                                              ; preds = %96
  %101 = load i32, ptr %14, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = mul nsw i64 %102, %80
  %104 = getelementptr inbounds i8, ptr %83, i64 %103
  %105 = load i32, ptr %15, align 4, !tbaa !8
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %104, i64 %106
  store i8 88, ptr %107, align 1, !tbaa !11
  br label %228

108:                                              ; preds = %96
  %109 = load i32, ptr %14, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %110)
          to label %112 unwind label %171

112:                                              ; preds = %108
  %113 = load i8, ptr %111, align 1, !tbaa !11
  %114 = sext i8 %113 to i32
  %115 = icmp eq i32 %114, 49
  br i1 %115, label %116, label %124

116:                                              ; preds = %112
  %117 = load i32, ptr %15, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %118)
          to label %120 unwind label %171

120:                                              ; preds = %116
  %121 = load i8, ptr %119, align 1, !tbaa !11
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 %122, 49
  br i1 %123, label %156, label %124

124:                                              ; preds = %120, %112
  %125 = load i32, ptr %14, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %126)
          to label %128 unwind label %171

128:                                              ; preds = %124
  %129 = load i8, ptr %127, align 1, !tbaa !11
  %130 = sext i8 %129 to i32
  %131 = icmp eq i32 %130, 49
  br i1 %131, label %132, label %140

132:                                              ; preds = %128
  %133 = load i32, ptr %15, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %134)
          to label %136 unwind label %171

136:                                              ; preds = %132
  %137 = load i8, ptr %135, align 1, !tbaa !11
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 %138, 50
  br i1 %139, label %156, label %140

140:                                              ; preds = %136, %128
  %141 = load i32, ptr %14, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %142)
          to label %144 unwind label %171

144:                                              ; preds = %140
  %145 = load i8, ptr %143, align 1, !tbaa !11
  %146 = sext i8 %145 to i32
  %147 = icmp eq i32 %146, 50
  br i1 %147, label %148, label %175

148:                                              ; preds = %144
  %149 = load i32, ptr %15, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %150)
          to label %152 unwind label %171

152:                                              ; preds = %148
  %153 = load i8, ptr %151, align 1, !tbaa !11
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 49
  br i1 %155, label %156, label %175

156:                                              ; preds = %152, %136, %120
  %157 = load i32, ptr %14, align 4, !tbaa !8
  %158 = sext i32 %157 to i64
  %159 = mul nsw i64 %158, %80
  %160 = getelementptr inbounds i8, ptr %83, i64 %159
  %161 = load i32, ptr %15, align 4, !tbaa !8
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  store i8 61, ptr %163, align 1, !tbaa !11
  %164 = load i32, ptr %15, align 4, !tbaa !8
  %165 = sext i32 %164 to i64
  %166 = mul nsw i64 %165, %80
  %167 = getelementptr inbounds i8, ptr %83, i64 %166
  %168 = load i32, ptr %14, align 4, !tbaa !8
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i8, ptr %167, i64 %169
  store i8 61, ptr %170, align 1, !tbaa !11
  br label %228

171:                                              ; preds = %183, %175, %148, %140, %132, %124, %116, %108
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %5, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %289

175:                                              ; preds = %152, %144
  %176 = load i32, ptr %14, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %177)
          to label %179 unwind label %171

179:                                              ; preds = %175
  %180 = load i8, ptr %178, align 1, !tbaa !11
  %181 = sext i8 %180 to i32
  %182 = icmp eq i32 %181, 50
  br i1 %182, label %183, label %225

183:                                              ; preds = %179
  %184 = load i32, ptr %15, align 4, !tbaa !8
  %185 = sext i32 %184 to i64
  %186 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %185)
          to label %187 unwind label %171

187:                                              ; preds = %183
  %188 = load i8, ptr %186, align 1, !tbaa !11
  %189 = sext i8 %188 to i32
  %190 = icmp eq i32 %189, 50
  br i1 %190, label %191, label %225

191:                                              ; preds = %187
  %192 = load i8, ptr %13, align 1, !tbaa !15, !range !17, !noundef !18
  %193 = trunc i8 %192 to i1
  br i1 %193, label %194, label %209

194:                                              ; preds = %191
  store i8 0, ptr %13, align 1, !tbaa !15
  %195 = load i32, ptr %14, align 4, !tbaa !8
  %196 = sext i32 %195 to i64
  %197 = mul nsw i64 %196, %80
  %198 = getelementptr inbounds i8, ptr %83, i64 %197
  %199 = load i32, ptr %15, align 4, !tbaa !8
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i8, ptr %198, i64 %200
  store i8 43, ptr %201, align 1, !tbaa !11
  %202 = load i32, ptr %15, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = mul nsw i64 %203, %80
  %205 = getelementptr inbounds i8, ptr %83, i64 %204
  %206 = load i32, ptr %14, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds i8, ptr %205, i64 %207
  store i8 45, ptr %208, align 1, !tbaa !11
  br label %224

209:                                              ; preds = %191
  %210 = load i32, ptr %14, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = mul nsw i64 %211, %80
  %213 = getelementptr inbounds i8, ptr %83, i64 %212
  %214 = load i32, ptr %15, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds i8, ptr %213, i64 %215
  store i8 45, ptr %216, align 1, !tbaa !11
  %217 = load i32, ptr %15, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = mul nsw i64 %218, %80
  %220 = getelementptr inbounds i8, ptr %83, i64 %219
  %221 = load i32, ptr %14, align 4, !tbaa !8
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %220, i64 %222
  store i8 43, ptr %223, align 1, !tbaa !11
  br label %224

224:                                              ; preds = %209, %194
  br label %228

225:                                              ; preds = %187, %179
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227, %224, %156, %100
  %229 = load i32, ptr %15, align 4, !tbaa !8
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %15, align 4, !tbaa !8
  br label %91, !llvm.loop !19

231:                                              ; preds = %95
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %14, align 4, !tbaa !8
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %14, align 4, !tbaa !8
  br label %84, !llvm.loop !20

235:                                              ; preds = %88
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %237 unwind label %245

237:                                              ; preds = %235
  %238 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %236, i8 noundef signext 10)
          to label %239 unwind label %245

239:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %240

240:                                              ; preds = %276, %239
  %241 = load i32, ptr %16, align 4, !tbaa !8
  %242 = load i32, ptr %3, align 4, !tbaa !8
  %243 = icmp slt i32 %241, %242
  br i1 %243, label %249, label %244

244:                                              ; preds = %240
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %284

245:                                              ; preds = %237, %235
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %5, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %6, align 4
  br label %289

249:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %250

250:                                              ; preds = %266, %249
  %251 = load i32, ptr %17, align 4, !tbaa !8
  %252 = load i32, ptr %3, align 4, !tbaa !8
  %253 = icmp slt i32 %251, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %273

255:                                              ; preds = %250
  %256 = load i32, ptr %16, align 4, !tbaa !8
  %257 = sext i32 %256 to i64
  %258 = mul nsw i64 %257, %80
  %259 = getelementptr inbounds i8, ptr %83, i64 %258
  %260 = load i32, ptr %17, align 4, !tbaa !8
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds i8, ptr %259, i64 %261
  %263 = load i8, ptr %262, align 1, !tbaa !11
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %263)
          to label %265 unwind label %269

265:                                              ; preds = %255
  br label %266

266:                                              ; preds = %265
  %267 = load i32, ptr %17, align 4, !tbaa !8
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %17, align 4, !tbaa !8
  br label %250, !llvm.loop !21

269:                                              ; preds = %255
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %5, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %283

273:                                              ; preds = %254
  %274 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %275 unwind label %279

275:                                              ; preds = %273
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %16, align 4, !tbaa !8
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %16, align 4, !tbaa !8
  br label %240, !llvm.loop !22

279:                                              ; preds = %273
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %5, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %6, align 4
  br label %283

283:                                              ; preds = %279, %269
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %289

284:                                              ; preds = %244
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  %285 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %285)
  store i32 0, ptr %9, align 4
  br label %286

286:                                              ; preds = %284, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %287 = load i32, ptr %9, align 4
  switch i32 %287, label %299 [
    i32 0, label %288
    i32 2, label %25
  ]

288:                                              ; preds = %286
  br label %25, !llvm.loop !14

289:                                              ; preds = %283, %245, %171
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %290

290:                                              ; preds = %289, %72, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %291

291:                                              ; preds = %290, %38
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %294

292:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %293 = load i32, ptr %1, align 4
  ret i32 %293

294:                                              ; preds = %291
  %295 = load ptr, ptr %5, align 8
  %296 = load i32, ptr %6, align 4
  %297 = insertvalue { ptr, i32 } poison, ptr %295, 0
  %298 = insertvalue { ptr, i32 } %297, i32 %296, 1
  resume { ptr, i32 } %298

299:                                              ; preds = %286
  unreachable
}

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

; 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: 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: 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

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

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

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

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 = { 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 #5 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13}


; 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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %10 = 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)
  %11 = load i32, ptr %1, align 4, !tbaa !8
  %12 = add nsw i32 %11, -1
  store i32 %12, ptr %1, align 4, !tbaa !8
  %.not86 = icmp eq i32 %11, 0
  br i1 %.not86, label %._crit_edge89, label %.lr.ph88

.lr.ph88:                                         ; preds = %0, %122
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %13 = 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)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %14 = 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) %3)
          to label %.preheader67 unwind label %18

.preheader67:                                     ; preds = %.lr.ph88
  %15 = load i32, ptr %2, align 4, !tbaa !8
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge.thread

._crit_edge:                                      ; preds = %.lr.ph
  %17 = add nsw i32 %spec.select, -1
  %or.cond = icmp ult i32 %17, 2
  br i1 %or.cond, label %27, label %._crit_edge.thread

18:                                               ; preds = %.lr.ph88
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %125

.lr.ph:                                           ; preds = %.preheader67, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader67 ]
  %.05669 = phi i32 [ %spec.select, %.lr.ph ], [ 0, %.preheader67 ]
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
  %21 = load i8, ptr %20, align 1, !tbaa !11
  %22 = icmp eq i8 %21, 50
  %23 = zext i1 %22 to i32
  %spec.select = add nuw nsw i32 %.05669, %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !12

27:                                               ; preds = %._crit_edge
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %29 unwind label %31

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %28, i8 noundef signext 10)
          to label %122 unwind label %31, !llvm.loop !14

31:                                               ; preds = %29, %27
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %125

._crit_edge.thread:                               ; preds = %.preheader67, %._crit_edge
  %.lcssa106 = phi i32 [ %24, %._crit_edge ], [ %15, %.preheader67 ]
  %33 = zext i32 %.lcssa106 to i64
  %34 = call ptr @llvm.stacksave.p0()
  %35 = mul nuw i64 %33, %33
  %36 = alloca i8, i64 %35, align 16
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.preheader65, label %._crit_edge80

.preheader65:                                     ; preds = %._crit_edge.thread, %._crit_edge74
  %39 = phi i32 [ %46, %._crit_edge74 ], [ %37, %._crit_edge.thread ]
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %._crit_edge74 ], [ 0, %._crit_edge.thread ]
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv92, %40
  br i1 %41, label %.lr.ph73, label %._crit_edge74

.lr.ph73:                                         ; preds = %.preheader65
  %42 = mul nuw nsw i64 %indvars.iv92, %33
  %43 = getelementptr inbounds i8, ptr %36, i64 %42
  %invariant.gep = getelementptr inbounds i8, ptr %36, i64 %indvars.iv92
  %44 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv92
  br label %48

._crit_edge80:                                    ; preds = %._crit_edge74, %._crit_edge.thread
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %95 unwind label %103

._crit_edge74.loopexit:                           ; preds = %91
  %.pre = sext i32 %92 to i64
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %._crit_edge74.loopexit, %.preheader65
  %.pre-phi = phi i64 [ %.pre, %._crit_edge74.loopexit ], [ %40, %.preheader65 ]
  %46 = phi i32 [ %92, %._crit_edge74.loopexit ], [ %39, %.preheader65 ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %47 = icmp slt i64 %indvars.iv.next93, %.pre-phi
  br i1 %47, label %.preheader65, label %._crit_edge80, !llvm.loop !15

48:                                               ; preds = %.lr.ph73, %91
  %indvars.iv94 = phi i64 [ %indvars.iv92, %.lr.ph73 ], [ %indvars.iv.next95, %91 ]
  %.04971 = phi i1 [ true, %.lr.ph73 ], [ %.1, %91 ]
  %49 = icmp eq i64 %indvars.iv92, %indvars.iv94
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  store i8 88, ptr %44, align 1, !tbaa !11
  br label %91

51:                                               ; preds = %48
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv92)
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = icmp eq i8 %53, 49
  br i1 %54, label %55, label %59

55:                                               ; preds = %51
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv94)
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = icmp eq i8 %57, 49
  br i1 %58, label %75, label %59

59:                                               ; preds = %55, %51
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv92)
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = icmp eq i8 %61, 49
  br i1 %62, label %63, label %67

63:                                               ; preds = %59
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv94)
  %65 = load i8, ptr %64, align 1, !tbaa !11
  %66 = icmp eq i8 %65, 50
  br i1 %66, label %75, label %67

67:                                               ; preds = %63, %59
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv92)
  %69 = load i8, ptr %68, align 1, !tbaa !11
  %70 = icmp eq i8 %69, 50
  br i1 %70, label %71, label %78

71:                                               ; preds = %67
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv94)
  %73 = load i8, ptr %72, align 1, !tbaa !11
  %74 = icmp eq i8 %73, 49
  br i1 %74, label %75, label %78

75:                                               ; preds = %71, %63, %55
  %76 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv94
  store i8 61, ptr %76, align 1, !tbaa !11
  %77 = mul nuw nsw i64 %indvars.iv94, %33
  %gep78 = getelementptr inbounds i8, ptr %invariant.gep, i64 %77
  store i8 61, ptr %gep78, align 1, !tbaa !11
  br label %91

78:                                               ; preds = %71, %67
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv92)
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = icmp eq i8 %80, 50
  br i1 %81, label %82, label %91

82:                                               ; preds = %78
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv94)
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = icmp eq i8 %84, 50
  br i1 %85, label %86, label %91

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv94
  %88 = mul nuw nsw i64 %indvars.iv94, %33
  %gep76 = getelementptr inbounds i8, ptr %invariant.gep, i64 %88
  br i1 %.04971, label %89, label %90

89:                                               ; preds = %86
  store i8 43, ptr %87, align 1, !tbaa !11
  store i8 45, ptr %gep76, align 1, !tbaa !11
  br label %91

90:                                               ; preds = %86
  store i8 45, ptr %87, align 1, !tbaa !11
  store i8 43, ptr %gep76, align 1, !tbaa !11
  br label %91

91:                                               ; preds = %78, %82, %89, %90, %75, %50
  %.1 = phi i1 [ %.04971, %50 ], [ %.04971, %75 ], [ false, %89 ], [ false, %90 ], [ %.04971, %82 ], [ %.04971, %78 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %92 = load i32, ptr %2, align 4, !tbaa !8
  %93 = trunc nuw i64 %indvars.iv.next95 to i32
  %94 = icmp sgt i32 %92, %93
  br i1 %94, label %48, label %._crit_edge74.loopexit, !llvm.loop !16

95:                                               ; preds = %._crit_edge80
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %45, i8 noundef signext 10)
          to label %.preheader66 unwind label %103

.preheader66:                                     ; preds = %95
  %97 = load i32, ptr %2, align 4, !tbaa !8
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.preheader, label %._crit_edge85

.preheader:                                       ; preds = %.preheader66, %116
  %99 = phi i32 [ %117, %116 ], [ %97, %.preheader66 ]
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %116 ], [ 0, %.preheader66 ]
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %.lr.ph82, label %._crit_edge83

.lr.ph82:                                         ; preds = %.preheader
  %101 = mul nuw nsw i64 %indvars.iv100, %33
  %102 = getelementptr inbounds i8, ptr %36, i64 %101
  br label %106

._crit_edge85:                                    ; preds = %116, %.preheader66
  call void @llvm.stackrestore.p0(ptr %34)
  br label %122

103:                                              ; preds = %95, %._crit_edge80
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %125

._crit_edge83:                                    ; preds = %110, %.preheader
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %116 unwind label %120

106:                                              ; preds = %.lr.ph82, %110
  %indvars.iv97 = phi i64 [ 0, %.lr.ph82 ], [ %indvars.iv.next98, %110 ]
  %107 = getelementptr inbounds i8, ptr %102, i64 %indvars.iv97
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %108)
          to label %110 unwind label %114

110:                                              ; preds = %106
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %111 = load i32, ptr %2, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = icmp slt i64 %indvars.iv.next98, %112
  br i1 %113, label %106, label %._crit_edge83, !llvm.loop !17

114:                                              ; preds = %106
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %125

116:                                              ; preds = %._crit_edge83
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %117 = load i32, ptr %2, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = icmp slt i64 %indvars.iv.next101, %118
  br i1 %119, label %.preheader, label %._crit_edge85, !llvm.loop !18

120:                                              ; preds = %._crit_edge83
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %125

122:                                              ; preds = %29, %._crit_edge85
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %123 = load i32, ptr %1, align 4, !tbaa !8
  %124 = add nsw i32 %123, -1
  store i32 %124, ptr %1, align 4, !tbaa !8
  %.not = icmp eq i32 %123, 0
  br i1 %.not, label %._crit_edge89, label %.lr.ph88

125:                                              ; preds = %31, %114, %120, %103, %18
  %.pn62.pn = phi { ptr, i32 } [ %19, %18 ], [ %32, %31 ], [ %104, %103 ], [ %115, %114 ], [ %121, %120 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn62.pn

._crit_edge89:                                    ; preds = %122, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

; 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 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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

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

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

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 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass